From 6c0232b9a34d1680cf3d0f1e383edb6f8aa4dffa Mon Sep 17 00:00:00 2001 From: Nikolay Volf Date: Wed, 19 Feb 2020 13:38:40 +0300 Subject: [PATCH 001/106] wasm per block size bench (#4982) --- bin/node/testing/benches/import.rs | 47 +++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/bin/node/testing/benches/import.rs b/bin/node/testing/benches/import.rs index f8cbbec79d5..d0ec993655c 100644 --- a/bin/node/testing/benches/import.rs +++ b/bin/node/testing/benches/import.rs @@ -28,7 +28,9 @@ //! to much configuring - just block full of randomized transactions. //! It is not supposed to measure runtime modules weight correctness +use std::fmt; use node_testing::bench::{BenchDb, Profile}; +use node_primitives::Block; use sp_runtime::generic::BlockId; use criterion::{Criterion, criterion_group, criterion_main}; use sc_client_api::backend::Backend; @@ -38,12 +40,17 @@ criterion_group!( config = Criterion::default().sample_size(50).warm_up_time(std::time::Duration::from_secs(20)); targets = bench_block_import ); +criterion_group!( + name = wasm_size; + config = Criterion::default().sample_size(10); + targets = bench_wasm_size_import +); criterion_group!( name = profile; config = Criterion::default().sample_size(10); targets = profile_block_import ); -criterion_main!(benches, profile); +criterion_main!(benches, profile, wasm_size); fn bench_block_import(c: &mut Criterion) { sc_cli::init_logger(""); @@ -139,3 +146,41 @@ fn profile_block_import(c: &mut Criterion) { }, ); } + +struct Setup { + db: BenchDb, + block: Block, +} + +impl fmt::Debug for Setup { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "Setup: {} tx/block", self.block.extrinsics.len()) + } +} + +fn bench_wasm_size_import(c: &mut Criterion) { + sc_cli::init_logger(""); + + let mut setups = Vec::new(); + + for block_size in 5..15 { + let mut db = BenchDb::new(block_size*50); + let block = db.generate_block(block_size * 50); + setups.push(Setup { db, block }); + } + + c.bench_function_over_inputs("wasm_size_import", + move |bencher, setup| { + bencher.iter_batched( + || { + setup.db.create_context(Profile::Wasm) + }, + |mut context| { + context.import_block(setup.block.clone()); + }, + criterion::BatchSize::PerIteration, + ); + }, + setups, + ); +} \ No newline at end of file -- GitLab From ebd4243487e6fbc7b19caab03a2759fa08285938 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Wed, 19 Feb 2020 15:36:24 +0100 Subject: [PATCH 002/106] Introduce Prometheus metric endpoint replacing Grafana endpoint (#4981) * Refactor rebase master prometheus_v0.3 * Milestone1: Final Version of v0.3 * no-std or warm compatibility issues, grapana-data -source code reference and correction,applicable * Cargo.lock paritytech/master rebase * prometheus networking.rs del, grafana-data-source networking.rs pub edit and note * chore: reflect various feedback * Spaces to tabs. * Replace grafana and tidy * Add generics * Add photo back * Re-fix spaces in primitives/consensus/babe/src/inherents.rs * Refactor rebase master prometheus_v0.3 * Milestone1: Final Version of v0.3 * no-std or warm compatibility issues, grapana-data -source code reference and correction,applicable * prometheus networking.rs del, grafana-data-source networking.rs pub edit and note * chore: reflect various feedback * Replace grafana and tidy * Add generics * Add photo back * Re-fix spaces in primitives/consensus/babe/src/inherents.rs * chore: revert this file back to paritytech/master inherents.rs. * Add newline at EOF * Tidy * Use local registry * fix typo Co-Authored-By: Max Inden * chore: Apply review feedback * endpoint -> exporter * fix readme * Remove lazy_static, use ServiceMetrics struct instead * Switch to using GaugeVecs * chore: without nightly , edit README * block_height -> block_height_number * Switch to a ready_transactions_number gauge * Update utils/prometheus/src/lib.rs Co-Authored-By: Max Inden * no-prometheus flag add * /metrics url Input check * remove prometheus in Tracing * remove prometheus in Tracing * chore: master code rebase edit * gitlab-check-web-wasm edit code * From:from and cargo.lock update * with_prometheus_registry add background_tasks * utils/prometheus/src/lib.rs: Restructure #[cfg] for wasm without hyper Given that Hyper is not compatible with WASM targets it needs to be excluded from WASM builds. Instead of introducing #[cfg] lines throughout the crate, this patch splits the crate into two: known_os and unknown_os (WASM). * utils/prometheus/src/lib.rs: Feature gate known_os module * client/cli/src/lib.rs: Re-add newline at end of file Co-authored-by: JeseonLEE Co-authored-by: Gavin Wood Co-authored-by: Ashley Co-authored-by: Hyungsuk Kang --- Cargo.lock | 147 ++++++++++------ Cargo.toml | 3 +- client/cli/Cargo.toml | 1 + client/cli/src/lib.rs | 15 +- client/cli/src/params.rs | 20 ++- client/service/Cargo.toml | 4 +- client/service/src/builder.rs | 144 +++++++++++---- client/service/src/config.rs | 6 +- client/service/src/error.rs | 6 + client/service/test/src/lib.rs | 2 +- client/tracing/Cargo.toml | 1 - client/tracing/src/lib.rs | 12 +- utils/grafana-data-source/src/database.rs | 154 ---------------- utils/grafana-data-source/src/lib.rs | 100 ----------- utils/grafana-data-source/src/server.rs | 164 ------------------ utils/grafana-data-source/src/types.rs | 50 ------ utils/grafana-data-source/test/Cargo.toml | 13 -- utils/grafana-data-source/test/src/main.rs | 44 ----- .../Cargo.toml | 11 +- utils/prometheus/README.md | 16 ++ utils/prometheus/src/lib.rs | 144 +++++++++++++++ .../src/networking.rs | 0 22 files changed, 409 insertions(+), 648 deletions(-) delete mode 100644 utils/grafana-data-source/src/database.rs delete mode 100644 utils/grafana-data-source/src/lib.rs delete mode 100644 utils/grafana-data-source/src/server.rs delete mode 100644 utils/grafana-data-source/src/types.rs delete mode 100644 utils/grafana-data-source/test/Cargo.toml delete mode 100644 utils/grafana-data-source/test/src/main.rs rename utils/{grafana-data-source => prometheus}/Cargo.toml (64%) create mode 100644 utils/prometheus/README.md create mode 100644 utils/prometheus/src/lib.rs rename utils/{grafana-data-source => prometheus}/src/networking.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index f518377d62b..db15cbe5919 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -446,6 +446,12 @@ dependencies = [ "wasm-bindgen-futures", ] +[[package]] +name = "bs58" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c95ee6bba9d950218b6cc910cf62bc9e0a171d0f4537e3627b0f54d08549b188" + [[package]] name = "bs58" version = "0.3.0" @@ -610,7 +616,6 @@ dependencies = [ "js-sys", "num-integer", "num-traits", - "serde", "time", "wasm-bindgen", ] @@ -1952,34 +1957,6 @@ dependencies = [ "scroll", ] -[[package]] -name = "grafana-data-source" -version = "0.8.0" -dependencies = [ - "async-std", - "chrono", - "derive_more", - "futures-timer 3.0.1", - "futures-util", - "hyper 0.13.2", - "lazy_static", - "log 0.4.8", - "parking_lot 0.10.0", - "serde", - "serde_json", - "tokio 0.2.11", -] - -[[package]] -name = "grafana-data-source-test" -version = "2.0.0" -dependencies = [ - "futures 0.3.4", - "futures-timer 3.0.1", - "grafana-data-source", - "rand 0.7.3", -] - [[package]] name = "h2" version = "0.1.26" @@ -2687,8 +2664,8 @@ dependencies = [ "libp2p-wasm-ext", "libp2p-websocket", "libp2p-yamux", - "parity-multiaddr", - "parity-multihash", + "parity-multiaddr 0.7.2", + "parity-multihash 0.2.3", "parking_lot 0.10.0", "pin-project", "smallvec 1.2.0", @@ -2702,7 +2679,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b874594c4b29de1a29f27871feba8e6cd13aa54a8a1e8f8c7cf3dfac5ca287c" dependencies = [ "asn1_der", - "bs58", + "bs58 0.3.0", "ed25519-dalek", "fnv", "futures 0.3.4", @@ -2711,8 +2688,8 @@ dependencies = [ "libsecp256k1", "log 0.4.8", "multistream-select", - "parity-multiaddr", - "parity-multihash", + "parity-multiaddr 0.7.2", + "parity-multihash 0.2.3", "parking_lot 0.10.0", "pin-project", "prost", @@ -2723,7 +2700,7 @@ dependencies = [ "sha2", "smallvec 1.2.0", "thiserror", - "unsigned-varint", + "unsigned-varint 0.3.0", "void", "zeroize 1.1.0", ] @@ -2798,7 +2775,7 @@ dependencies = [ "rand 0.7.3", "sha2", "smallvec 1.2.0", - "unsigned-varint", + "unsigned-varint 0.3.0", "wasm-timer", ] @@ -2833,14 +2810,14 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log 0.4.8", - "parity-multihash", + "parity-multihash 0.2.3", "prost", "prost-build", "rand 0.7.3", "sha2", "smallvec 1.2.0", "uint", - "unsigned-varint", + "unsigned-varint 0.3.0", "void", "wasm-timer", ] @@ -2880,7 +2857,7 @@ dependencies = [ "libp2p-core", "log 0.4.8", "parking_lot 0.10.0", - "unsigned-varint", + "unsigned-varint 0.3.0", ] [[package]] @@ -2933,7 +2910,7 @@ dependencies = [ "prost", "prost-build", "rw-stream-sink", - "unsigned-varint", + "unsigned-varint 0.3.0", "void", ] @@ -3334,7 +3311,7 @@ dependencies = [ "log 0.4.8", "smallvec 1.2.0", "tokio-io", - "unsigned-varint", + "unsigned-varint 0.3.0", ] [[package]] @@ -4576,6 +4553,24 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c276d76c5333b8c2579e02d49a06733a55b8282d2d9b13e8d53b6406bd7e30a" +[[package]] +name = "parity-multiaddr" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "045b3c7af871285146300da35b1932bb6e4639b66c7c98e85d06a32cbc4e8fa7" +dependencies = [ + "arrayref", + "bs58 0.2.5", + "byteorder 1.3.4", + "bytes 0.4.12", + "data-encoding", + "parity-multihash 0.1.3", + "percent-encoding 1.0.1", + "serde", + "unsigned-varint 0.2.3", + "url 1.7.2", +] + [[package]] name = "parity-multiaddr" version = "0.7.2" @@ -4583,17 +4578,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26df883298bc3f4e92528b4c5cc9f806b791955b136da3e5e939ed9de0fd958b" dependencies = [ "arrayref", - "bs58", + "bs58 0.3.0", "byteorder 1.3.4", "data-encoding", - "parity-multihash", + "parity-multihash 0.2.3", "percent-encoding 2.1.0", "serde", "static_assertions", - "unsigned-varint", + "unsigned-varint 0.3.0", "url 2.1.1", ] +[[package]] +name = "parity-multihash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3a17dc27848fd99e4f87eb0f8c9baba6ede0a6d555400c850ca45254ef4ce3" +dependencies = [ + "blake2", + "bytes 0.4.12", + "rand 0.6.5", + "sha-1", + "sha2", + "sha3", + "unsigned-varint 0.2.3", +] + [[package]] name = "parity-multihash" version = "0.2.3" @@ -4606,7 +4616,7 @@ dependencies = [ "sha-1", "sha2", "sha3", - "unsigned-varint", + "unsigned-varint 0.3.0", ] [[package]] @@ -4980,6 +4990,33 @@ dependencies = [ "unicode-xid 0.2.0", ] +[[package]] +name = "prometheus" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5567486d5778e2c6455b1b90ff1c558f29e751fc018130fa182e15828e728af1" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "protobuf", + "quick-error", + "spin", +] + +[[package]] +name = "prometheus-exporter" +version = "0.8.0" +dependencies = [ + "async-std", + "derive_more", + "futures-util", + "hyper 0.13.2", + "log 0.4.8", + "prometheus", + "tokio 0.2.11", +] + [[package]] name = "prost" version = "0.6.1" @@ -5031,6 +5068,12 @@ dependencies = [ "prost", ] +[[package]] +name = "protobuf" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6686ddd96a8dbe2687b5f2a687b2cfb520854010ec480f2d74c32e7c9873d3c5" + [[package]] name = "pwasm-utils" version = "0.12.0" @@ -5668,6 +5711,7 @@ dependencies = [ "log 0.4.8", "names", "parity-util-mem", + "prometheus-exporter", "regex", "rpassword", "sc-client-api", @@ -6201,7 +6245,7 @@ dependencies = [ "substrate-test-runtime-client", "tempfile", "thiserror", - "unsigned-varint", + "unsigned-varint 0.3.0", "void", "wasm-timer", "zeroize 1.1.0", @@ -6389,13 +6433,13 @@ dependencies = [ "futures 0.3.4", "futures-diagnose", "futures-timer 3.0.1", - "grafana-data-source", "lazy_static", "log 0.4.8", - "parity-multiaddr", + "parity-multiaddr 0.5.0", "parity-scale-codec", "parity-util-mem", "parking_lot 0.10.0", + "prometheus-exporter", "sc-chain-spec", "sc-client", "sc-client-api", @@ -6489,7 +6533,6 @@ name = "sc-tracing" version = "2.0.0" dependencies = [ "erased-serde", - "grafana-data-source", "log 0.4.8", "parking_lot 0.10.0", "sc-telemetry", @@ -8496,6 +8539,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +[[package]] +name = "unsigned-varint" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7f0023a96687fe169081e8adce3f65e3874426b7886e9234d490af2dc077959" + [[package]] name = "unsigned-varint" version = "0.3.0" diff --git a/Cargo.toml b/Cargo.toml index 2dc0c8926cb..350d9eafa4f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,9 +53,8 @@ members = [ "client/telemetry", "client/transaction-pool", "client/transaction-pool/graph", + "utils/prometheus", "utils/wasm-builder-runner", - "utils/grafana-data-source", - "utils/grafana-data-source/test", "frame/assets", "frame/aura", "frame/authority-discovery", diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index e176894d64c..66b0a9a9b88 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -31,6 +31,7 @@ sp-core = { version = "2.0.0", path = "../../primitives/core" } sc-service = { version = "0.8", default-features = false, path = "../service" } sp-state-machine = { version = "0.8", path = "../../primitives/state-machine" } sc-telemetry = { version = "2.0.0", path = "../telemetry" } +prometheus-exporter = { path = "../../utils/prometheus" } sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" } names = "0.11.0" structopt = "0.3.8" diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 6259c0a21b3..3517dca3789 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -623,13 +623,6 @@ where config.rpc_ws = Some(parse_address(&format!("{}:{}", ws_interface, 9944), cli.ws_port)?); } - if config.grafana_port.is_none() || cli.grafana_port.is_some() { - let grafana_interface: &str = if cli.grafana_external { "0.0.0.0" } else { "127.0.0.1" }; - config.grafana_port = Some( - parse_address(&format!("{}:{}", grafana_interface, 9955), cli.grafana_port)? - ); - } - config.rpc_ws_max_connections = cli.ws_max_connections; config.rpc_cors = cli.rpc_cors.unwrap_or_else(|| if is_dev { log::warn!("Running in --dev mode, RPC CORS has been disabled."); @@ -651,6 +644,14 @@ where } else if !cli.telemetry_endpoints.is_empty() { config.telemetry_endpoints = Some(TelemetryEndpoints::new(cli.telemetry_endpoints)); } + // Override prometheus + if cli.no_prometheus { + config.prometheus_port = None; + } else { + let prometheus_interface: &str = if cli.prometheus_external { "0.0.0.0" } else { "127.0.0.1" }; + config.prometheus_port = Some( + parse_address(&format!("{}:{}", prometheus_interface, 9615), cli.prometheus_port)?); + } config.tracing_targets = cli.import_params.tracing_targets.into(); config.tracing_receiver = cli.import_params.tracing_receiver.into(); diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index aaa46c0f638..a1a8b9c5b4f 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -337,7 +337,6 @@ arg_enum! { pub enum TracingReceiver { Log, Telemetry, - Grafana, } } @@ -346,7 +345,6 @@ impl Into for TracingReceiver { match self { TracingReceiver::Log => sc_tracing::TracingReceiver::Log, TracingReceiver::Telemetry => sc_tracing::TracingReceiver::Telemetry, - TracingReceiver::Grafana => sc_tracing::TracingReceiver::Grafana, } } } @@ -486,11 +484,11 @@ pub struct RunCmd { #[structopt(long = "unsafe-ws-external")] pub unsafe_ws_external: bool, - /// Listen to all Grafana data source interfaces. + /// Listen to all Prometheus endpoint interfaces. /// /// Default is local. - #[structopt(long = "grafana-external")] - pub grafana_external: bool, + #[structopt(long = "prometheus-external")] + pub prometheus_external: bool, /// Specify HTTP RPC server TCP port. #[structopt(long = "rpc-port", value_name = "PORT")] @@ -514,9 +512,15 @@ pub struct RunCmd { #[structopt(long = "rpc-cors", value_name = "ORIGINS", parse(try_from_str = parse_cors))] pub rpc_cors: Option, - /// Specify Grafana data source server TCP Port. - #[structopt(long = "grafana-port", value_name = "PORT")] - pub grafana_port: Option, + /// Specify Prometheus endpoint TCP Port. + #[structopt(long = "prometheus-port", value_name = "PORT")] + pub prometheus_port: Option, + + /// Do not expose a Prometheus metric endpoint. + /// + /// Prometheus metric endpoint is enabled by default. + #[structopt(long = "no-prometheus")] + pub no_prometheus: bool, /// The human-readable name for this node. /// diff --git a/client/service/Cargo.toml b/client/service/Cargo.toml index 1e781aa6956..feaa4e3e685 100644 --- a/client/service/Cargo.toml +++ b/client/service/Cargo.toml @@ -52,8 +52,8 @@ sc-rpc-server = { version = "2.0.0", path = "../rpc-servers" } sc-rpc = { version = "2.0.0", path = "../rpc" } sc-telemetry = { version = "2.0.0", path = "../telemetry" } sc-offchain = { version = "2.0.0", path = "../offchain" } -parity-multiaddr = { package = "parity-multiaddr", version = "0.7.1" } -grafana-data-source = { version = "0.8", path = "../../utils/grafana-data-source" } +parity-multiaddr = { package = "parity-multiaddr", version = "0.5.0" } +prometheus-exporter = { path = "../../utils/prometheus" } sc-tracing = { version = "2.0.0", path = "../tracing" } tracing = "0.1.10" parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index c67551afa35..9dee787f500 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -39,7 +39,7 @@ use sc_network::{config::BoxFinalityProofRequestBuilder, specialization::Network use parking_lot::{Mutex, RwLock}; use sp_runtime::generic::BlockId; use sp_runtime::traits::{ - Block as BlockT, NumberFor, SaturatedConversion, HasherFor, + Block as BlockT, NumberFor, SaturatedConversion, HasherFor, UniqueSaturatedInto, }; use sp_api::ProvideRuntimeApi; use sc_executor::{NativeExecutor, NativeExecutionDispatch}; @@ -53,7 +53,43 @@ use sysinfo::{get_current_pid, ProcessExt, System, SystemExt}; use sc_telemetry::{telemetry, SUBSTRATE_INFO}; use sp_transaction_pool::{MaintainedTransactionPool, ChainEvent}; use sp_blockchain; -use grafana_data_source::{self, record_metrics}; +use prometheus_exporter::{register, Gauge, U64, F64, Registry, PrometheusError, Opts, GaugeVec}; + +struct ServiceMetrics { + block_height_number: GaugeVec, + peers_count: Gauge, + ready_transactions_number: Gauge, + memory_usage_bytes: Gauge, + cpu_usage_percentage: Gauge, + network_per_sec_bytes: GaugeVec, +} + +impl ServiceMetrics { + fn register(registry: &Registry) -> Result { + Ok(Self { + block_height_number: register(GaugeVec::new( + Opts::new("block_height_number", "Height of the chain"), + &["status"] + )?, registry)?, + peers_count: register(Gauge::new( + "peers_count", "Number of network gossip peers", + )?, registry)?, + ready_transactions_number: register(Gauge::new( + "ready_transactions_number", "Number of transactions in the ready queue", + )?, registry)?, + memory_usage_bytes: register(Gauge::new( + "memory_usage_bytes", "Node memory usage", + )?, registry)?, + cpu_usage_percentage: register(Gauge::new( + "cpu_usage_percentage", "Node CPU usage", + )?, registry)?, + network_per_sec_bytes: register(GaugeVec::new( + Opts::new("network_per_sec_bytes", "Networking bytes per second"), + &["direction"] + )?, registry)?, + }) + } +} pub type BackgroundTask = Pin + Send>>; @@ -93,6 +129,7 @@ pub struct ServiceBuilder>>, marker: PhantomData<(TBl, TRtApi)>, background_tasks: Vec<(&'static str, BackgroundTask)>, + prometheus_registry: Option } /// Full client type. @@ -270,6 +307,7 @@ where TGen: RuntimeGenesis, TCSExt: Extension { remote_backend: None, background_tasks: Default::default(), marker: PhantomData, + prometheus_registry: None, }) } @@ -356,6 +394,7 @@ where TGen: RuntimeGenesis, TCSExt: Extension { remote_backend: Some(remote_blockchain), background_tasks: Default::default(), marker: PhantomData, + prometheus_registry: None, }) } } @@ -429,6 +468,7 @@ impl Self { + Self { + config: self.config, + client: self.client, + backend: self.backend, + keystore: self.keystore, + fetcher: self.fetcher, + select_chain: self.select_chain, + import_queue: self.import_queue, + finality_proof_request_builder: self.finality_proof_request_builder, + finality_proof_provider: self.finality_proof_provider, + network_protocol: self.network_protocol, + transaction_pool: self.transaction_pool, + rpc_extensions: self.rpc_extensions, + remote_backend: self.remote_backend, + background_tasks: self.background_tasks, + marker: self.marker, + prometheus_registry: Some(registry), + } + } } /// Implemented on `ServiceBuilder`. Allows running block commands, such as import/export/validate @@ -807,6 +875,7 @@ ServiceBuilder< rpc_extensions, remote_backend, background_tasks, + prometheus_registry, } = self; sp_session::generate_initial_session_keys( @@ -998,6 +1067,30 @@ ServiceBuilder< )); } + // Prometheus exporter and metrics + let metrics = if let Some(port) = config.prometheus_port { + let registry = match prometheus_registry { + Some(registry) => registry, + None => Registry::new_custom(Some("substrate".into()), None)? + }; + + let metrics = ServiceMetrics::register(®istry)?; + + let future = select( + prometheus_exporter::init_prometheus(port, registry).boxed(), + exit.clone() + ).map(drop); + + let _ = to_spawn_tx.unbounded_send(( + Box::pin(future), + From::from("prometheus-endpoint") + )); + + Some(metrics) + } else { + None + }; + // Periodically notify the telemetry. let transaction_pool_ = transaction_pool.clone(); let client_ = client.clone(); @@ -1014,6 +1107,8 @@ ServiceBuilder< let finalized_number: u64 = info.chain.finalized_number.saturated_into::(); let bandwidth_download = net_status.average_download_per_sec; let bandwidth_upload = net_status.average_upload_per_sec; + let best_seen_block = net_status.best_seen_block + .map(|num: NumberFor| num.unique_saturated_into() as u64); // get cpu usage and memory usage of this process let (cpu_usage, memory) = if let Some(self_pid) = self_pid { @@ -1042,25 +1137,22 @@ ServiceBuilder< "disk_read_per_sec" => info.usage.as_ref().map(|usage| usage.io.bytes_read).unwrap_or(0), "disk_write_per_sec" => info.usage.as_ref().map(|usage| usage.io.bytes_written).unwrap_or(0), ); - #[cfg(not(target_os = "unknown"))] - let memory_transaction_pool = parity_util_mem::malloc_size(&*transaction_pool_); - #[cfg(target_os = "unknown")] - let memory_transaction_pool = 0; - let _ = record_metrics!( - "peers" => num_peers, - "height" => best_number, - "txcount" => txpool_status.ready, - "cpu" => cpu_usage, - "memory" => memory, - "finalized_height" => finalized_number, - "bandwidth_download" => bandwidth_download, - "bandwidth_upload" => bandwidth_upload, - "used_state_cache_size" => info.usage.as_ref().map(|usage| usage.memory.state_cache).unwrap_or(0), - "used_db_cache_size" => info.usage.as_ref().map(|usage| usage.memory.database_cache).unwrap_or(0), - "disk_read_per_sec" => info.usage.as_ref().map(|usage| usage.io.bytes_read).unwrap_or(0), - "disk_write_per_sec" => info.usage.as_ref().map(|usage| usage.io.bytes_written).unwrap_or(0), - "memory_transaction_pool" => memory_transaction_pool, - ); + if let Some(metrics) = metrics.as_ref() { + metrics.memory_usage_bytes.set(memory); + metrics.cpu_usage_percentage.set(f64::from(cpu_usage)); + metrics.ready_transactions_number.set(txpool_status.ready as u64); + metrics.peers_count.set(num_peers as u64); + + metrics.network_per_sec_bytes.with_label_values(&["download"]).set(net_status.average_download_per_sec); + metrics.network_per_sec_bytes.with_label_values(&["upload"]).set(net_status.average_upload_per_sec); + + metrics.block_height_number.with_label_values(&["finalized"]).set(finalized_number); + metrics.block_height_number.with_label_values(&["best"]).set(best_number); + + if let Some(best_seen_block) = best_seen_block { + metrics.block_height_number.with_label_values(&["sync_target"]).set(best_seen_block); + } + } ready(()) }); @@ -1217,16 +1309,6 @@ ServiceBuilder< telemetry }); - // Grafana data source - if let Some(port) = config.grafana_port { - let future = select( - grafana_data_source::run_server(port).boxed(), - exit.clone() - ).map(drop); - - let _ = to_spawn_tx.unbounded_send((Box::pin(future), From::from("grafana-server"))); - } - // Instrumentation if let Some(tracing_targets) = config.tracing_targets.as_ref() { let subscriber = sc_tracing::ProfilingSubscriber::new( diff --git a/client/service/src/config.rs b/client/service/src/config.rs index 2099c600df1..f5b187e8b35 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -93,8 +93,8 @@ pub struct Configuration { pub rpc_ws_max_connections: Option, /// CORS settings for HTTP & WS servers. `None` if all origins are allowed. pub rpc_cors: Option>, - /// Grafana data source http port. `None` if disabled. - pub grafana_port: Option, + /// Prometheus exporter Port. `None` if disabled. + pub prometheus_port: Option, /// Telemetry service URL. `None` if disabled. pub telemetry_endpoints: Option, /// External WASM transport for the telemetry. If `Some`, when connection to a telemetry @@ -190,7 +190,7 @@ impl Default for Configuration { rpc_ws: None, rpc_ws_max_connections: None, rpc_cors: Some(vec![]), - grafana_port: None, + prometheus_port: None, telemetry_endpoints: None, telemetry_external_transport: None, default_heap_pages: None, diff --git a/client/service/src/error.rs b/client/service/src/error.rs index 059e1c19e49..4d0a2cef942 100644 --- a/client/service/src/error.rs +++ b/client/service/src/error.rs @@ -53,6 +53,12 @@ impl<'a> From<&'a str> for Error { } } +impl From for Error { + fn from(e: prometheus_exporter::PrometheusError) -> Self { + Error::Other(format!("Prometheus error: {}", e)) + } +} + impl std::error::Error for Error { fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { match self { diff --git a/client/service/test/src/lib.rs b/client/service/test/src/lib.rs index b65bccc1518..414b943594c 100644 --- a/client/service/test/src/lib.rs +++ b/client/service/test/src/lib.rs @@ -199,7 +199,7 @@ fn node_config ( rpc_ws: None, rpc_ws_max_connections: None, rpc_cors: None, - grafana_port: None, + prometheus_port: None, telemetry_endpoints: None, telemetry_external_transport: None, default_heap_pages: None, diff --git a/client/tracing/Cargo.toml b/client/tracing/Cargo.toml index b476db6a011..0b6b02acd52 100644 --- a/client/tracing/Cargo.toml +++ b/client/tracing/Cargo.toml @@ -15,7 +15,6 @@ slog = { version = "2.5.2", features = ["nested-values"] } tracing-core = "0.1.7" sc-telemetry = { version = "2.0.0", path = "../telemetry" } -grafana-data-source = { version = "0.8", path = "../../utils/grafana-data-source" } [dev-dependencies] tracing = "0.1.10" diff --git a/client/tracing/src/lib.rs b/client/tracing/src/lib.rs index cd301041d39..c00bca9275e 100644 --- a/client/tracing/src/lib.rs +++ b/client/tracing/src/lib.rs @@ -34,7 +34,7 @@ //! let span = tracing::span!(tracing::Level::INFO, "my_span_name", my_number = 10, a_key = "a value"); //! let _guard = span.enter(); //! ``` -//! Currently we provide `Log` (default), `Telemetry` and `Grafana` variants for `Receiver` +//! Currently we provide `Log` (default), `Telemetry` variants for `Receiver` use std::collections::HashMap; use std::fmt; @@ -53,7 +53,6 @@ use tracing_core::{ subscriber::Subscriber }; -use grafana_data_source::{self, record_metrics}; use sc_telemetry::{telemetry, SUBSTRATE_INFO}; /// Used to configure how to receive the metrics @@ -63,8 +62,6 @@ pub enum TracingReceiver { Log, /// Output to telemetry Telemetry, - /// Output to Grafana - Grafana, } impl Default for TracingReceiver { @@ -255,7 +252,6 @@ impl ProfilingSubscriber { match self.receiver { TracingReceiver::Log => print_log(span_datum), TracingReceiver::Telemetry => send_telemetry(span_datum), - TracingReceiver::Grafana => send_grafana(span_datum), } } } @@ -291,9 +287,3 @@ fn send_telemetry(span_datum: SpanDatum) { ); } -fn send_grafana(span_datum: SpanDatum) { - let name = format!("{}::{}", span_datum.target, span_datum.name); - if let Err(e) = record_metrics!(&name => span_datum.overall_time.as_nanos(),) { - log::warn!("Unable to send metrics to grafana: {:?}", e); - } -} diff --git a/utils/grafana-data-source/src/database.rs b/utils/grafana-data-source/src/database.rs deleted file mode 100644 index f20917cf785..00000000000 --- a/utils/grafana-data-source/src/database.rs +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2019-2020 Parity Technologies (UK) Ltd. -// This file is part of Substrate. - -// Substrate is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Substrate is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Substrate. If not, see . - -use std::collections::HashMap; -use std::convert::TryFrom; -use crate::Error; - -pub struct Database { - base_timestamp: i64, - storage: HashMap> -} - -impl Database { - /// Create a new Database. - pub fn new() -> Self { - Self { - base_timestamp: now_millis(), - storage: HashMap::new() - } - } - - /// Produce an iterator for keys starting with a base string. - pub fn keys_starting_with<'a>(&'a self, base: &'a str) -> impl Iterator + 'a { - self.storage.keys() - .filter(move |key| key.starts_with(base)) - .cloned() - } - - /// Select `max_datapoints` datapoints that have been added between `from` and `to`. - pub fn datapoints_between(&self, key: &str, from: i64, to: i64, max_datapoints: usize) -> Option> { - self.storage.get(key) - .map(|vec| { - let from = find_index(vec, self.base_timestamp, from); - let to = find_index(vec, self.base_timestamp, to); - let slice = &vec[from .. to]; - - if max_datapoints == 0 { - Vec::new() - } else if max_datapoints >= slice.len() { - // Just convert the slice as-is - slice.iter() - .map(|dp| dp.make_absolute(self.base_timestamp)) - .collect() - } else { - // We have more datapoints than we need, so we need to skip some - (0 .. max_datapoints - 1) - .map(|i| &slice[i * slice.len() / (max_datapoints - 1)]) - .chain(slice.last()) - .map(|dp| dp.make_absolute(self.base_timestamp)) - .collect() - } - }) - } - - /// Push a new datapoint. Will error if the base timestamp hasn't been updated in `2^32` - /// milliseconds (49 days). - pub fn push(&mut self, key: &str, value: f32) -> Result<(), Error> { - self.storage.entry(key.into()) - .or_insert_with(Vec::new) - .push(Datapoint::new(self.base_timestamp, value)?); - - Ok(()) - } - - /// Set a new base timestamp, and remove metrics older than this new timestamp. Errors if the - /// difference between timestamps is greater than `2^32` milliseconds (49 days). - pub fn truncate(&mut self, new_base_timestamp: i64) -> Result<(), Error> { - // Ensure that the new base is older. - if self.base_timestamp >= new_base_timestamp { - return Ok(()); - } - - // If the old base timestamp was too long ago, the - let delta = u32::try_from(new_base_timestamp - self.base_timestamp) - .map_err(Error::Timestamp)?; - - for metric in self.storage.values_mut() { - // Find the index of the oldest allowed timestamp and cut out all those before it. - let index = find_index(&metric, self.base_timestamp, new_base_timestamp); - - *metric = metric.iter_mut() - .skip(index) - .map(|dp| { - dp.delta_timestamp -= delta; - *dp - }) - .collect(); - } - - self.base_timestamp = new_base_timestamp; - - Ok(()) - } -} - -#[derive(Clone, Copy)] -struct Datapoint { - delta_timestamp: u32, - value: f32 -} - -impl Datapoint { - fn new(base_timestamp: i64, value: f32) -> Result { - Ok(Self { - delta_timestamp: u32::try_from(now_millis() - base_timestamp) - .map_err(Error::Timestamp)?, - value - }) - } - - fn make_absolute(self, base_timestamp: i64) -> (f32, i64) { - (self.value, base_timestamp + self.delta_timestamp as i64) - } -} - -fn find_index(slice: &[Datapoint], base_timestamp: i64, timestamp: i64) -> usize { - slice.binary_search_by_key(×tamp, |datapoint| { - base_timestamp + datapoint.delta_timestamp as i64 - }).unwrap_or_else(|index| index) -} - -/// Get the current unix timestamp in milliseconds. -fn now_millis() -> i64 { - chrono::Utc::now().timestamp_millis() -} - -#[test] -fn test() { - let mut database = Database::new(); - - database.push("test", 1.0).unwrap(); - database.push("test", 2.5).unwrap(); - database.push("test", 2.0).unwrap(); - database.push("test 2", 1.0).unwrap(); - - let mut keys: Vec<_> = database.keys_starting_with("test").collect(); - keys.sort(); - - assert_eq!(keys, ["test", "test 2"]); - assert_eq!(database.keys_starting_with("test ").collect::>(), ["test 2"]); -} diff --git a/utils/grafana-data-source/src/lib.rs b/utils/grafana-data-source/src/lib.rs deleted file mode 100644 index bc40fc39bbe..00000000000 --- a/utils/grafana-data-source/src/lib.rs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2019-2020 Parity Technologies (UK) Ltd. -// This file is part of Substrate. - -// Substrate is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Substrate is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Substrate. If not, see . - -//! [Grafana] data source server -//! -//! To display node statistics with [Grafana], this module exposes a `run_server` function that -//! starts up a HTTP server that conforms to the [`grafana-json-data-source`] API. The -//! `record_metrics` macro can be used to pass metrics to this server. -//! -//! [Grafana]: https://grafana.com/ -//! [`grafana-json-data-source`]: https://github.com/simPod/grafana-json-datasource - -#![warn(missing_docs)] - -use lazy_static::lazy_static; -use parking_lot::RwLock; - -mod types; -mod server; -#[cfg(not(target_os = "unknown"))] -mod networking; -mod database; - -use database::Database; -pub use server::run_server; -use std::num::TryFromIntError; - -lazy_static! { - // The `RwLock` wrapping the metrics database. - static ref DATABASE: RwLock = RwLock::new(Database::new()); -} - -/// Write metrics to `METRICS`. -#[macro_export] -macro_rules! record_metrics( - ($($key:expr => $value:expr,)*) => { - if cfg!(not(target_os = "unknown")) { - $crate::record_metrics_slice(&[ - $( ($key, $value as f32), )* - ]) - } else { - Ok(()) - } - } -); - -/// Write metrics to `METRICS` as a slice. Intended to be only used via `record_metrics!`. -pub fn record_metrics_slice(metrics: &[(&str, f32)]) -> Result<(), Error> { - let mut database = crate::DATABASE.write(); - - for &(key, value) in metrics.iter() { - database.push(key, value)?; - } - - Ok(()) -} - -/// Error type that can be returned by either `record_metrics` or `run_server`. -#[derive(Debug, derive_more::Display, derive_more::From)] -pub enum Error { - /// Hyper internal error. - #[cfg(not(target_os = "unknown"))] - Hyper(hyper::Error), - /// Http request error. - #[cfg(not(target_os = "unknown"))] - Http(hyper::http::Error), - /// Serialization/deserialization error. - Serde(serde_json::Error), - /// Timestamp error. - Timestamp(TryFromIntError), - /// i/o error. - Io(std::io::Error) -} - -impl std::error::Error for Error { - fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { - match self { - #[cfg(not(target_os = "unknown"))] - Error::Hyper(error) => Some(error), - #[cfg(not(target_os = "unknown"))] - Error::Http(error) => Some(error), - Error::Serde(error) => Some(error), - Error::Timestamp(error) => Some(error), - Error::Io(error) => Some(error) - } - } -} diff --git a/utils/grafana-data-source/src/server.rs b/utils/grafana-data-source/src/server.rs deleted file mode 100644 index f2f06f76888..00000000000 --- a/utils/grafana-data-source/src/server.rs +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright 2019-2020 Parity Technologies (UK) Ltd. -// This file is part of Substrate. - -// Substrate is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Substrate is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Substrate. If not, see . - -use serde::{Serialize, de::DeserializeOwned}; -use chrono::{Duration, Utc}; -use futures_util::{FutureExt, TryStreamExt, future::{Future, select, Either}}; -use futures_timer::Delay; -use crate::{DATABASE, Error, types::{Target, Query, TimeseriesData, Range}}; - -#[cfg(not(target_os = "unknown"))] -use hyper::{Body, Request, Response, header, service::{service_fn, make_service_fn}, Server}; - -#[cfg(not(target_os = "unknown"))] -async fn api_response(req: Request) -> Result, Error> { - match req.uri().path() { - "/search" => { - map_request_to_response(req, |target: Target| { - // Filter and return metrics relating to the target - DATABASE.read() - .keys_starting_with(&target.target) - .collect::>() - }).await - }, - "/query" => { - map_request_to_response(req, |query: Query| { - let metrics = DATABASE.read(); - - let Query { - range: Range { from, to }, - max_datapoints, .. - } = query; - - // Return timeseries data related to the specified metrics - query.targets.iter() - .map(|target| { - let datapoints = metrics.datapoints_between(&target.target, from, to, max_datapoints) - .unwrap_or_else(Vec::new); - - TimeseriesData { - target: target.target.clone(), datapoints - } - }) - .collect::>() - }).await - }, - _ => Ok(Response::new(Body::empty())), - } -} - -#[cfg(not(target_os = "unknown"))] -async fn map_request_to_response(req: Request, transformation: T) -> Result, Error> - where - Req: DeserializeOwned, - Res: Serialize, - T: Fn(Req) -> Res + Send + Sync + 'static -{ - let body = req.into_body() - .map_ok(|bytes| bytes.to_vec()) - .try_concat() - .await - .map_err(Error::Hyper)?; - - let req = serde_json::from_slice(body.as_ref()).map_err(Error::Serde)?; - let res = transformation(req); - let string = serde_json::to_string(&res).map_err(Error::Serde)?; - - Response::builder() - .header(header::CONTENT_TYPE, "application/json") - .body(Body::from(string)) - .map_err(Error::Http) -} - -/// Given that we're not using hyper's tokio feature, we need to define out own executor. -#[derive(Clone)] -pub struct Executor; - -#[cfg(not(target_os = "unknown"))] -impl hyper::rt::Executor for Executor - where - T: Future + Send + 'static, - T::Output: Send + 'static, -{ - fn execute(&self, future: T) { - async_std::task::spawn(future); - } -} - -/// Start the data source server. -#[cfg(not(target_os = "unknown"))] -pub async fn run_server(mut address: std::net::SocketAddr) -> Result<(), Error> { - use async_std::{net, io}; - use crate::networking::Incoming; - - let listener = loop { - let listener = net::TcpListener::bind(&address).await; - match listener { - Ok(listener) => { - log::info!("Grafana data source server started at {}", address); - break listener - }, - Err(err) => match err.kind() { - io::ErrorKind::AddrInUse | io::ErrorKind::PermissionDenied if address.port() != 0 => { - log::warn!( - "Unable to bind grafana data source server to {}. Trying random port.", - address - ); - address.set_port(0); - continue; - }, - _ => return Err(err.into()), - } - } - }; - - let service = make_service_fn(|_| { - async { - Ok::<_, Error>(service_fn(api_response)) - } - }); - - let server = Server::builder(Incoming(listener.incoming())) - .executor(Executor) - .serve(service) - .boxed(); - - let every = std::time::Duration::from_secs(24 * 3600); - let clean = clean_up(every, Duration::weeks(1)) - .boxed(); - - let result = match select(server, clean).await { - Either::Left((result, _)) => result.map_err(Into::into), - Either::Right((result, _)) => result - }; - - result -} - -#[cfg(target_os = "unknown")] -pub async fn run_server(_: std::net::SocketAddr) -> Result<(), Error> { - Ok(()) -} - -/// Periodically remove old metrics. -async fn clean_up(every: std::time::Duration, before: Duration) -> Result<(), Error> { - loop { - Delay::new(every).await; - - let oldest_allowed = (Utc::now() - before).timestamp_millis(); - DATABASE.write().truncate(oldest_allowed)?; - } -} diff --git a/utils/grafana-data-source/src/types.rs b/utils/grafana-data-source/src/types.rs deleted file mode 100644 index 960fc787e3e..00000000000 --- a/utils/grafana-data-source/src/types.rs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2019-2020 Parity Technologies (UK) Ltd. -// This file is part of Substrate. - -// Substrate is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Substrate is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Substrate. If not, see . - -use serde::{Serialize, Deserialize}; - -#[derive(Serialize, Deserialize)] -pub struct Target { - pub target: String, -} - -#[derive(Serialize, Deserialize)] -pub struct Query { - #[serde(rename = "maxDataPoints")] - pub max_datapoints: usize, - pub targets: Vec, - pub range: Range, -} - -#[derive(Serialize, Deserialize)] -pub struct Range { - #[serde(deserialize_with = "date_to_timestamp_ms")] - pub from: i64, - #[serde(deserialize_with = "date_to_timestamp_ms")] - pub to: i64, -} - -// Deserialize a timestamp via a `DateTime` -fn date_to_timestamp_ms<'de, D: serde::Deserializer<'de>>(timestamp: D) -> Result { - Deserialize::deserialize(timestamp) - .map(|date: chrono::DateTime| date.timestamp_millis()) -} - -#[derive(Serialize, Deserialize)] -pub struct TimeseriesData { - pub target: String, - pub datapoints: Vec<(f32, i64)> -} diff --git a/utils/grafana-data-source/test/Cargo.toml b/utils/grafana-data-source/test/Cargo.toml deleted file mode 100644 index 18c080c8d1f..00000000000 --- a/utils/grafana-data-source/test/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -description = "Grafana data source server test" -name = "grafana-data-source-test" -version = "2.0.0" -license = "GPL-3.0" -authors = ["Parity Technologies "] -edition = "2018" - -[dependencies] -grafana-data-source = { version = "0.8", path = ".." } -futures = "0.3" -futures-timer = "3.0.1" -rand = "0.7" diff --git a/utils/grafana-data-source/test/src/main.rs b/utils/grafana-data-source/test/src/main.rs deleted file mode 100644 index 53deaffc3be..00000000000 --- a/utils/grafana-data-source/test/src/main.rs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2019-2020 Parity Technologies (UK) Ltd. -// This file is part of Substrate. - -// Substrate is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Substrate is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Substrate. If not, see . - -use grafana_data_source::{run_server, record_metrics}; -use std::time::Duration; -use rand::Rng; -use futures::{future::join, executor}; - -async fn randomness() { - loop { - futures_timer::Delay::new(Duration::from_secs(1)).await; - - let random = rand::thread_rng().gen_range(0.0, 1000.0); - - let result = record_metrics!( - "random data" => random, - "random^2" => random * random, - ); - - if let Err(error) = result { - eprintln!("{}", error); - } - } -} - -fn main() { - executor::block_on(join( - run_server("127.0.0.1:9955".parse().unwrap()), - randomness() - )).0.unwrap(); -} diff --git a/utils/grafana-data-source/Cargo.toml b/utils/prometheus/Cargo.toml similarity index 64% rename from utils/grafana-data-source/Cargo.toml rename to utils/prometheus/Cargo.toml index c49ee963f0c..0111dfb740f 100644 --- a/utils/grafana-data-source/Cargo.toml +++ b/utils/prometheus/Cargo.toml @@ -1,6 +1,6 @@ [package] -description = "Grafana data source server" -name = "grafana-data-source" +description = "Prometheus exporter server" +name = "prometheus-exporter" version = "0.8.0" license = "GPL-3.0" authors = ["Parity Technologies "] @@ -8,13 +8,8 @@ edition = "2018" [dependencies] log = "0.4.8" +prometheus = "0.7" futures-util = { version = "0.3.1", default-features = false, features = ["io"] } -serde_json = "1" -serde = { version = "1", features = ["derive"] } -chrono = { version = "0.4", features = ["serde"] } -lazy_static = "1.4" -parking_lot = "0.10.0" -futures-timer = "3.0.1" derive_more = "0.99" [target.'cfg(not(target_os = "unknown"))'.dependencies] diff --git a/utils/prometheus/README.md b/utils/prometheus/README.md new file mode 100644 index 00000000000..9dd0882105c --- /dev/null +++ b/utils/prometheus/README.md @@ -0,0 +1,16 @@ +# Substrate Prometheus Exporter + +## Introduction + +[Prometheus](https://prometheus.io/) is one of the most widely used monitoring tools for managing highly available services supported by [Cloud Native Computing Foundation](https://www.cncf.io/). By providing Prometheus metrics in Substrate, node operators can easily adopt widely used display/alert tools such +as [Grafana](https://grafana.com/) and [Alertmanager](https://prometheus.io/docs/alerting/alertmanager/). Easy access to such monitoring tools will benefit parachain developers/operators and validators to have much higher availability of their services. + +Metrics will be served under `/metrics` on TCP port 9615 by default. + +## Quick Start + +1. From the root of the repository start Substrate `cargo run --release`. + +2. In another terminal run `curl localhost:9615/metrics` to retrieve the metrics. + +To learn how to configure Prometheus see the Prometheus [Getting Started](https://prometheus.io/docs/prometheus/latest/getting_started/) guide. \ No newline at end of file diff --git a/utils/prometheus/src/lib.rs b/utils/prometheus/src/lib.rs new file mode 100644 index 00000000000..1aaeff2a573 --- /dev/null +++ b/utils/prometheus/src/lib.rs @@ -0,0 +1,144 @@ +// Copyright 2019 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use futures_util::{FutureExt, future::Future}; +pub use prometheus::{ + Registry, Error as PrometheusError, Opts, + core::{ + GenericGauge as Gauge, GenericCounter as Counter, + GenericGaugeVec as GaugeVec, GenericCounterVec as CounterVec, + AtomicF64 as F64, AtomicI64 as I64, AtomicU64 as U64, + } +}; +use prometheus::{Encoder, TextEncoder, core::Collector}; +use std::net::SocketAddr; + +#[cfg(not(target_os = "unknown"))] +mod networking; + +#[cfg(target_os = "unknown")] +pub use unknown_os::init_prometheus; +#[cfg(not(target_os = "unknown"))] +pub use known_os::init_prometheus; + +pub fn register(metric: T, registry: &Registry) -> Result { + registry.register(Box::new(metric.clone()))?; + Ok(metric) +} + +// On WASM `init_prometheus` becomes a no-op. +#[cfg(target_os = "unknown")] +mod unknown_os { + use super::*; + + pub enum Error {} + + pub async fn init_prometheus(_: SocketAddr, _registry: Registry) -> Result<(), Error> { + Ok(()) + } +} + +#[cfg(not(target_os = "unknown"))] +mod known_os { + use super::*; + use hyper::http::StatusCode; + use hyper::{Server, Body, Request, Response, service::{service_fn, make_service_fn}}; + + #[derive(Debug, derive_more::Display, derive_more::From)] + pub enum Error { + /// Hyper internal error. + Hyper(hyper::Error), + /// Http request error. + Http(hyper::http::Error), + /// i/o error. + Io(std::io::Error), + #[display(fmt = "Prometheus exporter port {} already in use.", _0)] + PortInUse(SocketAddr) + } + + impl std::error::Error for Error { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { + match self { + Error::Hyper(error) => Some(error), + Error::Http(error) => Some(error), + Error::Io(error) => Some(error), + Error::PortInUse(_) => None + } + } + } + + async fn request_metrics(req: Request, registry: Registry) -> Result, Error> { + if req.uri().path() == "/metrics" { + let metric_families = registry.gather(); + let mut buffer = vec![]; + let encoder = TextEncoder::new(); + encoder.encode(&metric_families, &mut buffer).unwrap(); + + Response::builder().status(StatusCode::OK) + .header("Content-Type", encoder.format_type()) + .body(Body::from(buffer)) + .map_err(Error::Http) + } else { + Response::builder().status(StatusCode::NOT_FOUND) + .body(Body::from("Not found.")) + .map_err(Error::Http) + } + + } + + #[derive(Clone)] + pub struct Executor; + + impl hyper::rt::Executor for Executor + where + T: Future + Send + 'static, + T::Output: Send + 'static, + { + fn execute(&self, future: T) { + async_std::task::spawn(future); + } + } + + /// Initializes the metrics context, and starts an HTTP server + /// to serve metrics. + pub async fn init_prometheus(prometheus_addr: SocketAddr, registry: Registry) -> Result<(), Error>{ + use networking::Incoming; + let listener = async_std::net::TcpListener::bind(&prometheus_addr) + .await + .map_err(|_| Error::PortInUse(prometheus_addr))?; + + log::info!("Prometheus server started at {}", prometheus_addr); + + let service = make_service_fn(move |_| { + let registry = registry.clone(); + + async move { + Ok::<_, hyper::Error>(service_fn(move |req: Request| { + request_metrics(req, registry.clone()) + })) + } + }); + + let server = Server::builder(Incoming(listener.incoming())) + .executor(Executor) + .serve(service) + .boxed(); + + let result = server.await.map_err(Into::into); + + result + } +} diff --git a/utils/grafana-data-source/src/networking.rs b/utils/prometheus/src/networking.rs similarity index 100% rename from utils/grafana-data-source/src/networking.rs rename to utils/prometheus/src/networking.rs -- GitLab From 9c0a515063f6521cc5336a382e57c5370ce0e733 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Wed, 19 Feb 2020 16:50:47 +0100 Subject: [PATCH 003/106] Re-export PeerId from the peerset API (#4985) --- client/peerset/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/peerset/src/lib.rs b/client/peerset/src/lib.rs index fb91f1fcf69..dd5158c1123 100644 --- a/client/peerset/src/lib.rs +++ b/client/peerset/src/lib.rs @@ -21,12 +21,13 @@ mod peersstate; use std::{collections::{HashSet, HashMap}, collections::VecDeque}; use futures::{prelude::*, channel::mpsc}; -use libp2p::PeerId; use log::{debug, error, trace}; use serde_json::json; use std::{pin::Pin, task::Context, task::Poll}; use wasm_timer::Instant; +pub use libp2p::PeerId; + /// We don't accept nodes whose reputation is under this value. const BANNED_THRESHOLD: i32 = 82 * (i32::min_value() / 100); /// Reputation change for a node when we get disconnected from it. -- GitLab From 0fb8e84cde3f96980d251004e1418b366ec1945c Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Wed, 19 Feb 2020 16:52:39 +0100 Subject: [PATCH 004/106] Cleanup the exports of sc-network (#4983) * Cleanup the exports of sc-network * Fix RPC tests * Revert moving the NetworkStateInfo trait * Fix GrandPa tests --- client/finality-grandpa/src/finality_proof.rs | 2 +- client/finality-grandpa/src/tests.rs | 2 +- client/network/src/config.rs | 14 +- client/network/src/lib.rs | 123 +++--------------- client/network/src/network_state.rs | 111 ++++++++++++++++ client/network/src/protocol/light_dispatch.rs | 2 +- client/network/src/protocol/specialization.rs | 4 +- client/network/src/protocol/sync.rs | 2 +- client/network/src/protocol/sync/blocks.rs | 2 +- client/network/src/service.rs | 2 +- client/network/test/src/lib.rs | 6 +- client/peerset/src/lib.rs | 2 +- client/rpc/src/system/tests.rs | 6 +- client/service/src/builder.rs | 6 +- client/service/src/lib.rs | 8 +- 15 files changed, 158 insertions(+), 134 deletions(-) create mode 100644 client/network/src/network_state.rs diff --git a/client/finality-grandpa/src/finality_proof.rs b/client/finality-grandpa/src/finality_proof.rs index 9da99ab531a..d52db6c0998 100644 --- a/client/finality-grandpa/src/finality_proof.rs +++ b/client/finality-grandpa/src/finality_proof.rs @@ -154,7 +154,7 @@ impl FinalityProofProvider } } -impl sc_network::FinalityProofProvider for FinalityProofProvider +impl sc_network::config::FinalityProofProvider for FinalityProofProvider where Block: BlockT, NumberFor: BlockNumberOps, diff --git a/client/finality-grandpa/src/tests.rs b/client/finality-grandpa/src/tests.rs index 9b9063f2c17..24ab0dd41c5 100644 --- a/client/finality-grandpa/src/tests.rs +++ b/client/finality-grandpa/src/tests.rs @@ -171,7 +171,7 @@ impl TestNetFactory for GrandpaTestNet { fn make_finality_proof_provider( &self, client: PeersClient - ) -> Option>> { + ) -> Option>> { match client { PeersClient::Full(_, ref backend) => { let authorities_provider = Arc::new(self.test_config.clone()); diff --git a/client/network/src/config.rs b/client/network/src/config.rs index 2f920c66639..8c97cbb8729 100644 --- a/client/network/src/config.rs +++ b/client/network/src/config.rs @@ -19,12 +19,18 @@ //! The [`Params`] struct is the struct that must be passed in order to initialize the networking. //! See the documentation of [`Params`]. -pub use crate::protocol::ProtocolConfig; +pub use crate::chain::{Client, FinalityProofProvider}; +pub use crate::on_demand_layer::OnDemand; +pub use crate::service::TransactionPool; pub use libp2p::{identity, core::PublicKey, wasm_ext::ExtTransport, build_multiaddr}; -use crate::chain::{Client, FinalityProofProvider}; -use crate::on_demand_layer::OnDemand; -use crate::service::{ExHashT, TransactionPool}; +// Note: this re-export shouldn't be part of the public API of the crate and will be removed in +// the future. +#[doc(hidden)] +pub use crate::protocol::ProtocolConfig; + +use crate::service::ExHashT; + use bitflags::bitflags; use sp_consensus::{block_validation::BlockAnnounceValidator, import_queue::ImportQueue}; use sp_runtime::traits::{Block as BlockT}; diff --git a/client/network/src/lib.rs b/client/network/src/lib.rs index dd156360330..5da26b3346c 100644 --- a/client/network/src/lib.rs +++ b/client/network/src/lib.rs @@ -78,12 +78,8 @@ //! - DNS for addresses of the form `/dns4/example.com/tcp/5` or `/dns4/example.com/tcp/5/ws`. A //! node's address can contain a domain name. //! -//! The following encryption protocols are supported: -//! -//! - [Secio](https://github.com/libp2p/specs/tree/master/secio). A TLS-1.2-like protocol but -//! without certificates. Support for secio will likely be deprecated in the far future. -//! - [Noise](https://noiseprotocol.org/). Support for noise is very experimental. The details are -//! very blurry and may change at any moment. +//! On top of the base-layer protocol, the [Noise](https://noiseprotocol.org/) protocol is +//! negotiated and applied. The exact handshake protocol is experimental and is subject to change. //! //! The following multiplexing protocols are supported: //! @@ -160,7 +156,8 @@ //! //! After the `NetworkWorker` has been created, the important things to do are: //! -//! - Calling `NetworkWorker::poll` in order to advance the network. +//! - Calling `NetworkWorker::poll` in order to advance the network. This can be done by +//! dispatching a background task with the [`NetworkWorker`]. //! - Calling `on_block_import` whenever a block is added to the client. //! - Calling `on_block_finalized` whenever a block is finalized. //! - Calling `trigger_repropagate` when a transaction is added to the pool. @@ -180,34 +177,31 @@ mod utils; pub mod config; pub mod error; +pub mod network_state; -pub use chain::{Client as ClientHandle, FinalityProofProvider}; -pub use service::{ - NetworkService, NetworkWorker, TransactionPool, ExHashT, ReportHandle, - NetworkStateInfo, -}; -pub use protocol::{PeerInfo, Context, ProtocolConfig, message, specialization}; +pub use service::{NetworkService, NetworkStateInfo, NetworkWorker, ExHashT, ReportHandle}; +pub use protocol::{PeerInfo, Context, specialization}; pub use protocol::event::{Event, DhtEvent}; pub use protocol::sync::SyncState; pub use libp2p::{Multiaddr, PeerId}; #[doc(inline)] pub use libp2p::multiaddr; -pub use message::{generic as generic_message, RequestId, Status as StatusMessage}; -pub use on_demand_layer::{OnDemand, RemoteResponse}; +// Note: these re-exports shouldn't be part of the public API of the crate and will be removed in +// the future. +#[doc(hidden)] +pub use protocol::message; +#[doc(hidden)] +pub use protocol::message::Status as StatusMessage; + pub use sc_peerset::ReputationChange; // Used by the `construct_simple_protocol!` macro. #[doc(hidden)] pub use sp_runtime::traits::Block as BlockT; -use libp2p::core::ConnectedPoint; -use serde::{Deserialize, Serialize}; -use slog_derive::SerdeValue; -use std::{collections::{HashMap, HashSet}, time::Duration}; - /// Extension trait for `NetworkBehaviour` that also accepts discovering nodes. -pub trait DiscoveryNetBehaviour { +trait DiscoveryNetBehaviour { /// Notify the protocol that we have learned about the existence of nodes. /// /// Can (or most likely will) be called multiple times with the same `PeerId`s. @@ -216,90 +210,3 @@ pub trait DiscoveryNetBehaviour { /// system, or remove nodes that will fail to reach. fn add_discovered_nodes(&mut self, nodes: impl Iterator); } - -/// Returns general information about the networking. -/// -/// Meant for general diagnostic purposes. -/// -/// **Warning**: This API is not stable. -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, SerdeValue)] -#[serde(rename_all = "camelCase")] -pub struct NetworkState { - /// PeerId of the local node. - pub peer_id: String, - /// List of addresses the node is currently listening on. - pub listened_addresses: HashSet, - /// List of addresses the node knows it can be reached as. - pub external_addresses: HashSet, - /// List of node we're connected to. - pub connected_peers: HashMap, - /// List of node that we know of but that we're not connected to. - pub not_connected_peers: HashMap, - /// Downloaded bytes per second averaged over the past few seconds. - pub average_download_per_sec: u64, - /// Uploaded bytes per second averaged over the past few seconds. - pub average_upload_per_sec: u64, - /// State of the peerset manager. - pub peerset: serde_json::Value, -} - -/// Part of the `NetworkState` struct. Unstable. -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct NetworkStatePeer { - /// How we are connected to the node. - pub endpoint: NetworkStatePeerEndpoint, - /// Node information, as provided by the node itself. Can be empty if not known yet. - pub version_string: Option, - /// Latest ping duration with this node. - pub latest_ping_time: Option, - /// If true, the peer is "enabled", which means that we try to open Substrate-related protocols - /// with this peer. If false, we stick to Kademlia and/or other network-only protocols. - pub enabled: bool, - /// If true, the peer is "open", which means that we have a Substrate-related protocol - /// with this peer. - pub open: bool, - /// List of addresses known for this node. - pub known_addresses: HashSet, -} - -/// Part of the `NetworkState` struct. Unstable. -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct NetworkStateNotConnectedPeer { - /// List of addresses known for this node. - pub known_addresses: HashSet, - /// Node information, as provided by the node itself, if we were ever connected to this node. - pub version_string: Option, - /// Latest ping duration with this node, if we were ever connected to this node. - pub latest_ping_time: Option, -} - -/// Part of the `NetworkState` struct. Unstable. -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub enum NetworkStatePeerEndpoint { - /// We are dialing the given address. - Dialing(Multiaddr), - /// We are listening. - Listening { - /// Local address of the connection. - local_addr: Multiaddr, - /// Address data is sent back to. - send_back_addr: Multiaddr, - }, -} - -impl From for NetworkStatePeerEndpoint { - fn from(endpoint: ConnectedPoint) -> Self { - match endpoint { - ConnectedPoint::Dialer { address } => - NetworkStatePeerEndpoint::Dialing(address), - ConnectedPoint::Listener { local_addr, send_back_addr } => - NetworkStatePeerEndpoint::Listening { - local_addr, - send_back_addr - } - } - } -} diff --git a/client/network/src/network_state.rs b/client/network/src/network_state.rs new file mode 100644 index 00000000000..00d53976ae8 --- /dev/null +++ b/client/network/src/network_state.rs @@ -0,0 +1,111 @@ +// Copyright 2017-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Information about the networking, for diagnostic purposes. +//! +//! **Warning**: These APIs are not stable. + +use libp2p::{core::ConnectedPoint, Multiaddr}; +use serde::{Deserialize, Serialize}; +use slog_derive::SerdeValue; +use std::{collections::{HashMap, HashSet}, time::Duration}; + +/// Returns general information about the networking. +/// +/// Meant for general diagnostic purposes. +/// +/// **Warning**: This API is not stable. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, SerdeValue)] +#[serde(rename_all = "camelCase")] +pub struct NetworkState { + /// PeerId of the local node. + pub peer_id: String, + /// List of addresses the node is currently listening on. + pub listened_addresses: HashSet, + /// List of addresses the node knows it can be reached as. + pub external_addresses: HashSet, + /// List of node we're connected to. + pub connected_peers: HashMap, + /// List of node that we know of but that we're not connected to. + pub not_connected_peers: HashMap, + /// Downloaded bytes per second averaged over the past few seconds. + pub average_download_per_sec: u64, + /// Uploaded bytes per second averaged over the past few seconds. + pub average_upload_per_sec: u64, + /// State of the peerset manager. + pub peerset: serde_json::Value, +} + +/// Part of the `NetworkState` struct. Unstable. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Peer { + /// How we are connected to the node. + pub endpoint: PeerEndpoint, + /// Node information, as provided by the node itself. Can be empty if not known yet. + pub version_string: Option, + /// Latest ping duration with this node. + pub latest_ping_time: Option, + /// If true, the peer is "enabled", which means that we try to open Substrate-related protocols + /// with this peer. If false, we stick to Kademlia and/or other network-only protocols. + pub enabled: bool, + /// If true, the peer is "open", which means that we have a Substrate-related protocol + /// with this peer. + pub open: bool, + /// List of addresses known for this node. + pub known_addresses: HashSet, +} + +/// Part of the `NetworkState` struct. Unstable. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct NotConnectedPeer { + /// List of addresses known for this node. + pub known_addresses: HashSet, + /// Node information, as provided by the node itself, if we were ever connected to this node. + pub version_string: Option, + /// Latest ping duration with this node, if we were ever connected to this node. + pub latest_ping_time: Option, +} + +/// Part of the `NetworkState` struct. Unstable. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub enum PeerEndpoint { + /// We are dialing the given address. + Dialing(Multiaddr), + /// We are listening. + Listening { + /// Local address of the connection. + local_addr: Multiaddr, + /// Address data is sent back to. + send_back_addr: Multiaddr, + }, +} + +impl From for PeerEndpoint { + fn from(endpoint: ConnectedPoint) -> Self { + match endpoint { + ConnectedPoint::Dialer { address } => + PeerEndpoint::Dialing(address), + ConnectedPoint::Listener { local_addr, send_back_addr } => + PeerEndpoint::Listening { + local_addr, + send_back_addr + } + } + } +} diff --git a/client/network/src/protocol/light_dispatch.rs b/client/network/src/protocol/light_dispatch.rs index 738847dbaf3..aff220b6e03 100644 --- a/client/network/src/protocol/light_dispatch.rs +++ b/client/network/src/protocol/light_dispatch.rs @@ -30,7 +30,7 @@ use sp_blockchain::Error as ClientError; use sc_client_api::{FetchChecker, RemoteHeaderRequest, RemoteCallRequest, RemoteReadRequest, RemoteChangesRequest, ChangesProof, RemoteReadChildRequest, RemoteBodyRequest, StorageProof}; -use crate::message::{self, BlockAttributes, Direction, FromBlock, RequestId}; +use crate::protocol::message::{self, BlockAttributes, Direction, FromBlock, RequestId}; use libp2p::PeerId; use crate::config::Roles; use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor}; diff --git a/client/network/src/protocol/specialization.rs b/client/network/src/protocol/specialization.rs index 6ffa335c8c3..b410959509d 100644 --- a/client/network/src/protocol/specialization.rs +++ b/client/network/src/protocol/specialization.rs @@ -28,7 +28,7 @@ pub trait NetworkSpecialization: Send + Sync + 'static { fn status(&self) -> Vec; /// Called when a peer successfully handshakes. - fn on_connect(&mut self, ctx: &mut dyn Context, who: PeerId, status: crate::message::Status); + fn on_connect(&mut self, ctx: &mut dyn Context, who: PeerId, status: crate::protocol::message::Status); /// Called when a peer is disconnected. If the peer ID is unknown, it should be ignored. fn on_disconnect(&mut self, ctx: &mut dyn Context, who: PeerId); @@ -62,7 +62,7 @@ impl NetworkSpecialization for DummySpecialization { &mut self, _ctx: &mut dyn Context, _peer_id: PeerId, - _status: crate::message::Status + _status: crate::protocol::message::Status ) {} fn on_disconnect(&mut self, _ctx: &mut dyn Context, _peer_id: PeerId) {} diff --git a/client/network/src/protocol/sync.rs b/client/network/src/protocol/sync.rs index 88e663c904b..0c5355ea21f 100644 --- a/client/network/src/protocol/sync.rs +++ b/client/network/src/protocol/sync.rs @@ -35,7 +35,7 @@ use sp_consensus::{BlockOrigin, BlockStatus, }; use crate::{ config::{Roles, BoxFinalityProofRequestBuilder}, - message::{self, generic::FinalityProofRequest, BlockAnnounce, BlockAttributes, BlockRequest, BlockResponse, + protocol::message::{self, generic::FinalityProofRequest, BlockAnnounce, BlockAttributes, BlockRequest, BlockResponse, FinalityProofResponse}, }; use either::Either; diff --git a/client/network/src/protocol/sync/blocks.rs b/client/network/src/protocol/sync/blocks.rs index 974935f765e..d4e4581c670 100644 --- a/client/network/src/protocol/sync/blocks.rs +++ b/client/network/src/protocol/sync/blocks.rs @@ -22,7 +22,7 @@ use std::collections::hash_map::Entry; use log::trace; use libp2p::PeerId; use sp_runtime::traits::{Block as BlockT, NumberFor, One}; -use crate::message; +use crate::protocol::message; /// Block data with origin. #[derive(Debug, Clone, PartialEq, Eq)] diff --git a/client/network/src/service.rs b/client/network/src/service.rs index 8d990282981..5674d841b32 100644 --- a/client/network/src/service.rs +++ b/client/network/src/service.rs @@ -41,10 +41,10 @@ use sc_peerset::PeersetHandle; use sp_runtime::{traits::{Block as BlockT, NumberFor}, ConsensusEngineId}; use crate::{behaviour::{Behaviour, BehaviourOut}, config::{parse_str_addr, parse_addr}}; -use crate::{NetworkState, NetworkStateNotConnectedPeer, NetworkStatePeer}; use crate::{transport, config::NonReservedPeerMode, ReputationChange}; use crate::config::{Params, TransportConfig}; use crate::error::Error; +use crate::network_state::{NetworkState, NotConnectedPeer as NetworkStateNotConnectedPeer, Peer as NetworkStatePeer}; use crate::protocol::{self, Protocol, Context, PeerInfo}; use crate::protocol::{event::Event, light_dispatch::{AlwaysBadChecker, RequestData}}; use crate::protocol::specialization::NetworkSpecialization; diff --git a/client/network/test/src/lib.rs b/client/network/test/src/lib.rs index c15bd336550..ea641e58b68 100644 --- a/client/network/test/src/lib.rs +++ b/client/network/test/src/lib.rs @@ -25,7 +25,7 @@ use std::{collections::HashMap, pin::Pin, sync::Arc, marker::PhantomData}; use libp2p::build_multiaddr; use log::trace; -use sc_network::FinalityProofProvider; +use sc_network::config::FinalityProofProvider; use sp_blockchain::{ Result as ClientResult, well_known_cache_keys::{self, Id as CacheKeyId}, Info as BlockchainInfo, }; @@ -52,11 +52,11 @@ use sc_network::config::{NetworkConfiguration, TransportConfig, BoxFinalityProof use libp2p::PeerId; use parking_lot::Mutex; use sp_core::H256; -use sc_network::ProtocolConfig; +use sc_network::config::ProtocolConfig; use sp_runtime::generic::{BlockId, OpaqueDigestItemId}; use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor}; use sp_runtime::Justification; -use sc_network::TransactionPool; +use sc_network::config::TransactionPool; use sc_network::specialization::NetworkSpecialization; use substrate_test_runtime_client::{self, AccountKeyring}; diff --git a/client/peerset/src/lib.rs b/client/peerset/src/lib.rs index dd5158c1123..53e3b35297b 100644 --- a/client/peerset/src/lib.rs +++ b/client/peerset/src/lib.rs @@ -46,7 +46,7 @@ enum Action { RemoveFromPriorityGroup(String, PeerId), } -/// Shared handle to the peer set manager (PSM). Distributed around the code. +/// Description of a reputation adjustment for a node. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct ReputationChange { /// Reputation delta. diff --git a/client/rpc/src/system/tests.rs b/client/rpc/src/system/tests.rs index a280110093b..4487566e44c 100644 --- a/client/rpc/src/system/tests.rs +++ b/client/rpc/src/system/tests.rs @@ -69,7 +69,7 @@ fn api>>(sync: T) -> System { let _ = sender.send(peers); } Request::NetworkState(sender) => { - let _ = sender.send(serde_json::to_value(&sc_network::NetworkState { + let _ = sender.send(serde_json::to_value(&sc_network::network_state::NetworkState { peer_id: String::new(), listened_addresses: Default::default(), external_addresses: Default::default(), @@ -223,8 +223,8 @@ fn system_peers() { fn system_network_state() { let res = wait_receiver(api(None).system_network_state()); assert_eq!( - serde_json::from_value::(res).unwrap(), - sc_network::NetworkState { + serde_json::from_value::(res).unwrap(), + sc_network::network_state::NetworkState { peer_id: String::new(), listened_addresses: Default::default(), external_addresses: Default::default(), diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index 9dee787f500..20078f2d4ff 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -34,8 +34,8 @@ use futures::{ }; use sc_keystore::{Store as Keystore}; use log::{info, warn, error}; -use sc_network::{FinalityProofProvider, OnDemand, NetworkService, NetworkStateInfo}; -use sc_network::{config::BoxFinalityProofRequestBuilder, specialization::NetworkSpecialization}; +use sc_network::config::{FinalityProofProvider, OnDemand, BoxFinalityProofRequestBuilder}; +use sc_network::{NetworkService, NetworkStateInfo, specialization::NetworkSpecialization}; use parking_lot::{Mutex, RwLock}; use sp_runtime::generic::BlockId; use sp_runtime::traits::{ @@ -369,7 +369,7 @@ where TGen: RuntimeGenesis, TCSExt: Extension { executor.clone(), ), ); - let fetcher = Arc::new(sc_network::OnDemand::new(fetch_checker)); + let fetcher = Arc::new(sc_network::config::OnDemand::new(fetch_checker)); let backend = sc_client::light::new_light_backend(light_blockchain); let remote_blockchain = backend.remote_blockchain(); let client = Arc::new(sc_client::light::new_light( diff --git a/client/service/src/lib.rs b/client/service/src/lib.rs index a2e53616aba..c45d44dfca6 100644 --- a/client/service/src/lib.rs +++ b/client/service/src/lib.rs @@ -46,7 +46,7 @@ use futures::{ task::{Spawn, FutureObj, SpawnError}, }; use sc_network::{ - NetworkService, NetworkState, specialization::NetworkSpecialization, + NetworkService, network_state::NetworkState, specialization::NetworkSpecialization, PeerId, ReportHandle, }; use log::{log, warn, debug, error, Level}; @@ -71,7 +71,7 @@ pub use sc_executor::NativeExecutionDispatch; #[doc(hidden)] pub use std::{ops::Deref, result::Result, sync::Arc}; #[doc(hidden)] -pub use sc_network::{FinalityProofProvider, OnDemand, config::BoxFinalityProofRequestBuilder}; +pub use sc_network::config::{FinalityProofProvider, OnDemand, BoxFinalityProofRequestBuilder}; const DEFAULT_PROTOCOL_ID: &str = "sup"; @@ -634,10 +634,10 @@ where .collect() } -impl sc_network::TransactionPool for +impl sc_network::config::TransactionPool for TransactionPoolAdapter where - C: sc_network::ClientHandle + Send + Sync, + C: sc_network::config::Client + Send + Sync, Pool: 'static + TransactionPool, B: BlockT, H: std::hash::Hash + Eq + sp_runtime::traits::Member + sp_runtime::traits::MaybeSerialize, -- GitLab From c8e45ac5bfa0210057bf92f703c6b2fa7ddc087e Mon Sep 17 00:00:00 2001 From: Max Inden Date: Wed, 19 Feb 2020 20:59:32 +0100 Subject: [PATCH 005/106] docs/CODEOWNERS: Add mxinden to /utils/prometheus/ (#4991) --- docs/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/CODEOWNERS b/docs/CODEOWNERS index 9304f278534..701df299a35 100644 --- a/docs/CODEOWNERS +++ b/docs/CODEOWNERS @@ -75,3 +75,6 @@ # Authority discovery /client/authority-discovery/ @mxinden /frame/authority-discovery/ @mxinden + +# Prometheus endpoint +/utils/prometheus/ @mxinden -- GitLab From ab53994d74b0ad6983432050d540f834a8dc2c7f Mon Sep 17 00:00:00 2001 From: Toralf Wittner Date: Wed, 19 Feb 2020 21:00:16 +0100 Subject: [PATCH 006/106] Log kademlia errors when get/put record fails. (#4988) * Log kademlia errors when get/put record fails. The current approach makes it difficult to figure out what the underlying error was, that made the operation fail. * Formatting Co-Authored-By: Pierre Krieger Co-authored-by: Pierre Krieger --- client/network/src/discovery.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/network/src/discovery.rs b/client/network/src/discovery.rs index a236ceb1a8b..8360fce5186 100644 --- a/client/network/src/discovery.rs +++ b/client/network/src/discovery.rs @@ -391,7 +391,14 @@ impl NetworkBehaviour for DiscoveryBehaviour { DiscoveryOut::ValueFound(results) } + Err(e @ libp2p::kad::GetRecordError::NotFound { .. }) => { + trace!(target: "sub-libp2p", + "Libp2p => Failed to get record: {:?}", e); + DiscoveryOut::ValueNotFound(e.into_key()) + } Err(e) => { + warn!(target: "sub-libp2p", + "Libp2p => Failed to get record: {:?}", e); DiscoveryOut::ValueNotFound(e.into_key()) } }; @@ -401,6 +408,8 @@ impl NetworkBehaviour for DiscoveryBehaviour { let ev = match res { Ok(ok) => DiscoveryOut::ValuePut(ok.key), Err(e) => { + warn!(target: "sub-libp2p", + "Libp2p => Failed to put record: {:?}", e); DiscoveryOut::ValuePutFailed(e.into_key()) } }; -- GitLab From 992aea815a753da256a9c0bff053df408532df02 Mon Sep 17 00:00:00 2001 From: Nikolay Volf Date: Thu, 20 Feb 2020 11:58:41 +0300 Subject: [PATCH 007/106] Speedup import benchmark (#4995) * use lazy matrix * speedup * Update bin/node/testing/benches/import.rs Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> --- bin/node/testing/benches/import.rs | 43 +++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/bin/node/testing/benches/import.rs b/bin/node/testing/benches/import.rs index d0ec993655c..79cb71b1643 100644 --- a/bin/node/testing/benches/import.rs +++ b/bin/node/testing/benches/import.rs @@ -37,7 +37,7 @@ use sc_client_api::backend::Backend; criterion_group!( name = benches; - config = Criterion::default().sample_size(50).warm_up_time(std::time::Duration::from_secs(20)); + config = Criterion::default().sample_size(20).warm_up_time(std::time::Duration::from_secs(20)); targets = bench_block_import ); criterion_group!( @@ -50,7 +50,7 @@ criterion_group!( config = Criterion::default().sample_size(10); targets = profile_block_import ); -criterion_main!(benches, profile, wasm_size); +criterion_main!(benches, profile); fn bench_block_import(c: &mut Criterion) { sc_cli::init_logger(""); @@ -152,6 +152,33 @@ struct Setup { block: Block, } +struct SetupIterator { + current: usize, + finish: usize, + multiplier: usize, +} + +impl SetupIterator { + fn new(current: usize, finish: usize, multiplier: usize) -> Self { + SetupIterator { current, finish, multiplier } + } +} + +impl Iterator for SetupIterator { + type Item = Setup; + + fn next(&mut self) -> Option { + if self.current >= self.finish { return None } + + self.current += 1; + + let size = self.current * self.multiplier; + let mut db = BenchDb::new(size); + let block = db.generate_block(size); + Some(Setup { db, block }) + } +} + impl fmt::Debug for Setup { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "Setup: {} tx/block", self.block.extrinsics.len()) @@ -161,14 +188,6 @@ impl fmt::Debug for Setup { fn bench_wasm_size_import(c: &mut Criterion) { sc_cli::init_logger(""); - let mut setups = Vec::new(); - - for block_size in 5..15 { - let mut db = BenchDb::new(block_size*50); - let block = db.generate_block(block_size * 50); - setups.push(Setup { db, block }); - } - c.bench_function_over_inputs("wasm_size_import", move |bencher, setup| { bencher.iter_batched( @@ -181,6 +200,6 @@ fn bench_wasm_size_import(c: &mut Criterion) { criterion::BatchSize::PerIteration, ); }, - setups, + SetupIterator::new(5, 15, 50), ); -} \ No newline at end of file +} -- GitLab From 9a47993c160145bb5c8cab6d0e04bb3edf678cfa Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Thu, 20 Feb 2020 11:53:46 +0100 Subject: [PATCH 008/106] Remove using a network message in the chain_ops (?!?!) (#4999) --- client/service/src/chain_ops.rs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/client/service/src/chain_ops.rs b/client/service/src/chain_ops.rs index 30987170f37..f415ea213a4 100644 --- a/client/service/src/chain_ops.rs +++ b/client/service/src/chain_ops.rs @@ -36,8 +36,6 @@ use sc_executor::{NativeExecutor, NativeExecutionDispatch}; use std::{io::{Read, Write, Seek}, pin::Pin}; -use sc_network::message; - /// Build a chain spec json pub fn build_spec(spec: ChainSpec, raw: bool) -> error::Result where G: RuntimeGenesis, @@ -141,21 +139,13 @@ impl< Ok(signed) => { let (header, extrinsics) = signed.block.deconstruct(); let hash = header.hash(); - let block = message::BlockData:: { - hash, - justification: signed.justification, - header: Some(header), - body: Some(extrinsics), - receipt: None, - message_queue: None - }; // import queue handles verification and importing it into the client queue.import_blocks(BlockOrigin::File, vec![ IncomingBlock:: { - hash: block.hash, - header: block.header, - body: block.body, - justification: block.justification, + hash, + header: Some(header), + body: Some(extrinsics), + justification: signed.justification, origin: None, allow_missing_state: false, import_existing: force, -- GitLab From 98c5579a32c02e43106130c868f8da3a52f05e85 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Thu, 20 Feb 2020 12:02:59 +0100 Subject: [PATCH 009/106] babe: fix deprecated function in transcript (#4996) --- client/consensus/babe/src/authorship.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/consensus/babe/src/authorship.rs b/client/consensus/babe/src/authorship.rs index 4654f91b898..a3254d0fcb4 100644 --- a/client/consensus/babe/src/authorship.rs +++ b/client/consensus/babe/src/authorship.rs @@ -86,16 +86,15 @@ pub(super) fn secondary_slot_author( Some(&expected_author.0) } -#[allow(deprecated)] pub(super) fn make_transcript( randomness: &[u8], slot_number: u64, epoch: u64, ) -> Transcript { let mut transcript = Transcript::new(&BABE_ENGINE_ID); - transcript.commit_bytes(b"slot number", &slot_number.to_le_bytes()); - transcript.commit_bytes(b"current epoch", &epoch.to_le_bytes()); - transcript.commit_bytes(b"chain randomness", randomness); + transcript.append_message(b"slot number", &slot_number.to_le_bytes()); + transcript.append_message(b"current epoch", &epoch.to_le_bytes()); + transcript.append_message(b"chain randomness", randomness); transcript } -- GitLab From 1a9b06fbc75c1f9a5798c700ff4794075072771d Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Thu, 20 Feb 2020 13:23:47 +0100 Subject: [PATCH 010/106] fixes sc_transaction_pool::testing::fork_aware_finalization (#4976) * fixes sc_transaction_pool::testing::pool::fork_aware_finalization * adds pool status assertions --- client/transaction-pool/src/testing/pool.rs | 30 +++++++++++++-------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/client/transaction-pool/src/testing/pool.rs b/client/transaction-pool/src/testing/pool.rs index 37b80df9e1b..6984877eef4 100644 --- a/client/transaction-pool/src/testing/pool.rs +++ b/client/transaction-pool/src/testing/pool.rs @@ -384,7 +384,7 @@ fn fork_aware_finalization() { let mut canon_watchers = vec![]; let from_alice = uxt(Alice, 1); - let from_dave = uxt(Dave, 1); + let from_dave = uxt(Dave, 2); let from_bob = uxt(Bob, 1); let from_charlie = uxt(Charlie, 1); pool.api.increment_nonce(Alice.into()); @@ -405,6 +405,7 @@ fn fork_aware_finalization() { let watcher = block_on(pool.submit_and_watch(&BlockId::number(1), from_alice.clone())).expect("1. Imported"); let header = pool.api.push_block(2, vec![from_alice.clone()]); canon_watchers.push((watcher, header.hash())); + assert_eq!(pool.status().ready, 1); let event = ChainEvent::NewBlock { id: BlockId::Number(2), @@ -414,6 +415,7 @@ fn fork_aware_finalization() { }; b1 = header.hash(); block_on(pool.maintain(event)); + assert_eq!(pool.status().ready, 0); let event = ChainEvent::Finalized { hash: b1 }; block_on(pool.maintain(event)); } @@ -423,6 +425,7 @@ fn fork_aware_finalization() { let header = pool.api.push_fork_block_with_parent(b1, vec![from_dave.clone()]); from_dave_watcher = block_on(pool.submit_and_watch(&BlockId::number(1), from_dave.clone())) .expect("1. Imported"); + assert_eq!(pool.status().ready, 1); let event = ChainEvent::NewBlock { id: BlockId::Hash(header.hash()), is_new_best: true, @@ -431,11 +434,13 @@ fn fork_aware_finalization() { }; c2 = header.hash(); block_on(pool.maintain(event)); + assert_eq!(pool.status().ready, 0); } // block D2 { from_bob_watcher = block_on(pool.submit_and_watch(&BlockId::number(1), from_bob.clone())).expect("1. Imported"); + assert_eq!(pool.status().ready, 1); let header = pool.api.push_fork_block_with_parent(c2, vec![from_bob.clone()]); let event = ChainEvent::NewBlock { @@ -446,11 +451,13 @@ fn fork_aware_finalization() { }; d2 = header.hash(); block_on(pool.maintain(event)); + assert_eq!(pool.status().ready, 0); } // block C1 { let watcher = block_on(pool.submit_and_watch(&BlockId::number(1), from_charlie.clone())).expect("1.Imported"); + assert_eq!(pool.status().ready, 1); let header = pool.api.push_block(3, vec![from_charlie.clone()]); canon_watchers.push((watcher, header.hash())); @@ -461,6 +468,7 @@ fn fork_aware_finalization() { retracted: vec![c2, d2], }; block_on(pool.maintain(event)); + assert_eq!(pool.status().ready, 2); let event = ChainEvent::Finalized { hash: header.hash() }; block_on(pool.maintain(event)); } @@ -469,6 +477,7 @@ fn fork_aware_finalization() { { let xt = uxt(Eve, 0); let w = block_on(pool.submit_and_watch(&BlockId::number(1), xt.clone())).expect("1. Imported"); + assert_eq!(pool.status().ready, 3); let header = pool.api.push_block(4, vec![xt.clone()]); canon_watchers.push((w, header.hash())); @@ -480,6 +489,7 @@ fn fork_aware_finalization() { }; d1 = header.hash(); block_on(pool.maintain(event)); + assert_eq!(pool.status().ready, 2); let event = ChainEvent::Finalized { hash: d1 }; block_on(pool.maintain(event)); } @@ -488,7 +498,7 @@ fn fork_aware_finalization() { // block e1 { - let header = pool.api.push_block(5, vec![from_dave]); + let header = pool.api.push_block(5, vec![from_dave, from_bob]); e1 = header.hash(); let event = ChainEvent::NewBlock { id: BlockId::Hash(header.hash()), @@ -497,6 +507,7 @@ fn fork_aware_finalization() { retracted: vec![] }; block_on(pool.maintain(event)); + assert_eq!(pool.status().ready, 0); block_on(pool.maintain(ChainEvent::Finalized { hash: e1 })); } @@ -515,15 +526,8 @@ fn fork_aware_finalization() { assert_eq!(stream.next(), Some(TransactionStatus::Ready)); assert_eq!(stream.next(), Some(TransactionStatus::InBlock(c2.clone()))); assert_eq!(stream.next(), Some(TransactionStatus::Retracted(c2))); - - // can be either Ready, or InBlock, depending on which event comes first - assert_eq!( - match stream.next() { - Some(TransactionStatus::Ready) => stream.next(), - val @ _ => val, - }, - Some(TransactionStatus::InBlock(e1)), - ); + assert_eq!(stream.next(), Some(TransactionStatus::Ready)); + assert_eq!(stream.next(), Some(TransactionStatus::InBlock(e1))); assert_eq!(stream.next(), Some(TransactionStatus::Finalized(e1.clone()))); assert_eq!(stream.next(), None); } @@ -533,6 +537,10 @@ fn fork_aware_finalization() { assert_eq!(stream.next(), Some(TransactionStatus::Ready)); assert_eq!(stream.next(), Some(TransactionStatus::InBlock(d2.clone()))); assert_eq!(stream.next(), Some(TransactionStatus::Retracted(d2))); + assert_eq!(stream.next(), Some(TransactionStatus::Ready)); + assert_eq!(stream.next(), Some(TransactionStatus::InBlock(e1))); + assert_eq!(stream.next(), Some(TransactionStatus::Finalized(e1.clone()))); + assert_eq!(stream.next(), None); } } -- GitLab From 07740070215c74ff6d581c77daae6ed0783feafa Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Thu, 20 Feb 2020 13:25:52 +0100 Subject: [PATCH 011/106] `vesting_balance` returns `Option` (#4987) * `vesting_balance` returns `Option` * bump impl --- bin/node/runtime/src/lib.rs | 2 +- frame/support/src/traits.rs | 3 ++- frame/vesting/src/lib.rs | 36 ++++++++++++++++++------------------ 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index b60056e0450..c4d60437a33 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -81,7 +81,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 222, + spec_version: 223, impl_version: 0, apis: RUNTIME_API_VERSIONS, }; diff --git a/frame/support/src/traits.rs b/frame/support/src/traits.rs index 570342bf578..4730e1955e7 100644 --- a/frame/support/src/traits.rs +++ b/frame/support/src/traits.rs @@ -734,7 +734,8 @@ pub trait VestingSchedule { type Currency: Currency; /// Get the amount that is currently being vested and cannot be transferred out of this account. - fn vesting_balance(who: &AccountId) -> >::Balance; + /// Returns `None` if the account has no vesting schedule. + fn vesting_balance(who: &AccountId) -> Option<>::Balance>; /// Adds a vesting schedule to a given account. /// diff --git a/frame/vesting/src/lib.rs b/frame/vesting/src/lib.rs index 15adcaaf53b..dd512598428 100644 --- a/frame/vesting/src/lib.rs +++ b/frame/vesting/src/lib.rs @@ -237,13 +237,13 @@ impl VestingSchedule for Module where type Currency = T::Currency; /// Get the amount that is currently being vested and cannot be transferred out of this account. - fn vesting_balance(who: &T::AccountId) -> BalanceOf { + fn vesting_balance(who: &T::AccountId) -> Option> { if let Some(v) = Self::vesting(who) { let now = >::block_number(); let locked_now = v.locked_at::(now); - T::Currency::free_balance(who).min(locked_now) + Some(T::Currency::free_balance(who).min(locked_now)) } else { - Zero::zero() + None } } @@ -484,28 +484,28 @@ mod tests { assert_eq!(Vesting::vesting(&12), Some(user12_vesting_schedule)); // Account 12 has a vesting schedule // Account 1 has only 128 units vested from their illiquid 256 * 5 units at block 1 - assert_eq!(Vesting::vesting_balance(&1), 128 * 9); + assert_eq!(Vesting::vesting_balance(&1), Some(128 * 9)); // Account 2 has their full balance locked - assert_eq!(Vesting::vesting_balance(&2), user2_free_balance); + assert_eq!(Vesting::vesting_balance(&2), Some(user2_free_balance)); // Account 12 has only their illiquid funds locked - assert_eq!(Vesting::vesting_balance(&12), user12_free_balance - 256 * 5); + assert_eq!(Vesting::vesting_balance(&12), Some(user12_free_balance - 256 * 5)); System::set_block_number(10); assert_eq!(System::block_number(), 10); // Account 1 has fully vested by block 10 - assert_eq!(Vesting::vesting_balance(&1), 0); + assert_eq!(Vesting::vesting_balance(&1), Some(0)); // Account 2 has started vesting by block 10 - assert_eq!(Vesting::vesting_balance(&2), user2_free_balance); + assert_eq!(Vesting::vesting_balance(&2), Some(user2_free_balance)); // Account 12 has started vesting by block 10 - assert_eq!(Vesting::vesting_balance(&12), user12_free_balance - 256 * 5); + assert_eq!(Vesting::vesting_balance(&12), Some(user12_free_balance - 256 * 5)); System::set_block_number(30); assert_eq!(System::block_number(), 30); - assert_eq!(Vesting::vesting_balance(&1), 0); // Account 1 is still fully vested, and not negative - assert_eq!(Vesting::vesting_balance(&2), 0); // Account 2 has fully vested by block 30 - assert_eq!(Vesting::vesting_balance(&12), 0); // Account 2 has fully vested by block 30 + assert_eq!(Vesting::vesting_balance(&1), Some(0)); // Account 1 is still fully vested, and not negative + assert_eq!(Vesting::vesting_balance(&2), Some(0)); // Account 2 has fully vested by block 30 + assert_eq!(Vesting::vesting_balance(&12), Some(0)); // Account 2 has fully vested by block 30 }); } @@ -520,7 +520,7 @@ mod tests { let user1_free_balance = Balances::free_balance(&1); assert_eq!(user1_free_balance, 100); // Account 1 has free balance // Account 1 has only 5 units vested at block 1 (plus 50 unvested) - assert_eq!(Vesting::vesting_balance(&1), 45); + assert_eq!(Vesting::vesting_balance(&1), Some(45)); assert_noop!( Balances::transfer(Some(1).into(), 2, 56), pallet_balances::Error::::LiquidityRestrictions, @@ -538,7 +538,7 @@ mod tests { let user1_free_balance = Balances::free_balance(&1); assert_eq!(user1_free_balance, 100); // Account 1 has free balance // Account 1 has only 5 units vested at block 1 (plus 50 unvested) - assert_eq!(Vesting::vesting_balance(&1), 45); + assert_eq!(Vesting::vesting_balance(&1), Some(45)); assert_ok!(Vesting::vest(Some(1).into())); assert_ok!(Balances::transfer(Some(1).into(), 2, 55)); }); @@ -554,7 +554,7 @@ mod tests { let user1_free_balance = Balances::free_balance(&1); assert_eq!(user1_free_balance, 100); // Account 1 has free balance // Account 1 has only 5 units vested at block 1 (plus 50 unvested) - assert_eq!(Vesting::vesting_balance(&1), 45); + assert_eq!(Vesting::vesting_balance(&1), Some(45)); assert_ok!(Vesting::vest_other(Some(2).into(), 1)); assert_ok!(Balances::transfer(Some(1).into(), 2, 55)); }); @@ -577,12 +577,12 @@ mod tests { assert_eq!(user2_free_balance, 300); // Account 2 has 100 more free balance than normal // Account 1 has only 5 units vested at block 1 (plus 150 unvested) - assert_eq!(Vesting::vesting_balance(&1), 45); + assert_eq!(Vesting::vesting_balance(&1), Some(45)); assert_ok!(Vesting::vest(Some(1).into())); assert_ok!(Balances::transfer(Some(1).into(), 3, 155)); // Account 1 can send extra units gained // Account 2 has no units vested at block 1, but gained 100 - assert_eq!(Vesting::vesting_balance(&2), 200); + assert_eq!(Vesting::vesting_balance(&2), Some(200)); assert_ok!(Vesting::vest(Some(2).into())); assert_ok!(Balances::transfer(Some(2).into(), 3, 100)); // Account 2 can send extra units gained }); @@ -599,7 +599,7 @@ mod tests { assert_eq!(user12_free_balance, 2560); // Account 12 has free balance // Account 12 has liquid funds - assert_eq!(Vesting::vesting_balance(&12), user12_free_balance - 256 * 5); + assert_eq!(Vesting::vesting_balance(&12), Some(user12_free_balance - 256 * 5)); // Account 12 has delayed vesting let user12_vesting_schedule = VestingInfo { -- GitLab From d43b9f3ff94eb1f914ef77b00489bb42e5e40424 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Thu, 20 Feb 2020 13:27:36 +0100 Subject: [PATCH 012/106] Clean up the public API of sc-network-gossip (#5001) --- Cargo.lock | 1 - client/finality-grandpa/src/communication/tests.rs | 12 ++---------- client/network-gossip/Cargo.toml | 7 +++---- client/network-gossip/src/bridge.rs | 9 ++++----- client/network-gossip/src/lib.rs | 8 ++++---- 5 files changed, 13 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index db15cbe5919..622867dac2c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6255,7 +6255,6 @@ dependencies = [ name = "sc-network-gossip" version = "0.8.0" dependencies = [ - "futures 0.1.29", "futures 0.3.4", "futures-timer 3.0.1", "libp2p", diff --git a/client/finality-grandpa/src/communication/tests.rs b/client/finality-grandpa/src/communication/tests.rs index 040ee4c7bbd..5506512b531 100644 --- a/client/finality-grandpa/src/communication/tests.rs +++ b/client/finality-grandpa/src/communication/tests.rs @@ -44,20 +44,12 @@ pub(crate) struct TestNetwork { sender: mpsc::UnboundedSender, } -impl TestNetwork { - fn event_stream_03(&self) -> Pin + Send>> { +impl sc_network_gossip::Network for TestNetwork { + fn event_stream(&self) -> Pin + Send>> { let (tx, rx) = mpsc::unbounded(); let _ = self.sender.unbounded_send(Event::EventStream(tx)); Box::pin(rx) } -} - -impl sc_network_gossip::Network for TestNetwork { - fn event_stream(&self) -> Box + Send> { - Box::new( - self.event_stream_03().map(Ok::<_, ()>).compat() - ) - } fn report_peer(&self, who: sc_network::PeerId, cost_benefit: sc_network::ReputationChange) { let _ = self.sender.unbounded_send(Event::Report(who, cost_benefit)); diff --git a/client/network-gossip/Cargo.toml b/client/network-gossip/Cargo.toml index 98b2bd0590a..8866db1f343 100644 --- a/client/network-gossip/Cargo.toml +++ b/client/network-gossip/Cargo.toml @@ -7,13 +7,12 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -log = "0.4.8" -futures = { version = "0.3.1", features = ["compat"] } -wasm-timer = "0.2" +futures = "0.3.1" futures-timer = "3.0.1" -futures01 = { package = "futures", version = "0.1.29" } libp2p = { version = "0.16.0", default-features = false, features = ["libp2p-websocket"] } +log = "0.4.8" lru = "0.1.2" parking_lot = "0.10.0" sc-network = { version = "0.8", path = "../network" } sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } +wasm-timer = "0.2" diff --git a/client/network-gossip/src/bridge.rs b/client/network-gossip/src/bridge.rs index 87958cbc145..7968e59d070 100644 --- a/client/network-gossip/src/bridge.rs +++ b/client/network-gossip/src/bridge.rs @@ -20,8 +20,7 @@ use crate::state_machine::{ConsensusGossip, TopicNotification, PERIODIC_MAINTENA use sc_network::message::generic::ConsensusMessage; use sc_network::{Event, ReputationChange}; -use futures::{prelude::*, channel::mpsc, compat::Compat01As03}; -use futures01::stream::Stream as Stream01; +use futures::{prelude::*, channel::mpsc}; use libp2p::PeerId; use parking_lot::Mutex; use sp_runtime::{traits::Block as BlockT, ConsensusEngineId}; @@ -38,7 +37,7 @@ struct GossipEngineInner { state_machine: ConsensusGossip, network: Box + Send>, periodic_maintenance_interval: futures_timer::Delay, - network_event_stream: Compat01As03 + Send>>, + network_event_stream: Pin + Send>>, engine_id: ConsensusEngineId, } @@ -64,7 +63,7 @@ impl GossipEngine { state_machine, network: Box::new(network), periodic_maintenance_interval: futures_timer::Delay::new(PERIODIC_MAINTENANCE_INTERVAL), - network_event_stream: Compat01As03::new(network_event_stream), + network_event_stream, engine_id, })); @@ -178,7 +177,7 @@ impl Future for GossipEngineInner { fn poll(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll { let this = &mut *self; - while let Poll::Ready(Some(Ok(event))) = this.network_event_stream.poll_next_unpin(cx) { + while let Poll::Ready(Some(event)) = this.network_event_stream.poll_next_unpin(cx) { match event { Event::NotificationStreamOpened { remote, engine_id: msg_engine_id, roles } => { if msg_engine_id != this.engine_id { diff --git a/client/network-gossip/src/lib.rs b/client/network-gossip/src/lib.rs index 705a27210ac..c4f057a775f 100644 --- a/client/network-gossip/src/lib.rs +++ b/client/network-gossip/src/lib.rs @@ -61,7 +61,7 @@ pub use self::validator::{DiscardAll, MessageIntent, Validator, ValidatorContext use futures::prelude::*; use sc_network::{specialization::NetworkSpecialization, Event, ExHashT, NetworkService, PeerId, ReputationChange}; use sp_runtime::{traits::Block as BlockT, ConsensusEngineId}; -use std::sync::Arc; +use std::{pin::Pin, sync::Arc}; mod bridge; mod state_machine; @@ -70,7 +70,7 @@ mod validator; /// Abstraction over a network. pub trait Network { /// Returns a stream of events representing what happens on the network. - fn event_stream(&self) -> Box + Send>; + fn event_stream(&self) -> Pin + Send>>; /// Adjust the reputation of a node. fn report_peer(&self, peer_id: PeerId, reputation: ReputationChange); @@ -97,8 +97,8 @@ pub trait Network { } impl, H: ExHashT> Network for Arc> { - fn event_stream(&self) -> Box + Send> { - Box::new(NetworkService::event_stream(self).map(|v| Ok::<_, ()>(v)).compat()) + fn event_stream(&self) -> Pin + Send>> { + Box::pin(NetworkService::event_stream(self)) } fn report_peer(&self, peer_id: PeerId, reputation: ReputationChange) { -- GitLab From 308273f85c23c1e2176c11ed5f129adc4b68fb8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 20 Feb 2020 15:21:34 +0100 Subject: [PATCH 013/106] Offchain Workers: Example Pallet (#4989) * Example of offchain worker pallet. * Fix compilation issues. * Use serde_json to parse JSON. * Add some basic tests. * Working on docs. * Fix compilation * Finish docs for signed. * Work on unsigned send. * Add some tests and missing docs. * Add example of StorageValueRef * Add weight. * Extra \n * Fix im-online test. * Bump runtime. * Fix tests. * Apply suggestions from code review Co-Authored-By: Joshy Orndorff Co-Authored-By: Gavin Wood * Address review comments. Co-authored-by: Joshy Orndorff Co-authored-by: Gavin Wood --- Cargo.lock | 29 +- Cargo.toml | 1 + bin/node/runtime/src/lib.rs | 2 +- frame/example-offchain-worker/Cargo.toml | 29 ++ frame/example-offchain-worker/src/lib.rs | 548 +++++++++++++++++++++ frame/example-offchain-worker/src/tests.rs | 210 ++++++++ frame/executive/src/lib.rs | 5 + frame/im-online/src/lib.rs | 2 - frame/im-online/src/tests.rs | 15 +- primitives/core/src/offchain/testing.rs | 6 +- primitives/runtime/src/offchain/mod.rs | 2 + 11 files changed, 832 insertions(+), 17 deletions(-) create mode 100644 frame/example-offchain-worker/Cargo.toml create mode 100644 frame/example-offchain-worker/src/lib.rs create mode 100644 frame/example-offchain-worker/src/tests.rs diff --git a/Cargo.lock b/Cargo.lock index 622867dac2c..2f5dd0e19f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3722,6 +3722,12 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" +[[package]] +name = "nohash-hasher" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "721a2bf1c26159ebf17e0a980bc4ce61f4b2fec5ec3b42d42fddd7a84a9e538f" + [[package]] name = "nohash-hasher" version = "0.2.0" @@ -4149,6 +4155,21 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-example-offchain-worker" +version = "2.0.0" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "serde_json", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-finality-tracker" version = "2.0.0" @@ -6215,7 +6236,7 @@ dependencies = [ "linked_hash_set", "log 0.4.8", "lru 0.4.3", - "nohash-hasher", + "nohash-hasher 0.2.0", "parity-scale-codec", "parking_lot 0.10.0", "prost", @@ -9168,14 +9189,14 @@ checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" [[package]] name = "yamux" -version = "0.4.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d73295bc9d9acf89dd9336b3b5f5b57731ee72b587857dd4312721a0196b48e5" +checksum = "902f4cee32c401c211b6b69f4a3f6f4cf3515644db5bd822cf685a7dbd6201f9" dependencies = [ "bytes 0.5.4", "futures 0.3.4", "log 0.4.8", - "nohash-hasher", + "nohash-hasher 0.1.3", "parking_lot 0.10.0", "rand 0.7.3", "thiserror", diff --git a/Cargo.toml b/Cargo.toml index 350d9eafa4f..1ac2beb052f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,6 +71,7 @@ members = [ "frame/elections", "frame/evm", "frame/example", + "frame/example-offchain-worker", "frame/executive", "frame/finality-tracker", "frame/generic-asset", diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index c4d60437a33..e119fa02824 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -82,7 +82,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. spec_version: 223, - impl_version: 0, + impl_version: 1, apis: RUNTIME_API_VERSIONS, }; diff --git a/frame/example-offchain-worker/Cargo.toml b/frame/example-offchain-worker/Cargo.toml new file mode 100644 index 00000000000..ce858cacdab --- /dev/null +++ b/frame/example-offchain-worker/Cargo.toml @@ -0,0 +1,29 @@ +[package] +name = "pallet-example-offchain-worker" +version = "2.0.0" +authors = ["Parity Technologies "] +edition = "2018" + +[dependencies] +codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } +frame-support = { version = "2.0.0", default-features = false, path = "../support" } +frame-system = { version = "2.0.0", default-features = false, path = "../system" } +serde = { version = "1.0.101", optional = true } +sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } +sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } +serde_json = { version = "1.0.46", default-features = false, features = ["alloc"] } + +[features] +default = ["std"] +std = [ + "codec/std", + "frame-support/std", + "frame-system/std", + "serde", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", +] diff --git a/frame/example-offchain-worker/src/lib.rs b/frame/example-offchain-worker/src/lib.rs new file mode 100644 index 00000000000..1c72a8be686 --- /dev/null +++ b/frame/example-offchain-worker/src/lib.rs @@ -0,0 +1,548 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! # Offchain Worker Example Module +//! +//! The Offchain Worker Example: A simple pallet demonstrating +//! concepts, APIs and structures common to most offchain workers. +//! +//! Run `cargo doc --package pallet-example-offchain-worker --open` to view this module's +//! documentation. +//! +//! - \[`pallet_example_offchain_worker::Trait`](./trait.Trait.html) +//! - \[`Call`](./enum.Call.html) +//! - \[`Module`](./struct.Module.html) +//! +//! +//! \## Overview +//! +//! In this example we are going to build a very simplistic, naive and definitely NOT +//! production-ready oracle for BTC/USD price. +//! Offchain Worker (OCW) will be triggered after every block, fetch the current price +//! and prepare either signed or unsigned transaction to feed the result back on chain. +//! The on-chain logic will simply aggregate the results and store last `64` values to compute +//! the average price. +//! Additional logic in OCW is put in place to prevent spamming the network with both signed +//! and unsigned transactions, and custom `UnsignedValidator` makes sure that there is only +//! one unsigned transaction floating in the network. +#![cfg_attr(not(feature = "std"), no_std)] + +use frame_support::{ + debug, + dispatch::DispatchResult, decl_module, decl_storage, decl_event, + traits::Get, + weights::SimpleDispatchInfo, +}; +use frame_system::{self as system, ensure_signed, ensure_none, offchain}; +use serde_json as json; +use sp_core::crypto::KeyTypeId; +use sp_runtime::{ + offchain::{http, Duration, storage::StorageValueRef}, + traits::Zero, + transaction_validity::{InvalidTransaction, ValidTransaction, TransactionValidity}, +}; + +#[cfg(test)] +mod tests; + +/// Defines application identifier for crypto keys of this module. +/// +/// Every module that deals with signatures needs to declare its unique identifier for +/// its crypto keys. +/// When offchain worker is signing transactions it's going to request keys of type +/// `KeyTypeId` from the keystore and use the ones it finds to sign the transaction. +/// The keys can be inserted manually via RPC (see `author_insertKey`). +pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b"btc!"); + +/// Based on the above `KeyTypeId` we need to generate a pallet-specific crypto type wrappers. +/// We can use from supported crypto kinds (`sr25519`, `ed25519` and `ecdsa`) and augment +/// the types with this pallet-specific identifier. +pub mod crypto { + use super::KEY_TYPE; + use sp_runtime::app_crypto::{app_crypto, sr25519}; + app_crypto!(sr25519, KEY_TYPE); +} + +/// This pallet's configuration trait +pub trait Trait: frame_system::Trait { + /// The type to sign and submit transactions. + type SubmitSignedTransaction: + offchain::SubmitSignedTransaction::Call>; + /// The type to submit unsigned transactions. + type SubmitUnsignedTransaction: + offchain::SubmitUnsignedTransaction::Call>; + + /// The overarching event type. + type Event: From> + Into<::Event>; + /// The overarching dispatch call type. + type Call: From>; + + // Configuration parameters + + /// A grace period after we send transaction. + /// + /// To avoid sending too many transactions, we only attempt to send one + /// every `GRACE_PERIOD` blocks. We use Local Storage to coordinate + /// sending between distinct runs of this offchain worker. + type GracePeriod: Get; + + /// Number of blocks of cooldown after unsigned transaction is included. + /// + /// This ensures that we only accept unsigned transactions once, every `UnsignedInterval` blocks. + type UnsignedInterval: Get; +} + +decl_storage! { + trait Store for Module as Example { + /// A vector of recently submitted prices. + /// + /// This is used to calculate average price, should have bounded size. + Prices get(fn prices): Vec; + /// Defines the block when next unsigned transaction will be accepted. + /// + /// To prevent spam of unsigned (and unpayed!) transactions on the network, + /// we only allow one transaction every `T::UnsignedInterval` blocks. + /// This storage entry defines when new transaction is going to be accepted. + NextUnsignedAt get(fn next_unsigned_at): T::BlockNumber; + } +} + +decl_event!( + /// Events generated by the module. + pub enum Event where AccountId = ::AccountId { + /// Event generated when new price is accepted to contribute to the average. + NewPrice(u32, AccountId), + } +); + +decl_module! { + /// A public part of the pallet. + pub struct Module for enum Call where origin: T::Origin { + fn deposit_event() = default; + + /// Submit new price to the list. + /// + /// This method is a public function of the module and can be called from within + /// a transaction. It appends given `price` to current list of prices. + /// In our example the `offchain worker` will create, sign & submit a transaction that + /// calls this function passing the price. + /// + /// The transaction needs to be signed (see `ensure_signed`) check, so that the caller + /// pays a fee to execute it. + /// This makes sure that it's not easy (or rather cheap) to attack the chain by submitting + /// excesive transactions, but note that it doesn't ensure the price oracle is actually + /// working and receives (and provides) meaningful data. + /// This example is not focused on correctness of the oracle itself, but rather its + /// purpose is to showcase offchain worker capabilities. + #[weight = SimpleDispatchInfo::FixedNormal(10_000)] + pub fn submit_price(origin, price: u32) -> DispatchResult { + // Retrieve sender of the transaction. + let who = ensure_signed(origin)?; + // Add the price to the on-chain list. + Self::add_price(who, price); + Ok(()) + } + + /// Submit new price to the list via unsigned transaction. + /// + /// Works exactly like the `submit_price` function, but since we allow sending the + /// transaction without a signature, and hence without paying any fees, + /// we need a way to make sure that only some transactions are accepted. + /// This function can be called only once every `T::UnsignedInterval` blocks. + /// Transactions that call that function are de-duplicated on the pool level + /// via `validate_unsigned` implementation and also are rendered invalid if + /// the function has already been called in current "session". + /// + /// It's important to specify `weight` for unsigned calls as well, because even though + /// they don't charge fees, we still don't want a single block to contain unlimited + /// number of such transactions. + /// + /// This example is not focused on correctness of the oracle itself, but rather its + /// purpose is to showcase offchain worker capabilities. + #[weight = SimpleDispatchInfo::FixedNormal(10_000)] + pub fn submit_price_unsigned(origin, _block_number: T::BlockNumber, price: u32) + -> DispatchResult + { + // This ensures that the function can only be called via unsigned transaction. + ensure_none(origin)?; + // Add the price to the on-chain list, but mark it as coming from an empty address. + Self::add_price(Default::default(), price); + // now increment the block number at which we expect next unsigned transaction. + let current_block = >::block_number(); + >::put(current_block + T::UnsignedInterval::get()); + Ok(()) + } + + /// Offchain Worker entry point. + /// + /// By implementing `fn offchain_worker` within `decl_module!` you declare a new offchain + /// worker. + /// This function will be called when the node is fully synced and a new best block is + /// succesfuly imported. + /// Note that it's not guaranteed for offchain workers to run on EVERY block, there might + /// be cases where some blocks are skipped, or for some the worker runs twice (re-orgs), + /// so the code should be able to handle that. + /// You can use `Local Storage` API to coordinate runs of the worker. + fn offchain_worker(block_number: T::BlockNumber) { + // It's a good idea to add logs to your offchain workers. + // Using the `frame_support::debug` module you have access to the same API exposed by + // the `log` crate. + // Note that having logs compiled to WASM may cause the size of the blob to increase + // significantly. You can use `RuntimeDebug` custom derive to hide details of the types + // in WASM or use `debug::native` namespace to produce logs only when the worker is + // running natively. + debug::native::info!("Hello World from offchain workers!"); + + // Since off-chain workers are just part of the runtime code, they have direct access + // to the storage and other included pallets. + // + // We can easily import `frame_system` and retrieve a block hash of the parent block. + let parent_hash = >::block_hash(block_number - 1.into()); + debug::debug!("Current block: {:?} (parent hash: {:?})", block_number, parent_hash); + + // It's a good practice to keep `fn offchain_worker()` function minimal, and move most + // of the code to separate `impl` block. + // Here we call a helper function to calculate current average price. + // This function reads storage entries of the current state. + let average: Option = Self::average_price(); + debug::debug!("Current price: {:?}", average); + + // For this example we are going to send both signed and unsigned transactions + // depending on the block number. + // Usually it's enough to choose one or the other. + let should_send = Self::choose_transaction_type(block_number); + let res = match should_send { + TransactionType::Signed => Self::fetch_price_and_send_signed(), + TransactionType::Unsigned => Self::fetch_price_and_send_unsigned(block_number), + TransactionType::None => Ok(()), + }; + if let Err(e) = res { + debug::error!("Error: {}", e); + } + } + } +} + +enum TransactionType { + Signed, + Unsigned, + None, +} + +/// Most of the functions are moved outside of the `decl_module!` macro. +/// +/// This greatly helps with error messages, as the ones inside the macro +/// can sometimes be hard to debug. +impl Module { + /// Chooses which transaction type to send. + /// + /// This function serves mostly to showcase `StorageValue` helper + /// and local storage usage. + /// + /// Returns a type of transaction that should be produced in current run. + fn choose_transaction_type(block_number: T::BlockNumber) -> TransactionType { + /// A friendlier name for the error that is going to be returned in case we are in the grace + /// period. + const RECENTLY_SENT: () = (); + + // Start off by creating a reference to Local Storage value. + // Since the local storage is common for all offchain workers, it's a good practice + // to prepend your entry with the module name. + let val = StorageValueRef::persistent(b"example_ocw::last_send"); + // The Local Storage is persisted and shared between runs of the offchain workers, + // and offchain workers may run concurrently. We can use the `mutate` function, to + // write a storage entry in an atomic fashion. Under the hood it uses `compare_and_set` + // low-level method of local storage API, which means that only one worker + // will be able to "acquire a lock" and send a transaction if multiple workers + // happen to be executed concurrently. + let res = val.mutate(|last_send: Option>| { + // We match on the value decoded from the storage. The first `Option` + // indicates if the value was present in the storage at all, + // the second (inner) `Option` indicates if the value was succesfuly + // decoded to expected type (`T::BlockNumber` in our case). + match last_send { + // If we already have a value in storage and the block number is recent enough + // we avoid sending another transaction at this time. + Some(Some(block)) if block + T::GracePeriod::get() < block_number => { + Err(RECENTLY_SENT) + }, + // In every other case we attempt to acquire the lock and send a transaction. + _ => Ok(block_number) + } + }); + + // The result of `mutate` call will give us a nested `Result` type. + // The first one matches the return of the closure passed to `mutate`, i.e. + // if we return `Err` from the closure, we get an `Err` here. + // In case we return `Ok`, here we will have another (inner) `Result` that indicates + // if the value has been set to the storage correctly - i.e. if it wasn't + // written to in the meantime. + match res { + // The value has been set correctly, which means we can safely send a transaction now. + Ok(Ok(block_number)) => { + // Depending if the block is even or odd we will send a `Signed` or `Unsigned` + // transaction. + // Note that this logic doesn't really guarantee that the transactions will be sent + // in an alternating fashion (i.e. fairly distributed). Depending on the execution + // order and lock acquisition, we may end up for instance sending two `Signed` + // transactions in a row. If a strict order is desired, it's better to use + // the storage entry for that. (for instance store both block number and a flag + // indicating the type of next transaction to send). + let send_signed = block_number % 2.into() == Zero::zero(); + if send_signed { + TransactionType::Signed + } else { + TransactionType::Unsigned + } + }, + // We are in the grace period, we should not send a transaction this time. + Err(RECENTLY_SENT) => TransactionType::None, + // We wanted to send a transaction, but failed to write the block number (acquire a + // lock). This indicates that another offchain worker that was running concurrently + // most likely executed the same logic and succeeded at writing to storage. + // Thus we don't really want to send the transaction, knowing that the other run + // already did. + Ok(Err(_)) => TransactionType::None, + } + } + + /// A helper function to fetch the price and send signed transaction. + fn fetch_price_and_send_signed() -> Result<(), String> { + use system::offchain::SubmitSignedTransaction; + // Firstly we check if there are any accounts in the local keystore that are capable of + // signing the transaction. + // If not it doesn't even make sense to make external HTTP requests, since we won't be able + // to put the results back on-chain. + if !T::SubmitSignedTransaction::can_sign() { + return Err( + "No local accounts available. Consider adding one via `author_insertKey` RPC." + )? + } + + // Make an external HTTP request to fetch the current price. + // Note this call will block until response is received. + let price = Self::fetch_price().map_err(|e| format!("{:?}", e))?; + + // Received price is wrapped into a call to `submit_price` public function of this pallet. + // This means that the transaction, when executed, will simply call that function passing + // `price` as an argument. + let call = Call::submit_price(price); + + // Using `SubmitSignedTransaction` associated type we create and submit a transaction + // 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); + for (acc, res) in &results { + match res { + Ok(()) => debug::info!("[{:?}] Submitted price of {} cents", acc, price), + Err(e) => debug::error!("[{:?}] Failed to submit transaction: {:?}", acc, e), + } + } + + Ok(()) + } + + /// A helper function to fetch the price and send unsigned transaction. + fn fetch_price_and_send_unsigned(block_number: T::BlockNumber) -> Result<(), String> { + use system::offchain::SubmitUnsignedTransaction; + // Make sure we don't fetch the price if unsigned transaction is going to be rejected + // anyway. + let next_unsigned_at = >::get(); + if next_unsigned_at > block_number { + return Err( + format!("Too early to send unsigned transaction. Next at: {:?}", next_unsigned_at) + )? + } + + // Make an external HTTP request to fetch the current price. + // Note this call will block until response is received. + let price = Self::fetch_price().map_err(|e| format!("{:?}", e))?; + + // Received price is wrapped into a call to `submit_price_unsigned` public function of this + // pallet. This means that the transaction, when executed, will simply call that function + // passing `price` as an argument. + let call = Call::submit_price_unsigned(block_number, price); + + // Now let's create an unsigned transaction out of this call and submit it to the pool. + // By default unsigned transactions are disallowed, so we need to whitelist this case + // by writing `UnsignedValidator`. Note that it's EXTREMELY important to carefuly + // implement unsigned validation logic, as any mistakes can lead to opening DoS or spam + // attack vectors. See validation logic docs for more details. + T::SubmitUnsignedTransaction::submit_unsigned(call) + .map_err(|()| "Unable to submit unsigned transaction.".into()) + + } + + /// Fetch current price and return the result in cents. + fn fetch_price() -> Result { + // We want to keep the offchain worker execution time reasonable, so we set a hard-coded + // deadline to 2s to complete the external call. + // You can also wait idefinitely for the response, however you may still get a timeout + // coming from the host machine. + let deadline = sp_io::offchain::timestamp().add(Duration::from_millis(2_000)); + // Initiate an external HTTP GET request. + // This is using high-level wrappers from `sp_runtime`, for the low-level calls that + // you can find in `sp_io`. The API is trying to be similar to `reqwest`, but + // since we are running in a custom WASM execution environment we can't simply + // import the library here. + let request = http::Request::get( + "https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=USD" + ); + // We set the deadline for sending of the request, note that awaiting response can + // have a separate deadline. Next we send the request, before that it's also possible + // to alter request headers or stream body content in case of non-GET requests. + let pending = request + .deadline(deadline) + .send() + .map_err(|_| http::Error::IoError)?; + + // The request is already being processed by the host, we are free to do anything + // else in the worker (we can send multiple concurrent requests too). + // At some point however we probably want to check the response though, + // so we can block current thread and wait for it to finish. + // Note that since the request is being driven by the host, we don't have to wait + // for the request to have it complete, we will just not read the response. + let response = pending.try_wait(deadline) + .map_err(|_| http::Error::DeadlineReached)??; + // Let's check the status code before we proceed to reading the response. + if response.code != 200 { + debug::warn!("Unexpected status code: {}", response.code); + return Err(http::Error::Unknown); + } + + // Next we want to fully read the response body and collect it to a vector of bytes. + // Note that the return object allows you to read the body in chunks as well + // with a way to control the deadline. + let body = response.body().collect::>(); + // Next we parse the response using `serde_json`. Even though it's possible to use + // `serde_derive` and deserialize to a struct it's not recommended due to blob size + // overhead introduced by such code. Deserializing to `json::Value` is much more + // lightweight and should be preferred, especially if we only care about a small number + // of properties from the response. + let val: Result = json::from_slice(&body); + // Let's parse the price as float value. Note that you should avoid using floats in the + // runtime, it's fine to do that in the offchain worker, but we do convert it to an integer + // before submitting on-chain. + let price = val.ok().and_then(|v| v.get("USD").and_then(|v| v.as_f64())); + let price = match price { + Some(pricef) => Ok((pricef * 100.) as u32), + None => { + let s = core::str::from_utf8(&body); + debug::warn!("Unable to extract price from the response: {:?}", s); + Err(http::Error::Unknown) + } + }?; + + debug::warn!("Got price: {} cents", price); + + Ok(price) + } + + /// Add new price to the list. + fn add_price(who: T::AccountId, price: u32) { + debug::info!("Adding to the average: {}", price); + Prices::mutate(|prices| { + const MAX_LEN: usize = 64; + + if prices.len() < MAX_LEN { + prices.push(price); + } else { + prices[price as usize % MAX_LEN] = price; + } + }); + + let average = Self::average_price() + .expect("The average is not empty, because it was just mutated; qed"); + debug::info!("Current average price is: {}", average); + // here we are raising the NewPrice event + Self::deposit_event(RawEvent::NewPrice(price, who)); + } + + /// Calculate current average price. + fn average_price() -> Option { + let prices = Prices::get(); + if prices.is_empty() { + None + } else { + Some(prices.iter().fold(0_u32, |a, b| a.saturating_add(*b)) / prices.len() as u32) + } + } +} + +#[allow(deprecated)] // ValidateUnsigned +impl frame_support::unsigned::ValidateUnsigned for Module { + type Call = Call; + + /// Validate unsigned call to this module. + /// + /// By default unsigned transactions are disallowed, but implementing the validator + /// here we make sure that some particular calls (the ones produced by offchain worker) + /// are being whitelisted and marked as valid. + fn validate_unsigned(call: &Self::Call) -> TransactionValidity { + // Firstly let's check that we call the right function. + if let Call::submit_price_unsigned(block_number, new_price) = call { + // Now let's check if the transaction has any chance to succeed. + let next_unsigned_at = >::get(); + if &next_unsigned_at > block_number { + return InvalidTransaction::Stale.into(); + } + // Let's make sure to reject transactions from the future. + let current_block = >::block_number(); + if ¤t_block < block_number { + return InvalidTransaction::Future.into(); + } + + // We prioritize transactions that are more far away from current average. + // + // Note this doesn't make much sense when building an actual oracle, but this example + // is here mostly to show off offchain workers capabilities, not about building an + // oracle. + let avg_price = Self::average_price() + .map(|price| if &price > new_price { price - new_price } else { new_price - price }) + .unwrap_or(0); + + Ok(ValidTransaction { + // We set base priority to 2**20 to make sure it's included before any other + // transactions in the pool. Next we tweak the priority depending on how much + // it differs from the current average. (the more it differs the more priority it + // has). + priority: (1 << 20) + avg_price as u64, + // This transaction does not require anything else to go before into the pool. + // In theory we could require `previous_unsigned_at` transaction to go first, + // but it's not necessary in our case. + requires: vec![], + // We set the `provides` tag to be the same as `next_unsigned_at`. This makes + // sure only one transaction produced after `next_unsigned_at` will ever + // get to the transaction pool and will end up in the block. + // We can still have multiple transactions compete for the same "spot", + // and the one with higher priority will replace other one in the pool. + provides: vec![codec::Encode::encode(&(KEY_TYPE.0, next_unsigned_at))], + // The transaction is only valid for next 5 blocks. After that it's + // going to be revalidated by the pool. + longevity: 5, + // It's fine to propagate that transaction to other peers, which means it can be + // created even by nodes that don't produce blocks. + // Note that sometimes it's better to keep it for yourself (if you are the block + // producer), since for instance in some schemes others may copy your solution and + // claim a reward. + propagate: true, + }) + } else { + InvalidTransaction::Call.into() + } + } +} diff --git a/frame/example-offchain-worker/src/tests.rs b/frame/example-offchain-worker/src/tests.rs new file mode 100644 index 00000000000..6d6a82d8c99 --- /dev/null +++ b/frame/example-offchain-worker/src/tests.rs @@ -0,0 +1,210 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use crate::*; + +use codec::Decode; +use frame_support::{ + assert_ok, impl_outer_origin, parameter_types, + weights::{GetDispatchInfo, Weight}, +}; +use sp_core::{ + H256, + offchain::{OffchainExt, TransactionPoolExt, testing}, + testing::KeyStore, + traits::KeystoreExt, +}; +use sp_runtime::{ + Perbill, RuntimeAppPublic, + testing::{Header, TestXt}, + traits::{BlakeTwo256, IdentityLookup, Extrinsic as ExtrinsicsT}, +}; + +impl_outer_origin! { + pub enum Origin for Test where system = frame_system {} +} + +// For testing the module, we construct most of a mock runtime. This means +// first constructing a configuration type (`Test`) which `impl`s each of the +// configuration traits of modules we want to use. +#[derive(Clone, Eq, PartialEq)] +pub struct Test; +parameter_types! { + pub const BlockHashCount: u64 = 250; + pub const MaximumBlockWeight: Weight = 1024; + pub const MaximumBlockLength: u32 = 2 * 1024; + pub const AvailableBlockRatio: Perbill = Perbill::one(); +} +impl frame_system::Trait for Test { + type Origin = Origin; + type Index = u64; + type BlockNumber = u64; + type Hash = H256; + type Call = (); + type Hashing = BlakeTwo256; + type AccountId = sp_core::sr25519::Public; + type Lookup = IdentityLookup; + type Header = Header; + type Event = (); + type BlockHashCount = BlockHashCount; + type MaximumBlockWeight = MaximumBlockWeight; + type MaximumBlockLength = MaximumBlockLength; + type AvailableBlockRatio = AvailableBlockRatio; + type Version = (); + type ModuleToIndex = (); + type OnReapAccount = (); + type OnNewAccount = (); + type AccountData = (); +} + +type Extrinsic = TestXt, ()>; +type SubmitTransaction = frame_system::offchain::TransactionSubmitter< + crypto::Public, + Test, + Extrinsic +>; + +impl frame_system::offchain::CreateTransaction for Test { + type Public = sp_core::sr25519::Public; + type Signature = sp_core::sr25519::Signature; + + fn create_transaction>( + call: ::Call, + _public: Self::Public, + _account: ::AccountId, + nonce: ::Index, + ) -> Option<(::Call, ::SignaturePayload)> { + Some((call, (nonce, ()))) + } +} + +parameter_types! { + pub const GracePeriod: u64 = 5; + pub const UnsignedInterval: u64 = 128; +} + +impl Trait for Test { + type Event = (); + type Call = Call; + type SubmitSignedTransaction = SubmitTransaction; + type SubmitUnsignedTransaction = SubmitTransaction; + type GracePeriod = GracePeriod; + type UnsignedInterval = UnsignedInterval; +} + +type Example = Module; + +#[test] +fn it_aggregates_the_price() { + sp_io::TestExternalities::default().execute_with(|| { + assert_eq!(Example::average_price(), None); + + assert_ok!(Example::submit_price(Origin::signed(Default::default()), 27)); + assert_eq!(Example::average_price(), Some(27)); + + assert_ok!(Example::submit_price(Origin::signed(Default::default()), 43)); + assert_eq!(Example::average_price(), Some(35)); + }); +} + +#[test] +fn should_make_http_call_and_parse_result() { + let (offchain, state) = testing::TestOffchainExt::new(); + let mut t = sp_io::TestExternalities::default(); + t.register_extension(OffchainExt::new(offchain)); + + price_oracle_response(&mut state.write()); + + t.execute_with(|| { + // when + let price = Example::fetch_price().unwrap(); + // then + assert_eq!(price, 15522); + }); +} + +#[test] +fn should_submit_signed_transaction_on_chain() { + const PHRASE: &str = "news slush supreme milk chapter athlete soap sausage put clutch what kitten"; + + let (offchain, offchain_state) = testing::TestOffchainExt::new(); + let (pool, pool_state) = testing::TestTransactionPoolExt::new(); + let keystore = KeyStore::new(); + keystore.write().sr25519_generate_new( + crate::crypto::Public::ID, + Some(&format!("{}/hunter1", PHRASE)) + ).unwrap(); + + + let mut t = sp_io::TestExternalities::default(); + t.register_extension(OffchainExt::new(offchain)); + t.register_extension(TransactionPoolExt::new(pool)); + t.register_extension(KeystoreExt(keystore)); + + price_oracle_response(&mut offchain_state.write()); + + t.execute_with(|| { + // when + Example::fetch_price_and_send_signed().unwrap(); + // then + let tx = pool_state.write().transactions.pop().unwrap(); + assert!(pool_state.read().transactions.is_empty()); + let tx = Extrinsic::decode(&mut &*tx).unwrap(); + assert_eq!(tx.signature.unwrap().0, 0); + assert_eq!(tx.call, Call::submit_price(15522)); + }); +} + +#[test] +fn should_submit_unsigned_transaction_on_chain() { + let (offchain, offchain_state) = testing::TestOffchainExt::new(); + let (pool, pool_state) = testing::TestTransactionPoolExt::new(); + let mut t = sp_io::TestExternalities::default(); + t.register_extension(OffchainExt::new(offchain)); + t.register_extension(TransactionPoolExt::new(pool)); + + price_oracle_response(&mut offchain_state.write()); + + t.execute_with(|| { + // when + Example::fetch_price_and_send_unsigned(1).unwrap(); + // then + let tx = pool_state.write().transactions.pop().unwrap(); + assert!(pool_state.read().transactions.is_empty()); + let tx = Extrinsic::decode(&mut &*tx).unwrap(); + assert_eq!(tx.signature, None); + assert_eq!(tx.call, Call::submit_price_unsigned(1, 15522)); + }); +} + +#[test] +fn weights_work() { + // must have a default weight. + let default_call = >::submit_price(10); + let info = default_call.get_dispatch_info(); + // aka. `let info = as GetDispatchInfo>::get_dispatch_info(&default_call);` + assert_eq!(info.weight, 10_000); +} + +fn price_oracle_response(state: &mut testing::OffchainState) { + state.expect_request(0, testing::PendingRequest { + method: "GET".into(), + uri: "https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=USD".into(), + response: Some(br#"{"USD": 155.23}"#.to_vec()), + sent: true, + ..Default::default() + }); +} diff --git a/frame/executive/src/lib.rs b/frame/executive/src/lib.rs index 792643919d7..18f4edf3441 100644 --- a/frame/executive/src/lib.rs +++ b/frame/executive/src/lib.rs @@ -357,6 +357,11 @@ where &digests, frame_system::InitKind::Inspection, ); + + // Initialize logger, so the log messages are visible + // also when running WASM. + frame_support::debug::RuntimeLogger::init(); + >::offchain_worker( // to maintain backward compatibility we call module offchain workers // with parent block number. diff --git a/frame/im-online/src/lib.rs b/frame/im-online/src/lib.rs index a050ad3d8a9..0132bcedd20 100644 --- a/frame/im-online/src/lib.rs +++ b/frame/im-online/src/lib.rs @@ -341,8 +341,6 @@ decl_module! { // Runs after every block. fn offchain_worker(now: T::BlockNumber) { - debug::RuntimeLogger::init(); - // Only send messages if we are a potential validator. if sp_io::offchain::is_validator() { for res in Self::send_heartbeats(now).into_iter().flatten() { diff --git a/frame/im-online/src/tests.rs b/frame/im-online/src/tests.rs index 80056023e50..4ce5dec9613 100644 --- a/frame/im-online/src/tests.rs +++ b/frame/im-online/src/tests.rs @@ -192,6 +192,8 @@ fn late_heartbeat_should_fail() { #[test] fn should_generate_heartbeats() { + use sp_runtime::traits::OffchainWorker; + let mut ext = new_test_ext(); let (offchain, _state) = TestOffchainExt::new(); let (pool, state) = TestTransactionPoolExt::new(); @@ -202,6 +204,7 @@ fn should_generate_heartbeats() { // given let block = 1; System::set_block_number(block); + UintAuthorityId::set_all_keys(vec![0, 1, 2]); // buffer new validators Session::rotate_session(); // enact the change and buffer another one @@ -209,17 +212,13 @@ fn should_generate_heartbeats() { Session::rotate_session(); // when - UintAuthorityId::set_all_keys(vec![0, 1, 2]); - ImOnline::send_heartbeats(2) - .unwrap() - // make sure to consume the iterator and check there are no errors. - .collect::, _>>().unwrap(); - + ImOnline::offchain_worker(block); // then let transaction = state.write().transactions.pop().unwrap(); - // All validators have `0` as their session key, so we generate 3 transactions. + // All validators have `0` as their session key, so we generate 2 transactions. assert_eq!(state.read().transactions.len(), 2); + // check stuff about the transaction. let ex: Extrinsic = Decode::decode(&mut &*transaction).unwrap(); let heartbeat = match ex.call { @@ -228,7 +227,7 @@ fn should_generate_heartbeats() { }; assert_eq!(heartbeat, Heartbeat { - block_number: 2, + block_number: block, network_state: sp_io::offchain::network_state().unwrap(), session_index: 2, authority_index: 2, diff --git a/primitives/core/src/offchain/testing.rs b/primitives/core/src/offchain/testing.rs index 82438dd6f85..f4faee6b026 100644 --- a/primitives/core/src/offchain/testing.rs +++ b/primitives/core/src/offchain/testing.rs @@ -72,6 +72,8 @@ pub struct OffchainState { pub persistent_storage: InMemOffchainStorage, /// Local storage pub local_storage: InMemOffchainStorage, + /// Current timestamp (unix millis) + pub timestamp: u64, } impl OffchainState { @@ -144,7 +146,7 @@ impl TestOffchainExt { impl offchain::Externalities for TestOffchainExt { fn is_validator(&self) -> bool { - unimplemented!("not needed in tests so far") + true } fn network_state(&self) -> Result { @@ -155,7 +157,7 @@ impl offchain::Externalities for TestOffchainExt { } fn timestamp(&mut self) -> Timestamp { - unimplemented!("not needed in tests so far") + Timestamp::from_unix_millis(self.0.read().timestamp) } fn sleep_until(&mut self, _deadline: Timestamp) { diff --git a/primitives/runtime/src/offchain/mod.rs b/primitives/runtime/src/offchain/mod.rs index dfc15360c6c..9f0f949eaeb 100644 --- a/primitives/runtime/src/offchain/mod.rs +++ b/primitives/runtime/src/offchain/mod.rs @@ -18,3 +18,5 @@ pub mod http; pub mod storage; + +pub use sp_core::offchain::*; -- GitLab From 99cc19d0ca171325b3c67bb595ea1e23ac39fe17 Mon Sep 17 00:00:00 2001 From: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Date: Thu, 20 Feb 2020 16:46:11 +0100 Subject: [PATCH 014/106] Unsigned transactions should also note weight (#4998) * Make unsigned also note weight * Bump. * Fix tests * Better fee test * Fix another test * Update lock file --- Cargo.lock | 8913 +++++++++++++++--------------- bin/node/executor/tests/basic.rs | 11 +- bin/node/executor/tests/fees.rs | 24 +- bin/node/runtime/src/lib.rs | 4 +- frame/executive/src/lib.rs | 43 +- frame/system/src/lib.rs | 71 +- 6 files changed, 4557 insertions(+), 4509 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2f5dd0e19f3..97e56ffae21 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7436 +4,6980 @@ name = "Inflector" version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" dependencies = [ - "lazy_static", - "regex", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "adler32" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" [[package]] name = "aes-ctr" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2e5b0458ea3beae0d1d8c0f3946564f8e10f90646cf78c06b4351052058d1ee" dependencies = [ - "aes-soft", - "aesni", - "ctr", - "stream-cipher", + "aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "aes-soft" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d" dependencies = [ - "block-cipher-trait", - "byteorder 1.3.4", - "opaque-debug", + "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "aesni" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100" dependencies = [ - "block-cipher-trait", - "opaque-debug", - "stream-cipher", + "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ahash" version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f33b5018f120946c1dcf279194f238a9f146725593ead1c08fa47ff22b0b5d3" dependencies = [ - "const-random", + "const-random 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "aho-corasick" version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743ad5a418686aad3b87fd14c43badd828cf26e214a00f92a384291cf22e1811" dependencies = [ - "memchr", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "anyhow" version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" [[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", + "ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "arc-swap" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7b8a9123b8027467bce0099fe556c628a53c8d83df0507084c31e9ba2e39aff" [[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", + "nodrop 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "asn1_der_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.2", - "syn", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "assert_cmd" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6283bac8dd7226470d491bc4737816fea4ca1fba7a2847f2e9097fd6bfb4624c" dependencies = [ - "doc-comment", - "escargot", - "predicates", - "predicates-core", - "predicates-tree", + "doc-comment 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "escargot 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 0.4.8", - "memchr", - "mio", - "mio-uds", - "num_cpus", - "once_cell", - "pin-project-lite", - "pin-utils", - "slab", +dependencies = [ + "async-task 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "broadcaster 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "kv-log-macro 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "once_cell 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "async-tls" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce6977f57fa68da77ffe5542950d47e9c23d65f5bc7cb0a9f8700996913eec7" dependencies = [ - "futures 0.3.4", - "rustls", - "webpki", - "webpki-roots 0.17.0", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki-roots 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "hermit-abi 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 = "backtrace" -version = "0.3.43" +version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f80256bc78f67e7df7e36d77366f636ed976895d91fe2ab9efa3973e8fe8c4f" dependencies = [ - "backtrace-sys", - "cfg-if", - "libc", - "rustc-demangle", + "backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "backtrace-sys" version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" dependencies = [ - "cc", - "libc", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "base58" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" [[package]] name = "base64" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" dependencies = [ - "byteorder 1.3.4", - "safemem", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "base64" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" dependencies = [ - "byteorder 1.3.4", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "base64" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" [[package]] name = "bincode" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5753e2a71534719bf3f4e57006c3a4f0d2c672a4b676eec84161f763eca87dbf" dependencies = [ - "byteorder 1.3.4", - "serde", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bindgen" version = "0.49.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c07087f3d5731bf3fb375a81841b99597e25dc11bd3bc72d16d43adf6624a6e" dependencies = [ - "bitflags", - "cexpr", - "cfg-if", - "clang-sys", - "clap", - "env_logger 0.6.2", - "fxhash", - "lazy_static", - "log 0.4.8", - "peeking_take_while", - "proc-macro2 0.4.30", - "quote 0.6.13", - "regex", - "shlex", - "which 2.0.1", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cexpr 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "clang-sys 0.28.1 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993f74b4c99c1908d156b8d2e0fb6277736b0ecbd833982fd1241d39b2766a6" [[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", + "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "arrayvec 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 1.3.4", - "generic-array", + "block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "block-cipher-trait" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" dependencies = [ - "generic-array", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "block-padding" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" dependencies = [ - "byte-tools", + "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.0", - "slab", + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "browser-utils" version = "0.8.0" dependencies = [ - "chrono", - "clear_on_drop", - "console_error_panic_hook", - "console_log", - "futures 0.1.29", - "futures 0.3.4", - "futures-timer 3.0.1", - "js-sys", - "kvdb-web", - "libp2p", - "log 0.4.8", - "rand 0.6.5", - "rand 0.7.3", - "sc-chain-spec", - "sc-informant", - "sc-network", - "sc-service", - "wasm-bindgen", - "wasm-bindgen-futures", + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb-web 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-chain-spec 2.0.0", + "sc-informant 0.8.0", + "sc-network 0.8.0", + "sc-service 0.8.0", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bs58" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95ee6bba9d950218b6cc910cf62bc9e0a171d0f4537e3627b0f54d08549b188" [[package]] name = "bs58" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b170cd256a3f9fa6b9edae3e44a7dfdfc77e8124dbc3e2612d75f9c3e2396dae" [[package]] name = "bstr" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "502ae1441a0a5adb8fbd38a5955a6416b9493e92b465de5e4a9bde6a539c2c48" dependencies = [ - "lazy_static", - "memchr", - "regex-automata", - "serde", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "build-helper" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdce191bf3fa4995ce948c8c83b4640a1745457a149e73c6db75b4ffe36aad5f" dependencies = [ - "semver 0.6.0", + "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bumpalo" version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f359dc14ff8911330a51ef78022d376f25ed00248912803b58f00cb1c27f742" [[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 = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" [[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 1.3.4", - "either", - "iovec", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bytes" version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" [[package]] name = "c2-chacha" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" dependencies = [ - "ppv-lite86", + "ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "c_linked_list" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" [[package]] name = "cargo_metadata" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46e3374c604fb39d1a2f35ed5e4a4e30e60d01fab49446e08f1b3e9a90aef202" dependencies = [ - "semver 0.9.0", - "serde", - "serde_derive", - "serde_json", + "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cast" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0" dependencies = [ - "rustc_version", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cc" version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" dependencies = [ - "jobserver", + "jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cexpr" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fce5b5fb86b0c57c20c834c1b412fd09c77c8a59b9473f86272709e78874cd1d" dependencies = [ - "nom", + "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "chain-spec-builder" version = "2.0.0" dependencies = [ - "ansi_term 0.12.1", - "node-cli", - "rand 0.7.3", - "sc-keystore", - "sp-core", - "structopt", + "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", + "node-cli 2.0.0", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-keystore 2.0.0", + "sp-core 2.0.0", + "structopt 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "chrono" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01" dependencies = [ - "js-sys", - "num-integer", - "num-traits", - "time", - "wasm-bindgen", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "clang-sys" version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81de550971c976f176130da4b2978d3b524eaa0fd9ac31f3ceb5ae1231fb4853" dependencies = [ - "glob 0.3.0", - "libc", - "libloading", + "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "clear_on_drop" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97276801e127ffb46b66ce23f35cc96bd454fa311294bced4bbace7baa8b1d17" dependencies = [ - "cc", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cmake" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fb25b677f8bf1eb325017cb6bb8452f87969db0fedb4f757b297bee78a7c62" dependencies = [ - "cc", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "console_error_panic_hook" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d976903543e0c48546a91908f21588a680a8c8f984df9a5d69feccb2b2a211" dependencies = [ - "cfg-if", - "wasm-bindgen", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "console_log" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7871d2947441b0fdd8e2bd1ce2a2f75304f896582c0d572162d48290683c48" dependencies = [ - "log 0.4.8", - "web-sys", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "const-random-macro 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" dependencies = [ - "core-foundation-sys", - "libc", + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "core-foundation-sys" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" [[package]] name = "cranelift-bforest" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd0f53d59dc9ab1c8ab68c991d8406b52b7a0aab0b15b05a3a6895579c4e5dd9" dependencies = [ - "cranelift-entity", + "cranelift-entity 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cranelift-codegen" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0381a794836fb994c47006465d46d46be072483b667f36013d993b9895117fee" dependencies = [ - "byteorder 1.3.4", - "cranelift-bforest", - "cranelift-codegen-meta", - "cranelift-codegen-shared", - "cranelift-entity", - "gimli 0.20.0", - "log 0.4.8", - "serde", - "smallvec 1.2.0", - "target-lexicon", - "thiserror", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-bforest 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-codegen-meta 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-codegen-shared 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-entity 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gimli 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cranelift-codegen-meta" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "208c3c8d82bfef32a534c5020c6cfc3bc92f41388f1246b7bb98cf543331abaa" dependencies = [ - "cranelift-codegen-shared", - "cranelift-entity", + "cranelift-codegen-shared 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-entity 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cranelift-codegen-shared" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea048c456a517e56fd6df8f0e3947922897e6e6f61fbc5eb557a36c7b8ff6394" [[package]] name = "cranelift-entity" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c8c7ed50812194c9e9de1fa39c77b39fc9ab48173d5e7ee88b25b6a8953e9b8" dependencies = [ - "serde", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cranelift-frontend" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21ceb931d9f919731df1b1ecdc716b5c66384b413a7f95909d1f45441ab9bef5" dependencies = [ - "cranelift-codegen", - "log 0.4.8", - "smallvec 1.2.0", - "target-lexicon", + "cranelift-codegen 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cranelift-native" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "564ee82268bc25b914fcf331edfc2452f2d9ca34f976b187b4ca668beba250c8" dependencies = [ - "cranelift-codegen", - "raw-cpuid", - "target-lexicon", + "cranelift-codegen 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "raw-cpuid 7.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cranelift-wasm" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de63e2271b374be5b07f359184e2126a08fb24d24a740cbc178b7e0107ddafa5" dependencies = [ - "cranelift-codegen", - "cranelift-entity", - "cranelift-frontend", - "log 0.4.8", - "serde", - "thiserror", - "wasmparser 0.48.2", + "cranelift-codegen 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-entity 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-frontend 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmparser 0.48.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crc32fast" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" dependencies = [ - "cfg-if", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "criterion" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0363053954f3e679645fc443321ca128b7b950a6fe288cf5f9335cc22ee58394" -dependencies = [ - "atty", - "cast", - "clap", - "criterion-plot 0.3.1", - "csv", - "itertools", - "lazy_static", - "libc", - "num-traits", - "rand_core 0.3.1", - "rand_os", - "rand_xoshiro", - "rayon", - "rayon-core", - "serde", - "serde_derive", - "serde_json", - "tinytemplate", - "walkdir", +dependencies = [ + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion-plot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "csv 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "tinytemplate 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "criterion" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc755679c12bda8e5523a71e4d654b6bf2e14bd838dfc48cde6559a05caf7d1" dependencies = [ - "atty", - "cast", - "clap", - "criterion-plot 0.4.1", - "csv", - "itertools", - "lazy_static", - "num-traits", - "oorandom", - "plotters", - "rayon", - "regex", - "serde", - "serde_derive", - "serde_json", - "tinytemplate", - "walkdir", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion-plot 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "csv 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "oorandom 11.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "plotters 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "tinytemplate 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "criterion-plot" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f9212ddf2f4a9eb2d401635190600656a1f88a932ef53d06e7fa4c7e02fb8e" dependencies = [ - "byteorder 1.3.4", - "cast", - "itertools", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "criterion-plot" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01e15e0ea58e8234f96146b1f91fa9d0e4dd7a38da93ff7a75d42c0b9d3a545" dependencies = [ - "cast", - "itertools", + "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-channel" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acec9a3b0b3559f15aee4f90746c4e5e293b701c0f7d3925d24e01645267b68c" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-deque" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca" dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", + "crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-epoch" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" dependencies = [ - "autocfg 0.1.7", - "cfg-if", - "crossbeam-utils", - "lazy_static", - "memoffset", - "scopeguard", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-utils" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" dependencies = [ - "autocfg 0.1.7", - "cfg-if", - "lazy_static", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "csv" version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279" dependencies = [ - "bstr", - "csv-core", - "itoa", - "ryu", - "serde", + "bstr 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "csv-core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "csv-core" -version = "0.1.6" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b5cadb6b25c77aeff80ba701712494213f4a8418fcda2ee11b6560c3ad0bf4c" dependencies = [ - "memchr", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ct-logs" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113" dependencies = [ - "sct", + "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ctor" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8ce37ad4184ab2ce004c33bf6379185d3b1c95801cab51026bd271bf68eedc" dependencies = [ - "quote 1.0.2", - "syn", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ctr" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "022cd691704491df67d25d006fe8eca083098253c4d43516c2206479c58c6736" dependencies = [ - "block-cipher-trait", - "stream-cipher", + "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cuckoofilter" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" dependencies = [ - "byteorder 0.5.3", - "rand 0.3.23", + "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "curve25519-dalek" version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b7dcd30ba50cdf88b55b033456138b7c0ac4afdc436d82e1b79f370f24cc66d" dependencies = [ - "byteorder 1.3.4", - "clear_on_drop", - "digest", - "rand_core 0.3.1", - "subtle 2.2.2", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "curve25519-dalek" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26778518a7f6cffa1d25a44b602b62b979bd88adb9e99ffec546998cf3404839" dependencies = [ - "byteorder 1.3.4", - "digest", - "rand_core 0.5.1", - "subtle 2.2.2", - "zeroize 1.1.0", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "data-encoding" version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" [[package]] name = "derive_more" -version = "0.99.2" +version = "0.99.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2159be042979966de68315bce7034bb000c775f22e3e834e1c52ff78f041cae8" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "difference" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" [[package]] name = "digest" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "generic-array", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "directories" version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "551a778172a450d7fc12e629ca3b0428d00f6afa9a43da1b630d54604e97371c" dependencies = [ - "cfg-if", - "dirs-sys", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "dirs-sys" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" dependencies = [ - "cfg-if", - "libc", - "redox_users", - "winapi 0.3.8", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "dns-parser" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" dependencies = [ - "byteorder 1.3.4", - "quick-error", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "doc-comment" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "923dea538cea0aa3025e8685b20d6ee21ef99c4f77e954a30febbaac5ec73a97" [[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 2.0.0", - "rand 0.7.3", - "sha2", + "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "either" version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" [[package]] name = "enumflags2" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33121c8782ba948ba332dab29311b026a8716dc65a1599e5b88f392d38496af8" dependencies = [ - "enumflags2_derive", + "enumflags2_derive 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "enumflags2_derive" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecf634c5213044b8d54a46dd282cf5dd1f86bb5cb53e92c409cb4680a7fb9894" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "env_logger" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" dependencies = [ - "atty", - "humantime", - "log 0.4.8", - "regex", - "termcolor", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "env_logger" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" dependencies = [ - "atty", - "humantime", - "log 0.4.8", - "regex", - "termcolor", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7d80305c9bd8cd78e3c753eb9fb110f83621e5211f1a3afffcc812b104daf9" dependencies = [ - "serde", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "errno" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e" dependencies = [ - "errno-dragonfly", - "libc", - "winapi 0.3.8", + "errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "errno-dragonfly" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" dependencies = [ - "gcc", - "libc", + "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "escargot" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74cf96bec282dcdb07099f7e31d9fed323bca9435a09aba7b6d99b7617bca96d" dependencies = [ - "lazy_static", - "log 0.4.8", - "serde", - "serde_json", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "evm" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "272f65e18a2b6449b682bfcdf6c3ccc63db0b93898d89c0fb237548bbfc764a5" dependencies = [ - "evm-core", - "evm-gasometer", - "evm-runtime", - "primitive-types", - "rlp", - "serde", - "sha3", + "evm-core 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "evm-gasometer 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "evm-runtime 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rlp 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "evm-core" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66534d42e13d50f9101bed87cb568fd5aa929c600c3c13f8dadbbf39f5635945" dependencies = [ - "primitive-types", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "evm-gasometer" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39bc5b592803ca644781fe2290b7305ea5182f7c9516d615ddfb2308c2cab639" dependencies = [ - "evm-core", - "evm-runtime", - "primitive-types", + "evm-core 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "evm-runtime 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "evm-runtime" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389e4b447fb26971a9c76c8aa49c0ab435f8e46e8fc46e1bc4ebf01f3c2b428f" dependencies = [ - "evm-core", - "primitive-types", - "sha3", + "evm-core 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "faerie" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74b9ed6159e4a6212c61d9c6a86bee01876b192a64accecf58d5b5ae3b667b52" dependencies = [ - "anyhow", - "goblin", - "indexmap", - "log 0.4.8", - "scroll", - "string-interner", - "target-lexicon", - "thiserror", + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "goblin 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "string-interner 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "failure" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" dependencies = [ - "backtrace", - "failure_derive", + "backtrace 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "failure_derive" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", - "synstructure", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "fake-simd" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fdlimit" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9084c55bb76efb1496328976db88320fe7d9ee86e649e83c4ecce3ba7a9a35d1" dependencies = [ - "libc", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "file-per-thread-logger" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8505b75b31ef7285168dd237c4a7db3c1f3e0927e7d314e670bc98e854272fe9" dependencies = [ - "env_logger 0.6.2", - "log 0.4.8", + "env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "finality-grandpa" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cbb25bef9fcad97fb31e817da280b1c9174435b8769c770ee190a330dd181ea" dependencies = [ - "futures 0.3.4", - "futures-timer 2.0.2", - "log 0.4.8", - "num-traits", - "parity-scale-codec", - "parking_lot 0.9.0", - "rand 0.6.5", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "fixed-hash" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3367952ceb191f4ab95dd5685dc163ac539e36202f9fcfd0cb22f9f9c542fefc" dependencies = [ - "byteorder 1.3.4", - "libc", - "rand 0.7.3", - "rustc-hex", - "static_assertions", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" dependencies = [ - "cfg-if", - "crc32fast", - "libc", - "libz-sys", - "miniz_oxide", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "fnv" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" [[package]] name = "foreign-types" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared", + "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "foreign-types-shared" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "2.0.0" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "frame-benchmarking" version = "2.0.0" dependencies = [ - "parity-scale-codec", - "sp-api", - "sp-runtime-interface", - "sp-std", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-runtime-interface 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "frame-benchmarking-cli" version = "2.0.0" dependencies = [ - "frame-benchmarking", - "parity-scale-codec", - "sc-cli", - "sc-client", - "sc-client-db", - "sc-executor", - "sc-service", - "sp-runtime", - "structopt", + "frame-benchmarking 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-cli 0.8.0", + "sc-client 0.8.0", + "sc-client-db 0.8.0", + "sc-executor 0.8.0", + "sc-service 0.8.0", + "sp-runtime 2.0.0", + "structopt 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "frame-executive" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "hex-literal", - "pallet-balances", - "pallet-indices", - "pallet-transaction-payment", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pallet-balances 2.0.0", + "pallet-indices 2.0.0", + "pallet-transaction-payment 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "frame-metadata" version = "11.0.0" dependencies = [ - "parity-scale-codec", - "serde", - "sp-core", - "sp-std", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "frame-support" version = "2.0.0" dependencies = [ - "bitmask", - "frame-metadata", - "frame-support-procedural", - "frame-system", - "impl-trait-for-tuples", - "log 0.4.8", - "once_cell", - "parity-scale-codec", - "paste", - "pretty_assertions", - "serde", - "sp-arithmetic", - "sp-core", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-state-machine", - "sp-std", - "tracing", + "bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-metadata 11.0.0", + "frame-support-procedural 2.0.0", + "frame-system 2.0.0", + "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "once_cell 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 0.8.0", + "sp-std 2.0.0", + "tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "frame-support-procedural" version = "2.0.0" dependencies = [ - "frame-support-procedural-tools", - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "frame-support-procedural-tools 2.0.0", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "frame-support-procedural-tools" version = "2.0.0" dependencies = [ - "frame-support-procedural-tools-derive", - "proc-macro-crate", - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "frame-support-procedural-tools-derive 2.0.0", + "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "frame-support-procedural-tools-derive" version = "2.0.0" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "frame-support-test" version = "2.0.0" dependencies = [ - "frame-support", - "parity-scale-codec", - "pretty_assertions", - "serde", - "sp-core", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-state-machine", - "trybuild", + "frame-support 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 0.8.0", + "trybuild 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "frame-system" version = "2.0.0" dependencies = [ - "criterion 0.2.11", - "frame-support", - "impl-trait-for-tuples", - "parity-scale-codec", - "serde", - "sp-core", - "sp-externalities", - "sp-io", - "sp-runtime", - "sp-std", - "sp-version", - "substrate-test-runtime-client", + "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-support 2.0.0", + "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-externalities 0.8.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", + "sp-version 2.0.0", + "substrate-test-runtime-client 2.0.0", ] [[package]] name = "frame-system-rpc-runtime-api" version = "2.0.0" dependencies = [ - "parity-scale-codec", - "sp-api", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", ] [[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", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "fs2" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" dependencies = [ - "libc", - "winapi 0.3.8", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "fs_extra" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f2a4a2034423744d2cc7ca2068453168dcdb82c438419e639a26bd87839c674" [[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", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-executor 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 0.4.8", - "parking_lot 0.9.0", - "pin-project", - "serde", - "serde_json", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.8", - "quote 1.0.2", - "syn", + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3de1a2b2a2a33d9e60e17980b60ee061eeaae96a5abe9121db0fdb9af167a1c5" dependencies = [ - "gloo-timers", - "send_wrapper 0.4.0", + "gloo-timers 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "send_wrapper 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", - "tokio-io", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "fxhash" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" dependencies = [ - "byteorder 1.3.4", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "c_linked_list 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "getrandom" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" dependencies = [ - "cfg-if", - "libc", - "wasi", - "wasm-bindgen", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "gimli" version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162d18ae5f2e3b90a993d202f1ba17a5633c2484426f8bcae201f86194bacd00" dependencies = [ - "arrayvec 0.4.12", - "byteorder 1.3.4", - "fallible-iterator", - "indexmap", - "stable_deref_trait", + "arrayvec 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "gimli" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dd6190aad0f05ddbbf3245c54ed14ca4aa6dd32f22312b70d8f168c3e3e633" dependencies = [ - "byteorder 1.3.4", - "indexmap", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "glob" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" [[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.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925aa2cac82d8834e2b2a4415b6f6879757fb5c0928fc445ae76461a12eed8f2" dependencies = [ - "aho-corasick", - "bstr", - "fnv", - "log 0.4.8", - "regex", + "aho-corasick 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", + "bstr 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "gloo-timers" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2d17dbd803c2fc86cb1b613adf63192046a7176f383a8302594654752c4c4a" dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", - "web-sys", + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "goblin" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3081214398d39e4bd7f2c1975f0488ed04614ffdd976c6fc7a0708278552c0da" dependencies = [ - "log 0.4.8", - "plain", - "scroll", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "h2" version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" dependencies = [ - "byteorder 1.3.4", - "bytes 0.4.12", - "fnv", - "futures 0.1.29", - "http 0.1.21", - "indexmap", - "log 0.4.8", - "slab", - "string", - "tokio-io", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "h2" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1" dependencies = [ - "bytes 0.5.4", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.0", - "indexmap", - "log 0.4.8", - "slab", - "tokio 0.2.11", - "tokio-util", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hashbrown" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1de41fb8dba9714efd92241565cdff73f78508c95697dd56787d3cba27e2353" [[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", + "ahash 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "heck" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" dependencies = [ - "unicode-segmentation", + "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hermit-abi" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772" dependencies = [ - "libc", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hex" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cdda6bf525062a0c9e8f14ee2b37935c86b8efb6c8b69b3c83dfb518a914af" [[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", + "hex-literal-impl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hmac" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" dependencies = [ - "crypto-mac", - "digest", + "crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "http" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b" dependencies = [ - "bytes 0.5.4", - "fnv", - "itoa", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.0", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hyper" version = "0.10.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" dependencies = [ - "base64 0.9.3", - "httparse", - "language-tags", - "log 0.3.9", - "mime", - "num_cpus", - "time", - "traitobject", - "typeable", - "unicase 1.4.2", - "url 1.7.2", + "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 0.4.8", - "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", +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hyper" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1c527bbc634be72aa7ba31e4e4def9bbb020f5416916279b7c705cd838893e" dependencies = [ - "bytes 0.5.4", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.2.1", - "http 0.2.0", - "http-body 0.3.1", - "httparse", - "itoa", - "log 0.4.8", - "net2", - "pin-project", - "time", - "tokio 0.2.11", - "tower-service", - "want 0.3.0", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hyper-rustls" version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ea6215c7314d450ee45970ab8b3851ab447a0e6bafdd19e31b20a42dbb7faf" dependencies = [ - "bytes 0.5.4", - "ct-logs", - "futures-util", - "hyper 0.13.2", - "rustls", - "rustls-native-certs", - "tokio 0.2.11", - "tokio-rustls", - "webpki", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "ct-logs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls-native-certs 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-rustls 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hyper-tls" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "hyper 0.12.35", - "native-tls", - "tokio-io", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "impl-codec" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "impl-rlp" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f7a72f11830b52333f36e3b09a288333888bf54380fd0ac0790a3c31ab0f3c5" dependencies = [ - "rlp", + "rlp 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "impl-serde" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58e3cae7e99c7ff5a995da2cf78dd0a5383740eda71d98cf7b1910c301ac69b8" dependencies = [ - "serde", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "impl-serde" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bbe9ea9b182f0fb1cabbd61f4ff9b7b7b9197955e95a7e4c27de5055eb29ff8" dependencies = [ - "serde", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.8", - "quote 1.0.2", - "syn", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "indexmap" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 = "iovec" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" dependencies = [ - "libc", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ipnet" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a859057dc563d1388c1e816f98a1892629075fc046ed06e845b883bb8b2916fb" [[package]] name = "itertools" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" dependencies = [ - "either", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "js-sys" version = "0.3.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9" dependencies = [ - "wasm-bindgen", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-client-transports" version = "14.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a9ae166c4d1f702d297cd76d4b55758ace80272ffc6dbb139fdc1bf810de40b" dependencies = [ - "failure", - "futures 0.1.29", - "hyper 0.12.35", - "hyper-tls", - "jsonrpc-core", - "jsonrpc-pubsub", - "log 0.4.8", - "serde", - "serde_json", - "tokio 0.1.22", - "url 1.7.2", - "websocket", + "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "websocket 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-core" version = "14.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe3b688648f1ef5d5072229e2d672ecb92cbff7d1c79bcf3fd5898f3f3df0970" dependencies = [ - "futures 0.1.29", - "log 0.4.8", - "serde", - "serde_derive", - "serde_json", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-core-client" version = "14.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080dc110be17701097df238fad3c816d4a478a1899dfbcf8ec8957dd40ec7304" dependencies = [ - "jsonrpc-client-transports", + "jsonrpc-client-transports 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.8", - "quote 1.0.2", - "syn", + "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-http-server" version = "14.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816d63997ea45d3634608edbef83ddb35e661f7c0b27b5b72f237e321f0e9807" dependencies = [ - "hyper 0.12.35", - "jsonrpc-core", - "jsonrpc-server-utils", - "log 0.4.8", - "net2", - "parking_lot 0.10.0", - "unicase 2.6.0", + "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-server-utils 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-pubsub" version = "14.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b31c9b90731276fdd24d896f31bb10aecf2e5151733364ae81123186643d939" dependencies = [ - "jsonrpc-core", - "log 0.4.8", - "parking_lot 0.10.0", - "serde", + "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-server-utils" version = "14.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b7635e618a0edbbe0d2a2bbbc69874277c49383fcf6c3c0414491cfb517d22" dependencies = [ - "bytes 0.4.12", - "globset", - "jsonrpc-core", - "lazy_static", - "log 0.4.8", - "tokio 0.1.22", - "tokio-codec", - "unicase 2.6.0", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "jsonrpc-ws-server" version = "14.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b94e5773b2ae66e0e02c80775ce6bbba6f15d5bb47c14ec36a36fcf94f8df851" dependencies = [ - "jsonrpc-core", - "jsonrpc-server-utils", - "log 0.4.8", - "parking_lot 0.10.0", - "slab", - "ws", + "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-server-utils 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ws 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "keccak" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] name = "keccak-hasher" version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3468207deea1359a0e921591ae9b4c928733d94eb9d6a2eeda994cfd59f42cf8" dependencies = [ - "hash-db", - "hash256-std-hasher", - "tiny-keccak 1.5.0", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hash256-std-hasher 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "kv-log-macro" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c54d9f465d530a752e6ebdc217e081a7a614b48cb200f6f0aee21ba6bc9aabb" dependencies = [ - "log 0.4.8", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "kvdb" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03080afe6f42cd996da9f568d6add5d7fb5ee2ea7fb7802d2d2cbd836958fd87" dependencies = [ - "parity-bytes", - "parity-util-mem", - "smallvec 1.2.0", + "parity-bytes 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "kvdb-memorydb" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9355274e5a9e0a7e8ef43916950eae3949024de2a8dffe4d5a6c13974a37c8e" dependencies = [ - "kvdb", - "parity-util-mem", - "parking_lot 0.10.0", + "kvdb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "kvdb-rocksdb" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af36fd66ccd99f3f771ae39b75aaba28b952372b6debfb971134bf1f03466ab2" dependencies = [ - "fs-swap", - "interleaved-ordered", - "kvdb", - "log 0.4.8", - "num_cpus", - "owning_ref", - "parity-util-mem", - "parking_lot 0.10.0", - "regex", - "rocksdb", - "smallvec 1.2.0", + "fs-swap 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "interleaved-ordered 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rocksdb 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "kvdb-web" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a985c47b4c46429e96033ebf6eaed784a81ceccb4e5df13d63f3b9078a4df81" dependencies = [ - "futures 0.3.4", - "js-sys", - "kvdb", - "kvdb-memorydb", - "log 0.4.8", - "parity-util-mem", - "send_wrapper 0.3.0", - "wasm-bindgen", - "web-sys", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb-memorydb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "send_wrapper 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "language-tags" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" [[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 = "leb128" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" version = "0.2.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" [[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", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a58becf0b9585fcfbb8215bbe6e6ac187fcc180fd1026925ca180c845aa5a6e8" -dependencies = [ - "bytes 0.5.4", - "futures 0.3.4", - "lazy_static", - "libp2p-core", - "libp2p-core-derive", - "libp2p-deflate", - "libp2p-dns", - "libp2p-floodsub", - "libp2p-gossipsub", - "libp2p-identify", - "libp2p-kad", - "libp2p-mdns", - "libp2p-mplex", - "libp2p-noise", - "libp2p-ping", - "libp2p-plaintext", - "libp2p-pnet", - "libp2p-secio", - "libp2p-swarm", - "libp2p-tcp", - "libp2p-uds", - "libp2p-wasm-ext", - "libp2p-websocket", - "libp2p-yamux", - "parity-multiaddr 0.7.2", - "parity-multihash 0.2.3", - "parking_lot 0.10.0", - "pin-project", - "smallvec 1.2.0", - "wasm-timer", +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core-derive 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-deflate 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-dns 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-floodsub 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-gossipsub 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-identify 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-kad 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-mdns 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-mplex 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-noise 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-ping 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-plaintext 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-pnet 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-secio 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-swarm 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-tcp 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-uds 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-wasm-ext 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-websocket 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-yamux 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multihash 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-core" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b874594c4b29de1a29f27871feba8e6cd13aa54a8a1e8f8c7cf3dfac5ca287c" -dependencies = [ - "asn1_der", - "bs58 0.3.0", - "ed25519-dalek", - "fnv", - "futures 0.3.4", - "futures-timer 3.0.1", - "lazy_static", - "libsecp256k1", - "log 0.4.8", - "multistream-select", - "parity-multiaddr 0.7.2", - "parity-multihash 0.2.3", - "parking_lot 0.10.0", - "pin-project", - "prost", - "prost-build", - "rand 0.7.3", - "ring", - "rw-stream-sink", - "sha2", - "smallvec 1.2.0", - "thiserror", - "unsigned-varint 0.3.0", - "void", - "zeroize 1.1.0", +dependencies = [ + "asn1_der 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bs58 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ed25519-dalek 1.0.0-pre.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "multistream-select 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multihash 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rw-stream-sink 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-core-derive" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d472e9d522f588805c77801de10b957be84e10f019ca5f869fa1825b15ea9b" dependencies = [ - "quote 1.0.2", - "syn", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-deflate" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e25004d4d9837b44b22c5f1a69be1724a5168fef6cff1716b5176a972c3aa62" dependencies = [ - "flate2", - "futures 0.3.4", - "libp2p-core", + "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-dns" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b99e552f9939b606eb4b59f7f64d9b01e3f96752f47e350fc3c5fc646ed3f649" dependencies = [ - "futures 0.3.4", - "libp2p-core", - "log 0.4.8", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-floodsub" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3234f12e44f9a50351a9807b97fe7de11eb9ae4482370392ba10da6dc90722" dependencies = [ - "cuckoofilter", - "fnv", - "futures 0.3.4", - "libp2p-core", - "libp2p-swarm", - "prost", - "prost-build", - "rand 0.7.3", - "smallvec 1.2.0", + "cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-swarm 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-gossipsub" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d46cb3e0841bd951cbf4feae56cdc081e6347836a644fb260c3ec554149b4006" dependencies = [ - "base64 0.11.0", - "byteorder 1.3.4", - "bytes 0.5.4", - "fnv", - "futures 0.3.4", - "futures_codec", - "libp2p-core", - "libp2p-swarm", - "log 0.4.8", - "lru 0.4.3", - "prost", - "prost-build", - "rand 0.7.3", - "sha2", - "smallvec 1.2.0", - "unsigned-varint 0.3.0", - "wasm-timer", + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures_codec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-swarm 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "lru 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-identify" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfeb935a9bd41263e4f3a24b988e9f4a044f3ae89ac284e83c17fe2f84e0d66b" dependencies = [ - "futures 0.3.4", - "libp2p-core", - "libp2p-swarm", - "log 0.4.8", - "prost", - "prost-build", - "smallvec 1.2.0", - "wasm-timer", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-swarm 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-kad" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2efcff2af085e8181c421f68fe9c2b0a067379d146731925b3ac8f8e605c458" -dependencies = [ - "arrayvec 0.5.1", - "bytes 0.5.4", - "either", - "fnv", - "futures 0.3.4", - "futures_codec", - "libp2p-core", - "libp2p-swarm", - "log 0.4.8", - "parity-multihash 0.2.3", - "prost", - "prost-build", - "rand 0.7.3", - "sha2", - "smallvec 1.2.0", - "uint", - "unsigned-varint 0.3.0", - "void", - "wasm-timer", +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures_codec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-swarm 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multihash 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uint 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-mdns" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881fcfb360c2822db9f0e6bb6f89529621556ed9a8b038313414eda5107334de" dependencies = [ - "async-std", - "data-encoding", - "dns-parser", - "either", - "futures 0.3.4", - "lazy_static", - "libp2p-core", - "libp2p-swarm", - "log 0.4.8", - "net2", - "rand 0.7.3", - "smallvec 1.2.0", - "void", - "wasm-timer", + "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "dns-parser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-swarm 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-mplex" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8507b37ad0eed275efcde67a023c3d85af6c80768b193845b9288e848e1af95" dependencies = [ - "bytes 0.5.4", - "fnv", - "futures 0.3.4", - "futures_codec", - "libp2p-core", - "log 0.4.8", - "parking_lot 0.10.0", - "unsigned-varint 0.3.0", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures_codec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-noise" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac7d33809afdf6794f09fdb2f9f94e1550ae230be5bae6430a078eb96fc9e5a6" dependencies = [ - "curve25519-dalek 1.2.3", - "futures 0.3.4", - "lazy_static", - "libp2p-core", - "log 0.4.8", - "prost", - "prost-build", - "rand 0.7.3", - "sha2", - "snow", - "static_assertions", - "x25519-dalek 0.5.2", - "zeroize 1.1.0", + "curve25519-dalek 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "snow 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "x25519-dalek 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-ping" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d22f2f228b3a828dca1cb8aa9fa331e0bc9c36510cb2c1916956e20dc85e8c" dependencies = [ - "futures 0.3.4", - "libp2p-core", - "libp2p-swarm", - "log 0.4.8", - "rand 0.7.3", - "void", - "wasm-timer", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-swarm 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-plaintext" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56126a204d7b3382bac163143ff4125a14570b3ba76ba979103d1ae1abed1923" dependencies = [ - "bytes 0.5.4", - "futures 0.3.4", - "futures_codec", - "libp2p-core", - "log 0.4.8", - "prost", - "prost-build", - "rw-stream-sink", - "unsigned-varint 0.3.0", - "void", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures_codec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rw-stream-sink 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-pnet" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b916938a8868f75180aeeffcc6a516a922d165e8fa2a90b57bad989d1ccbb57a" dependencies = [ - "futures 0.3.4", - "log 0.4.8", - "pin-project", - "rand 0.7.3", - "salsa20", - "sha3", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "salsa20 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-secio" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec00eb9a3404ed76a0e14f637edcaa7f2b4a27a16884da4a56f2f21e166c2843" -dependencies = [ - "aes-ctr", - "ctr", - "futures 0.3.4", - "hmac", - "js-sys", - "lazy_static", - "libp2p-core", - "log 0.4.8", - "parity-send-wrapper", - "pin-project", - "prost", - "prost-build", - "quicksink", - "rand 0.7.3", - "ring", - "rw-stream-sink", - "sha2", - "static_assertions", - "twofish", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-send-wrapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "quicksink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rw-stream-sink 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-swarm" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1e9f4fb84a4bfe3d3a361c1fbcd4af017ba68f0a46a77bfbcc48bf8a456d6ef" dependencies = [ - "futures 0.3.4", - "libp2p-core", - "log 0.4.8", - "smallvec 1.2.0", - "void", - "wasm-timer", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-tcp" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9e80ad4e3535345f3d666554ce347d3100453775611c05c60786bf9a1747a10" dependencies = [ - "async-std", - "futures 0.3.4", - "futures-timer 3.0.1", - "get_if_addrs", - "ipnet", - "libp2p-core", - "log 0.4.8", + "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ipnet 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-uds" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d329564a43da9d0e055a5b938633c4a8ceab1f59cec133fbc4647917c07341" dependencies = [ - "async-std", - "futures 0.3.4", - "libp2p-core", - "log 0.4.8", + "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-wasm-ext" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39703653caa36f4afd0def39cc49a3ac0fa1d4289ca1802e417af03e4f5ef950" dependencies = [ - "futures 0.3.4", - "js-sys", - "libp2p-core", - "parity-send-wrapper", - "wasm-bindgen", - "wasm-bindgen-futures", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-send-wrapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-websocket" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5351ca9eea122081c1c0f9323164d2918cac29b5a6bfe5054d4ba8ec9447cf42" dependencies = [ - "async-tls", - "bytes 0.5.4", - "either", - "futures 0.3.4", - "libp2p-core", - "log 0.4.8", - "quicksink", - "rustls", - "rw-stream-sink", - "soketto", - "url 2.1.1", - "webpki", - "webpki-roots 0.18.0", + "async-tls 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quicksink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rw-stream-sink 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "soketto 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki-roots 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-yamux" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f72aa5a7273c29c6eaea09108a49feaefc7456164863f64f86a193f9e78a4b7f" dependencies = [ - "futures 0.3.4", - "libp2p-core", - "parking_lot 0.10.0", - "thiserror", - "yamux", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "yamux 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "librocksdb-sys" version = "6.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a0785e816e1e11e7599388a492c61ef80ddc2afc91e313e61662cce537809be" dependencies = [ - "bindgen", - "cc", - "glob 0.3.0", - "libc", + "bindgen 0.49.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac-drbg 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", + "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "linked-hash-map" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" [[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", + "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "lock_api" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b" dependencies = [ - "scopeguard", + "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "log" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" dependencies = [ - "log 0.4.8", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "log" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" dependencies = [ - "cfg-if", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "lru" version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8f669d42c72d18514dfca8115689c5f6370a17d980cb5bd777a67f404594c8" dependencies = [ - "hashbrown 0.5.0", + "hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "lru" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237" dependencies = [ - "hashbrown 0.6.3", + "hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mach" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86dd2487cdfea56def77b88438a2c915fb45113c5319bfe7e14306ca4cd0b0e1" dependencies = [ - "libc", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[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.0" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223" -dependencies = [ - "libc", -] [[package]] name = "memoffset" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" dependencies = [ - "rustc_version", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "memory-db" version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "198831fe8722331a395bc199a5d08efbc197497ef354cb4c77b969c02ffc0fc4" dependencies = [ - "ahash", - "hash-db", - "hashbrown 0.6.3", - "parity-util-mem", + "ahash 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "memory_units" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" [[package]] name = "merlin" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b0942b357c1b4d0dc43ba724674ec89c3218e6ca2b3e8269e7cb53bcecd2f6e" dependencies = [ - "byteorder 1.3.4", - "keccak", - "rand_core 0.4.2", - "zeroize 1.1.0", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mime" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" dependencies = [ - "log 0.3.9", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "miniz_oxide" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" dependencies = [ - "adler32", + "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mio" version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" dependencies = [ - "cfg-if", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log 0.4.8", - "miow", - "net2", - "slab", - "winapi 0.2.8", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mio-extras" version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" dependencies = [ - "lazycell", - "log 0.4.8", - "mio", - "slab", + "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mio-uds" version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" dependencies = [ - "iovec", - "libc", - "mio", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "more-asserts" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" [[package]] name = "multimap" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97fbd5d00e0e37bfb10f433af8f5aaf631e739368dc9fc28286ca81ca4948dc" [[package]] name = "multistream-select" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f938ffe420493e77c8b6cbcc3f282283f68fc889c5dcbc8e51668d5f3a01ad94" dependencies = [ - "bytes 0.5.4", - "futures 0.1.29", - "log 0.4.8", - "smallvec 1.2.0", - "tokio-io", - "unsigned-varint 0.3.0", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "names" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da" dependencies = [ - "rand 0.3.23", + "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "native-tls" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" dependencies = [ - "lazy_static", - "libc", - "log 0.4.8", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.28 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "net2" version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" dependencies = [ - "cfg-if", - "libc", - "winapi 0.3.8", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "node-cli" version = "2.0.0" dependencies = [ - "assert_cmd", - "browser-utils", - "frame-benchmarking-cli", - "frame-support", - "frame-system", - "futures 0.3.4", - "hex-literal", - "jsonrpc-core", - "log 0.4.8", - "nix", - "node-executor", - "node-inspect", - "node-primitives", - "node-rpc", - "node-runtime", - "node-transaction-factory", - "pallet-authority-discovery", - "pallet-balances", - "pallet-contracts", - "pallet-im-online", - "pallet-indices", - "pallet-timestamp", - "pallet-transaction-payment", - "parity-scale-codec", - "rand 0.7.3", - "sc-authority-discovery", - "sc-basic-authorship", - "sc-chain-spec", - "sc-cli", - "sc-client", - "sc-client-api", - "sc-client-db", - "sc-consensus-babe", - "sc-consensus-epochs", - "sc-finality-grandpa", - "sc-keystore", - "sc-network", - "sc-offchain", - "sc-rpc", - "sc-service", - "sc-service-test", - "sc-telemetry", - "sc-tracing", - "sc-transaction-pool", - "serde", - "sp-authority-discovery", - "sp-consensus", - "sp-consensus-babe", - "sp-core", - "sp-finality-grandpa", - "sp-finality-tracker", - "sp-inherents", - "sp-io", - "sp-keyring", - "sp-runtime", - "sp-timestamp", - "sp-transaction-pool", - "structopt", - "substrate-build-script-utils", - "tempfile", - "tracing", - "vergen", - "wasm-bindgen", - "wasm-bindgen-futures", + "assert_cmd 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "browser-utils 0.8.0", + "frame-benchmarking-cli 2.0.0", + "frame-support 2.0.0", + "frame-system 2.0.0", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", + "node-executor 2.0.0", + "node-inspect 0.8.0", + "node-primitives 2.0.0", + "node-rpc 2.0.0", + "node-runtime 2.0.0", + "node-transaction-factory 0.8.0", + "pallet-authority-discovery 2.0.0", + "pallet-balances 2.0.0", + "pallet-contracts 2.0.0", + "pallet-im-online 2.0.0", + "pallet-indices 2.0.0", + "pallet-timestamp 2.0.0", + "pallet-transaction-payment 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-authority-discovery 0.8.0", + "sc-basic-authorship 0.8.0", + "sc-chain-spec 2.0.0", + "sc-cli 0.8.0", + "sc-client 0.8.0", + "sc-client-api 2.0.0", + "sc-client-db 0.8.0", + "sc-consensus-babe 0.8.0", + "sc-consensus-epochs 0.8.0", + "sc-finality-grandpa 0.8.0", + "sc-keystore 2.0.0", + "sc-network 0.8.0", + "sc-offchain 2.0.0", + "sc-rpc 2.0.0", + "sc-service 0.8.0", + "sc-service-test 2.0.0", + "sc-telemetry 2.0.0", + "sc-tracing 2.0.0", + "sc-transaction-pool 2.0.0", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-authority-discovery 2.0.0", + "sp-consensus 0.8.0", + "sp-consensus-babe 0.8.0", + "sp-core 2.0.0", + "sp-finality-grandpa 2.0.0", + "sp-finality-tracker 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-timestamp 2.0.0", + "sp-transaction-pool 2.0.0", + "structopt 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "substrate-build-script-utils 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "node-executor" version = "2.0.0" dependencies = [ - "criterion 0.3.1", - "frame-benchmarking", - "frame-support", - "frame-system", - "node-primitives", - "node-runtime", - "node-testing", - "pallet-balances", - "pallet-contracts", - "pallet-grandpa", - "pallet-im-online", - "pallet-indices", - "pallet-session", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-treasury", - "parity-scale-codec", - "sc-executor", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", - "sp-trie", - "substrate-test-client", - "trie-root", - "wabt", + "criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-benchmarking 2.0.0", + "frame-support 2.0.0", + "frame-system 2.0.0", + "node-primitives 2.0.0", + "node-runtime 2.0.0", + "node-testing 2.0.0", + "pallet-balances 2.0.0", + "pallet-contracts 2.0.0", + "pallet-grandpa 2.0.0", + "pallet-im-online 2.0.0", + "pallet-indices 2.0.0", + "pallet-session 2.0.0", + "pallet-timestamp 2.0.0", + "pallet-transaction-payment 2.0.0", + "pallet-treasury 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-executor 0.8.0", + "sp-application-crypto 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 0.8.0", + "sp-trie 2.0.0", + "substrate-test-client 2.0.0", + "trie-root 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "node-inspect" version = "0.8.0" dependencies = [ - "derive_more", - "log 0.4.8", - "parity-scale-codec", - "sc-cli", - "sc-client-api", - "sc-service", - "sp-blockchain", - "sp-core", - "sp-runtime", - "structopt", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-cli 0.8.0", + "sc-client-api 2.0.0", + "sc-service 0.8.0", + "sp-blockchain 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "structopt 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "node-primitives" version = "2.0.0" dependencies = [ - "pretty_assertions", - "sp-core", - "sp-runtime", - "sp-serializer", + "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "sp-serializer 2.0.0", ] [[package]] name = "node-rpc" version = "2.0.0" dependencies = [ - "jsonrpc-core", - "node-primitives", - "node-runtime", - "pallet-contracts-rpc", - "pallet-transaction-payment-rpc", - "sc-client", - "sc-consensus-babe", - "sc-consensus-babe-rpc", - "sc-consensus-epochs", - "sc-keystore", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-runtime", - "sp-transaction-pool", - "substrate-frame-rpc-system", + "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "node-primitives 2.0.0", + "node-runtime 2.0.0", + "pallet-contracts-rpc 0.8.0", + "pallet-transaction-payment-rpc 2.0.0", + "sc-client 0.8.0", + "sc-consensus-babe 0.8.0", + "sc-consensus-babe-rpc 0.8.0", + "sc-consensus-epochs 0.8.0", + "sc-keystore 2.0.0", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-consensus-babe 0.8.0", + "sp-runtime 2.0.0", + "sp-transaction-pool 2.0.0", + "substrate-frame-rpc-system 2.0.0", ] [[package]] name = "node-rpc-client" version = "2.0.0" dependencies = [ - "env_logger 0.7.1", - "futures 0.1.29", - "hyper 0.12.35", - "jsonrpc-core-client", - "log 0.4.8", - "node-primitives", - "sc-rpc", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "node-primitives 2.0.0", + "sc-rpc 2.0.0", ] [[package]] name = "node-runtime" version = "2.0.0" dependencies = [ - "frame-benchmarking", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-rpc-runtime-api", - "integer-sqrt", - "node-primitives", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-balances", - "pallet-collective", - "pallet-contracts", - "pallet-contracts-primitives", - "pallet-contracts-rpc-runtime-api", - "pallet-democracy", - "pallet-elections-phragmen", - "pallet-finality-tracker", - "pallet-grandpa", - "pallet-identity", - "pallet-im-online", - "pallet-indices", - "pallet-membership", - "pallet-offences", - "pallet-randomness-collective-flip", - "pallet-recovery", - "pallet-session", - "pallet-society", - "pallet-staking", - "pallet-staking-reward-curve", - "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vesting", - "parity-scale-codec", - "rustc-hex", - "serde", - "sp-api", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", - "sp-core", - "sp-inherents", - "sp-io", - "sp-keyring", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-transaction-pool", - "sp-version", - "substrate-wasm-builder-runner", + "frame-benchmarking 2.0.0", + "frame-executive 2.0.0", + "frame-support 2.0.0", + "frame-system 2.0.0", + "frame-system-rpc-runtime-api 2.0.0", + "integer-sqrt 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "node-primitives 2.0.0", + "pallet-authority-discovery 2.0.0", + "pallet-authorship 2.0.0", + "pallet-babe 2.0.0", + "pallet-balances 2.0.0", + "pallet-collective 2.0.0", + "pallet-contracts 2.0.0", + "pallet-contracts-primitives 2.0.0", + "pallet-contracts-rpc-runtime-api 0.8.0", + "pallet-democracy 2.0.0", + "pallet-elections-phragmen 2.0.0", + "pallet-finality-tracker 2.0.0", + "pallet-grandpa 2.0.0", + "pallet-identity 2.0.0", + "pallet-im-online 2.0.0", + "pallet-indices 2.0.0", + "pallet-membership 2.0.0", + "pallet-offences 2.0.0", + "pallet-randomness-collective-flip 2.0.0", + "pallet-recovery 2.0.0", + "pallet-session 2.0.0", + "pallet-society 2.0.0", + "pallet-staking 2.0.0", + "pallet-staking-reward-curve 2.0.0", + "pallet-sudo 2.0.0", + "pallet-timestamp 2.0.0", + "pallet-transaction-payment 2.0.0", + "pallet-transaction-payment-rpc-runtime-api 2.0.0", + "pallet-treasury 2.0.0", + "pallet-utility 2.0.0", + "pallet-vesting 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-authority-discovery 2.0.0", + "sp-block-builder 2.0.0", + "sp-consensus-babe 0.8.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-keyring 2.0.0", + "sp-offchain 2.0.0", + "sp-runtime 2.0.0", + "sp-session 2.0.0", + "sp-staking 2.0.0", + "sp-std 2.0.0", + "sp-transaction-pool 2.0.0", + "sp-version 2.0.0", + "substrate-wasm-builder-runner 1.0.5", ] [[package]] name = "node-template" version = "2.0.0" dependencies = [ - "futures 0.3.4", - "log 0.4.8", - "node-template-runtime", - "sc-basic-authorship", - "sc-cli", - "sc-client", - "sc-consensus-aura", - "sc-executor", - "sc-finality-grandpa", - "sc-network", - "sc-service", - "sc-transaction-pool", - "sp-consensus", - "sp-consensus-aura", - "sp-core", - "sp-finality-grandpa", - "sp-inherents", - "sp-runtime", - "sp-transaction-pool", - "structopt", - "substrate-build-script-utils", - "vergen", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "node-template-runtime 2.0.0", + "sc-basic-authorship 0.8.0", + "sc-cli 0.8.0", + "sc-client 0.8.0", + "sc-consensus-aura 0.8.0", + "sc-executor 0.8.0", + "sc-finality-grandpa 0.8.0", + "sc-network 0.8.0", + "sc-service 0.8.0", + "sc-transaction-pool 2.0.0", + "sp-consensus 0.8.0", + "sp-consensus-aura 0.8.0", + "sp-core 2.0.0", + "sp-finality-grandpa 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-transaction-pool 2.0.0", + "structopt 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "substrate-build-script-utils 2.0.0", + "vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "node-template-runtime" version = "2.0.0" dependencies = [ - "frame-executive", - "frame-support", - "frame-system", - "pallet-aura", - "pallet-balances", - "pallet-grandpa", - "pallet-indices", - "pallet-randomness-collective-flip", - "pallet-sudo", - "pallet-template", - "pallet-timestamp", - "pallet-transaction-payment", - "parity-scale-codec", - "serde", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core", - "sp-inherents", - "sp-io", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-transaction-pool", - "sp-version", - "substrate-wasm-builder-runner", + "frame-executive 2.0.0", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-aura 2.0.0", + "pallet-balances 2.0.0", + "pallet-grandpa 2.0.0", + "pallet-indices 2.0.0", + "pallet-randomness-collective-flip 2.0.0", + "pallet-sudo 2.0.0", + "pallet-template 2.0.0", + "pallet-timestamp 2.0.0", + "pallet-transaction-payment 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-block-builder 2.0.0", + "sp-consensus-aura 0.8.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-offchain 2.0.0", + "sp-runtime 2.0.0", + "sp-session 2.0.0", + "sp-std 2.0.0", + "sp-transaction-pool 2.0.0", + "sp-version 2.0.0", + "substrate-wasm-builder-runner 1.0.5", ] [[package]] name = "node-testing" version = "2.0.0" dependencies = [ - "criterion 0.3.1", - "frame-support", - "frame-system", - "fs_extra", - "log 0.4.8", - "node-executor", - "node-primitives", - "node-runtime", - "pallet-balances", - "pallet-contracts", - "pallet-grandpa", - "pallet-indices", - "pallet-session", - "pallet-society", - "pallet-staking", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-treasury", - "parity-scale-codec", - "sc-cli", - "sc-client", - "sc-client-api", - "sc-client-db", - "sc-executor", - "sc-service", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-finality-tracker", - "sp-inherents", - "sp-io", - "sp-keyring", - "sp-runtime", - "sp-timestamp", - "substrate-test-client", - "tempdir", - "wabt", + "criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-support 2.0.0", + "frame-system 2.0.0", + "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "node-executor 2.0.0", + "node-primitives 2.0.0", + "node-runtime 2.0.0", + "pallet-balances 2.0.0", + "pallet-contracts 2.0.0", + "pallet-grandpa 2.0.0", + "pallet-indices 2.0.0", + "pallet-session 2.0.0", + "pallet-society 2.0.0", + "pallet-staking 2.0.0", + "pallet-timestamp 2.0.0", + "pallet-transaction-payment 2.0.0", + "pallet-treasury 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-cli 0.8.0", + "sc-client 0.8.0", + "sc-client-api 2.0.0", + "sc-client-db 0.8.0", + "sc-executor 0.8.0", + "sc-service 0.8.0", + "sp-api 2.0.0", + "sp-block-builder 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-core 2.0.0", + "sp-finality-tracker 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-timestamp 2.0.0", + "substrate-test-client 2.0.0", + "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "node-transaction-factory" version = "0.8.0" dependencies = [ - "log 0.4.8", - "parity-scale-codec", - "sc-cli", - "sc-client", - "sc-client-api", - "sc-service", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-runtime", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-cli 0.8.0", + "sc-client 0.8.0", + "sc-client-api 2.0.0", + "sc-service 0.8.0", + "sp-api 2.0.0", + "sp-block-builder 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", ] [[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.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721a2bf1c26159ebf17e0a980bc4ce61f4b2fec5ec3b42d42fddd7a84a9e538f" [[package]] name = "nohash-hasher" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" [[package]] name = "nom" version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" dependencies = [ - "memchr", - "version_check 0.1.5", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-rational" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da4dc79f9e6c81bef96148c8f6b8e72ad4541caa4a24373e900a36da07de03a3" dependencies = [ - "autocfg 1.0.0", - "num-bigint", - "num-integer", - "num-traits", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num_cpus" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" dependencies = [ - "hermit-abi", - "libc", + "hermit-abi 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "oorandom" version = "11.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcec7c9c2a95cacc7cd0ecb89d8a8454eca13906f6deb55258ffff0adeb9405" [[package]] name = "opaque-debug" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "openssl" version = "0.10.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "973293749822d7dd6370d6da1e523b0d1db19f06c459134c658b2a4261378b52" dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "lazy_static", - "libc", - "openssl-sys", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl-probe" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" [[package]] name = "openssl-sys" version = "0.9.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986" dependencies = [ - "autocfg 1.0.0", - "cc", - "libc", - "pkg-config", - "vcpkg", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", + "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "output_vt100" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" dependencies = [ - "winapi 0.3.8", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "owning_ref" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" dependencies = [ - "stable_deref_trait", + "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pallet-assets" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-aura" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "lazy_static", - "pallet-session", - "pallet-timestamp", - "parity-scale-codec", - "parking_lot 0.10.0", - "serde", - "sp-application-crypto", - "sp-consensus-aura", - "sp-core", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-std", - "sp-timestamp", + "frame-support 2.0.0", + "frame-system 2.0.0", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pallet-session 2.0.0", + "pallet-timestamp 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-application-crypto 2.0.0", + "sp-consensus-aura 0.8.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", + "sp-timestamp 2.0.0", ] [[package]] name = "pallet-authority-discovery" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "pallet-session", - "parity-scale-codec", - "serde", - "sp-application-crypto", - "sp-authority-discovery", - "sp-core", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-session 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-application-crypto 2.0.0", + "sp-authority-discovery 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-staking 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-authorship" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "parity-scale-codec", - "sp-authorship", - "sp-core", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-authorship 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-babe" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "hex-literal", - "lazy_static", - "pallet-session", - "pallet-timestamp", - "parity-scale-codec", - "parking_lot 0.10.0", - "serde", - "sp-consensus-babe", - "sp-core", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", - "sp-timestamp", - "sp-version", - "substrate-test-runtime", + "frame-support 2.0.0", + "frame-system 2.0.0", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pallet-session 2.0.0", + "pallet-timestamp 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-consensus-babe 0.8.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-staking 2.0.0", + "sp-std 2.0.0", + "sp-timestamp 2.0.0", + "sp-version 2.0.0", + "substrate-test-runtime 2.0.0", ] [[package]] name = "pallet-balances" version = "2.0.0" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-transaction-payment", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-benchmarking 2.0.0", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-transaction-payment 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-collective" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "hex-literal", - "pallet-balances", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pallet-balances 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-contracts" version = "2.0.0" dependencies = [ - "assert_matches", - "frame-support", - "frame-system", - "hex-literal", - "pallet-balances", - "pallet-contracts-primitives", - "pallet-randomness-collective-flip", - "pallet-timestamp", - "parity-scale-codec", - "parity-wasm 0.41.0", - "pwasm-utils", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-sandbox", - "sp-std", - "wabt", - "wasmi-validation", + "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-support 2.0.0", + "frame-system 2.0.0", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pallet-balances 2.0.0", + "pallet-contracts-primitives 2.0.0", + "pallet-randomness-collective-flip 2.0.0", + "pallet-timestamp 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pwasm-utils 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-sandbox 0.8.0", + "sp-std 2.0.0", + "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi-validation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pallet-contracts-primitives" version = "2.0.0" dependencies = [ - "parity-scale-codec", - "sp-runtime", - "sp-std", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-contracts-rpc" version = "0.8.0" dependencies = [ - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "pallet-contracts-primitives", - "pallet-contracts-rpc-runtime-api", - "parity-scale-codec", - "serde", - "serde_json", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-rpc", - "sp-runtime", + "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "pallet-contracts-primitives 2.0.0", + "pallet-contracts-rpc-runtime-api 0.8.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-core 2.0.0", + "sp-rpc 2.0.0", + "sp-runtime 2.0.0", ] [[package]] name = "pallet-contracts-rpc-runtime-api" version = "0.8.0" dependencies = [ - "pallet-contracts-primitives", - "parity-scale-codec", - "sp-api", - "sp-runtime", - "sp-std", + "pallet-contracts-primitives 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-democracy" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "hex-literal", - "pallet-balances", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-storage", + "frame-support 2.0.0", + "frame-system 2.0.0", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pallet-balances 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", + "sp-storage 2.0.0", ] [[package]] name = "pallet-elections" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "hex-literal", - "pallet-balances", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pallet-balances 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-elections-phragmen" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "hex-literal", - "pallet-balances", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-phragmen", - "sp-runtime", - "sp-std", - "substrate-test-utils", + "frame-support 2.0.0", + "frame-system 2.0.0", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pallet-balances 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-phragmen 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", + "substrate-test-utils 2.0.0", ] [[package]] name = "pallet-evm" version = "2.0.0" dependencies = [ - "evm", - "frame-support", - "frame-system", - "pallet-balances", - "pallet-timestamp", - "parity-scale-codec", - "primitive-types", - "rlp", - "serde", - "sha3", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "evm 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-balances 2.0.0", + "pallet-timestamp 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rlp 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-example" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "pallet-balances", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-balances 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-example-offchain-worker" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "serde", - "serde_json", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-finality-tracker" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "parity-scale-codec", - "serde", - "sp-core", - "sp-finality-tracker", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-finality-tracker 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-generic-asset" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-grandpa" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "pallet-finality-tracker", - "pallet-session", - "parity-scale-codec", - "serde", - "sp-core", - "sp-finality-grandpa", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-finality-tracker 2.0.0", + "pallet-session 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-finality-grandpa 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-staking 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-identity" version = "2.0.0" dependencies = [ - "enumflags2", - "frame-benchmarking", - "frame-support", - "frame-system", - "pallet-balances", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "enumflags2 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-benchmarking 2.0.0", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-balances 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-im-online" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "pallet-authorship", - "pallet-session", - "parity-scale-codec", - "serde", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-authorship 2.0.0", + "pallet-session 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-application-crypto 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-staking 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-indices" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "pallet-balances", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-keyring", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-balances 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-membership" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-nicks" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "pallet-balances", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-balances 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-offences" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "pallet-balances", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-balances 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-staking 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-randomness-collective-flip" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "safe-mix", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "safe-mix 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-recovery" version = "2.0.0" dependencies = [ - "enumflags2", - "frame-support", - "frame-system", - "pallet-balances", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "enumflags2 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-balances 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-scored-pool" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "pallet-balances", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-balances 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-session" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "lazy_static", - "pallet-timestamp", - "parity-scale-codec", - "serde", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", - "sp-trie", + "frame-support 2.0.0", + "frame-system 2.0.0", + "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pallet-timestamp 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-application-crypto 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-staking 2.0.0", + "sp-std 2.0.0", + "sp-trie 2.0.0", ] [[package]] name = "pallet-society" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "pallet-balances", - "parity-scale-codec", - "rand_chacha 0.2.1", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-balances 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-staking" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "pallet-authorship", - "pallet-balances", - "pallet-session", - "pallet-staking-reward-curve", - "pallet-timestamp", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-keyring", - "sp-phragmen", - "sp-runtime", - "sp-staking", - "sp-std", - "substrate-test-utils", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-authorship 2.0.0", + "pallet-balances 2.0.0", + "pallet-session 2.0.0", + "pallet-staking-reward-curve 2.0.0", + "pallet-timestamp 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-keyring 2.0.0", + "sp-phragmen 2.0.0", + "sp-runtime 2.0.0", + "sp-staking 2.0.0", + "sp-std 2.0.0", + "substrate-test-utils 2.0.0", ] [[package]] name = "pallet-staking-reward-curve" version = "2.0.0" dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.8", - "quote 1.0.2", - "sp-runtime", - "syn", + "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime 2.0.0", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pallet-sudo" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-template" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "safe-mix", - "sp-core", - "sp-io", - "sp-runtime", + "frame-support 2.0.0", + "frame-system 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "safe-mix 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", ] [[package]] name = "pallet-timestamp" version = "2.0.0" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "parity-scale-codec", - "serde", - "sp-core", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-std", - "sp-timestamp", + "frame-benchmarking 2.0.0", + "frame-support 2.0.0", + "frame-system 2.0.0", + "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", + "sp-timestamp 2.0.0", ] [[package]] name = "pallet-transaction-payment" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "pallet-balances", - "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-balances 2.0.0", + "pallet-transaction-payment-rpc-runtime-api 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-transaction-payment-rpc" version = "2.0.0" dependencies = [ - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec", - "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-rpc", - "sp-runtime", + "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "pallet-transaction-payment-rpc-runtime-api 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-core 2.0.0", + "sp-rpc 2.0.0", + "sp-runtime 2.0.0", ] [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "2.0.0" dependencies = [ - "frame-support", - "parity-scale-codec", - "serde", - "serde_json", - "sp-api", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-treasury" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "pallet-balances", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-balances 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-utility" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "pallet-balances", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "frame-support 2.0.0", + "frame-system 2.0.0", + "pallet-balances 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "pallet-vesting" version = "2.0.0" dependencies = [ - "enumflags2", - "frame-support", - "frame-system", - "hex-literal", - "pallet-balances", - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-storage", + "enumflags2 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-support 2.0.0", + "frame-system 2.0.0", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pallet-balances 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", + "sp-storage 2.0.0", ] [[package]] name = "parity-bytes" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c276d76c5333b8c2579e02d49a06733a55b8282d2d9b13e8d53b6406bd7e30a" [[package]] name = "parity-multiaddr" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "045b3c7af871285146300da35b1932bb6e4639b66c7c98e85d06a32cbc4e8fa7" dependencies = [ - "arrayref", - "bs58 0.2.5", - "byteorder 1.3.4", - "bytes 0.4.12", - "data-encoding", - "parity-multihash 0.1.3", - "percent-encoding 1.0.1", - "serde", - "unsigned-varint 0.2.3", - "url 1.7.2", + "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "bs58 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multihash 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parity-multiaddr" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26df883298bc3f4e92528b4c5cc9f806b791955b136da3e5e939ed9de0fd958b" dependencies = [ - "arrayref", - "bs58 0.3.0", - "byteorder 1.3.4", - "data-encoding", - "parity-multihash 0.2.3", - "percent-encoding 2.1.0", - "serde", - "static_assertions", - "unsigned-varint 0.3.0", - "url 2.1.1", + "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "bs58 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multihash 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parity-multihash" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3a17dc27848fd99e4f87eb0f8c9baba6ede0a6d555400c850ca45254ef4ce3" dependencies = [ - "blake2", - "bytes 0.4.12", - "rand 0.6.5", - "sha-1", - "sha2", - "sha3", - "unsigned-varint 0.2.3", + "blake2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 0.3.0", + "blake2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parity-scale-codec" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f747c06d9f3b2ad387ac881b9667298c81b1243aa9833f086e05996937c35507" dependencies = [ - "arrayvec 0.5.1", - "bitvec", - "byte-slice-cast", - "parity-scale-codec-derive", - "serde", + "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitvec 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-slice-cast 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec-derive 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parity-scale-codec-derive" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34e513ff3e406f3ede6796dcdc83d0b32ffb86668cea1ccf7363118abeb00476" dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef1476e40bf8f5c6776e9600983435821ca86eb9819d74a6207cca69d091406a" dependencies = [ - "cfg-if", - "impl-trait-for-tuples", - "parity-util-mem-derive", - "parking_lot 0.10.0", - "primitive-types", - "smallvec 1.2.0", - "winapi 0.3.8", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.8", - "syn", - "synstructure", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parity-wasm" version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ad52817c4d343339b3bc2e26861bd21478eda0b7509acf83505727000512ac" dependencies = [ - "byteorder 1.3.4", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "lock_api 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parking_lot" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e98c49ab0b7ce5b222f2cc9193fc4efe11c6d0bd4f648e374684a6857b1cfc" dependencies = [ - "lock_api", - "parking_lot_core 0.7.0", + "lock_api 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parking_lot_core" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7582838484df45743c8434fbff785e8edf260c28748353d44bc0da32e0ceabf1" dependencies = [ - "cfg-if", - "cloudabi", - "libc", - "redox_syscall", - "smallvec 1.2.0", - "winapi 0.3.8", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "paste" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "423a519e1c6e828f1e73b720f9d9ed2fa643dce8a7737fb43235ce0b41eeaa49" dependencies = [ - "paste-impl", - "proc-macro-hack", + "paste-impl 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "paste-impl" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4214c9e912ef61bf42b81ba9a47e8aad1b2ffaf739ab162bf96d1e011f54e6c5" dependencies = [ - "proc-macro-hack", - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pbkdf2" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" dependencies = [ - "byteorder 1.3.4", - "crypto-mac", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "fixedbitset 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pin-project" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c" dependencies = [ - "pin-project-internal", + "pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pin-project-internal" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pin-project-lite" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" [[package]] name = "pin-utils" version = "0.1.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" [[package]] name = "pkg-config" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" [[package]] name = "plain" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" [[package]] name = "plotters" version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3bb8da247d27ae212529352020f3e5ee16e83c0c258061d27b08ab92675eeb" dependencies = [ - "js-sys", - "num-traits", - "wasm-bindgen", - "web-sys", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ppv-lite86" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" [[package]] name = "predicates" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9bfe52247e5cc9b2f943682a85a5549fb9662245caf094504e69a2f03fe64d4" dependencies = [ - "difference", - "predicates-core", + "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "predicates-core" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" [[package]] name = "predicates-tree" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" dependencies = [ - "predicates-core", - "treeline", + "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pretty_assertions" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427" dependencies = [ - "ansi_term 0.11.0", - "ctor", - "difference", - "output_vt100", + "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ctor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "output_vt100 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "primitive-types" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4336f4f5d5524fa60bcbd6fe626f9223d8142a50e7053e979acdf0da41ab975" dependencies = [ - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde 0.3.0", - "uint", + "fixed-hash 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "impl-codec 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "impl-rlp 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "impl-serde 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uint 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "proc-macro-crate" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10d4b51f154c8a7fb96fd6dad097cb74b863943ec010ac94b9fd1be8861fe1e" dependencies = [ - "toml", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "proc-macro-error" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875077759af22fa20b610ad4471d8155b321c89c3f2785526c9839b099be4e0a" dependencies = [ - "proc-macro-error-attr", - "proc-macro2 1.0.8", - "quote 1.0.2", - "rustversion", - "syn", + "proc-macro-error-attr 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "proc-macro-error-attr" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5717d9fa2664351a01ed73ba5ef6df09c01a521cb42cb65a061432a826f3c7a" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "rustversion", - "syn", - "syn-mid", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "syn-mid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "proc-macro-hack" version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "proc-macro-nested" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" [[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", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "proc-macro2" version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" dependencies = [ - "unicode-xid 0.2.0", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "prometheus" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5567486d5778e2c6455b1b90ff1c558f29e751fc018130fa182e15828e728af1" dependencies = [ - "cfg-if", - "fnv", - "lazy_static", - "protobuf", - "quick-error", - "spin", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "prometheus-exporter" version = "0.8.0" dependencies = [ - "async-std", - "derive_more", - "futures-util", - "hyper 0.13.2", - "log 0.4.8", - "prometheus", - "tokio 0.2.11", + "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "prometheus 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "prost-derive 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 0.4.8", - "multimap", - "petgraph", - "prost", - "prost-types", - "tempfile", - "which 3.1.0", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "multimap 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "petgraph 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "which 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.8", - "quote 1.0.2", - "syn", + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "protobuf" version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6686ddd96a8dbe2687b5f2a687b2cfb520854010ec480f2d74c32e7c9873d3c5" [[package]] name = "pwasm-utils" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f7a12f176deee919f4ba55326ee17491c8b707d0987aed822682c821b660192" dependencies = [ - "byteorder 1.3.4", - "log 0.4.8", - "parity-wasm 0.41.0", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "quick-error" version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quickcheck" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44883e74aa97ad63db83c4bf8ca490f02b2fc02f92575e720c8551e843c945f" dependencies = [ - "env_logger 0.7.1", - "log 0.4.8", - "rand 0.7.3", - "rand_core 0.5.1", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "quicksink" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8461ef7445f61fd72d8dcd0629ce724b9131b3c2eb36e83a5d3d4161c127530" dependencies = [ - "futures-core", - "futures-sink", - "pin-project-lite", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "quote" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" dependencies = [ - "proc-macro2 1.0.8", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", - "rand_xorshift", - "winapi 0.3.8", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.1", - "rand_core 0.5.1", - "rand_hc 0.2.0", + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_chacha" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" dependencies = [ - "c2-chacha", - "rand_core 0.5.1", + "c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", - "wasm-bindgen", - "winapi 0.3.8", + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_xoshiro" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b418169fb9c46533f326efd6eed2576699c44ca92d3052a066214a8d828929" dependencies = [ - "byteorder 1.3.4", - "rand_core 0.3.1", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "raw-cpuid" version = "7.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a349ca83373cfa5d6dbb66fd76e58b2cca08da71a5f6400de0a0a6a9bceeaf" dependencies = [ - "bitflags", - "cc", - "rustc_version", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "redox_syscall" version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" [[package]] name = "redox_users" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" dependencies = [ - "getrandom", - "redox_syscall", - "rust-argon2", + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "rust-argon2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", - "thread_local", + "aho-corasick 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-automata" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9" dependencies = [ - "byteorder 1.3.4", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06" [[package]] name = "region" version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "448e868c6e4cfddfa49b6a72c95906c04e8547465e9536575b95c70a4044f856" dependencies = [ - "bitflags", - "libc", - "mach", - "winapi 0.3.8", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "mach 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ring" version = "0.16.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "741ba1704ae21999c00942f9f5944f801e977f54302af346b596287599ad1862" dependencies = [ - "cc", - "lazy_static", - "libc", - "spin", - "untrusted", - "web-sys", - "winapi 0.3.8", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rlp" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a44d5ae8afcb238af8b75640907edc6c931efcfab2c854e81ed35fa080f84cd" dependencies = [ - "rustc-hex", + "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rocksdb" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12069b106981c6103d3eab7dd1c86751482d0779a520b7c14954c8b586c1e643" dependencies = [ - "libc", - "librocksdb-sys", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "librocksdb-sys 6.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rust-argon2" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" dependencies = [ - "base64 0.11.0", - "blake2b_simd", - "constant_time_eq", - "crossbeam-utils", + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", + "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 0.9.0", + "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustls" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" dependencies = [ - "base64 0.10.1", - "log 0.4.8", - "ring", - "sct", - "webpki", + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustls-native-certs" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ffebdbb48c14f84eba0b715197d673aff1dd22cc1007ca647e28483bbcc307" dependencies = [ - "openssl-probe", - "rustls", - "schannel", - "security-framework", + "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustversion" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3bba175698996010c4f6dce5e7f173b6eb781fce25d2cfc45e27091ce0b79f6" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ryu" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" [[package]] name = "safe-mix" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c" dependencies = [ - "rustc_version", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "safemem" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" [[package]] name = "salsa20" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2324b0e8c3bb9a586a571fdb3136f70e7e2c748de00a78043f86e0cff91f91fe" dependencies = [ - "byteorder 1.3.4", - "salsa20-core", - "stream-cipher", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "salsa20-core 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "salsa20-core" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fe6cc1b9f5a5867853ade63099de70f042f7679e408d1ffe52821c9248e6e69" dependencies = [ - "stream-cipher", + "stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "same-file" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ - "winapi-util", + "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-authority-discovery" version = "0.8.0" dependencies = [ - "bytes 0.4.12", - "derive_more", - "env_logger 0.7.1", - "futures 0.3.4", - "futures-timer 3.0.1", - "libp2p", - "log 0.4.8", - "parity-scale-codec", - "prost", - "prost-build", - "quickcheck", - "rand 0.7.3", - "sc-client-api", - "sc-keystore", - "sc-network", - "sc-peerset", - "serde_json", - "sp-api", - "sp-authority-discovery", - "sp-blockchain", - "sp-core", - "sp-runtime", - "substrate-test-runtime-client", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "quickcheck 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sc-keystore 2.0.0", + "sc-network 0.8.0", + "sc-peerset 2.0.0", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-authority-discovery 2.0.0", + "sp-blockchain 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "substrate-test-runtime-client 2.0.0", ] [[package]] name = "sc-basic-authorship" version = "0.8.0" dependencies = [ - "futures 0.3.4", - "log 0.4.8", - "parity-scale-codec", - "parking_lot 0.10.0", - "sc-block-builder", - "sc-client", - "sc-client-api", - "sc-telemetry", - "sc-transaction-pool", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-transaction-pool", - "substrate-test-runtime-client", - "tokio-executor 0.2.0-alpha.6", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-block-builder 0.8.0", + "sc-client 0.8.0", + "sc-client-api 2.0.0", + "sc-telemetry 2.0.0", + "sc-transaction-pool 2.0.0", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-transaction-pool 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-block-builder" version = "0.8.0" dependencies = [ - "parity-scale-codec", - "sc-client-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-runtime", - "sp-state-machine", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sp-api 2.0.0", + "sp-block-builder 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 0.8.0", ] [[package]] name = "sc-chain-spec" version = "2.0.0" dependencies = [ - "impl-trait-for-tuples", - "sc-chain-spec-derive", - "sc-network", - "sc-telemetry", - "serde", - "serde_json", - "sp-core", - "sp-runtime", + "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-chain-spec-derive 2.0.0", + "sc-network 0.8.0", + "sc-telemetry 2.0.0", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-runtime 2.0.0", ] [[package]] name = "sc-chain-spec-derive" version = "2.0.0" dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-cli" version = "0.8.0" dependencies = [ - "ansi_term 0.12.1", - "app_dirs", - "atty", - "chrono", - "clap", - "derive_more", - "env_logger 0.7.1", - "fdlimit", - "futures 0.3.4", - "lazy_static", - "log 0.4.8", - "names", - "parity-util-mem", - "prometheus-exporter", - "regex", - "rpassword", - "sc-client-api", - "sc-informant", - "sc-network", - "sc-service", - "sc-telemetry", - "sc-tracing", - "serde_json", - "sp-blockchain", - "sp-core", - "sp-keyring", - "sp-panic-handler", - "sp-runtime", - "sp-state-machine", - "structopt", - "tempfile", - "time", - "tokio 0.2.11", + "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", + "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fdlimit 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "names 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prometheus-exporter 0.8.0", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rpassword 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sc-informant 0.8.0", + "sc-network 0.8.0", + "sc-service 0.8.0", + "sc-telemetry 2.0.0", + "sc-tracing 2.0.0", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-blockchain 2.0.0", + "sp-core 2.0.0", + "sp-keyring 2.0.0", + "sp-panic-handler 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 0.8.0", + "structopt 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-client" version = "0.8.0" dependencies = [ - "derive_more", - "env_logger 0.7.1", - "fnv", - "futures 0.3.4", - "hash-db", - "hex-literal", - "kvdb", - "kvdb-memorydb", - "log 0.4.8", - "parity-scale-codec", - "parking_lot 0.10.0", - "sc-block-builder", - "sc-client-api", - "sc-executor", - "sc-telemetry", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-externalities", - "sp-inherents", - "sp-keyring", - "sp-panic-handler", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", - "sp-version", - "substrate-test-runtime-client", - "tempfile", - "tracing", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb-memorydb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-block-builder 0.8.0", + "sc-client-api 2.0.0", + "sc-executor 0.8.0", + "sc-telemetry 2.0.0", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-core 2.0.0", + "sp-externalities 0.8.0", + "sp-inherents 2.0.0", + "sp-keyring 2.0.0", + "sp-panic-handler 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 0.8.0", + "sp-std 2.0.0", + "sp-trie 2.0.0", + "sp-version 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-client-api" version = "2.0.0" dependencies = [ - "derive_more", - "fnv", - "futures 0.3.4", - "hash-db", - "hex-literal", - "kvdb", - "log 0.4.8", - "parity-scale-codec", - "parking_lot 0.10.0", - "sc-executor", - "sc-telemetry", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-externalities", - "sp-inherents", - "sp-keyring", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-test-primitives", - "sp-transaction-pool", - "sp-trie", - "sp-version", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-executor 0.8.0", + "sc-telemetry 2.0.0", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-core 2.0.0", + "sp-externalities 0.8.0", + "sp-inherents 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 0.8.0", + "sp-std 2.0.0", + "sp-test-primitives 2.0.0", + "sp-transaction-pool 2.0.0", + "sp-trie 2.0.0", + "sp-version 2.0.0", ] [[package]] name = "sc-client-db" version = "0.8.0" dependencies = [ - "env_logger 0.7.1", - "hash-db", - "kvdb", - "kvdb-memorydb", - "kvdb-rocksdb", - "linked-hash-map", - "log 0.4.8", - "parity-scale-codec", - "parity-util-mem", - "parking_lot 0.10.0", - "quickcheck", - "rand 0.7.3", - "sc-client", - "sc-client-api", - "sc-executor", - "sc-state-db", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-keyring", - "sp-runtime", - "sp-state-machine", - "sp-trie", - "substrate-test-runtime-client", - "tempfile", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb-memorydb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb-rocksdb 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quickcheck 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client 0.8.0", + "sc-client-api 2.0.0", + "sc-executor 0.8.0", + "sc-state-db 0.8.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-core 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 0.8.0", + "sp-trie 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-consensus-aura" version = "0.8.0" dependencies = [ - "derive_more", - "env_logger 0.7.1", - "futures 0.1.29", - "futures 0.3.4", - "futures-timer 3.0.1", - "log 0.4.8", - "parity-scale-codec", - "parking_lot 0.10.0", - "sc-client", - "sc-client-api", - "sc-consensus-slots", - "sc-executor", - "sc-keystore", - "sc-network", - "sc-network-test", - "sc-service", - "sc-telemetry", - "sp-api", - "sp-application-crypto", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-aura", - "sp-core", - "sp-inherents", - "sp-io", - "sp-keyring", - "sp-runtime", - "sp-timestamp", - "sp-version", - "substrate-test-runtime-client", - "tempfile", - "tokio 0.1.22", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client 0.8.0", + "sc-client-api 2.0.0", + "sc-consensus-slots 0.8.0", + "sc-executor 0.8.0", + "sc-keystore 2.0.0", + "sc-network 0.8.0", + "sc-network-test 0.8.0", + "sc-service 0.8.0", + "sc-telemetry 2.0.0", + "sp-api 2.0.0", + "sp-application-crypto 2.0.0", + "sp-block-builder 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-consensus-aura 0.8.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-timestamp 2.0.0", + "sp-version 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-consensus-babe" version = "0.8.0" dependencies = [ - "derive_more", - "env_logger 0.7.1", - "fork-tree", - "futures 0.1.29", - "futures 0.3.4", - "futures-timer 3.0.1", - "log 0.4.8", - "merlin", - "num-bigint", - "num-rational", - "num-traits", - "parity-scale-codec", - "parking_lot 0.10.0", - "pdqselect", - "rand 0.7.3", - "sc-block-builder", - "sc-client", - "sc-client-api", - "sc-consensus-epochs", - "sc-consensus-slots", - "sc-consensus-uncles", - "sc-executor", - "sc-keystore", - "sc-network", - "sc-network-test", - "sc-service", - "sc-telemetry", - "schnorrkel", - "serde", - "sp-api", - "sp-application-crypto", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-core", - "sp-inherents", - "sp-io", - "sp-keyring", - "sp-runtime", - "sp-timestamp", - "sp-version", - "substrate-test-runtime-client", - "tempfile", - "tokio 0.1.22", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fork-tree 2.0.0", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "merlin 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num-rational 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pdqselect 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-block-builder 0.8.0", + "sc-client 0.8.0", + "sc-client-api 2.0.0", + "sc-consensus-epochs 0.8.0", + "sc-consensus-slots 0.8.0", + "sc-consensus-uncles 0.8.0", + "sc-executor 0.8.0", + "sc-keystore 2.0.0", + "sc-network 0.8.0", + "sc-network-test 0.8.0", + "sc-service 0.8.0", + "sc-telemetry 2.0.0", + "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-application-crypto 2.0.0", + "sp-block-builder 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-consensus-babe 0.8.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-timestamp 2.0.0", + "sp-version 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-consensus-babe-rpc" version = "0.8.0" dependencies = [ - "derive_more", - "futures 0.3.4", - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "sc-consensus-babe", - "sc-consensus-epochs", - "sc-keystore", - "serde", - "sp-api", - "sp-application-crypto", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-core", - "sp-keyring", - "sp-runtime", - "substrate-test-runtime-client", - "tempfile", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-consensus-babe 0.8.0", + "sc-consensus-epochs 0.8.0", + "sc-keystore 2.0.0", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-application-crypto 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-consensus-babe 0.8.0", + "sp-core 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-consensus-epochs" version = "0.8.0" dependencies = [ - "fork-tree", - "parity-scale-codec", - "parking_lot 0.10.0", - "sc-client-api", - "sp-blockchain", - "sp-runtime", + "fork-tree 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-runtime 2.0.0", ] [[package]] name = "sc-consensus-manual-seal" version = "0.8.0" dependencies = [ - "derive_more", - "env_logger 0.7.1", - "futures 0.3.4", - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "log 0.4.8", - "parking_lot 0.10.0", - "sc-basic-authorship", - "sc-client", - "sc-client-api", - "sc-transaction-pool", - "serde", - "sp-blockchain", - "sp-consensus", - "sp-inherents", - "sp-runtime", - "sp-transaction-pool", - "substrate-test-runtime-client", - "substrate-test-runtime-transaction-pool", - "tempfile", - "tokio 0.2.11", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-basic-authorship 0.8.0", + "sc-client 0.8.0", + "sc-client-api 2.0.0", + "sc-transaction-pool 2.0.0", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-transaction-pool 2.0.0", + "substrate-test-runtime-client 2.0.0", + "substrate-test-runtime-transaction-pool 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-consensus-pow" version = "0.8.0" dependencies = [ - "derive_more", - "futures 0.3.4", - "log 0.4.8", - "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", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sp-api 2.0.0", + "sp-block-builder 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-consensus-pow 0.8.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-timestamp 2.0.0", ] [[package]] name = "sc-consensus-slots" version = "0.8.0" dependencies = [ - "futures 0.3.4", - "futures-timer 3.0.1", - "log 0.4.8", - "parity-scale-codec", - "parking_lot 0.10.0", - "sc-client-api", - "sc-telemetry", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", - "substrate-test-runtime-client", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sc-telemetry 2.0.0", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 0.8.0", + "substrate-test-runtime-client 2.0.0", ] [[package]] name = "sc-consensus-uncles" version = "0.8.0" dependencies = [ - "log 0.4.8", - "sc-client-api", - "sp-authorship", - "sp-consensus", - "sp-core", - "sp-inherents", - "sp-runtime", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sp-authorship 2.0.0", + "sp-consensus 0.8.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", ] [[package]] name = "sc-executor" version = "0.8.0" dependencies = [ - "assert_matches", - "derive_more", - "hex-literal", - "lazy_static", - "libsecp256k1", - "log 0.4.8", - "parity-scale-codec", - "parity-wasm 0.41.0", - "parking_lot 0.10.0", - "sc-executor-common", - "sc-executor-wasmi", - "sc-executor-wasmtime", - "sc-runtime-test", - "sp-core", - "sp-externalities", - "sp-io", - "sp-panic-handler", - "sp-runtime-interface", - "sp-serializer", - "sp-state-machine", - "sp-trie", - "sp-version", - "sp-wasm-interface", - "substrate-test-runtime", - "test-case", - "wabt", - "wasmi", + "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-executor-common 0.8.0", + "sc-executor-wasmi 0.8.0", + "sc-executor-wasmtime 0.8.0", + "sc-runtime-test 2.0.0", + "sp-core 2.0.0", + "sp-externalities 0.8.0", + "sp-io 2.0.0", + "sp-panic-handler 2.0.0", + "sp-runtime-interface 2.0.0", + "sp-serializer 2.0.0", + "sp-state-machine 0.8.0", + "sp-trie 2.0.0", + "sp-version 2.0.0", + "sp-wasm-interface 2.0.0", + "substrate-test-runtime 2.0.0", + "test-case 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-executor-common" version = "0.8.0" dependencies = [ - "derive_more", - "log 0.4.8", - "parity-scale-codec", - "sp-allocator", - "sp-core", - "sp-runtime-interface", - "sp-serializer", - "sp-wasm-interface", - "wasmi", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-allocator 2.0.0", + "sp-core 2.0.0", + "sp-runtime-interface 2.0.0", + "sp-serializer 2.0.0", + "sp-wasm-interface 2.0.0", + "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-executor-wasmi" version = "0.8.0" dependencies = [ - "log 0.4.8", - "parity-scale-codec", - "parity-wasm 0.41.0", - "sc-executor-common", - "sp-allocator", - "sp-core", - "sp-runtime-interface", - "sp-wasm-interface", - "wasmi", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-executor-common 0.8.0", + "sp-allocator 2.0.0", + "sp-core 2.0.0", + "sp-runtime-interface 2.0.0", + "sp-wasm-interface 2.0.0", + "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-executor-wasmtime" version = "0.8.0" dependencies = [ - "assert_matches", - "log 0.4.8", - "parity-scale-codec", - "parity-wasm 0.41.0", - "sc-executor-common", - "sp-allocator", - "sp-core", - "sp-runtime-interface", - "sp-wasm-interface", - "wasmi", - "wasmtime", + "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-executor-common 0.8.0", + "sp-allocator 2.0.0", + "sp-core 2.0.0", + "sp-runtime-interface 2.0.0", + "sp-wasm-interface 2.0.0", + "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmtime 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-finality-grandpa" version = "0.8.0" dependencies = [ - "assert_matches", - "env_logger 0.7.1", - "finality-grandpa", - "fork-tree", - "futures 0.1.29", - "futures 0.3.4", - "futures-timer 3.0.1", - "log 0.4.8", - "parity-scale-codec", - "parking_lot 0.10.0", - "pin-project", - "rand 0.7.3", - "sc-client", - "sc-client-api", - "sc-keystore", - "sc-network", - "sc-network-gossip", - "sc-network-test", - "sc-telemetry", - "serde_json", - "sp-api", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-core", - "sp-finality-grandpa", - "sp-finality-tracker", - "sp-inherents", - "sp-keyring", - "sp-runtime", - "sp-state-machine", - "substrate-test-runtime-client", - "tempfile", - "tokio 0.1.22", + "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "finality-grandpa 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fork-tree 2.0.0", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client 0.8.0", + "sc-client-api 2.0.0", + "sc-keystore 2.0.0", + "sc-network 0.8.0", + "sc-network-gossip 0.8.0", + "sc-network-test 0.8.0", + "sc-telemetry 2.0.0", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-arithmetic 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-consensus-babe 0.8.0", + "sp-core 2.0.0", + "sp-finality-grandpa 2.0.0", + "sp-finality-tracker 2.0.0", + "sp-inherents 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 0.8.0", + "substrate-test-runtime-client 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-informant" version = "0.8.0" dependencies = [ - "ansi_term 0.12.1", - "futures 0.3.4", - "log 0.4.8", - "parity-util-mem", - "sc-client-api", - "sc-network", - "sc-service", - "sp-blockchain", - "sp-runtime", - "wasm-timer", + "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sc-network 0.8.0", + "sc-service 0.8.0", + "sp-blockchain 2.0.0", + "sp-runtime 2.0.0", + "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-keystore" version = "2.0.0" dependencies = [ - "derive_more", - "hex", - "parking_lot 0.10.0", - "rand 0.7.3", - "serde_json", - "sp-application-crypto", - "sp-core", - "subtle 2.2.2", - "tempfile", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-application-crypto 2.0.0", + "sp-core 2.0.0", + "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-network" version = "0.8.0" dependencies = [ - "assert_matches", - "async-std", - "bitflags", - "bytes 0.5.4", - "derive_more", - "either", - "env_logger 0.7.1", - "erased-serde", - "fnv", - "fork-tree", - "futures 0.3.4", - "futures-timer 3.0.1", - "futures_codec", - "libp2p", - "linked-hash-map", - "linked_hash_set", - "log 0.4.8", - "lru 0.4.3", - "nohash-hasher 0.2.0", - "parity-scale-codec", - "parking_lot 0.10.0", - "prost", - "prost-build", - "quickcheck", - "rand 0.7.3", - "rustc-hex", - "sc-block-builder", - "sc-client", - "sc-client-api", - "sc-peerset", - "serde", - "serde_json", - "slog", - "slog_derive", - "smallvec 0.6.13", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-core", - "sp-keyring", - "sp-runtime", - "sp-test-primitives", - "substrate-test-client", - "substrate-test-runtime", - "substrate-test-runtime-client", - "tempfile", - "thiserror", - "unsigned-varint 0.3.0", - "void", - "wasm-timer", - "zeroize 1.1.0", + "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "erased-serde 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "fork-tree 2.0.0", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures_codec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "linked_hash_set 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "lru 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "nohash-hasher 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "quickcheck 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-block-builder 0.8.0", + "sc-client 0.8.0", + "sc-client-api 2.0.0", + "sc-peerset 2.0.0", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "slog_derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-consensus-babe 0.8.0", + "sp-core 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-test-primitives 2.0.0", + "substrate-test-client 2.0.0", + "substrate-test-runtime 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-network-gossip" version = "0.8.0" dependencies = [ - "futures 0.3.4", - "futures-timer 3.0.1", - "libp2p", - "log 0.4.8", - "lru 0.1.17", - "parking_lot 0.10.0", - "sc-network", - "sp-runtime", - "wasm-timer", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "lru 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-network 0.8.0", + "sp-runtime 2.0.0", + "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-network-test" version = "0.8.0" dependencies = [ - "env_logger 0.7.1", - "futures 0.1.29", - "futures 0.3.4", - "futures-timer 3.0.1", - "libp2p", - "log 0.4.8", - "parking_lot 0.10.0", - "rand 0.7.3", - "sc-block-builder", - "sc-client", - "sc-client-api", - "sc-network", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-core", - "sp-runtime", - "substrate-test-runtime", - "substrate-test-runtime-client", - "tempfile", - "tokio 0.1.22", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-block-builder 0.8.0", + "sc-client 0.8.0", + "sc-client-api 2.0.0", + "sc-network 0.8.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-consensus-babe 0.8.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "substrate-test-runtime 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-offchain" version = "2.0.0" dependencies = [ - "bytes 0.5.4", - "env_logger 0.7.1", - "fnv", - "futures 0.3.4", - "futures-timer 3.0.1", - "hyper 0.13.2", - "hyper-rustls", - "log 0.4.8", - "num_cpus", - "parity-scale-codec", - "parking_lot 0.10.0", - "rand 0.7.3", - "sc-client-api", - "sc-client-db", - "sc-keystore", - "sc-network", - "sc-transaction-pool", - "sp-api", - "sp-core", - "sp-offchain", - "sp-runtime", - "sp-transaction-pool", - "substrate-test-runtime-client", - "threadpool", - "tokio 0.2.11", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-rustls 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sc-client-db 0.8.0", + "sc-keystore 2.0.0", + "sc-network 0.8.0", + "sc-transaction-pool 2.0.0", + "sp-api 2.0.0", + "sp-core 2.0.0", + "sp-offchain 2.0.0", + "sp-runtime 2.0.0", + "sp-transaction-pool 2.0.0", + "substrate-test-runtime-client 2.0.0", + "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-peerset" version = "2.0.0" dependencies = [ - "futures 0.3.4", - "libp2p", - "log 0.4.8", - "rand 0.7.3", - "serde_json", - "wasm-timer", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-rpc" version = "2.0.0" dependencies = [ - "assert_matches", - "futures 0.1.29", - "futures 0.3.4", - "hash-db", - "jsonrpc-core", - "jsonrpc-pubsub", - "log 0.4.8", - "parity-scale-codec", - "parking_lot 0.10.0", - "rustc-hex", - "sc-client", - "sc-client-api", - "sc-executor", - "sc-keystore", - "sc-network", - "sc-rpc-api", - "sc-transaction-pool", - "serde_json", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-io", - "sp-offchain", - "sp-rpc", - "sp-runtime", - "sp-session", - "sp-state-machine", - "sp-transaction-pool", - "sp-version", - "substrate-test-runtime-client", - "tokio 0.1.22", + "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client 0.8.0", + "sc-client-api 2.0.0", + "sc-executor 0.8.0", + "sc-keystore 2.0.0", + "sc-network 0.8.0", + "sc-rpc-api 0.8.0", + "sc-transaction-pool 2.0.0", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-offchain 2.0.0", + "sp-rpc 2.0.0", + "sp-runtime 2.0.0", + "sp-session 2.0.0", + "sp-state-machine 0.8.0", + "sp-transaction-pool 2.0.0", + "sp-version 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-rpc-api" version = "0.8.0" dependencies = [ - "derive_more", - "futures 0.3.4", - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "jsonrpc-pubsub", - "log 0.4.8", - "parity-scale-codec", - "parking_lot 0.10.0", - "serde", - "serde_json", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-transaction-pool", - "sp-version", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-rpc 2.0.0", + "sp-runtime 2.0.0", + "sp-transaction-pool 2.0.0", + "sp-version 2.0.0", ] [[package]] name = "sc-rpc-server" version = "2.0.0" dependencies = [ - "jsonrpc-core", - "jsonrpc-http-server", - "jsonrpc-pubsub", - "jsonrpc-ws-server", - "log 0.4.8", - "serde", - "serde_json", - "sp-runtime", + "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-http-server 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-ws-server 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime 2.0.0", ] [[package]] name = "sc-runtime-test" version = "2.0.0" dependencies = [ - "sp-allocator", - "sp-core", - "sp-io", - "sp-runtime", - "sp-sandbox", - "sp-std", - "substrate-wasm-builder-runner", + "sp-allocator 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-sandbox 0.8.0", + "sp-std 2.0.0", + "substrate-wasm-builder-runner 1.0.5", ] [[package]] name = "sc-service" version = "0.8.0" dependencies = [ - "derive_more", - "exit-future", - "futures 0.1.29", - "futures 0.3.4", - "futures-diagnose", - "futures-timer 3.0.1", - "lazy_static", - "log 0.4.8", - "parity-multiaddr 0.5.0", - "parity-scale-codec", - "parity-util-mem", - "parking_lot 0.10.0", - "prometheus-exporter", - "sc-chain-spec", - "sc-client", - "sc-client-api", - "sc-client-db", - "sc-executor", - "sc-finality-grandpa", - "sc-keystore", - "sc-network", - "sc-offchain", - "sc-rpc", - "sc-rpc-server", - "sc-telemetry", - "sc-tracing", - "sc-transaction-pool", - "serde", - "serde_json", - "slog", - "sp-api", - "sp-application-crypto", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-core", - "sp-finality-grandpa", - "sp-io", - "sp-runtime", - "sp-session", - "sp-transaction-pool", - "substrate-test-runtime-client", - "sysinfo", - "target_info", - "tokio 0.2.11", - "tracing", - "wasm-timer", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-diagnose 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "prometheus-exporter 0.8.0", + "sc-chain-spec 2.0.0", + "sc-client 0.8.0", + "sc-client-api 2.0.0", + "sc-client-db 0.8.0", + "sc-executor 0.8.0", + "sc-finality-grandpa 0.8.0", + "sc-keystore 2.0.0", + "sc-network 0.8.0", + "sc-offchain 2.0.0", + "sc-rpc 2.0.0", + "sc-rpc-server 2.0.0", + "sc-telemetry 2.0.0", + "sc-tracing 2.0.0", + "sc-transaction-pool 2.0.0", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-application-crypto 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-consensus-babe 0.8.0", + "sp-core 2.0.0", + "sp-finality-grandpa 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-session 2.0.0", + "sp-transaction-pool 2.0.0", + "substrate-test-runtime-client 2.0.0", + "sysinfo 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", + "target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-service-test" version = "2.0.0" dependencies = [ - "env_logger 0.7.1", - "fdlimit", - "futures 0.1.29", - "futures 0.3.4", - "log 0.4.8", - "sc-client", - "sc-network", - "sc-service", - "sp-consensus", - "sp-core", - "sp-runtime", - "sp-transaction-pool", - "tempfile", - "tokio 0.1.22", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fdlimit 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client 0.8.0", + "sc-network 0.8.0", + "sc-service 0.8.0", + "sp-consensus 0.8.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "sp-transaction-pool 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-state-db" version = "0.8.0" dependencies = [ - "env_logger 0.7.1", - "log 0.4.8", - "parity-scale-codec", - "parking_lot 0.10.0", - "sp-core", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", ] [[package]] name = "sc-telemetry" version = "2.0.0" dependencies = [ - "bytes 0.5.4", - "futures 0.3.4", - "futures-timer 3.0.1", - "libp2p", - "log 0.4.8", - "parking_lot 0.10.0", - "pin-project", - "rand 0.7.3", - "serde", - "slog", - "slog-json", - "slog-scope", - "take_mut", - "void", - "wasm-timer", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slog-scope 4.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-tracing" version = "2.0.0" dependencies = [ - "erased-serde", - "log 0.4.8", - "parking_lot 0.10.0", - "sc-telemetry", - "serde", - "serde_json", - "slog", - "tracing", - "tracing-core", + "erased-serde 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-telemetry 2.0.0", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-transaction-graph" version = "2.0.0" dependencies = [ - "assert_matches", - "criterion 0.3.1", - "derive_more", - "futures 0.3.4", - "linked-hash-map", - "log 0.4.8", - "parity-scale-codec", - "parity-util-mem", - "parking_lot 0.10.0", - "serde", - "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-transaction-pool", - "substrate-test-runtime", - "wasm-timer", + "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-blockchain 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "sp-transaction-pool 2.0.0", + "substrate-test-runtime 2.0.0", + "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sc-transaction-pool" version = "2.0.0" dependencies = [ - "derive_more", - "futures 0.3.4", - "futures-diagnose", - "futures-timer 2.0.2", - "log 0.4.8", - "parity-scale-codec", - "parity-util-mem", - "parking_lot 0.10.0", - "sc-client-api", - "sc-transaction-graph", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-keyring", - "sp-runtime", - "sp-transaction-pool", - "substrate-test-runtime-client", - "substrate-test-runtime-transaction-pool", - "wasm-timer", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-diagnose 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sc-transaction-graph 2.0.0", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-core 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-transaction-pool 2.0.0", + "substrate-test-runtime-client 2.0.0", + "substrate-test-runtime-transaction-pool 2.0.0", + "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "schannel" version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295" dependencies = [ - "lazy_static", - "winapi 0.3.8", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "schnorrkel" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eacd8381b3c37840c9c9f40472af529e49975bdcbc24f83c31059fd6539023d3" dependencies = [ - "curve25519-dalek 1.2.3", - "failure", - "merlin", - "rand 0.6.5", - "rand_core 0.4.2", - "rand_os", - "sha2", - "subtle 2.2.2", - "zeroize 0.9.3", + "curve25519-dalek 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "merlin 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "scopeguard" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" [[package]] name = "scroll" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb2332cb595d33f7edd5700f4cbf94892e680c7f0ae56adab58a35190b66cb1" dependencies = [ - "scroll_derive", + "scroll_derive 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "scroll_derive" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8584eea9b9ff42825b46faf46a8c24d2cff13ec152fa2a50df788b87c07ee28" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sct" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" dependencies = [ - "ring", - "untrusted", + "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "security-framework" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" dependencies = [ - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", + "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "security-framework-sys" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" dependencies = [ - "core-foundation-sys", + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "semver" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" dependencies = [ - "semver-parser", + "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "semver" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser", - "serde", + "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 = "send_wrapper" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686ef91cf020ad8d4aca9a7047641fd6add626b7b89e14546c2b6a76781cf822" [[package]] name = "send_wrapper" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "serde" version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" dependencies = [ - "serde_derive", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.47" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15913895b61e0be854afd32fd4163fcd2a3df34142cf2cb961b310ce694cbf90" dependencies = [ - "itoa", - "ryu", - "serde", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "arc-swap 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "erased-serde 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", - "slog", + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "erased-serde 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "arc-swap 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.8", - "quote 1.0.2", - "syn", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "smallvec" version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" dependencies = [ - "maybe-uninit", + "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "smallvec" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc" [[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 0.6.0", + "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "chacha20-poly1305-aead 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "x25519-dalek 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "soketto" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c9dab3f95c9ebdf3a88268c19af668f637a3c5039c2c56ff2d40b1b2d64a25b" dependencies = [ - "base64 0.11.0", - "bytes 0.5.4", - "flate2", - "futures 0.3.4", - "http 0.2.0", - "httparse", - "log 0.4.8", - "rand 0.7.3", - "sha1", - "smallvec 1.2.0", - "static_assertions", - "thiserror", + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sourcefile" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" [[package]] name = "sp-allocator" version = "2.0.0" dependencies = [ - "derive_more", - "log 0.4.8", - "sp-core", - "sp-std", - "sp-wasm-interface", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-std 2.0.0", + "sp-wasm-interface 2.0.0", ] [[package]] name = "sp-api" version = "2.0.0" dependencies = [ - "hash-db", - "parity-scale-codec", - "sp-api-proc-macro", - "sp-core", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-test-primitives", - "sp-version", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api-proc-macro 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 0.8.0", + "sp-std 2.0.0", + "sp-test-primitives 2.0.0", + "sp-version 2.0.0", ] [[package]] name = "sp-api-proc-macro" version = "2.0.0" dependencies = [ - "blake2-rfc", - "proc-macro-crate", - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-api-test" version = "2.0.0" dependencies = [ - "criterion 0.3.1", - "parity-scale-codec", - "rustversion", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-runtime", - "sp-state-machine", - "sp-version", - "substrate-test-runtime-client", - "trybuild", + "criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-runtime 2.0.0", + "sp-state-machine 0.8.0", + "sp-version 2.0.0", + "substrate-test-runtime-client 2.0.0", + "trybuild 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-application-crypto" version = "2.0.0" dependencies = [ - "parity-scale-codec", - "serde", - "sp-core", - "sp-io", - "sp-std", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "sp-application-crypto-test" version = "2.0.0" dependencies = [ - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-runtime", - "substrate-test-runtime-client", + "sp-api 2.0.0", + "sp-application-crypto 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "substrate-test-runtime-client 2.0.0", ] [[package]] name = "sp-arithmetic" version = "2.0.0" dependencies = [ - "criterion 0.3.1", - "integer-sqrt", - "num-traits", - "parity-scale-codec", - "primitive-types", - "rand 0.7.3", - "serde", - "sp-debug-derive", - "sp-std", + "criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "integer-sqrt 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "sp-authority-discovery" version = "2.0.0" dependencies = [ - "parity-scale-codec", - "sp-api", - "sp-application-crypto", - "sp-runtime", - "sp-std", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-application-crypto 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "sp-authorship" version = "2.0.0" dependencies = [ - "parity-scale-codec", - "sp-inherents", - "sp-runtime", - "sp-std", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "sp-block-builder" version = "2.0.0" dependencies = [ - "parity-scale-codec", - "sp-api", - "sp-inherents", - "sp-runtime", - "sp-std", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "sp-blockchain" version = "2.0.0" dependencies = [ - "derive_more", - "log 0.4.8", - "lru 0.4.3", - "parity-scale-codec", - "parking_lot 0.10.0", - "sp-block-builder", - "sp-consensus", - "sp-runtime", - "sp-state-machine", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "lru 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-block-builder 2.0.0", + "sp-consensus 0.8.0", + "sp-runtime 2.0.0", + "sp-state-machine 0.8.0", ] [[package]] name = "sp-consensus" version = "0.8.0" dependencies = [ - "derive_more", - "futures 0.3.4", - "futures-diagnose", - "futures-timer 3.0.1", - "libp2p", - "log 0.4.8", - "parity-scale-codec", - "parking_lot 0.10.0", - "serde", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-test-primitives", - "sp-version", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-diagnose 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 0.8.0", + "sp-std 2.0.0", + "sp-test-primitives 2.0.0", + "sp-version 2.0.0", ] [[package]] name = "sp-consensus-aura" version = "0.8.0" dependencies = [ - "parity-scale-codec", - "sp-api", - "sp-application-crypto", - "sp-inherents", - "sp-runtime", - "sp-std", - "sp-timestamp", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-application-crypto 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", + "sp-timestamp 2.0.0", ] [[package]] name = "sp-consensus-babe" version = "0.8.0" dependencies = [ - "parity-scale-codec", - "schnorrkel", - "sp-api", - "sp-application-crypto", - "sp-consensus", - "sp-inherents", - "sp-runtime", - "sp-std", - "sp-timestamp", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-application-crypto 2.0.0", + "sp-consensus 0.8.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", + "sp-timestamp 2.0.0", ] [[package]] name = "sp-consensus-pow" version = "0.8.0" dependencies = [ - "parity-scale-codec", - "sp-api", - "sp-core", - "sp-runtime", - "sp-std", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "sp-core" version = "2.0.0" dependencies = [ - "base58", - "blake2-rfc", - "byteorder 1.3.4", - "criterion 0.2.11", - "ed25519-dalek", - "hash-db", - "hash256-std-hasher", - "hex", - "hex-literal", - "impl-serde 0.3.0", - "lazy_static", - "libsecp256k1", - "log 0.4.8", - "num-traits", - "parity-scale-codec", - "parity-util-mem", - "parking_lot 0.10.0", - "pretty_assertions", - "primitive-types", - "rand 0.7.3", - "regex", - "rustc-hex", - "schnorrkel", - "serde", - "serde_json", - "sha2", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-serializer", - "sp-std", - "sp-storage", - "substrate-bip39", - "tiny-bip39", - "tiny-keccak 2.0.1", - "twox-hash", - "wasmi", - "zeroize 1.1.0", + "base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "ed25519-dalek 1.0.0-pre.3 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hash256-std-hasher 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "impl-serde 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 2.0.0", + "sp-externalities 0.8.0", + "sp-runtime-interface 2.0.0", + "sp-serializer 2.0.0", + "sp-std 2.0.0", + "sp-storage 2.0.0", + "substrate-bip39 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-bip39 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-keccak 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "twox-hash 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-debug-derive" version = "2.0.0" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-externalities" version = "0.8.0" dependencies = [ - "environmental", - "sp-std", - "sp-storage", + "environmental 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 2.0.0", + "sp-storage 2.0.0", ] [[package]] name = "sp-finality-grandpa" version = "2.0.0" dependencies = [ - "parity-scale-codec", - "serde", - "sp-api", - "sp-application-crypto", - "sp-runtime", - "sp-std", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-application-crypto 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "sp-finality-tracker" version = "2.0.0" dependencies = [ - "parity-scale-codec", - "sp-inherents", - "sp-std", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-inherents 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "sp-inherents" version = "2.0.0" dependencies = [ - "derive_more", - "parity-scale-codec", - "parking_lot 0.10.0", - "sp-core", - "sp-std", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "sp-io" version = "2.0.0" dependencies = [ - "hash-db", - "libsecp256k1", - "log 0.4.8", - "parity-scale-codec", - "sp-core", - "sp-externalities", - "sp-runtime-interface", - "sp-state-machine", - "sp-std", - "sp-trie", - "sp-wasm-interface", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-externalities 0.8.0", + "sp-runtime-interface 2.0.0", + "sp-state-machine 0.8.0", + "sp-std 2.0.0", + "sp-trie 2.0.0", + "sp-wasm-interface 2.0.0", ] [[package]] name = "sp-keyring" version = "2.0.0" dependencies = [ - "lazy_static", - "sp-core", - "sp-runtime", - "strum", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "strum 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-offchain" version = "2.0.0" dependencies = [ - "sp-api", - "sp-runtime", + "sp-api 2.0.0", + "sp-runtime 2.0.0", ] [[package]] name = "sp-panic-handler" version = "2.0.0" dependencies = [ - "backtrace", - "log 0.4.8", + "backtrace 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-phragmen" version = "2.0.0" dependencies = [ - "rand 0.7.3", - "serde", - "sp-io", - "sp-runtime", - "sp-std", - "substrate-test-utils", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", + "substrate-test-utils 2.0.0", ] [[package]] name = "sp-rpc" version = "2.0.0" dependencies = [ - "serde", - "serde_json", - "sp-core", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", ] [[package]] name = "sp-runtime" version = "2.0.0" dependencies = [ - "impl-trait-for-tuples", - "log 0.4.8", - "parity-scale-codec", - "parity-util-mem", - "paste", - "rand 0.7.3", - "serde", - "serde_json", - "sp-application-crypto", - "sp-arithmetic", - "sp-core", - "sp-inherents", - "sp-io", - "sp-std", + "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-application-crypto 2.0.0", + "sp-arithmetic 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "sp-runtime-interface" version = "2.0.0" dependencies = [ - "parity-scale-codec", - "primitive-types", - "rustversion", - "sp-core", - "sp-externalities", - "sp-io", - "sp-runtime-interface-proc-macro", - "sp-runtime-interface-test-wasm", - "sp-state-machine", - "sp-std", - "sp-wasm-interface", - "static_assertions", - "trybuild", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-externalities 0.8.0", + "sp-io 2.0.0", + "sp-runtime-interface-proc-macro 2.0.0", + "sp-runtime-interface-test-wasm 2.0.0", + "sp-state-machine 0.8.0", + "sp-std 2.0.0", + "sp-wasm-interface 2.0.0", + "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trybuild 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-runtime-interface-proc-macro" version = "2.0.0" dependencies = [ - "Inflector", - "proc-macro-crate", - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-runtime-interface-test" version = "2.0.0" dependencies = [ - "sc-executor", - "sp-core", - "sp-io", - "sp-runtime-interface", - "sp-runtime-interface-test-wasm", - "sp-state-machine", + "sc-executor 0.8.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime-interface 2.0.0", + "sp-runtime-interface-test-wasm 2.0.0", + "sp-state-machine 0.8.0", ] [[package]] name = "sp-runtime-interface-test-wasm" version = "2.0.0" dependencies = [ - "sp-core", - "sp-io", - "sp-runtime-interface", - "sp-std", - "substrate-wasm-builder-runner", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime-interface 2.0.0", + "sp-std 2.0.0", + "substrate-wasm-builder-runner 1.0.5", ] [[package]] name = "sp-sandbox" version = "0.8.0" dependencies = [ - "assert_matches", - "parity-scale-codec", - "sp-core", - "sp-io", - "sp-std", - "sp-wasm-interface", - "wabt", - "wasmi", + "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-std 2.0.0", + "sp-wasm-interface 2.0.0", + "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-serializer" version = "2.0.0" dependencies = [ - "serde", - "serde_json", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-session" version = "2.0.0" dependencies = [ - "sp-api", - "sp-core", - "sp-runtime", - "sp-std", + "sp-api 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "sp-staking" version = "2.0.0" dependencies = [ - "parity-scale-codec", - "sp-runtime", - "sp-std", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "sp-state-machine" version = "0.8.0" dependencies = [ - "hash-db", - "hex-literal", - "log 0.4.8", - "num-traits", - "parity-scale-codec", - "parking_lot 0.10.0", - "rand 0.7.3", - "sp-core", - "sp-externalities", - "sp-panic-handler", - "sp-trie", - "trie-db", - "trie-root", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-externalities 0.8.0", + "sp-panic-handler 2.0.0", + "sp-trie 2.0.0", + "trie-db 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-root 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7444,224 +6988,212 @@ version = "2.0.0" name = "sp-storage" version = "2.0.0" dependencies = [ - "impl-serde 0.2.3", - "serde", - "sp-debug-derive", - "sp-std", + "impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "sp-test-primitives" version = "2.0.0" dependencies = [ - "parity-scale-codec", - "parity-util-mem", - "serde", - "sp-application-crypto", - "sp-core", - "sp-runtime", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-application-crypto 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", ] [[package]] name = "sp-timestamp" version = "2.0.0" dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "sp-api", - "sp-inherents", - "sp-runtime", - "sp-std", - "wasm-timer", + "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", + "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-transaction-pool" version = "2.0.0" dependencies = [ - "derive_more", - "futures 0.3.4", - "log 0.4.8", - "parity-scale-codec", - "serde", - "sp-api", - "sp-runtime", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-runtime 2.0.0", ] [[package]] name = "sp-trie" version = "2.0.0" dependencies = [ - "criterion 0.2.11", - "hash-db", - "hex-literal", - "memory-db", - "parity-scale-codec", - "sp-core", - "sp-std", - "trie-bench", - "trie-db", - "trie-root", - "trie-standardmap", + "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memory-db 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-std 2.0.0", + "trie-bench 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-db 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-root 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-standardmap 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-version" version = "2.0.0" dependencies = [ - "impl-serde 0.2.3", - "parity-scale-codec", - "serde", - "sp-runtime", - "sp-std", + "impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] name = "sp-wasm-interface" version = "2.0.0" dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "sp-std", - "wasmi", + "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 2.0.0", + "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 = "stream-cipher" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8131256a5896cabcf5eb04f4d6dacbe1aefda854b0d9896e09cb58829ec5638c" dependencies = [ - "generic-array", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "string" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" dependencies = [ - "bytes 0.4.12", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "string-interner" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd710eadff449a1531351b0e43eb81ea404336fa2f56c777427ab0e32a4cf183" dependencies = [ - "serde", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "structopt" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1bcbed7d48956fcbb5d80c6b95aedb553513de0a1b451ea92679d999c010e98" dependencies = [ - "clap", - "lazy_static", - "structopt-derive", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt-derive 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "structopt-derive" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "095064aa1f5b94d14e635d0a5684cf140c43ae40a0fd990708d38f5d669e5f64" dependencies = [ - "heck", - "proc-macro-error", - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-error 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "strum" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6138f8f88a16d90134763314e3fc76fa3ed6a7db4725d6acf9a3ef95a3188d22" dependencies = [ - "strum_macros", + "strum_macros 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.8", - "quote 1.0.2", - "syn", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "subkey" version = "2.0.0" dependencies = [ - "clap", - "derive_more", - "frame-system", - "futures 0.1.29", - "hex", - "hex-literal", - "hyper 0.12.35", - "itertools", - "jsonrpc-core-client", - "libp2p", - "node-primitives", - "node-runtime", - "pallet-balances", - "pallet-transaction-payment", - "parity-scale-codec", - "rand 0.7.3", - "rpassword", - "rustc-hex", - "sc-rpc", - "serde_json", - "sp-core", - "sp-runtime", - "substrate-bip39", - "tiny-bip39", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-system 2.0.0", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", + "node-primitives 2.0.0", + "node-runtime 2.0.0", + "pallet-balances 2.0.0", + "pallet-transaction-payment 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rpassword 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-rpc 2.0.0", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "substrate-bip39 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-bip39 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "substrate-bip39" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be511be555a3633e71739a79e4ddff6a6aaa6579fa6114182a51d72c3eb93c5" dependencies = [ - "hmac", - "pbkdf2", - "schnorrkel", - "sha2", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7672,131 +7204,131 @@ version = "2.0.0" name = "substrate-frame-rpc-support" version = "2.0.0" dependencies = [ - "frame-support", - "frame-system", - "futures 0.3.4", - "jsonrpc-client-transports", - "jsonrpc-core", - "parity-scale-codec", - "sc-rpc-api", - "serde", - "sp-storage", - "tokio 0.1.22", + "frame-support 2.0.0", + "frame-system 2.0.0", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-client-transports 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-rpc-api 0.8.0", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 2.0.0", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "substrate-frame-rpc-system" version = "2.0.0" dependencies = [ - "env_logger 0.7.1", - "frame-system-rpc-runtime-api", - "futures 0.3.4", - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "log 0.4.8", - "parity-scale-codec", - "sc-client", - "sc-transaction-pool", - "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-transaction-pool", - "substrate-test-runtime-client", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-system-rpc-runtime-api 2.0.0", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client 0.8.0", + "sc-transaction-pool 2.0.0", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "sp-transaction-pool 2.0.0", + "substrate-test-runtime-client 2.0.0", ] [[package]] name = "substrate-test-client" version = "2.0.0" dependencies = [ - "futures 0.3.4", - "hash-db", - "parity-scale-codec", - "sc-client", - "sc-client-api", - "sc-client-db", - "sc-executor", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-keyring", - "sp-runtime", - "sp-state-machine", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client 0.8.0", + "sc-client-api 2.0.0", + "sc-client-db 0.8.0", + "sc-executor 0.8.0", + "sp-blockchain 2.0.0", + "sp-consensus 0.8.0", + "sp-core 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 0.8.0", ] [[package]] name = "substrate-test-runtime" version = "2.0.0" dependencies = [ - "cfg-if", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-rpc-runtime-api", - "log 0.4.8", - "memory-db", - "pallet-babe", - "pallet-timestamp", - "parity-scale-codec", - "parity-util-mem", - "sc-client", - "sc-executor", - "serde", - "sp-api", - "sp-application-crypto", - "sp-block-builder", - "sp-consensus-aura", - "sp-consensus-babe", - "sp-core", - "sp-inherents", - "sp-io", - "sp-keyring", - "sp-offchain", - "sp-runtime", - "sp-runtime-interface", - "sp-session", - "sp-state-machine", - "sp-std", - "sp-transaction-pool", - "sp-trie", - "sp-version", - "substrate-test-runtime-client", - "substrate-wasm-builder-runner", - "trie-db", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-executive 2.0.0", + "frame-support 2.0.0", + "frame-system 2.0.0", + "frame-system-rpc-runtime-api 2.0.0", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "memory-db 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pallet-babe 2.0.0", + "pallet-timestamp 2.0.0", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client 0.8.0", + "sc-executor 0.8.0", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-application-crypto 2.0.0", + "sp-block-builder 2.0.0", + "sp-consensus-aura 0.8.0", + "sp-consensus-babe 0.8.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-keyring 2.0.0", + "sp-offchain 2.0.0", + "sp-runtime 2.0.0", + "sp-runtime-interface 2.0.0", + "sp-session 2.0.0", + "sp-state-machine 0.8.0", + "sp-std 2.0.0", + "sp-transaction-pool 2.0.0", + "sp-trie 2.0.0", + "sp-version 2.0.0", + "substrate-test-runtime-client 2.0.0", + "substrate-wasm-builder-runner 1.0.5", + "trie-db 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "substrate-test-runtime-client" version = "2.0.0" dependencies = [ - "futures 0.3.4", - "parity-scale-codec", - "sc-block-builder", - "sc-client", - "sc-client-api", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-runtime", - "substrate-test-client", - "substrate-test-runtime", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-block-builder 0.8.0", + "sc-client 0.8.0", + "sc-client-api 2.0.0", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "substrate-test-client 2.0.0", + "substrate-test-runtime 2.0.0", ] [[package]] name = "substrate-test-runtime-transaction-pool" version = "2.0.0" dependencies = [ - "derive_more", - "futures 0.3.4", - "parity-scale-codec", - "parking_lot 0.10.0", - "sc-transaction-graph", - "sp-blockchain", - "sp-runtime", - "sp-transaction-pool", - "substrate-test-runtime-client", + "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-transaction-graph 2.0.0", + "sp-blockchain 2.0.0", + "sp-runtime 2.0.0", + "sp-transaction-pool 2.0.0", + "substrate-test-runtime-client 2.0.0", ] [[package]] @@ -7807,14 +7339,14 @@ version = "2.0.0" name = "substrate-wasm-builder" version = "1.0.9" dependencies = [ - "atty", - "build-helper", - "cargo_metadata", - "fs2", - "tempfile", - "toml", - "walkdir", - "wasm-gc-api", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "build-helper 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cargo_metadata 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fs2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-gc-api 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7825,1436 +7357,1897 @@ version = "1.0.5" 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 = "syn" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "unicode-xid 0.2.0", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.8", - "quote 1.0.2", - "syn", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "synstructure" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", - "unicode-xid 0.2.0", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sysinfo" version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f4b2468c629cffba39c0a4425849ab3cdb03d9dfacba69684609aea04d08ff9" dependencies = [ - "cfg-if", - "doc-comment", - "libc", - "rayon", - "winapi 0.3.8", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "doc-comment 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "take_mut" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" [[package]] name = "target-lexicon" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d" [[package]] name = "target_info" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe" [[package]] name = "tempdir" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" dependencies = [ - "rand 0.4.6", - "remove_dir_all", + "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "termcolor" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" dependencies = [ - "winapi-util", + "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "test-case" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a605baa797821796a751f4a959e1206079b24a4b7e1ed302b7d785d81a9276c9" dependencies = [ - "lazy_static", - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", - "version_check 0.9.1", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "textwrap" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "unicode-width", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "thiserror" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "205684fd018ca14432b12cce6ea3d46763311a571c3d294e71ba3f01adcf1aad" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "thiserror-impl" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e4d2e50ca050ed44fb58309bdce3efa79948f84f9993ad1978de5eebdce5a7" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "thread_local" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" dependencies = [ - "lazy_static", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "threadpool" version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" dependencies = [ - "num_cpus", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" dependencies = [ - "libc", - "redox_syscall", - "winapi 0.3.8", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tiny-bip39" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd1fb03fe8e07d17cd851a624a9fff74642a997b67fbd1ccd77533241640d92" dependencies = [ - "failure", - "hmac", - "once_cell", - "pbkdf2", - "rand 0.7.3", - "rustc-hash", - "sha2", + "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "once_cell 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tiny-keccak" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8a021c69bb74a44ccedb824a046447e2c84a01df9e5c20779750acb38e11b2" dependencies = [ - "crunchy", + "crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tiny-keccak" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2953ca5148619bc99695c1274cb54c5275bbb913c6adad87e72eaf8db9787f69" dependencies = [ - "crunchy", + "crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tinytemplate" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a3c6667d3e65eb1bc3aed6fd14011c6cbc3a0665218ab7f5daf040b9ec371a" dependencies = [ - "serde", - "serde_json", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-fs 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-udp 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-uds 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fdd17989496f49cdc57978c96f0c9fe5e4a58a8bddc6813c449a4624f6a030b" dependencies = [ - "bytes 0.5.4", - "fnv", - "iovec", - "lazy_static", - "libc", - "memchr", - "mio", - "mio-uds", - "num_cpus", - "pin-project-lite", - "signal-hook-registry", - "slab", - "tokio-macros", - "winapi 0.3.8", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-macros 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 0.4.8", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-macros" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4b1e7ed7d5d4c2af3d999904b0eebe76544897cdbfb2b9684bed2174ab20f7c" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 0.4.8", - "mio", - "num_cpus", - "parking_lot 0.9.0", - "slab", - "tokio-executor 0.1.10", - "tokio-io", - "tokio-sync 0.1.8", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-rustls" version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "141afec0978abae6573065a48882c6bae44c5cc61db9b511ac4abf6a09bfd9cc" dependencies = [ - "futures-core", - "rustls", - "tokio 0.2.11", - "webpki", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 0.4.8", - "num_cpus", - "slab", - "tokio-executor 0.1.10", + "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-tls" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "354b8cd83825b3c20217a9dc174d6a0c67441a2fae5c41bcb1ea6679f6ae0f7c" dependencies = [ - "futures 0.1.29", - "native-tls", - "tokio-io", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 0.4.8", - "mio", - "tokio-codec", - "tokio-io", - "tokio-reactor", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 0.4.8", - "mio", - "mio-uds", - "tokio-codec", - "tokio-io", - "tokio-reactor", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-util" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" dependencies = [ - "bytes 0.5.4", - "futures-core", - "futures-sink", - "log 0.4.8", - "pin-project-lite", - "tokio 0.2.11", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "toml" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" dependencies = [ - "serde", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e213bd24252abeb86a0b7060e02df677d367ce6cb772cef17e9214b8390a8d3" dependencies = [ - "cfg-if", - "tracing-attributes", - "tracing-core", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-attributes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tracing-attributes" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cfd395def5a60236e187e1ff905cb55668a59f29928dec05e6e1b1fd2ac1f3" dependencies = [ - "quote 1.0.2", - "syn", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tracing-core" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a46f11e372b8bd4b4398ea54353412fdd7fd42a8370c7e543e218cf7661978" dependencies = [ - "lazy_static", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "traitobject" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" [[package]] name = "treeline" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" [[package]] name = "trie-bench" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dcd9bac85703d8f974ee1e6dfe668784b105d3385c174ad729adb7427ad5d81" dependencies = [ - "criterion 0.2.11", - "hash-db", - "keccak-hasher", - "memory-db", - "parity-scale-codec", - "trie-db", - "trie-root", - "trie-standardmap", + "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "keccak-hasher 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "memory-db 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-db 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-root 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-standardmap 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "trie-db" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de9222c50cc325855621271157c973da27a0dcd26fa06f8edf81020bd2333df0" dependencies = [ - "hash-db", - "hashbrown 0.6.3", - "log 0.4.8", - "rustc-hex", - "smallvec 1.2.0", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "trie-root" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "652931506d2c1244d7217a70b99f56718a7b4161b37f04e7cd868072a99f68cd" dependencies = [ - "hash-db", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "trie-standardmap" version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3161ba520ab28cd8e6b68e1126f1009f6e335339d1a73b978139011703264c8" dependencies = [ - "hash-db", - "keccak-hasher", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "keccak-hasher 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "try-lock" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" [[package]] name = "trybuild" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f5b3f750c701725331ac78e389b5d143b7d25f6b6ffffd0d419759a9063ac5f" dependencies = [ - "glob 0.3.0", - "lazy_static", - "serde", - "serde_json", - "termcolor", - "toml", + "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "twofish" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712d261e83e727c8e2dbb75dacac67c36e35db36a958ee504f2164fc052434e1" dependencies = [ - "block-cipher-trait", - "byteorder 1.3.4", - "opaque-debug", + "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "typeable" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" [[package]] name = "typenum" version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" [[package]] name = "uint" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e75a4cdd7b87b28840dba13c483b9a88ee6bbf16ba5c951ee1ecfcf723078e0d" dependencies = [ - "byteorder 1.3.4", - "crunchy", - "rustc-hex", - "static_assertions", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "unicase" version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" dependencies = [ - "version_check 0.1.5", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "unicase" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ - "version_check 0.9.1", + "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "unicode-bidi" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" dependencies = [ - "matches", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "unicode-normalization" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" dependencies = [ - "smallvec 1.2.0", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.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.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f0023a96687fe169081e8adce3f65e3874426b7886e9234d490af2dc077959" [[package]] name = "unsigned-varint" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c689459fbaeb50e56c6749275f084decfd02194ac5852e6617d95d0d3cf02eaf" dependencies = [ - "bytes 0.5.4", - "futures_codec", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures_codec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "untrusted" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60369ef7a31de49bcb3f6ca728d4ba7300d9a1658f94c727d4cab8c8d9f4aece" [[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", + "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "vcpkg" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" [[package]] name = "vec_map" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" [[package]] name = "vergen" version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aba5e34f93dc7051dfad05b98a18e9156f27e7b431fe1d2398cb6061c0a1dba" dependencies = [ - "bitflags", - "chrono", - "failure", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "version_check" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" [[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 = "wabt" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5c5c1286c6e578416982609f47594265f9d489f9b836157d403ad605a46693" dependencies = [ - "serde", - "serde_derive", - "serde_json", - "wabt-sys", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "wabt-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wabt-sys" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af5d153dc96aad7dc13ab90835b892c69867948112d95299e522d370c4e13a08" dependencies = [ - "cc", - "cmake", - "glob 0.2.11", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "walkdir" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" dependencies = [ - "same-file", - "winapi 0.3.8", - "winapi-util", + "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 0.4.8", - "try-lock", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "want" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ - "log 0.4.8", - "try-lock", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c" dependencies = [ - "cfg-if", - "wasm-bindgen-macro", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-backend" version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45" dependencies = [ - "bumpalo", - "lazy_static", - "log 0.4.8", - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", - "wasm-bindgen-shared", + "bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-futures" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bbdd49e3e28b40dec6a9ba8d17798245ce32b019513a845369c641b275135d9" dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-macro" version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3" dependencies = [ - "quote 1.0.2", - "wasm-bindgen-macro-support", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-macro-support" version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-shared" version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601" [[package]] name = "wasm-bindgen-webidl" version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d" dependencies = [ - "anyhow", - "heck", - "log 0.4.8", - "proc-macro2 1.0.8", - "quote 1.0.2", - "syn", - "wasm-bindgen-backend", - "weedle", + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-gc-api" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c32691b6c7e6c14e7f8fd55361a9088b507aa49620fcd06c09b3a1082186b9" dependencies = [ - "log 0.4.8", - "parity-wasm 0.32.0", - "rustc-demangle", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wasm 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 0.2.0", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "send_wrapper 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasmi" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf617d864d25af3587aa745529f7aaa541066c876d57e050c0d0c85c61c92aff" dependencies = [ - "errno", - "libc", - "memory_units", - "num-rational", - "num-traits", - "parity-wasm 0.41.0", - "wasmi-validation", + "errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-rational 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi-validation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasmi-validation" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea78c597064ba73596099281e2f4cfc019075122a65cdda3205af94f0b264d93" dependencies = [ - "parity-wasm 0.41.0", + "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasmparser" version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "073da89bf1c84db000dd68ce660c1b4a08e3a2d28fd1e3394ab9e7abdde4a0f8" [[package]] name = "wasmparser" -version = "0.51.1" +version = "0.51.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e41b27a1677fe28c115de49efca55dabb14f7fece2c32947ffb9b1064fe5bd4" [[package]] name = "wasmtime" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5614d964c3e7d07a13b59aca66103c52656bd80430f0d86dc7eeb3af4f03d4a2" dependencies = [ - "anyhow", - "backtrace", - "cfg-if", - "lazy_static", - "libc", - "region", - "rustc-demangle", - "target-lexicon", - "wasmparser 0.51.1", - "wasmtime-environ", - "wasmtime-jit", - "wasmtime-runtime", - "wat", - "winapi 0.3.8", + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "region 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmparser 0.51.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmtime-environ 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmtime-jit 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmtime-runtime 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wat 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasmtime-debug" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feb5900275b4ef0b621ce725b9d5660b12825d7f7d79b392b97baf089ffab8c0" dependencies = [ - "anyhow", - "faerie", - "gimli 0.19.0", - "more-asserts", - "target-lexicon", - "thiserror", - "wasmparser 0.51.1", - "wasmtime-environ", + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "faerie 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gimli 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "more-asserts 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmparser 0.51.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmtime-environ 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasmtime-environ" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04661851e133fb11691c4a0f92a705766b4bbf7afc06811f949e295cc8414fc" -dependencies = [ - "anyhow", - "base64 0.11.0", - "bincode", - "cranelift-codegen", - "cranelift-entity", - "cranelift-wasm", - "directories", - "errno", - "file-per-thread-logger", - "indexmap", - "libc", - "log 0.4.8", - "more-asserts", - "rayon", - "serde", - "sha2", - "thiserror", - "toml", - "wasmparser 0.51.1", - "winapi 0.3.8", - "zstd", +dependencies = [ + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-codegen 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-entity 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-wasm 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "directories 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "file-per-thread-logger 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "more-asserts 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmparser 0.51.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "zstd 0.5.1+zstd.1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasmtime-jit" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d451353764ce55c9bb6a8b260063cfc209b7adadd277a9a872ab4563a69e357c" dependencies = [ - "anyhow", - "cfg-if", - "cranelift-codegen", - "cranelift-entity", - "cranelift-frontend", - "cranelift-native", - "cranelift-wasm", - "more-asserts", - "region", - "target-lexicon", - "thiserror", - "wasmparser 0.51.1", - "wasmtime-debug", - "wasmtime-environ", - "wasmtime-runtime", - "winapi 0.3.8", + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-codegen 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-entity 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-frontend 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-native 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-wasm 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "more-asserts 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "region 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmparser 0.51.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmtime-debug 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmtime-environ 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmtime-runtime 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasmtime-runtime" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dbd4fc114b828cae3e405fed413df4b3814d87a92ea029640cec9ba41f0c162" dependencies = [ - "backtrace", - "cc", - "cfg-if", - "indexmap", - "libc", - "memoffset", - "more-asserts", - "region", - "thiserror", - "wasmtime-environ", - "winapi 0.3.8", + "backtrace 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "more-asserts 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "region 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmtime-environ 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wast" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12a729d076deb29c8509fa71f2d427729f9394f9496844ed8fcab152f35d163d" dependencies = [ - "leb128", + "leb128 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wat" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5795e34a4b39893653dec97e644fac85c31398e0ce1abecc48967aac83d9e8ce" dependencies = [ - "wast", + "wast 8.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "web-sys" version = "0.3.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b" dependencies = [ - "anyhow", - "js-sys", - "sourcefile", - "wasm-bindgen", - "wasm-bindgen-webidl", + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "webpki" version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" dependencies = [ - "ring", - "untrusted", + "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "webpki-roots" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a262ae37dd9d60f60dd473d1158f9fbebf110ba7b6a5051c8160460f6043718b" dependencies = [ - "webpki", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "webpki-roots" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cd5736df7f12a964a5067a12c62fa38e1bd8080aff1f80bc29be7c80d19ab4" dependencies = [ - "webpki", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "websocket" version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413b37840b9e27b340ce91b319ede10731de8c72f5bc4cb0206ec1ca4ce581d0" dependencies = [ - "bytes 0.4.12", - "futures 0.1.29", - "hyper 0.10.16", - "native-tls", - "rand 0.6.5", - "tokio-codec", - "tokio-io", - "tokio-reactor", - "tokio-tcp", - "tokio-tls", - "unicase 1.4.2", - "url 1.7.2", - "websocket-base", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "websocket-base 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "websocket-base" version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e3810f0d00c4dccb54c30a4eee815e703232819dec7b007db115791c42aa374" dependencies = [ - "base64 0.10.1", - "bitflags", - "byteorder 1.3.4", - "bytes 0.4.12", - "futures 0.1.29", - "native-tls", - "rand 0.6.5", - "sha1", - "tokio-codec", - "tokio-io", - "tokio-tcp", - "tokio-tls", + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "weedle" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164" dependencies = [ - "nom", + "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "which" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164" dependencies = [ - "failure", - "libc", + "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "which" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5475d47078209a02e60614f7ba5e645ef3ed60f771920ac1906d7c1cc65024c8" dependencies = [ - "libc", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80" dependencies = [ - "winapi 0.3.8", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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 1.3.4", - "bytes 0.4.12", - "httparse", - "log 0.4.8", - "mio", - "mio-extras", - "rand 0.7.3", - "sha-1", - "slab", - "url 2.1.1", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "x25519-dalek" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee1585dc1484373cbc1cee7aafda26634665cf449436fd6e24bfd1fad230538" dependencies = [ - "clear_on_drop", - "curve25519-dalek 1.2.3", - "rand_core 0.3.1", + "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "x25519-dalek" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "637ff90c9540fa3073bb577e65033069e4bae7c79d49d74aa3ffdf5342a53217" dependencies = [ - "curve25519-dalek 2.0.0", - "rand_core 0.5.1", - "zeroize 1.1.0", + "curve25519-dalek 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902f4cee32c401c211b6b69f4a3f6f4cf3515644db5bd822cf685a7dbd6201f9" dependencies = [ - "bytes 0.5.4", - "futures 0.3.4", - "log 0.4.8", - "nohash-hasher 0.1.3", - "parking_lot 0.10.0", - "rand 0.7.3", - "thiserror", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "nohash-hasher 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "zeroize" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45af6a010d13e4cf5b54c94ba5a2b2eba5596b9e46bf5875612d332a1f2b3f86" [[package]] name = "zeroize" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8" dependencies = [ - "zeroize_derive", + "zeroize_derive 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[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.8", - "quote 1.0.2", - "syn", - "synstructure", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "zstd" version = "0.5.1+zstd.1.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5d978b793ae64375b80baf652919b148f6a496ac8802922d9999f5a553194f" dependencies = [ - "zstd-safe", + "zstd-safe 2.0.3+zstd.1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "zstd-safe" version = "2.0.3+zstd.1.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee25eac9753cfedd48133fa1736cbd23b774e253d89badbeac7d12b23848d3f" dependencies = [ - "libc", - "zstd-sys", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "zstd-sys 1.4.15+zstd.1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "zstd-sys" version = "1.4.15+zstd.1.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89719b034dc22d240d5b407fb0a3fe6d29952c181cff9a9f95c0bd40b4f8f7d8" dependencies = [ - "cc", - "glob 0.3.0", - "libc", -] + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[metadata] +"checksum Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +"checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" +"checksum aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2e5b0458ea3beae0d1d8c0f3946564f8e10f90646cf78c06b4351052058d1ee" +"checksum aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d" +"checksum aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100" +"checksum ahash 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "6f33b5018f120946c1dcf279194f238a9f146725593ead1c08fa47ff22b0b5d3" +"checksum aho-corasick 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "743ad5a418686aad3b87fd14c43badd828cf26e214a00f92a384291cf22e1811" +"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +"checksum ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +"checksum anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" +"checksum app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" +"checksum arc-swap 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d7b8a9123b8027467bce0099fe556c628a53c8d83df0507084c31e9ba2e39aff" +"checksum arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +"checksum arrayvec 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +"checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" +"checksum asn1_der 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6fce6b6a0ffdafebd82c87e79e3f40e8d2c523e5fea5566ff6b90509bf98d638" +"checksum asn1_der_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502" +"checksum assert_cmd 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6283bac8dd7226470d491bc4737816fea4ca1fba7a2847f2e9097fd6bfb4624c" +"checksum assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7deb0a829ca7bcfaf5da70b073a8d128619259a7be8216a355e23f00763059e5" +"checksum async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "538ecb01eb64eecd772087e5b6f7540cbc917f047727339a472dafed2185b267" +"checksum async-task 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0ac2c016b079e771204030951c366db398864f5026f84a44dafb0ff20f02085d" +"checksum async-tls 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce6977f57fa68da77ffe5542950d47e9c23d65f5bc7cb0a9f8700996913eec7" +"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" +"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +"checksum backtrace 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)" = "e4036b9bf40f3cf16aba72a3d65e8a520fc4bafcdc7079aea8f848c58c5b5536" +"checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" +"checksum base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" +"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" +"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" +"checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" +"checksum bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5753e2a71534719bf3f4e57006c3a4f0d2c672a4b676eec84161f763eca87dbf" +"checksum bindgen 0.49.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4c07087f3d5731bf3fb375a81841b99597e25dc11bd3bc72d16d43adf6624a6e" +"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +"checksum bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5da9b3d9f6f585199287a473f4f8dfab6566cf827d15c00c219f53c645687ead" +"checksum bitvec 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a993f74b4c99c1908d156b8d2e0fb6277736b0ecbd833982fd1241d39b2766a6" +"checksum blake2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330" +"checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +"checksum blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" +"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +"checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" +"checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +"checksum broadcaster 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9c972e21e0d055a36cf73e4daae870941fe7a8abcd5ac3396aab9e4c126bd87" +"checksum bs58 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c95ee6bba9d950218b6cc910cf62bc9e0a171d0f4537e3627b0f54d08549b188" +"checksum bs58 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b170cd256a3f9fa6b9edae3e44a7dfdfc77e8124dbc3e2612d75f9c3e2396dae" +"checksum bstr 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "502ae1441a0a5adb8fbd38a5955a6416b9493e92b465de5e4a9bde6a539c2c48" +"checksum build-helper 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdce191bf3fa4995ce948c8c83b4640a1745457a149e73c6db75b4ffe36aad5f" +"checksum bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1f359dc14ff8911330a51ef78022d376f25ed00248912803b58f00cb1c27f742" +"checksum byte-slice-cast 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b0a5e3906bcbf133e33c1d4d95afc664ad37fbdb9f6568d8043e7ea8c27d93d3" +"checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" +"checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" +"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +"checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" +"checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" +"checksum c_linked_list 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" +"checksum cargo_metadata 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "46e3374c604fb39d1a2f35ed5e4a4e30e60d01fab49446e08f1b3e9a90aef202" +"checksum cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0" +"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" +"checksum cexpr 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fce5b5fb86b0c57c20c834c1b412fd09c77c8a59b9473f86272709e78874cd1d" +"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +"checksum chacha20-poly1305-aead 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77d2058ba29594f69c75e8a9018e0485e3914ca5084e3613cd64529042f5423b" +"checksum chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01" +"checksum clang-sys 0.28.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81de550971c976f176130da4b2978d3b524eaa0fd9ac31f3ceb5ae1231fb4853" +"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" +"checksum clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "97276801e127ffb46b66ce23f35cc96bd454fa311294bced4bbace7baa8b1d17" +"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +"checksum cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "81fb25b677f8bf1eb325017cb6bb8452f87969db0fedb4f757b297bee78a7c62" +"checksum console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d976903543e0c48546a91908f21588a680a8c8f984df9a5d69feccb2b2a211" +"checksum console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1e7871d2947441b0fdd8e2bd1ce2a2f75304f896582c0d572162d48290683c48" +"checksum const-random 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "2f1af9ac737b2dd2d577701e59fd09ba34822f6f2ebdb30a7647405d9e55e16a" +"checksum const-random-macro 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "25e4c606eb459dd29f7c57b2e0879f2b6f14ee130918c2b78ccb58a9624e6c7a" +"checksum constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +"checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" +"checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" +"checksum cranelift-bforest 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0f53d59dc9ab1c8ab68c991d8406b52b7a0aab0b15b05a3a6895579c4e5dd9" +"checksum cranelift-codegen 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0381a794836fb994c47006465d46d46be072483b667f36013d993b9895117fee" +"checksum cranelift-codegen-meta 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "208c3c8d82bfef32a534c5020c6cfc3bc92f41388f1246b7bb98cf543331abaa" +"checksum cranelift-codegen-shared 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea048c456a517e56fd6df8f0e3947922897e6e6f61fbc5eb557a36c7b8ff6394" +"checksum cranelift-entity 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0c8c7ed50812194c9e9de1fa39c77b39fc9ab48173d5e7ee88b25b6a8953e9b8" +"checksum cranelift-frontend 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "21ceb931d9f919731df1b1ecdc716b5c66384b413a7f95909d1f45441ab9bef5" +"checksum cranelift-native 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "564ee82268bc25b914fcf331edfc2452f2d9ca34f976b187b4ca668beba250c8" +"checksum cranelift-wasm 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de63e2271b374be5b07f359184e2126a08fb24d24a740cbc178b7e0107ddafa5" +"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +"checksum criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0363053954f3e679645fc443321ca128b7b950a6fe288cf5f9335cc22ee58394" +"checksum criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1fc755679c12bda8e5523a71e4d654b6bf2e14bd838dfc48cde6559a05caf7d1" +"checksum criterion-plot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76f9212ddf2f4a9eb2d401635190600656a1f88a932ef53d06e7fa4c7e02fb8e" +"checksum criterion-plot 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a01e15e0ea58e8234f96146b1f91fa9d0e4dd7a38da93ff7a75d42c0b9d3a545" +"checksum crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "acec9a3b0b3559f15aee4f90746c4e5e293b701c0f7d3925d24e01645267b68c" +"checksum crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca" +"checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" +"checksum crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" +"checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" +"checksum crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +"checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +"checksum csv 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279" +"checksum csv-core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +"checksum ct-logs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113" +"checksum ctor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8ce37ad4184ab2ce004c33bf6379185d3b1c95801cab51026bd271bf68eedc" +"checksum ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "022cd691704491df67d25d006fe8eca083098253c4d43516c2206479c58c6736" +"checksum cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" +"checksum curve25519-dalek 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8b7dcd30ba50cdf88b55b033456138b7c0ac4afdc436d82e1b79f370f24cc66d" +"checksum curve25519-dalek 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26778518a7f6cffa1d25a44b602b62b979bd88adb9e99ffec546998cf3404839" +"checksum data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" +"checksum derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a806e96c59a76a5ba6e18735b6cf833344671e61e7863f2edb5c518ea2cac95c" +"checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" +"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +"checksum directories 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "551a778172a450d7fc12e629ca3b0428d00f6afa9a43da1b630d54604e97371c" +"checksum dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" +"checksum dns-parser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" +"checksum doc-comment 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "923dea538cea0aa3025e8685b20d6ee21ef99c4f77e954a30febbaac5ec73a97" +"checksum ed25519-dalek 1.0.0-pre.3 (registry+https://github.com/rust-lang/crates.io-index)" = "978710b352437433c97b2bff193f2fb1dfd58a093f863dd95e225a19baa599a2" +"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" +"checksum enumflags2 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "33121c8782ba948ba332dab29311b026a8716dc65a1599e5b88f392d38496af8" +"checksum enumflags2_derive 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ecf634c5213044b8d54a46dd282cf5dd1f86bb5cb53e92c409cb4680a7fb9894" +"checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" +"checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +"checksum environmental 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "516aa8d7a71cb00a1c4146f0798549b93d083d4f189b3ced8f3de6b8f11ee6c4" +"checksum erased-serde 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)" = "cd7d80305c9bd8cd78e3c753eb9fb110f83621e5211f1a3afffcc812b104daf9" +"checksum errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e" +"checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" +"checksum escargot 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74cf96bec282dcdb07099f7e31d9fed323bca9435a09aba7b6d99b7617bca96d" +"checksum evm 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "272f65e18a2b6449b682bfcdf6c3ccc63db0b93898d89c0fb237548bbfc764a5" +"checksum evm-core 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "66534d42e13d50f9101bed87cb568fd5aa929c600c3c13f8dadbbf39f5635945" +"checksum evm-gasometer 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "39bc5b592803ca644781fe2290b7305ea5182f7c9516d615ddfb2308c2cab639" +"checksum evm-runtime 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "389e4b447fb26971a9c76c8aa49c0ab435f8e46e8fc46e1bc4ebf01f3c2b428f" +"checksum exit-future 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" +"checksum faerie 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74b9ed6159e4a6212c61d9c6a86bee01876b192a64accecf58d5b5ae3b667b52" +"checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" +"checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" +"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +"checksum fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +"checksum fdlimit 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9084c55bb76efb1496328976db88320fe7d9ee86e649e83c4ecce3ba7a9a35d1" +"checksum file-per-thread-logger 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8505b75b31ef7285168dd237c4a7db3c1f3e0927e7d314e670bc98e854272fe9" +"checksum finality-grandpa 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3cbb25bef9fcad97fb31e817da280b1c9174435b8769c770ee190a330dd181ea" +"checksum fixed-hash 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3367952ceb191f4ab95dd5685dc163ac539e36202f9fcfd0cb22f9f9c542fefc" +"checksum fixedbitset 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" +"checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" +"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +"checksum fs-swap 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "921d332c89b3b61a826de38c61ee5b6e02c56806cade1b0e5d81bd71f57a71bb" +"checksum fs2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +"checksum fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5f2a4a2034423744d2cc7ca2068453168dcdb82c438419e639a26bd87839c674" +"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" +"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" +"checksum futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780" +"checksum futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" +"checksum futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "d5e5f4df964fa9c1c2f8bddeb5c3611631cacd93baf810fc8bb2fb4b495c263a" +"checksum futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" +"checksum futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "b35b6263fb1ef523c3056565fa67b1d16f0a8604ff12b11b08c25f28a734c60a" +"checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" +"checksum futures-diagnose 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fdcef58a173af8148b182684c9f2d5250875adbcaff7b5794073894f9d8634a9" +"checksum futures-executor 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f674f3e1bcb15b37284a90cedf55afdba482ab061c407a9c0ebbd0f3109741ba" +"checksum futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" +"checksum futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" +"checksum futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" +"checksum futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" +"checksum futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a1de7508b218029b0f01662ed8f61b1c964b3ae99d6f25462d0f55a595109df6" +"checksum futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +"checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" +"checksum futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "5ce968633c17e5f97936bd2797b6e38fb56cf16a7422319f7ec2e30d3c470e8d" +"checksum futures_codec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a0a73299e4718f5452e45980fc1d6957a070abe308d3700b63b8673f47e1c2b3" +"checksum fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +"checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" +"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +"checksum get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7" +"checksum get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48" +"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +"checksum gimli 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "162d18ae5f2e3b90a993d202f1ba17a5633c2484426f8bcae201f86194bacd00" +"checksum gimli 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "81dd6190aad0f05ddbbf3245c54ed14ca4aa6dd32f22312b70d8f168c3e3e633" +"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" +"checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +"checksum globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "925aa2cac82d8834e2b2a4415b6f6879757fb5c0928fc445ae76461a12eed8f2" +"checksum gloo-timers 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0b2d17dbd803c2fc86cb1b613adf63192046a7176f383a8302594654752c4c4a" +"checksum goblin 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3081214398d39e4bd7f2c1975f0488ed04614ffdd976c6fc7a0708278552c0da" +"checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" +"checksum h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1" +"checksum hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" +"checksum hash256-std-hasher 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +"checksum hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1de41fb8dba9714efd92241565cdff73f78508c95697dd56787d3cba27e2353" +"checksum hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" +"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +"checksum hermit-abi 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "e2c55f143919fbc0bc77e427fe2d74cf23786d7c1875666f2fde3ac3c659bb67" +"checksum hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" +"checksum hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "961de220ec9a91af2e1e5bd80d02109155695e516771762381ef8581317066e0" +"checksum hex-literal-impl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9d4c5c844e2fee0bf673d54c2c177f1713b3d2af2ff6e666b49cb7572e6cf42d" +"checksum hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" +"checksum hmac-drbg 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" +"checksum http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" +"checksum http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b" +"checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" +"checksum http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" +"checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" +"checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" +"checksum hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" +"checksum hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)" = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" +"checksum hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fa1c527bbc634be72aa7ba31e4e4def9bbb020f5416916279b7c705cd838893e" +"checksum hyper-rustls 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6ea6215c7314d450ee45970ab8b3851ab447a0e6bafdd19e31b20a42dbb7faf" +"checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" +"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" +"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +"checksum impl-codec 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53" +"checksum impl-rlp 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8f7a72f11830b52333f36e3b09a288333888bf54380fd0ac0790a3c31ab0f3c5" +"checksum impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "58e3cae7e99c7ff5a995da2cf78dd0a5383740eda71d98cf7b1910c301ac69b8" +"checksum impl-serde 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5bbe9ea9b182f0fb1cabbd61f4ff9b7b7b9197955e95a7e4c27de5055eb29ff8" +"checksum impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" +"checksum indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" +"checksum integer-sqrt 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f65877bf7d44897a473350b1046277941cee20b263397e90869c50b6e766088b" +"checksum interleaved-ordered 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "141340095b15ed7491bd3d4ced9d20cebfb826174b6bb03386381f62b01e3d77" +"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +"checksum ipnet 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a859057dc563d1388c1e816f98a1892629075fc046ed06e845b883bb8b2916fb" +"checksum itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" +"checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" +"checksum jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" +"checksum js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9" +"checksum jsonrpc-client-transports 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0a9ae166c4d1f702d297cd76d4b55758ace80272ffc6dbb139fdc1bf810de40b" +"checksum jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fe3b688648f1ef5d5072229e2d672ecb92cbff7d1c79bcf3fd5898f3f3df0970" +"checksum jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "080dc110be17701097df238fad3c816d4a478a1899dfbcf8ec8957dd40ec7304" +"checksum jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8609af8f63b626e8e211f52441fcdb6ec54f1a446606b10d5c89ae9bf8a20058" +"checksum jsonrpc-http-server 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "816d63997ea45d3634608edbef83ddb35e661f7c0b27b5b72f237e321f0e9807" +"checksum jsonrpc-pubsub 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5b31c9b90731276fdd24d896f31bb10aecf2e5151733364ae81123186643d939" +"checksum jsonrpc-server-utils 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "95b7635e618a0edbbe0d2a2bbbc69874277c49383fcf6c3c0414491cfb517d22" +"checksum jsonrpc-ws-server 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b94e5773b2ae66e0e02c80775ce6bbba6f15d5bb47c14ec36a36fcf94f8df851" +"checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" +"checksum keccak-hasher 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3468207deea1359a0e921591ae9b4c928733d94eb9d6a2eeda994cfd59f42cf8" +"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +"checksum kv-log-macro 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c54d9f465d530a752e6ebdc217e081a7a614b48cb200f6f0aee21ba6bc9aabb" +"checksum kvdb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03080afe6f42cd996da9f568d6add5d7fb5ee2ea7fb7802d2d2cbd836958fd87" +"checksum kvdb-memorydb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b9355274e5a9e0a7e8ef43916950eae3949024de2a8dffe4d5a6c13974a37c8e" +"checksum kvdb-rocksdb 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "af36fd66ccd99f3f771ae39b75aaba28b952372b6debfb971134bf1f03466ab2" +"checksum kvdb-web 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a985c47b4c46429e96033ebf6eaed784a81ceccb4e5df13d63f3b9078a4df81" +"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" +"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" +"checksum leb128 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" +"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" +"checksum libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" +"checksum libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6bf152b510950e1030f2d3dcca5f0b4017892be50348a15fd3eec8b90c826fb" +"checksum libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3b874594c4b29de1a29f27871feba8e6cd13aa54a8a1e8f8c7cf3dfac5ca287c" +"checksum libp2p-core-derive 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96d472e9d522f588805c77801de10b957be84e10f019ca5f869fa1825b15ea9b" +"checksum libp2p-deflate 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e25004d4d9837b44b22c5f1a69be1724a5168fef6cff1716b5176a972c3aa62" +"checksum libp2p-dns 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b99e552f9939b606eb4b59f7f64d9b01e3f96752f47e350fc3c5fc646ed3f649" +"checksum libp2p-floodsub 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d3234f12e44f9a50351a9807b97fe7de11eb9ae4482370392ba10da6dc90722" +"checksum libp2p-gossipsub 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d46cb3e0841bd951cbf4feae56cdc081e6347836a644fb260c3ec554149b4006" +"checksum libp2p-identify 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfeb935a9bd41263e4f3a24b988e9f4a044f3ae89ac284e83c17fe2f84e0d66b" +"checksum libp2p-kad 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76c260a92309112fff855ab2bd8f26c246c1dd380b87021abe61358dedb9748d" +"checksum libp2p-mdns 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "881fcfb360c2822db9f0e6bb6f89529621556ed9a8b038313414eda5107334de" +"checksum libp2p-mplex 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d8507b37ad0eed275efcde67a023c3d85af6c80768b193845b9288e848e1af95" +"checksum libp2p-noise 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac7d33809afdf6794f09fdb2f9f94e1550ae230be5bae6430a078eb96fc9e5a6" +"checksum libp2p-ping 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "33d22f2f228b3a828dca1cb8aa9fa331e0bc9c36510cb2c1916956e20dc85e8c" +"checksum libp2p-plaintext 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "56126a204d7b3382bac163143ff4125a14570b3ba76ba979103d1ae1abed1923" +"checksum libp2p-pnet 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b916938a8868f75180aeeffcc6a516a922d165e8fa2a90b57bad989d1ccbb57a" +"checksum libp2p-secio 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1219e9ecb4945d7331a05f5ffe96a1f6e28051bfa1223d4c60353c251de0354e" +"checksum libp2p-swarm 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "275471e7c0e88ae004660866cd54f603bd8bd1f4caef541a27f50dd8640c4d4c" +"checksum libp2p-tcp 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f9e80ad4e3535345f3d666554ce347d3100453775611c05c60786bf9a1747a10" +"checksum libp2p-uds 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "76d329564a43da9d0e055a5b938633c4a8ceab1f59cec133fbc4647917c07341" +"checksum libp2p-wasm-ext 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7d40c95ac1a9b7fb7770616e4165f34559885337f3be485b32acdd085261be3a" +"checksum libp2p-websocket 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5351ca9eea122081c1c0f9323164d2918cac29b5a6bfe5054d4ba8ec9447cf42" +"checksum libp2p-yamux 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f72aa5a7273c29c6eaea09108a49feaefc7456164863f64f86a193f9e78a4b7f" +"checksum librocksdb-sys 6.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0a0785e816e1e11e7599388a492c61ef80ddc2afc91e313e61662cce537809be" +"checksum libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" +"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" +"checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" +"checksum linked_hash_set 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3c7c91c4c7bbeb4f2f7c4e5be11e6a05bd6830bc37249c47ce1ad86ad453ff9c" +"checksum lock_api 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b" +"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" +"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +"checksum lru 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "5d8f669d42c72d18514dfca8115689c5f6370a17d980cb5bd777a67f404594c8" +"checksum lru 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237" +"checksum mach 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "86dd2487cdfea56def77b88438a2c915fb45113c5319bfe7e14306ca4cd0b0e1" +"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +"checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" +"checksum memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53445de381a1f436797497c61d851644d0e8e88e6140f22872ad33a704933978" +"checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" +"checksum memory-db 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "198831fe8722331a395bc199a5d08efbc197497ef354cb4c77b969c02ffc0fc4" +"checksum memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" +"checksum merlin 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2b0942b357c1b4d0dc43ba724674ec89c3218e6ca2b3e8269e7cb53bcecd2f6e" +"checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" +"checksum miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" +"checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" +"checksum mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" +"checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" +"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +"checksum more-asserts 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" +"checksum multimap 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a97fbd5d00e0e37bfb10f433af8f5aaf631e739368dc9fc28286ca81ca4948dc" +"checksum multistream-select 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f938ffe420493e77c8b6cbcc3f282283f68fc889c5dcbc8e51668d5f3a01ad94" +"checksum names 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da" +"checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" +"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" +"checksum nix 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" +"checksum nodrop 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" +"checksum nohash-hasher 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" +"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" +"checksum num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +"checksum num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" +"checksum num-rational 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "da4dc79f9e6c81bef96148c8f6b8e72ad4541caa4a24373e900a36da07de03a3" +"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +"checksum num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" +"checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" +"checksum once_cell 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b1c601810575c99596d4afc46f78a678c80105117c379eb3650cf99b8a21ce5b" +"checksum oorandom 11.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ebcec7c9c2a95cacc7cd0ecb89d8a8454eca13906f6deb55258ffff0adeb9405" +"checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" +"checksum openssl 0.10.28 (registry+https://github.com/rust-lang/crates.io-index)" = "973293749822d7dd6370d6da1e523b0d1db19f06c459134c658b2a4261378b52" +"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" +"checksum openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)" = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986" +"checksum output_vt100 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" +"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" +"checksum parity-bytes 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0c276d76c5333b8c2579e02d49a06733a55b8282d2d9b13e8d53b6406bd7e30a" +"checksum parity-multiaddr 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "045b3c7af871285146300da35b1932bb6e4639b66c7c98e85d06a32cbc4e8fa7" +"checksum parity-multiaddr 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "26df883298bc3f4e92528b4c5cc9f806b791955b136da3e5e939ed9de0fd958b" +"checksum parity-multihash 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "df3a17dc27848fd99e4f87eb0f8c9baba6ede0a6d555400c850ca45254ef4ce3" +"checksum parity-multihash 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7a1cd2ba02391b81367bec529fb209019d718684fdc8ad6a712c2b536e46f775" +"checksum parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f747c06d9f3b2ad387ac881b9667298c81b1243aa9833f086e05996937c35507" +"checksum parity-scale-codec-derive 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "34e513ff3e406f3ede6796dcdc83d0b32ffb86668cea1ccf7363118abeb00476" +"checksum parity-send-wrapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" +"checksum parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ef1476e40bf8f5c6776e9600983435821ca86eb9819d74a6207cca69d091406a" +"checksum parity-util-mem-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" +"checksum parity-wasm 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "16ad52817c4d343339b3bc2e26861bd21478eda0b7509acf83505727000512ac" +"checksum parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" +"checksum parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92e98c49ab0b7ce5b222f2cc9193fc4efe11c6d0bd4f648e374684a6857b1cfc" +"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" +"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" +"checksum parking_lot_core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7582838484df45743c8434fbff785e8edf260c28748353d44bc0da32e0ceabf1" +"checksum paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "423a519e1c6e828f1e73b720f9d9ed2fa643dce8a7737fb43235ce0b41eeaa49" +"checksum paste-impl 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4214c9e912ef61bf42b81ba9a47e8aad1b2ffaf739ab162bf96d1e011f54e6c5" +"checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" +"checksum pdqselect 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ec91767ecc0a0bbe558ce8c9da33c068066c57ecc8bb8477ef8c1ad3ef77c27" +"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" +"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" +"checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +"checksum petgraph 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "29c127eea4a29ec6c85d153c59dc1213f33ec74cead30fe4730aecc88cc1fd92" +"checksum pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c" +"checksum pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f" +"checksum pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" +"checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" +"checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" +"checksum plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" +"checksum plotters 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "4e3bb8da247d27ae212529352020f3e5ee16e83c0c258061d27b08ab92675eeb" +"checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" +"checksum predicates 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a9bfe52247e5cc9b2f943682a85a5549fb9662245caf094504e69a2f03fe64d4" +"checksum predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" +"checksum predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" +"checksum pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427" +"checksum primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e4336f4f5d5524fa60bcbd6fe626f9223d8142a50e7053e979acdf0da41ab975" +"checksum proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e10d4b51f154c8a7fb96fd6dad097cb74b863943ec010ac94b9fd1be8861fe1e" +"checksum proc-macro-error 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "052b3c9af39c7e5e94245f820530487d19eb285faedcb40e0c3275132293f242" +"checksum proc-macro-error-attr 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "d175bef481c7902e63e3165627123fff3502f06ac043d3ef42d08c1246da9253" +"checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" +"checksum proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" +"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +"checksum proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" +"checksum prometheus 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5567486d5778e2c6455b1b90ff1c558f29e751fc018130fa182e15828e728af1" +"checksum prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce49aefe0a6144a45de32927c77bd2859a5f7677b55f220ae5b744e87389c212" +"checksum prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "02b10678c913ecbd69350e8535c3aef91a8676c0773fc1d7b95cdd196d7f2f26" +"checksum prost-derive 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" +"checksum prost-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1834f67c0697c001304b75be76f67add9c89742eda3a085ad8ee0bb38c3417aa" +"checksum protobuf 2.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6686ddd96a8dbe2687b5f2a687b2cfb520854010ec480f2d74c32e7c9873d3c5" +"checksum pwasm-utils 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f7a12f176deee919f4ba55326ee17491c8b707d0987aed822682c821b660192" +"checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +"checksum quickcheck 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a44883e74aa97ad63db83c4bf8ca490f02b2fc02f92575e720c8551e843c945f" +"checksum quicksink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a8461ef7445f61fd72d8dcd0629ce724b9131b3c2eb36e83a5d3d4161c127530" +"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +"checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" +"checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" +"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +"checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +"checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" +"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" +"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" +"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +"checksum rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03b418169fb9c46533f326efd6eed2576699c44ca92d3052a066214a8d828929" +"checksum raw-cpuid 7.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4a349ca83373cfa5d6dbb66fd76e58b2cca08da71a5f6400de0a0a6a9bceeaf" +"checksum rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" +"checksum rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" +"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" +"checksum redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" +"checksum regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" +"checksum regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9" +"checksum regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06" +"checksum region 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "448e868c6e4cfddfa49b6a72c95906c04e8547465e9536575b95c70a4044f856" +"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" +"checksum ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)" = "741ba1704ae21999c00942f9f5944f801e977f54302af346b596287599ad1862" +"checksum rlp 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3a44d5ae8afcb238af8b75640907edc6c931efcfab2c854e81ed35fa080f84cd" +"checksum rocksdb 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "12069b106981c6103d3eab7dd1c86751482d0779a520b7c14954c8b586c1e643" +"checksum rpassword 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" +"checksum rust-argon2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" +"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" +"checksum rustc-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +"checksum rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +"checksum rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" +"checksum rustls-native-certs 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51ffebdbb48c14f84eba0b715197d673aff1dd22cc1007ca647e28483bbcc307" +"checksum rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b3bba175698996010c4f6dce5e7f173b6eb781fce25d2cfc45e27091ce0b79f6" +"checksum rw-stream-sink 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" +"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" +"checksum safe-mix 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c" +"checksum safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" +"checksum salsa20 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2324b0e8c3bb9a586a571fdb3136f70e7e2c748de00a78043f86e0cff91f91fe" +"checksum salsa20-core 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2fe6cc1b9f5a5867853ade63099de70f042f7679e408d1ffe52821c9248e6e69" +"checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +"checksum schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295" +"checksum schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)" = "eacd8381b3c37840c9c9f40472af529e49975bdcbc24f83c31059fd6539023d3" +"checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +"checksum scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "abb2332cb595d33f7edd5700f4cbf94892e680c7f0ae56adab58a35190b66cb1" +"checksum scroll_derive 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8584eea9b9ff42825b46faf46a8c24d2cff13ec152fa2a50df788b87c07ee28" +"checksum sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" +"checksum security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" +"checksum security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" +"checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" +"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +"checksum send_wrapper 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4" +"checksum send_wrapper 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "686ef91cf020ad8d4aca9a7047641fd6add626b7b89e14546c2b6a76781cf822" +"checksum send_wrapper 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" +"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" +"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" +"checksum serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" +"checksum sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" +"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" +"checksum sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0" +"checksum sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" +"checksum shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" +"checksum shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" +"checksum signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" +"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +"checksum slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1cc9c640a4adbfbcc11ffb95efe5aa7af7309e002adab54b185507dbf2377b99" +"checksum slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddc0d2aff1f8f325ef660d9a0eb6e6dcd20b30b3f581a5897f58bf42d061c37a" +"checksum slog-scope 4.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c44c89dd8b0ae4537d1ae318353eaf7840b4869c536e31c41e963d1ea523ee6" +"checksum slog_derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a945ec7f7ce853e89ffa36be1e27dce9a43e82ff9093bf3461c30d5da74ed11b" +"checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" +"checksum smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc" +"checksum snow 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "afb767eee7d257ba202f0b9b08673bc13b22281632ef45267b19f13100accd2f" +"checksum soketto 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c9dab3f95c9ebdf3a88268c19af668f637a3c5039c2c56ff2d40b1b2d64a25b" +"checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" +"checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" +"checksum static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +"checksum stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8131256a5896cabcf5eb04f4d6dacbe1aefda854b0d9896e09cb58829ec5638c" +"checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" +"checksum string-interner 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd710eadff449a1531351b0e43eb81ea404336fa2f56c777427ab0e32a4cf183" +"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +"checksum structopt 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "a1bcbed7d48956fcbb5d80c6b95aedb553513de0a1b451ea92679d999c010e98" +"checksum structopt-derive 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "095064aa1f5b94d14e635d0a5684cf140c43ae40a0fd990708d38f5d669e5f64" +"checksum strum 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6138f8f88a16d90134763314e3fc76fa3ed6a7db4725d6acf9a3ef95a3188d22" +"checksum strum_macros 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0054a7df764039a6cd8592b9de84be4bec368ff081d203a7d5371cbfa8e65c81" +"checksum substrate-bip39 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3be511be555a3633e71739a79e4ddff6a6aaa6579fa6114182a51d72c3eb93c5" +"checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" +"checksum subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c65d530b10ccaeac294f349038a597e435b18fb456aadd0840a623f83b9e941" +"checksum syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5" +"checksum syn-mid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" +"checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" +"checksum sysinfo 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6f4b2468c629cffba39c0a4425849ab3cdb03d9dfacba69684609aea04d08ff9" +"checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" +"checksum target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d" +"checksum target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe" +"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" +"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +"checksum termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" +"checksum test-case 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a605baa797821796a751f4a959e1206079b24a4b7e1ed302b7d785d81a9276c9" +"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +"checksum thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ee14bf8e6767ab4c687c9e8bc003879e042a96fd67a3ba5934eadb6536bef4db" +"checksum thiserror-impl 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "a7b51e1fbc44b5a0840be594fbc0f960be09050f2617e61e6aa43bef97cd3ef4" +"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +"checksum threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" +"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" +"checksum tiny-bip39 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1cd1fb03fe8e07d17cd851a624a9fff74642a997b67fbd1ccd77533241640d92" +"checksum tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d8a021c69bb74a44ccedb824a046447e2c84a01df9e5c20779750acb38e11b2" +"checksum tiny-keccak 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2953ca5148619bc99695c1274cb54c5275bbb913c6adad87e72eaf8db9787f69" +"checksum tinytemplate 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "57a3c6667d3e65eb1bc3aed6fd14011c6cbc3a0665218ab7f5daf040b9ec371a" +"checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" +"checksum tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8fdd17989496f49cdc57978c96f0c9fe5e4a58a8bddc6813c449a4624f6a030b" +"checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" +"checksum tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" +"checksum tokio-current-thread 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" +"checksum tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" +"checksum tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee9ceecf69145923834ea73f32ba40c790fd877b74a7817dd0b089f1eb9c7c8" +"checksum tokio-fs 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" +"checksum tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" +"checksum tokio-macros 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f4b1e7ed7d5d4c2af3d999904b0eebe76544897cdbfb2b9684bed2174ab20f7c" +"checksum tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" +"checksum tokio-rustls 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "141afec0978abae6573065a48882c6bae44c5cc61db9b511ac4abf6a09bfd9cc" +"checksum tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" +"checksum tokio-sync 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4f1aaeb685540f7407ea0e27f1c9757d258c7c6bf4e3eb19da6fc59b747239d2" +"checksum tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" +"checksum tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" +"checksum tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" +"checksum tokio-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "354b8cd83825b3c20217a9dc174d6a0c67441a2fae5c41bcb1ea6679f6ae0f7c" +"checksum tokio-udp 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" +"checksum tokio-uds 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5076db410d6fdc6523df7595447629099a1fdc47b3d9f896220780fa48faf798" +"checksum tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" +"checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" +"checksum tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" +"checksum tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1e213bd24252abeb86a0b7060e02df677d367ce6cb772cef17e9214b8390a8d3" +"checksum tracing-attributes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04cfd395def5a60236e187e1ff905cb55668a59f29928dec05e6e1b1fd2ac1f3" +"checksum tracing-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "13a46f11e372b8bd4b4398ea54353412fdd7fd42a8370c7e543e218cf7661978" +"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" +"checksum treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" +"checksum trie-bench 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6dcd9bac85703d8f974ee1e6dfe668784b105d3385c174ad729adb7427ad5d81" +"checksum trie-db 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de9222c50cc325855621271157c973da27a0dcd26fa06f8edf81020bd2333df0" +"checksum trie-root 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "652931506d2c1244d7217a70b99f56718a7b4161b37f04e7cd868072a99f68cd" +"checksum trie-standardmap 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3161ba520ab28cd8e6b68e1126f1009f6e335339d1a73b978139011703264c8" +"checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" +"checksum trybuild 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5867c525891caf154503954cb743ff7f1c4ca2c3e8578f6a5af84c913aa084c8" +"checksum twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d261e83e727c8e2dbb75dacac67c36e35db36a958ee504f2164fc052434e1" +"checksum twox-hash 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bfd5b7557925ce778ff9b9ef90e3ade34c524b5ff10e239c69a42d546d2af56" +"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" +"checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" +"checksum uint 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e75a4cdd7b87b28840dba13c483b9a88ee6bbf16ba5c951ee1ecfcf723078e0d" +"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" +"checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +"checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" +"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" +"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" +"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +"checksum unsigned-varint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f0023a96687fe169081e8adce3f65e3874426b7886e9234d490af2dc077959" +"checksum unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3b7ffb36714206d2f5f05d61a2bc350415c642f2c54433f0ebf829afbe41d570" +"checksum untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60369ef7a31de49bcb3f6ca728d4ba7300d9a1658f94c727d4cab8c8d9f4aece" +"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" +"checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" +"checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" +"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" +"checksum vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6aba5e34f93dc7051dfad05b98a18e9156f27e7b431fe1d2398cb6061c0a1dba" +"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" +"checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" +"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +"checksum wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3c5c5c1286c6e578416982609f47594265f9d489f9b836157d403ad605a46693" +"checksum wabt-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "af5d153dc96aad7dc13ab90835b892c69867948112d95299e522d370c4e13a08" +"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" +"checksum want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" +"checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +"checksum wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c" +"checksum wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45" +"checksum wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8bbdd49e3e28b40dec6a9ba8d17798245ce32b019513a845369c641b275135d9" +"checksum wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3" +"checksum wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" +"checksum wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601" +"checksum wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d" +"checksum wasm-gc-api 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c32691b6c7e6c14e7f8fd55361a9088b507aa49620fcd06c09b3a1082186b9" +"checksum wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "324c5e65a08699c9c4334ba136597ab22b85dccd4b65dd1e36ccf8f723a95b54" +"checksum wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bf617d864d25af3587aa745529f7aaa541066c876d57e050c0d0c85c61c92aff" +"checksum wasmi-validation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea78c597064ba73596099281e2f4cfc019075122a65cdda3205af94f0b264d93" +"checksum wasmparser 0.48.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073da89bf1c84db000dd68ce660c1b4a08e3a2d28fd1e3394ab9e7abdde4a0f8" +"checksum wasmparser 0.51.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a40d24f114a3f24b459ec292019220cff6388673b4a2c0a11483665b599ef15c" +"checksum wasmtime 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5614d964c3e7d07a13b59aca66103c52656bd80430f0d86dc7eeb3af4f03d4a2" +"checksum wasmtime-debug 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "feb5900275b4ef0b621ce725b9d5660b12825d7f7d79b392b97baf089ffab8c0" +"checksum wasmtime-environ 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f04661851e133fb11691c4a0f92a705766b4bbf7afc06811f949e295cc8414fc" +"checksum wasmtime-jit 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d451353764ce55c9bb6a8b260063cfc209b7adadd277a9a872ab4563a69e357c" +"checksum wasmtime-runtime 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7dbd4fc114b828cae3e405fed413df4b3814d87a92ea029640cec9ba41f0c162" +"checksum wast 8.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f9df3d716118a503b2f6bbb6ff46b21997ab0cc167b01de7a188e45e4b01e8d" +"checksum wat 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "4a927b35badc29c97d97e82689eef7f72fc936d884b3391804c1bb6cd2bdccbb" +"checksum web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b" +"checksum webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" +"checksum webpki-roots 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a262ae37dd9d60f60dd473d1158f9fbebf110ba7b6a5051c8160460f6043718b" +"checksum webpki-roots 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "91cd5736df7f12a964a5067a12c62fa38e1bd8080aff1f80bc29be7c80d19ab4" +"checksum websocket 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)" = "413b37840b9e27b340ce91b319ede10731de8c72f5bc4cb0206ec1ca4ce581d0" +"checksum websocket-base 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5e3810f0d00c4dccb54c30a4eee815e703232819dec7b007db115791c42aa374" +"checksum weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164" +"checksum which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164" +"checksum which 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5475d47078209a02e60614f7ba5e645ef3ed60f771920ac1906d7c1cc65024c8" +"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" +"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" +"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" +"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80" +"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +"checksum ws 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a2c47b5798ccc774ffb93ff536aec7c4275d722fd9c740c83cdd1af1f2d94" +"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +"checksum x25519-dalek 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ee1585dc1484373cbc1cee7aafda26634665cf449436fd6e24bfd1fad230538" +"checksum x25519-dalek 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "637ff90c9540fa3073bb577e65033069e4bae7c79d49d74aa3ffdf5342a53217" +"checksum xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" +"checksum yamux 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d73295bc9d9acf89dd9336b3b5f5b57731ee72b587857dd4312721a0196b48e5" +"checksum zeroize 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "45af6a010d13e4cf5b54c94ba5a2b2eba5596b9e46bf5875612d332a1f2b3f86" +"checksum zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8" +"checksum zeroize_derive 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2" +"checksum zstd 0.5.1+zstd.1.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c5d978b793ae64375b80baf652919b148f6a496ac8802922d9999f5a553194f" +"checksum zstd-safe 2.0.3+zstd.1.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bee25eac9753cfedd48133fa1736cbd23b774e253d89badbeac7d12b23848d3f" +"checksum zstd-sys 1.4.15+zstd.1.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "89719b034dc22d240d5b407fb0a3fe6d29952c181cff9a9f95c0bd40b4f8f7d8" diff --git a/bin/node/executor/tests/basic.rs b/bin/node/executor/tests/basic.rs index 100bdf3fe60..972c561a2fb 100644 --- a/bin/node/executor/tests/basic.rs +++ b/bin/node/executor/tests/basic.rs @@ -347,7 +347,7 @@ fn full_native_block_import_works() { }, EventRecord { phase: Phase::ApplyExtrinsic(1), - event: Event::pallet_treasury(pallet_treasury::RawEvent::Deposit(1984800000000)), + event: Event::pallet_treasury(pallet_treasury::RawEvent::Deposit(fees * 8 / 10)), topics: vec![], }, EventRecord { @@ -381,13 +381,14 @@ fn full_native_block_import_works() { ).0.unwrap(); t.execute_with(|| { + let fees = transfer_fee(&xt(), fm); assert_eq!( Balances::total_balance(&alice()), - alice_last_known_balance - 10 * DOLLARS - transfer_fee(&xt(), fm), + alice_last_known_balance - 10 * DOLLARS - fees, ); assert_eq!( Balances::total_balance(&bob()), - 179 * DOLLARS - transfer_fee(&xt(), fm), + 179 * DOLLARS - fees, ); let events = vec![ EventRecord { @@ -399,7 +400,7 @@ fn full_native_block_import_works() { }, EventRecord { phase: Phase::ApplyExtrinsic(1), - event: Event::pallet_treasury(pallet_treasury::RawEvent::Deposit(1984788199392)), + event: Event::pallet_treasury(pallet_treasury::RawEvent::Deposit(fees * 8 / 10)), topics: vec![], }, EventRecord { @@ -422,7 +423,7 @@ fn full_native_block_import_works() { }, EventRecord { phase: Phase::ApplyExtrinsic(2), - event: Event::pallet_treasury(pallet_treasury::RawEvent::Deposit(1984788199392)), + event: Event::pallet_treasury(pallet_treasury::RawEvent::Deposit(fees * 8 / 10)), topics: vec![], }, EventRecord { diff --git a/bin/node/executor/tests/fees.rs b/bin/node/executor/tests/fees.rs index ba303a6feb6..374dee354f1 100644 --- a/bin/node/executor/tests/fees.rs +++ b/bin/node/executor/tests/fees.rs @@ -25,13 +25,13 @@ use sp_core::{ storage::Storage, }; use sp_runtime::{ - Fixed64, + Fixed64, Perbill, traits::Convert, }; use node_runtime::{ - CheckedExtrinsic, Call, Runtime, Balances, - TransactionPayment, TransactionBaseFee, TransactionByteFee, - WeightFeeCoefficient, constants::currency::*, + CheckedExtrinsic, Call, Runtime, Balances, TransactionPayment, TransactionBaseFee, + TransactionByteFee, WeightFeeCoefficient, + constants::currency::*, }; use node_runtime::impls::LinearWeightToFee; use node_primitives::Balance; @@ -60,12 +60,12 @@ fn fee_multiplier_increases_and_decreases_on_big_weight() { GENESIS_HASH.into(), vec![ CheckedExtrinsic { - signed: None, - function: Call::Timestamp(pallet_timestamp::Call::set(42 * 1000)), + signed: None, + function: Call::Timestamp(pallet_timestamp::Call::set(42 * 1000)), }, CheckedExtrinsic { signed: Some((charlie(), signed_extra(0, 0))), - function: Call::System(frame_system::Call::fill_block()), + function: Call::System(frame_system::Call::fill_block(Perbill::from_percent(90))), } ] ); @@ -77,8 +77,8 @@ fn fee_multiplier_increases_and_decreases_on_big_weight() { block1.1.clone(), vec![ CheckedExtrinsic { - signed: None, - function: Call::Timestamp(pallet_timestamp::Call::set(52 * 1000)), + signed: None, + function: Call::Timestamp(pallet_timestamp::Call::set(52 * 1000)), }, CheckedExtrinsic { signed: Some((charlie(), signed_extra(1, 0))), @@ -87,7 +87,11 @@ fn fee_multiplier_increases_and_decreases_on_big_weight() { ] ); - println!("++ Block 1 size: {} / Block 2 size {}", block1.0.encode().len(), block2.0.encode().len()); + println!( + "++ Block 1 size: {} / Block 2 size {}", + block1.0.encode().len(), + block2.0.encode().len(), + ); // execute a big block. executor_call:: _>( diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index e119fa02824..617ca2257a3 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -81,8 +81,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 223, - impl_version: 1, + spec_version: 224, + impl_version: 0, apis: RUNTIME_API_VERSIONS, }; diff --git a/frame/executive/src/lib.rs b/frame/executive/src/lib.rs index 18f4edf3441..e68681af197 100644 --- a/frame/executive/src/lib.rs +++ b/frame/executive/src/lib.rs @@ -546,7 +546,7 @@ mod tests { pallet_balances::GenesisConfig:: { balances: vec![(1, 211)], }.assimilate_storage(&mut t).unwrap(); - let xt = sp_runtime::testing::TestXt::new_signed(sign_extra(1, 0, 0), Call::Balances(BalancesCall::transfer(2, 69))); + let xt = TestXt::new_signed(sign_extra(1, 0, 0), Call::Balances(BalancesCall::transfer(2, 69))); let weight = xt.get_dispatch_info().weight as u64; let mut t = sp_io::TestExternalities::new(t); t.execute_with(|| { @@ -626,7 +626,7 @@ mod tests { fn bad_extrinsic_not_inserted() { let mut t = new_test_ext(1); // bad nonce check! - let xt = sp_runtime::testing::TestXt::new_signed(sign_extra(1, 30, 0), Call::Balances(BalancesCall::transfer(33, 69))); + let xt = TestXt::new_signed(sign_extra(1, 30, 0), Call::Balances(BalancesCall::transfer(33, 69))); t.execute_with(|| { Executive::initialize_block(&Header::new( 1, @@ -644,7 +644,7 @@ mod tests { fn block_weight_limit_enforced() { let mut t = new_test_ext(10000); // given: TestXt uses the encoded len as fixed Len: - let xt = sp_runtime::testing::TestXt::new_signed(sign_extra(1, 0, 0), Call::Balances(BalancesCall::transfer(33, 0))); + let xt = TestXt::new_signed(sign_extra(1, 0, 0), Call::Balances(BalancesCall::transfer(33, 0))); let encoded = xt.encode(); let encoded_len = encoded.len() as Weight; let limit = AvailableBlockRatio::get() * MaximumBlockWeight::get() - 175; @@ -661,7 +661,7 @@ mod tests { assert_eq!(>::all_extrinsics_weight(), 175); for nonce in 0..=num_to_exhaust_block { - let xt = sp_runtime::testing::TestXt::new_signed( + let xt = TestXt::new_signed( sign_extra(1, nonce.into(), 0), Call::Balances(BalancesCall::transfer(33, 0)), ); let res = Executive::apply_extrinsic(xt); @@ -681,14 +681,14 @@ mod tests { #[test] fn block_weight_and_size_is_stored_per_tx() { - let xt = sp_runtime::testing::TestXt::new_signed(sign_extra(1, 0, 0), Call::Balances(BalancesCall::transfer(33, 0))); - let x1 = sp_runtime::testing::TestXt::new_signed(sign_extra(1, 1, 0), Call::Balances(BalancesCall::transfer(33, 0))); - let x2 = sp_runtime::testing::TestXt::new_signed(sign_extra(1, 2, 0), Call::Balances(BalancesCall::transfer(33, 0))); + let xt = TestXt::new_signed(sign_extra(1, 0, 0), Call::Balances(BalancesCall::transfer(33, 0))); + let x1 = TestXt::new_signed(sign_extra(1, 1, 0), Call::Balances(BalancesCall::transfer(33, 0))); + let x2 = TestXt::new_signed(sign_extra(1, 2, 0), Call::Balances(BalancesCall::transfer(33, 0))); let len = xt.clone().encode().len() as u32; let mut t = new_test_ext(1); t.execute_with(|| { assert_eq!(>::all_extrinsics_weight(), 0); - assert_eq!(>::all_extrinsics_weight(), 0); + assert_eq!(>::all_extrinsics_len(), 0); assert!(Executive::apply_extrinsic(xt.clone()).unwrap().is_ok()); assert!(Executive::apply_extrinsic(x1.clone()).unwrap().is_ok()); @@ -701,13 +701,13 @@ mod tests { let _ = >::finalize(); assert_eq!(>::all_extrinsics_weight(), 0); - assert_eq!(>::all_extrinsics_weight(), 0); + assert_eq!(>::all_extrinsics_len(), 0); }); } #[test] fn validate_unsigned() { - let xt = sp_runtime::testing::TestXt::new_unsigned(Call::Balances(BalancesCall::set_balance(33, 69, 69))); + let xt = TestXt::new_unsigned(Call::Balances(BalancesCall::set_balance(33, 69, 69))); let mut t = new_test_ext(1); t.execute_with(|| { @@ -716,9 +716,26 @@ mod tests { }); } + #[test] + fn unsigned_weight_is_noted_when_applied() { + let xt = TestXt::new_unsigned(Call::Balances(BalancesCall::set_balance(33, 69, 69))); + let len = xt.clone().encode().len() as u32; + let mut t = new_test_ext(1); + t.execute_with(|| { + assert_eq!(>::all_extrinsics_weight(), 0); + assert_eq!(>::all_extrinsics_len(), 0); + + // This is okay -- balances transfer will panic since it requires ensure_signed. + assert_eq!(Executive::apply_extrinsic(xt), Ok(Err(DispatchError::BadOrigin))); + + assert_eq!(>::all_extrinsics_weight(), len); + assert_eq!(>::all_extrinsics_len(), len); + }); + } + #[test] fn apply_trusted_skips_signature_check_but_not_others() { - let xt1 = sp_runtime::testing::TestXt::new_signed(sign_extra(1, 0, 0), Call::Balances(BalancesCall::transfer(33, 0))) + let xt1 = TestXt::new_signed(sign_extra(1, 0, 0), Call::Balances(BalancesCall::transfer(33, 0))) .badly_signed(); let mut t = new_test_ext(1); @@ -727,7 +744,7 @@ mod tests { assert_eq!(Executive::apply_trusted_extrinsic(xt1), Ok(Ok(()))); }); - let xt2 = sp_runtime::testing::TestXt::new_signed(sign_extra(1, 0, 0), Call::Balances(BalancesCall::transfer(33, 0))) + let xt2 = TestXt::new_signed(sign_extra(1, 0, 0), Call::Balances(BalancesCall::transfer(33, 0))) .invalid(TransactionValidityError::Invalid(InvalidTransaction::Call)); t.execute_with(|| { @@ -750,7 +767,7 @@ mod tests { 110, lock, ); - let xt = sp_runtime::testing::TestXt::new_signed( + let xt = TestXt::new_signed( sign_extra(1, 0, 0), Call::System(SystemCall::remark(vec![1u8])), ); diff --git a/frame/system/src/lib.rs b/frame/system/src/lib.rs index 875a1d7cfe2..ec35fe3b603 100644 --- a/frame/system/src/lib.rs +++ b/frame/system/src/lib.rs @@ -117,7 +117,7 @@ use frame_support::{ Contains, Get, ModuleToIndex, OnNewAccount, OnReapAccount, IsDeadAccount, Happened, StoredMap }, - weights::{Weight, DispatchInfo, DispatchClass, SimpleDispatchInfo}, + weights::{Weight, DispatchInfo, DispatchClass, SimpleDispatchInfo, FunctionOf}, }; use codec::{Encode, Decode, FullCodec, EncodeLike}; @@ -414,11 +414,15 @@ decl_module! { pub struct Module for enum Call where origin: T::Origin { type Error = Error; - /// A big dispatch that will disallow any other transaction to be included. + /// A dispatch that will fill the block weight up to the given ratio. // TODO: This should only be available for testing, rather than in general usage, but // that's not possible at present (since it's within the decl_module macro). - #[weight = SimpleDispatchInfo::MaxOperational] - fn fill_block(origin) { + #[weight = FunctionOf( + |(ratio,): (&Perbill,)| *ratio * T::MaximumBlockWeight::get(), + DispatchClass::Operational, + true, + )] + fn fill_block(origin, _ratio: Perbill) { ensure_root(origin)?; } @@ -1080,6 +1084,34 @@ impl CheckWeight { pub fn new() -> Self { Self(PhantomData) } + + /// Do the pre-dispatch checks. This can be applied to both signed and unsigned. + /// + /// It checks and notes the new weight and length. + fn do_pre_dispatch( + info: ::DispatchInfo, + len: usize, + ) -> Result<(), TransactionValidityError> { + let next_len = Self::check_block_length(info, len)?; + let next_weight = Self::check_weight(info)?; + AllExtrinsicsLen::put(next_len); + AllExtrinsicsWeight::put(next_weight); + Ok(()) + } + + /// Do the validate checks. This can be applied to both signed and unsigned. + /// + /// It only checks that the block weight and length limit will not exceed. + fn do_validate( + info: ::DispatchInfo, + len: usize, + ) -> TransactionValidity { + // ignore the next weight and length. If they return `Ok`, then it is below the limit. + let _ = Self::check_block_length(info, len)?; + let _ = Self::check_weight(info)?; + + Ok(ValidTransaction { priority: Self::get_priority(info), ..Default::default() }) + } } impl SignedExtension for CheckWeight { @@ -1099,11 +1131,7 @@ impl SignedExtension for CheckWeight { info: Self::DispatchInfo, len: usize, ) -> Result<(), TransactionValidityError> { - let next_len = Self::check_block_length(info, len)?; - AllExtrinsicsLen::put(next_len); - let next_weight = Self::check_weight(info)?; - AllExtrinsicsWeight::put(next_weight); - Ok(()) + Self::do_pre_dispatch(info, len) } fn validate( @@ -1113,18 +1141,23 @@ impl SignedExtension for CheckWeight { info: Self::DispatchInfo, len: usize, ) -> TransactionValidity { - // There is no point in writing to storage here since changes are discarded. This basically - // discards any transaction which is bigger than the length or weight limit **alone**, which - // is a guarantee that it will fail in the pre-dispatch phase. - if let Err(e) = Self::check_block_length(info, len) { - return Err(e); - } + Self::do_validate(info, len) + } - if let Err(e) = Self::check_weight(info) { - return Err(e); - } + fn pre_dispatch_unsigned( + _call: &Self::Call, + info: Self::DispatchInfo, + len: usize, + ) -> Result<(), TransactionValidityError> { + Self::do_pre_dispatch(info, len) + } - Ok(ValidTransaction { priority: Self::get_priority(info), ..Default::default() }) + fn validate_unsigned( + _call: &Self::Call, + info: Self::DispatchInfo, + len: usize, + ) -> TransactionValidity { + Self::do_validate(info, len) } } -- GitLab From dbeebe2cbc87662cc4bdc7e948d14da2cf30e03e Mon Sep 17 00:00:00 2001 From: Stanislav Tkach Date: Thu, 20 Feb 2020 18:03:33 +0200 Subject: [PATCH 015/106] Remove deprecated API (#4993) * Remove deprecated API * Remove (some) allow(dead_code) * Bump spec_version * Fix import, remove allow dead code. Co-authored-by: Shawn Tabrizi --- bin/node/cli/src/service.rs | 4 -- client/block-builder/src/lib.rs | 70 ++++++++++------------------- client/consensus/babe/src/lib.rs | 43 ------------------ frame/babe/src/lib.rs | 1 - frame/babe/src/mock.rs | 6 +-- frame/babe/src/tests.rs | 4 +- frame/grandpa/src/lib.rs | 1 - primitives/block-builder/src/lib.rs | 27 ----------- primitives/blockchain/src/error.rs | 13 ------ 9 files changed, 26 insertions(+), 143 deletions(-) diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs index a882483a44a..79e1f97169e 100644 --- a/bin/node/cli/src/service.rs +++ b/bin/node/cli/src/service.rs @@ -264,9 +264,7 @@ macro_rules! new_full { }} } -#[allow(dead_code)] type ConcreteBlock = node_primitives::Block; -#[allow(dead_code)] type ConcreteClient = Client< Backend, @@ -275,9 +273,7 @@ type ConcreteClient = ConcreteBlock, node_runtime::RuntimeApi >; -#[allow(dead_code)] type ConcreteBackend = Backend; -#[allow(dead_code)] type ConcreteTransactionPool = sc_transaction_pool::BasicPool< sc_transaction_pool::FullChainApi, ConcreteBlock diff --git a/client/block-builder/src/lib.rs b/client/block-builder/src/lib.rs index 26bc9ecea8d..9bc14cb6e9e 100644 --- a/client/block-builder/src/lib.rs +++ b/client/block-builder/src/lib.rs @@ -121,7 +121,7 @@ where backend, }) } - + /// Push onto the block's list of extrinsics. /// /// This will ensure the extrinsic can be validly executed (by executing it). @@ -141,60 +141,36 @@ where let block_id = &self.block_id; let extrinsics = &mut self.extrinsics; - if self + let use_trusted = skip_signature && self .api .has_api_with::>, _>( block_id, - |version| version < 4, - )? - { - // Run compatibility fallback for v3. - self.api.map_api_result(|api| { - #[allow(deprecated)] - match api.apply_extrinsic_before_version_4_with_context( + |version| version >= 5, + )?; + + self.api.map_api_result(|api| { + let apply_result = if use_trusted { + api.apply_trusted_extrinsic_with_context( block_id, ExecutionContext::BlockConstruction, xt.clone(), - )? { - Ok(_) => { - extrinsics.push(xt); - Ok(()) - } - Err(e) => Err(ApplyExtrinsicFailed::from(e).into()), - } - }) - } else { - let use_trusted = skip_signature && self - .api - .has_api_with::>, _>( + )? + } else { + api.apply_extrinsic_with_context( block_id, - |version| version >= 5, - )?; - - self.api.map_api_result(|api| { - let apply_result = if use_trusted { - api.apply_trusted_extrinsic_with_context( - block_id, - ExecutionContext::BlockConstruction, - xt.clone(), - )? - } else { - api.apply_extrinsic_with_context( - block_id, - ExecutionContext::BlockConstruction, - xt.clone(), - )? - }; - - match apply_result { - Ok(_) => { - extrinsics.push(xt); - Ok(()) - } - Err(tx_validity) => Err(ApplyExtrinsicFailed::Validity(tx_validity).into()), + ExecutionContext::BlockConstruction, + xt.clone(), + )? + }; + + match apply_result { + Ok(_) => { + extrinsics.push(xt); + Ok(()) } - }) - } + Err(tx_validity) => Err(ApplyExtrinsicFailed::Validity(tx_validity).into()), + } + }) } /// Consume the builder to build a valid `Block` containing all pushed extrinsics. diff --git a/client/consensus/babe/src/lib.rs b/client/consensus/babe/src/lib.rs index b93619b29c8..e04e112d7d7 100644 --- a/client/consensus/babe/src/lib.rs +++ b/client/consensus/babe/src/lib.rs @@ -693,49 +693,6 @@ impl BabeVerifier { } } -#[allow(dead_code)] -fn median_algorithm( - median_required_blocks: u64, - slot_duration: u64, - slot_number: u64, - slot_now: u64, - time_source: &mut (Option, Vec<(Instant, u64)>), -) { - let num_timestamps = time_source.1.len(); - if num_timestamps as u64 >= median_required_blocks && median_required_blocks > 0 { - let mut new_list: Vec<_> = time_source.1.iter().map(|&(t, sl)| { - let offset: u128 = u128::from(slot_duration) - .checked_mul(1_000_000u128) // self.config.slot_duration returns milliseconds - .and_then(|x| { - x.checked_mul(u128::from(slot_number).saturating_sub(u128::from(sl))) - }) - .expect("we cannot have timespans long enough for this to overflow; qed"); - - const NANOS_PER_SEC: u32 = 1_000_000_000; - let nanos = (offset % u128::from(NANOS_PER_SEC)) as u32; - let secs = (offset / u128::from(NANOS_PER_SEC)) as u64; - - t + Duration::new(secs, nanos) - }).collect(); - - // Use a partial sort to move the median timestamp to the middle of the list - pdqselect::select(&mut new_list, num_timestamps / 2); - - let &median = new_list - .get(num_timestamps / 2) - .expect("we have at least one timestamp, so this is a valid index; qed"); - - let now = Instant::now(); - if now >= median { - time_source.0.replace(now - median); - } - - time_source.1.clear(); - } else { - time_source.1.push((Instant::now(), slot_now)) - } -} - impl Verifier for BabeVerifier where Block: BlockT, B: Backend + 'static, diff --git a/frame/babe/src/lib.rs b/frame/babe/src/lib.rs index aba3a75eb97..4dc9304fa84 100644 --- a/frame/babe/src/lib.rs +++ b/frame/babe/src/lib.rs @@ -248,7 +248,6 @@ impl pallet_session::ShouldEndSession for Module { /// A BABE equivocation offence report. /// /// When a validator released two or more blocks at the same slot. -#[allow(dead_code)] struct BabeEquivocationOffence { /// A babe slot number in which this incident happened. slot: u64, diff --git a/frame/babe/src/mock.rs b/frame/babe/src/mock.rs index efb5570c1db..aef0b4b3860 100644 --- a/frame/babe/src/mock.rs +++ b/frame/babe/src/mock.rs @@ -15,17 +15,15 @@ // along with Substrate. If not, see . //! Test utilities -#![allow(dead_code, unused_imports)] use super::{Trait, Module, GenesisConfig}; -use sp_consensus_babe::AuthorityId; use sp_runtime::{ - traits::IdentityLookup, Perbill, PerThing, testing::{Header, UintAuthorityId}, impl_opaque_keys, + traits::IdentityLookup, Perbill, testing::{Header, UintAuthorityId}, impl_opaque_keys, }; use sp_version::RuntimeVersion; use frame_support::{impl_outer_origin, parameter_types, weights::Weight}; use sp_io; -use sp_core::{H256, Blake2Hasher}; +use sp_core::H256; impl_outer_origin!{ pub enum Origin for Test where system = frame_system {} diff --git a/frame/babe/src/tests.rs b/frame/babe/src/tests.rs index 976a264d7ba..84f8166b104 100644 --- a/frame/babe/src/tests.rs +++ b/frame/babe/src/tests.rs @@ -17,7 +17,7 @@ //! Consensus extension module tests for BABE consensus. use super::*; -use mock::{new_test_ext, Babe, Test}; +use mock::{new_test_ext, Babe, System}; use sp_runtime::{traits::OnFinalize, testing::{Digest, DigestItem}}; use pallet_session::ShouldEndSession; @@ -66,8 +66,6 @@ fn check_module() { }) } -type System = frame_system::Module; - #[test] fn first_block_epoch_zero_start() { new_test_ext(vec![0, 1, 2, 3]).execute_with(|| { diff --git a/frame/grandpa/src/lib.rs b/frame/grandpa/src/lib.rs index 6d3223f0948..3210627f915 100644 --- a/frame/grandpa/src/lib.rs +++ b/frame/grandpa/src/lib.rs @@ -481,7 +481,6 @@ struct GrandpaTimeSlot { // TODO [slashing]: Integrate this. /// A grandpa equivocation offence report. -#[allow(dead_code)] struct GrandpaEquivocationOffence { /// Time slot at which this incident happened. time_slot: GrandpaTimeSlot, diff --git a/primitives/block-builder/src/lib.rs b/primitives/block-builder/src/lib.rs index e4e98e1f40c..71c2a3ccb55 100644 --- a/primitives/block-builder/src/lib.rs +++ b/primitives/block-builder/src/lib.rs @@ -22,37 +22,10 @@ use sp_runtime::{traits::Block as BlockT, ApplyExtrinsicResult}; use sp_inherents::{InherentData, CheckInherentsResult}; -/// Definitions for supporting the older version of API: v3 -/// -/// These definitions are taken from the 2c58e30246a029b53d51e5b24c31974ac539ee8b git revision. -#[deprecated(note = "These definitions here are only for compatibility reasons")] -pub mod compatibility_v3 { - use sp_runtime::{DispatchOutcome, transaction_validity}; - use codec::{Encode, Decode}; - - #[derive(Eq, PartialEq, Clone, Copy, Decode, Encode, Debug)] - pub enum ApplyError { - NoPermission, - BadState, - Validity(transaction_validity::TransactionValidityError), - } - - // `ApplyOutcome` was renamed to `DispatchOutcome` with the layout preserved. - pub type ApplyResult = Result; -} - sp_api::decl_runtime_apis! { /// The `BlockBuilder` api trait that provides the required functionality for building a block. #[api_version(5)] pub trait BlockBuilder { - /// Compatibility version of `apply_extrinsic` for v3. - /// - /// Only the return type is changed. - #[changed_in(4)] - #[allow(deprecated)] - fn apply_extrinsic(extrinsic: ::Extrinsic) - -> self::compatibility_v3::ApplyResult; - /// Apply the given extrinsic. /// /// Returns an inclusion outcome which specifies if this extrinsic is included in diff --git a/primitives/blockchain/src/error.rs b/primitives/blockchain/src/error.rs index ece20d1cf85..a4ec9c29952 100644 --- a/primitives/blockchain/src/error.rs +++ b/primitives/blockchain/src/error.rs @@ -19,8 +19,6 @@ use std::{self, error, result}; use sp_state_machine; use sp_runtime::transaction_validity::TransactionValidityError; -#[allow(deprecated)] -use sp_block_builder::compatibility_v3; use sp_consensus; use derive_more::{Display, From}; use codec::Error as CodecError; @@ -150,17 +148,6 @@ impl<'a> From<&'a str> for Error { } } -#[allow(deprecated)] -impl From for ApplyExtrinsicFailed { - fn from(e: compatibility_v3::ApplyError) -> Self { - use self::compatibility_v3::ApplyError::*; - match e { - Validity(tx_validity) => Self::Validity(tx_validity), - e => Self::Msg(format!("Apply extrinsic failed: {:?}", e)), - } - } -} - impl Error { /// Chain a blockchain error. pub fn from_blockchain(e: Box) -> Self { -- GitLab From 5135844eb77eb5dd76948a535146c0ad1df6bd0f Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 20 Feb 2020 17:20:16 +0100 Subject: [PATCH 016/106] Benchmark macro (#4962) * MAcro benchamrks * Iterative macro * Tidying it up. * Macro improvements * Bits.. * Last benchmaks. * Repo benchmark macro * Add the possibility of evaluating arbitrary expressions in a benchmaark * Better syntax and docs * Update `BenchmarkParameter` * Add `ignore` to sudo-code in docs * First try of timestamp implementation. * Fix macro docs, remove warnings. * Use macro in balances pallet. * Make some space in frame benchmarking. * Remove _benchmarks_seed variable. * Bump impl_version. Co-authored-by: Shawn Tabrizi Co-authored-by: Marcio Diaz --- Cargo.lock | 8851 +++++++++++++-------------- bin/node/runtime/src/lib.rs | 2 +- frame/balances/src/benchmarking.rs | 340 +- frame/benchmarking/Cargo.toml | 1 + frame/benchmarking/src/lib.rs | 434 +- frame/benchmarking/src/utils.rs | 97 + frame/identity/src/benchmarking.rs | 530 +- frame/identity/src/lib.rs | 20 +- frame/timestamp/src/benchmarking.rs | 87 +- 9 files changed, 5097 insertions(+), 5265 deletions(-) create mode 100644 frame/benchmarking/src/utils.rs diff --git a/Cargo.lock b/Cargo.lock index 97e56ffae21..c17bd30b0b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,6980 +4,7428 @@ name = "Inflector" version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "regex", ] [[package]] name = "adler32" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" [[package]] name = "aes-ctr" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2e5b0458ea3beae0d1d8c0f3946564f8e10f90646cf78c06b4351052058d1ee" dependencies = [ - "aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "aes-soft", + "aesni", + "ctr", + "stream-cipher", ] [[package]] name = "aes-soft" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d" dependencies = [ - "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "block-cipher-trait", + "byteorder 1.3.4", + "opaque-debug", ] [[package]] name = "aesni" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100" dependencies = [ - "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "block-cipher-trait", + "opaque-debug", + "stream-cipher", ] [[package]] name = "ahash" version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f33b5018f120946c1dcf279194f238a9f146725593ead1c08fa47ff22b0b5d3" dependencies = [ - "const-random 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "const-random", ] [[package]] name = "aho-corasick" version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743ad5a418686aad3b87fd14c43badd828cf26e214a00f92a384291cf22e1811" dependencies = [ - "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8", ] [[package]] name = "anyhow" version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" [[package]] name = "app_dirs" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" dependencies = [ - "ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ole32-sys", + "shell32-sys", + "winapi 0.2.8", + "xdg", ] [[package]] name = "arc-swap" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7b8a9123b8027467bce0099fe556c628a53c8d83df0507084c31e9ba2e39aff" [[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 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "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.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2", + "syn", ] [[package]] name = "assert_cmd" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6283bac8dd7226470d491bc4737816fea4ca1fba7a2847f2e9097fd6bfb4624c" dependencies = [ - "doc-comment 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "escargot 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "doc-comment", + "escargot", + "predicates", + "predicates-core", + "predicates-tree", ] [[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" -dependencies = [ - "async-task 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "broadcaster 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "kv-log-macro 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "once_cell 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (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 0.4.8", + "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 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "winapi 0.3.8", ] [[package]] name = "async-tls" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce6977f57fa68da77ffe5542950d47e9c23d65f5bc7cb0a9f8700996913eec7" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki-roots 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "rustls", + "webpki", + "webpki-roots 0.17.0", ] [[package]] name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "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 = "backtrace" version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4036b9bf40f3cf16aba72a3d65e8a520fc4bafcdc7079aea8f848c58c5b5536" dependencies = [ - "backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys", + "cfg-if", + "libc", + "rustc-demangle", ] [[package]] name = "backtrace-sys" version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" dependencies = [ - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "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.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "safemem", ] [[package]] name = "base64" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", ] [[package]] name = "base64" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" [[package]] name = "bincode" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5753e2a71534719bf3f4e57006c3a4f0d2c672a4b676eec84161f763eca87dbf" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "serde", ] [[package]] name = "bindgen" version = "0.49.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c07087f3d5731bf3fb375a81841b99597e25dc11bd3bc72d16d43adf6624a6e" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cexpr 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "clang-sys 0.28.1 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "cexpr", + "cfg-if", + "clang-sys", + "clap", + "env_logger 0.6.2", + "fxhash", + "lazy_static", + "log 0.4.8", + "peeking_take_while", + "proc-macro2 0.4.30", + "quote 0.6.13", + "regex", + "shlex", + "which 2.0.1", ] [[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.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993f74b4c99c1908d156b8d2e0fb6277736b0ecbd833982fd1241d39b2766a6" [[package]] name = "blake2" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330" dependencies = [ - "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "block-padding", + "byte-tools", + "byteorder 1.3.4", + "generic-array", ] [[package]] name = "block-cipher-trait" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" dependencies = [ - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-tools", ] [[package]] name = "broadcaster" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c972e21e0d055a36cf73e4daae870941fe7a8abcd5ac3396aab9e4c126bd87" dependencies = [ - "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel", + "futures-core", + "futures-sink", + "futures-util", + "parking_lot 0.10.0", + "slab", ] [[package]] name = "browser-utils" version = "0.8.0" dependencies = [ - "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb-web 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-chain-spec 2.0.0", - "sc-informant 0.8.0", - "sc-network 0.8.0", - "sc-service 0.8.0", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono", + "clear_on_drop", + "console_error_panic_hook", + "console_log", + "futures 0.1.29", + "futures 0.3.4", + "futures-timer 3.0.2", + "js-sys", + "kvdb-web", + "libp2p", + "log 0.4.8", + "rand 0.6.5", + "rand 0.7.3", + "sc-chain-spec", + "sc-informant", + "sc-network", + "sc-service", + "wasm-bindgen", + "wasm-bindgen-futures", ] [[package]] name = "bs58" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c95ee6bba9d950218b6cc910cf62bc9e0a171d0f4537e3627b0f54d08549b188" [[package]] name = "bs58" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b170cd256a3f9fa6b9edae3e44a7dfdfc77e8124dbc3e2612d75f9c3e2396dae" [[package]] name = "bstr" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "502ae1441a0a5adb8fbd38a5955a6416b9493e92b465de5e4a9bde6a539c2c48" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "memchr", + "regex-automata", + "serde", ] [[package]] name = "build-helper" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdce191bf3fa4995ce948c8c83b4640a1745457a149e73c6db75b4ffe36aad5f" dependencies = [ - "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.6.0", ] [[package]] name = "bumpalo" version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f359dc14ff8911330a51ef78022d376f25ed00248912803b58f00cb1c27f742" [[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 = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" [[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 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "either", + "iovec", ] [[package]] name = "bytes" version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" [[package]] name = "c2-chacha" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" dependencies = [ - "ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "ppv-lite86", ] [[package]] name = "c_linked_list" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" [[package]] name = "cargo_metadata" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46e3374c604fb39d1a2f35ed5e4a4e30e60d01fab49446e08f1b3e9a90aef202" dependencies = [ - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.9.0", + "serde", + "serde_derive", + "serde_json", ] [[package]] name = "cast" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0" dependencies = [ - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version", ] [[package]] name = "cc" version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" dependencies = [ - "jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "jobserver", ] [[package]] name = "cexpr" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fce5b5fb86b0c57c20c834c1b412fd09c77c8a59b9473f86272709e78874cd1d" dependencies = [ - "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "constant_time_eq", ] [[package]] name = "chain-spec-builder" version = "2.0.0" dependencies = [ - "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", - "node-cli 2.0.0", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-keystore 2.0.0", - "sp-core 2.0.0", - "structopt 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term 0.12.1", + "node-cli", + "rand 0.7.3", + "sc-keystore", + "sp-core", + "structopt", ] [[package]] name = "chrono" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01" dependencies = [ - "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys", + "num-integer", + "num-traits", + "time", + "wasm-bindgen", ] [[package]] name = "clang-sys" version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81de550971c976f176130da4b2978d3b524eaa0fd9ac31f3ceb5ae1231fb4853" dependencies = [ - "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "glob 0.3.0", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "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 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", ] [[package]] name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", ] [[package]] name = "cmake" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fb25b677f8bf1eb325017cb6bb8452f87969db0fedb4f757b297bee78a7c62" dependencies = [ - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", ] [[package]] name = "console_error_panic_hook" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8d976903543e0c48546a91908f21588a680a8c8f984df9a5d69feccb2b2a211" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "wasm-bindgen", ] [[package]] name = "console_log" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7871d2947441b0fdd8e2bd1ce2a2f75304f896582c0d572162d48290683c48" dependencies = [ - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8", + "web-sys", ] [[package]] name = "const-random" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f1af9ac737b2dd2d577701e59fd09ba34822f6f2ebdb30a7647405d9e55e16a" dependencies = [ - "const-random-macro 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", + "proc-macro-hack", ] [[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.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" dependencies = [ - "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys", + "libc", ] [[package]] name = "core-foundation-sys" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" [[package]] name = "cranelift-bforest" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd0f53d59dc9ab1c8ab68c991d8406b52b7a0aab0b15b05a3a6895579c4e5dd9" dependencies = [ - "cranelift-entity 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-entity", ] [[package]] name = "cranelift-codegen" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0381a794836fb994c47006465d46d46be072483b667f36013d993b9895117fee" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-bforest 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-codegen-meta 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-codegen-shared 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-entity 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gimli 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "cranelift-bforest", + "cranelift-codegen-meta", + "cranelift-codegen-shared", + "cranelift-entity", + "gimli 0.20.0", + "log 0.4.8", + "serde", + "smallvec 1.2.0", + "target-lexicon", + "thiserror", ] [[package]] name = "cranelift-codegen-meta" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "208c3c8d82bfef32a534c5020c6cfc3bc92f41388f1246b7bb98cf543331abaa" dependencies = [ - "cranelift-codegen-shared 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-entity 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-codegen-shared", + "cranelift-entity", ] [[package]] name = "cranelift-codegen-shared" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea048c456a517e56fd6df8f0e3947922897e6e6f61fbc5eb557a36c7b8ff6394" [[package]] name = "cranelift-entity" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c8c7ed50812194c9e9de1fa39c77b39fc9ab48173d5e7ee88b25b6a8953e9b8" dependencies = [ - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", ] [[package]] name = "cranelift-frontend" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21ceb931d9f919731df1b1ecdc716b5c66384b413a7f95909d1f45441ab9bef5" dependencies = [ - "cranelift-codegen 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-codegen", + "log 0.4.8", + "smallvec 1.2.0", + "target-lexicon", ] [[package]] name = "cranelift-native" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "564ee82268bc25b914fcf331edfc2452f2d9ca34f976b187b4ca668beba250c8" dependencies = [ - "cranelift-codegen 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "raw-cpuid 7.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-codegen", + "raw-cpuid", + "target-lexicon", ] [[package]] name = "cranelift-wasm" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de63e2271b374be5b07f359184e2126a08fb24d24a740cbc178b7e0107ddafa5" dependencies = [ - "cranelift-codegen 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-entity 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-frontend 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmparser 0.48.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-codegen", + "cranelift-entity", + "cranelift-frontend", + "log 0.4.8", + "serde", + "thiserror", + "wasmparser 0.48.2", ] [[package]] name = "crc32fast" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", ] [[package]] name = "criterion" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "criterion-plot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "csv 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "tinytemplate 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +checksum = "0363053954f3e679645fc443321ca128b7b950a6fe288cf5f9335cc22ee58394" +dependencies = [ + "atty", + "cast", + "clap", + "criterion-plot 0.3.1", + "csv", + "itertools", + "lazy_static", + "libc", + "num-traits", + "rand_core 0.3.1", + "rand_os", + "rand_xoshiro", + "rayon", + "rayon-core", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", ] [[package]] name = "criterion" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc755679c12bda8e5523a71e4d654b6bf2e14bd838dfc48cde6559a05caf7d1" dependencies = [ - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "criterion-plot 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "csv 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "oorandom 11.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "plotters 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "tinytemplate 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "atty", + "cast", + "clap", + "criterion-plot 0.4.1", + "csv", + "itertools", + "lazy_static", + "num-traits", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", ] [[package]] name = "criterion-plot" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f9212ddf2f4a9eb2d401635190600656a1f88a932ef53d06e7fa4c7e02fb8e" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "cast", + "itertools", ] [[package]] name = "criterion-plot" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01e15e0ea58e8234f96146b1f91fa9d0e4dd7a38da93ff7a75d42c0b9d3a545" dependencies = [ - "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cast", + "itertools", ] [[package]] name = "crossbeam-channel" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acec9a3b0b3559f15aee4f90746c4e5e293b701c0f7d3925d24e01645267b68c" dependencies = [ - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils", ] [[package]] name = "crossbeam-deque" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca" dependencies = [ - "crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-epoch", + "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7", + "cfg-if", + "crossbeam-utils", + "lazy_static", + "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 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "crossbeam-utils", ] [[package]] name = "crossbeam-utils" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7", + "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 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array", + "subtle 1.0.0", ] [[package]] name = "csv" version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279" dependencies = [ - "bstr 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "csv-core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "bstr", + "csv-core", + "itoa", + "ryu", + "serde", ] [[package]] name = "csv-core" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" dependencies = [ - "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", ] [[package]] name = "ct-logs" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113" dependencies = [ - "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sct", ] [[package]] name = "ctor" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd8ce37ad4184ab2ce004c33bf6379185d3b1c95801cab51026bd271bf68eedc" dependencies = [ - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2", + "syn", ] [[package]] name = "ctr" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "022cd691704491df67d25d006fe8eca083098253c4d43516c2206479c58c6736" dependencies = [ - "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "block-cipher-trait", + "stream-cipher", ] [[package]] name = "cuckoofilter" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" dependencies = [ - "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 0.5.3", + "rand 0.3.23", ] [[package]] name = "curve25519-dalek" version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b7dcd30ba50cdf88b55b033456138b7c0ac4afdc436d82e1b79f370f24cc66d" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "clear_on_drop", + "digest", + "rand_core 0.3.1", + "subtle 2.2.2", ] [[package]] name = "curve25519-dalek" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26778518a7f6cffa1d25a44b602b62b979bd88adb9e99ffec546998cf3404839" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "digest", + "rand_core 0.5.1", + "subtle 2.2.2", + "zeroize 1.1.0", ] [[package]] name = "data-encoding" version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" [[package]] name = "derive_more" version = "0.99.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a806e96c59a76a5ba6e18735b6cf833344671e61e7863f2edb5c518ea2cac95c" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "difference" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" [[package]] name = "digest" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array", ] [[package]] name = "directories" version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "551a778172a450d7fc12e629ca3b0428d00f6afa9a43da1b630d54604e97371c" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "dirs-sys", ] [[package]] name = "dirs-sys" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "redox_users", + "winapi 0.3.8", ] [[package]] name = "dns-parser" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "quick-error", ] [[package]] name = "doc-comment" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "923dea538cea0aa3025e8685b20d6ee21ef99c4f77e954a30febbaac5ec73a97" [[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 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "clear_on_drop", + "curve25519-dalek 2.0.0", + "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 = "enumflags2" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33121c8782ba948ba332dab29311b026a8716dc65a1599e5b88f392d38496af8" dependencies = [ - "enumflags2_derive 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "enumflags2_derive", ] [[package]] name = "enumflags2_derive" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecf634c5213044b8d54a46dd282cf5dd1f86bb5cb53e92c409cb4680a7fb9894" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "env_logger" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" dependencies = [ - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty", + "humantime", + "log 0.4.8", + "regex", + "termcolor", ] [[package]] name = "env_logger" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" dependencies = [ - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty", + "humantime", + "log 0.4.8", + "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.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7d80305c9bd8cd78e3c753eb9fb110f83621e5211f1a3afffcc812b104daf9" dependencies = [ - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", ] [[package]] name = "errno" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e" dependencies = [ - "errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "errno-dragonfly", + "libc", + "winapi 0.3.8", ] [[package]] name = "errno-dragonfly" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" dependencies = [ - "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc", + "libc", ] [[package]] name = "escargot" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74cf96bec282dcdb07099f7e31d9fed323bca9435a09aba7b6d99b7617bca96d" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "log 0.4.8", + "serde", + "serde_json", ] [[package]] name = "evm" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "272f65e18a2b6449b682bfcdf6c3ccc63db0b93898d89c0fb237548bbfc764a5" dependencies = [ - "evm-core 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "evm-gasometer 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "evm-runtime 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rlp 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "evm-core", + "evm-gasometer", + "evm-runtime", + "primitive-types", + "rlp", + "serde", + "sha3", ] [[package]] name = "evm-core" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66534d42e13d50f9101bed87cb568fd5aa929c600c3c13f8dadbbf39f5635945" dependencies = [ - "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types", ] [[package]] name = "evm-gasometer" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39bc5b592803ca644781fe2290b7305ea5182f7c9516d615ddfb2308c2cab639" dependencies = [ - "evm-core 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "evm-runtime 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "evm-core", + "evm-runtime", + "primitive-types", ] [[package]] name = "evm-runtime" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389e4b447fb26971a9c76c8aa49c0ab435f8e46e8fc46e1bc4ebf01f3c2b428f" dependencies = [ - "evm-core 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "evm-core", + "primitive-types", + "sha3", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", ] [[package]] name = "faerie" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74b9ed6159e4a6212c61d9c6a86bee01876b192a64accecf58d5b5ae3b667b52" dependencies = [ - "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "goblin 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "string-interner 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow", + "goblin", + "indexmap", + "log 0.4.8", + "scroll", + "string-interner", + "target-lexicon", + "thiserror", ] [[package]] name = "failure" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" dependencies = [ - "backtrace 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace", + "failure_derive", ] [[package]] name = "failure_derive" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", + "synstructure", ] [[package]] name = "fake-simd" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fdlimit" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9084c55bb76efb1496328976db88320fe7d9ee86e649e83c4ecce3ba7a9a35d1" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "file-per-thread-logger" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8505b75b31ef7285168dd237c4a7db3c1f3e0927e7d314e670bc98e854272fe9" dependencies = [ - "env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.2", + "log 0.4.8", ] [[package]] name = "finality-grandpa" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cbb25bef9fcad97fb31e817da280b1c9174435b8769c770ee190a330dd181ea" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "futures-timer 2.0.2", + "log 0.4.8", + "num-traits", + "parity-scale-codec", + "parking_lot 0.9.0", + "rand 0.6.5", ] [[package]] name = "fixed-hash" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3367952ceb191f4ab95dd5685dc163ac539e36202f9fcfd0cb22f9f9c542fefc" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "libc", + "rand 0.7.3", + "rustc-hex", + "static_assertions", ] [[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.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "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 = "foreign-types" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "foreign-types-shared", ] [[package]] name = "foreign-types-shared" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "2.0.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec", ] [[package]] name = "frame-benchmarking" version = "2.0.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-runtime-interface 2.0.0", - "sp-std 2.0.0", + "parity-scale-codec", + "sp-api", + "sp-io", + "sp-runtime-interface", + "sp-std", ] [[package]] name = "frame-benchmarking-cli" version = "2.0.0" dependencies = [ - "frame-benchmarking 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-cli 0.8.0", - "sc-client 0.8.0", - "sc-client-db 0.8.0", - "sc-executor 0.8.0", - "sc-service 0.8.0", - "sp-runtime 2.0.0", - "structopt 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-benchmarking", + "parity-scale-codec", + "sc-cli", + "sc-client", + "sc-client-db", + "sc-executor", + "sc-service", + "sp-runtime", + "structopt", ] [[package]] name = "frame-executive" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pallet-balances 2.0.0", - "pallet-indices 2.0.0", - "pallet-transaction-payment 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "hex-literal", + "pallet-balances", + "pallet-indices", + "pallet-transaction-payment", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "frame-metadata" version = "11.0.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-std 2.0.0", + "parity-scale-codec", + "serde", + "sp-core", + "sp-std", ] [[package]] name = "frame-support" version = "2.0.0" dependencies = [ - "bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "frame-metadata 11.0.0", - "frame-support-procedural 2.0.0", - "frame-system 2.0.0", - "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "once_cell 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-arithmetic 2.0.0", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-state-machine 0.8.0", - "sp-std 2.0.0", - "tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bitmask", + "frame-metadata", + "frame-support-procedural", + "frame-system", + "impl-trait-for-tuples", + "log 0.4.8", + "once_cell", + "parity-scale-codec", + "paste", + "pretty_assertions", + "serde", + "sp-arithmetic", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-std", + "tracing", ] [[package]] name = "frame-support-procedural" version = "2.0.0" dependencies = [ - "frame-support-procedural-tools 2.0.0", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-support-procedural-tools", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "frame-support-procedural-tools" version = "2.0.0" dependencies = [ - "frame-support-procedural-tools-derive 2.0.0", - "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-support-procedural-tools-derive", + "proc-macro-crate", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "frame-support-procedural-tools-derive" version = "2.0.0" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "frame-support-test" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-state-machine 0.8.0", - "trybuild 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-support", + "parity-scale-codec", + "pretty_assertions", + "serde", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-state-machine", + "trybuild", ] [[package]] name = "frame-system" version = "2.0.0" dependencies = [ - "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "frame-support 2.0.0", - "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-externalities 0.8.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", - "sp-version 2.0.0", - "substrate-test-runtime-client 2.0.0", + "criterion 0.2.11", + "frame-support", + "impl-trait-for-tuples", + "parity-scale-codec", + "serde", + "sp-core", + "sp-externalities", + "sp-io", + "sp-runtime", + "sp-std", + "sp-version", + "substrate-test-runtime-client", ] [[package]] name = "frame-system-rpc-runtime-api" version = "2.0.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", + "parity-scale-codec", + "sp-api", ] [[package]] name = "fs-swap" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "921d332c89b3b61a826de38c61ee5b6e02c56806cade1b0e5d81bd71f57a71bb" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "libc", + "libloading", + "winapi 0.3.8", ] [[package]] name = "fs2" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "winapi 0.3.8", ] [[package]] name = "fs_extra" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f2a4a2034423744d2cc7ca2068453168dcdb82c438419e639a26bd87839c674" [[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 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-executor 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29", + "futures 0.3.4", + "lazy_static", + "log 0.4.8", + "parking_lot 0.9.0", + "pin-project", + "serde", + "serde_json", ] [[package]] name = "futures-executor" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f674f3e1bcb15b37284a90cedf55afdba482ab061c407a9c0ebbd0f3109741ba" dependencies = [ - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[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" dependencies = [ - "gloo-timers 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "send_wrapper 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gloo-timers", + "send_wrapper 0.4.0", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "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", + "tokio-io", ] [[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 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "futures 0.3.4", + "memchr", + "pin-project", ] [[package]] name = "fxhash" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", ] [[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 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum", ] [[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 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc", + "libc", ] [[package]] name = "getrandom" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "wasi", + "wasm-bindgen", ] [[package]] name = "gimli" version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162d18ae5f2e3b90a993d202f1ba17a5633c2484426f8bcae201f86194bacd00" dependencies = [ - "arrayvec 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.12", + "byteorder 1.3.4", + "fallible-iterator", + "indexmap", + "stable_deref_trait", ] [[package]] name = "gimli" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81dd6190aad0f05ddbbf3245c54ed14ca4aa6dd32f22312b70d8f168c3e3e633" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "indexmap", ] [[package]] name = "glob" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" [[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.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925aa2cac82d8834e2b2a4415b6f6879757fb5c0928fc445ae76461a12eed8f2" dependencies = [ - "aho-corasick 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", - "bstr 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick", + "bstr", + "fnv", + "log 0.4.8", + "regex", ] [[package]] name = "gloo-timers" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b2d17dbd803c2fc86cb1b613adf63192046a7176f383a8302594654752c4c4a" dependencies = [ - "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", + "web-sys", ] [[package]] name = "goblin" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3081214398d39e4bd7f2c1975f0488ed04614ffdd976c6fc7a0708278552c0da" dependencies = [ - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8", + "plain", + "scroll", ] [[package]] name = "h2" version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "bytes 0.4.12", + "fnv", + "futures 0.1.29", + "http 0.1.21", + "indexmap", + "log 0.4.8", + "slab", + "string", + "tokio-io", ] [[package]] name = "h2" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.0", + "indexmap", + "log 0.4.8", + "slab", + "tokio 0.2.11", + "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 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crunchy", ] [[package]] name = "hashbrown" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1de41fb8dba9714efd92241565cdff73f78508c95697dd56787d3cba27e2353" [[package]] name = "hashbrown" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" dependencies = [ - "ahash 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "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 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-segmentation", ] [[package]] name = "hermit-abi" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2c55f143919fbc0bc77e427fe2d74cf23786d7c1875666f2fde3ac3c659bb67" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12", + "fnv", + "itoa", ] [[package]] name = "http" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "http 0.2.0", ] [[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 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error", ] [[package]] name = "hyper" version = "0.10.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" dependencies = [ - "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.9.3", + "httparse", + "language-tags", + "log 0.3.9", + "mime", + "num_cpus", + "time", + "traitobject", + "typeable", + "unicase 1.4.2", + "url 1.7.2", ] [[package]] name = "hyper" version = "0.12.35" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "want 0.2.0 (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 0.4.8", + "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.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa1c527bbc634be72aa7ba31e4e4def9bbb020f5416916279b7c705cd838893e" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.2.1", + "http 0.2.0", + "http-body 0.3.1", + "httparse", + "itoa", + "log 0.4.8", + "net2", + "pin-project", + "time", + "tokio 0.2.11", + "tower-service", + "want 0.3.0", ] [[package]] name = "hyper-rustls" version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ea6215c7314d450ee45970ab8b3851ab447a0e6bafdd19e31b20a42dbb7faf" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ct-logs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls-native-certs 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-rustls 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "ct-logs", + "futures-util", + "hyper 0.13.2", + "rustls", + "rustls-native-certs", + "tokio 0.2.11", + "tokio-rustls", + "webpki", ] [[package]] name = "hyper-tls" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12", + "futures 0.1.29", + "hyper 0.12.35", + "native-tls", + "tokio-io", ] [[package]] name = "idna" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "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 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rlp", ] [[package]] name = "impl-serde" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58e3cae7e99c7ff5a995da2cf78dd0a5383740eda71d98cf7b1910c301ac69b8" dependencies = [ - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", ] [[package]] name = "impl-serde" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bbe9ea9b182f0fb1cabbd61f4ff9b7b7b9197955e95a7e4c27de5055eb29ff8" dependencies = [ - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "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.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "indexmap" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "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 = "iovec" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "ipnet" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a859057dc563d1388c1e816f98a1892629075fc046ed06e845b883bb8b2916fb" [[package]] name = "itertools" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" dependencies = [ - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "js-sys" version = "0.3.35" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9" dependencies = [ - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen", ] [[package]] name = "jsonrpc-client-transports" version = "14.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a9ae166c4d1f702d297cd76d4b55758ace80272ffc6dbb139fdc1bf810de40b" dependencies = [ - "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "websocket 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)", + "failure", + "futures 0.1.29", + "hyper 0.12.35", + "hyper-tls", + "jsonrpc-core", + "jsonrpc-pubsub", + "log 0.4.8", + "serde", + "serde_json", + "tokio 0.1.22", + "url 1.7.2", + "websocket", ] [[package]] name = "jsonrpc-core" version = "14.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe3b688648f1ef5d5072229e2d672ecb92cbff7d1c79bcf3fd5898f3f3df0970" dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29", + "log 0.4.8", + "serde", + "serde_derive", + "serde_json", ] [[package]] name = "jsonrpc-core-client" version = "14.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "080dc110be17701097df238fad3c816d4a478a1899dfbcf8ec8957dd40ec7304" dependencies = [ - "jsonrpc-client-transports 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-crate", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "jsonrpc-http-server" version = "14.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816d63997ea45d3634608edbef83ddb35e661f7c0b27b5b72f237e321f0e9807" dependencies = [ - "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-server-utils 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.35", + "jsonrpc-core", + "jsonrpc-server-utils", + "log 0.4.8", + "net2", + "parking_lot 0.10.0", + "unicase 2.6.0", ] [[package]] name = "jsonrpc-pubsub" version = "14.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b31c9b90731276fdd24d896f31bb10aecf2e5151733364ae81123186643d939" dependencies = [ - "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core", + "log 0.4.8", + "parking_lot 0.10.0", + "serde", ] [[package]] name = "jsonrpc-server-utils" version = "14.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95b7635e618a0edbbe0d2a2bbbc69874277c49383fcf6c3c0414491cfb517d22" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12", + "globset", + "jsonrpc-core", + "lazy_static", + "log 0.4.8", + "tokio 0.1.22", + "tokio-codec", + "unicase 2.6.0", ] [[package]] name = "jsonrpc-ws-server" version = "14.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94e5773b2ae66e0e02c80775ce6bbba6f15d5bb47c14ec36a36fcf94f8df851" dependencies = [ - "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-server-utils 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "ws 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core", + "jsonrpc-server-utils", + "log 0.4.8", + "parking_lot 0.10.0", + "slab", + "ws", ] [[package]] name = "keccak" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] name = "keccak-hasher" version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3468207deea1359a0e921591ae9b4c928733d94eb9d6a2eeda994cfd59f42cf8" dependencies = [ - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hash256-std-hasher 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db", + "hash256-std-hasher", + "tiny-keccak 1.5.0", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8", + "winapi-build", ] [[package]] name = "kv-log-macro" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c54d9f465d530a752e6ebdc217e081a7a614b48cb200f6f0aee21ba6bc9aabb" dependencies = [ - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8", ] [[package]] name = "kvdb" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03080afe6f42cd996da9f568d6add5d7fb5ee2ea7fb7802d2d2cbd836958fd87" dependencies = [ - "parity-bytes 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-bytes", + "parity-util-mem", + "smallvec 1.2.0", ] [[package]] name = "kvdb-memorydb" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9355274e5a9e0a7e8ef43916950eae3949024de2a8dffe4d5a6c13974a37c8e" dependencies = [ - "kvdb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb", + "parity-util-mem", + "parking_lot 0.10.0", ] [[package]] name = "kvdb-rocksdb" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af36fd66ccd99f3f771ae39b75aaba28b952372b6debfb971134bf1f03466ab2" dependencies = [ - "fs-swap 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "interleaved-ordered 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rocksdb 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fs-swap", + "interleaved-ordered", + "kvdb", + "log 0.4.8", + "num_cpus", + "owning_ref", + "parity-util-mem", + "parking_lot 0.10.0", + "regex", + "rocksdb", + "smallvec 1.2.0", ] [[package]] name = "kvdb-web" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a985c47b4c46429e96033ebf6eaed784a81ceccb4e5df13d63f3b9078a4df81" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb-memorydb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "send_wrapper 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "js-sys", + "kvdb", + "kvdb-memorydb", + "log 0.4.8", + "parity-util-mem", + "send_wrapper 0.3.0", + "wasm-bindgen", + "web-sys", ] [[package]] name = "language-tags" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" [[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 = "leb128" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" version = "0.2.66" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" [[package]] name = "libloading" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" dependencies = [ - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "winapi 0.3.8", ] [[package]] name = "libp2p" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core-derive 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-deflate 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-dns 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-floodsub 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-gossipsub 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-identify 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-kad 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-mdns 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-mplex 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-noise 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-ping 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-plaintext 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-pnet 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-secio 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-swarm 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-tcp 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-uds 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-wasm-ext 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-websocket 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-yamux 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multihash 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", +checksum = "f6bf152b510950e1030f2d3dcca5f0b4017892be50348a15fd3eec8b90c826fb" +dependencies = [ + "bytes 0.5.4", + "futures 0.3.4", + "lazy_static", + "libp2p-core", + "libp2p-core-derive", + "libp2p-deflate", + "libp2p-dns", + "libp2p-floodsub", + "libp2p-gossipsub", + "libp2p-identify", + "libp2p-kad", + "libp2p-mdns", + "libp2p-mplex", + "libp2p-noise", + "libp2p-ping", + "libp2p-plaintext", + "libp2p-pnet", + "libp2p-secio", + "libp2p-swarm", + "libp2p-tcp", + "libp2p-uds", + "libp2p-wasm-ext", + "libp2p-websocket", + "libp2p-yamux", + "parity-multiaddr 0.7.2", + "parity-multihash 0.2.3", + "parking_lot 0.10.0", + "pin-project", + "smallvec 1.2.0", + "wasm-timer", ] [[package]] name = "libp2p-core" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "asn1_der 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "bs58 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ed25519-dalek 1.0.0-pre.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "multistream-select 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multihash 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +checksum = "3b874594c4b29de1a29f27871feba8e6cd13aa54a8a1e8f8c7cf3dfac5ca287c" +dependencies = [ + "asn1_der", + "bs58 0.3.0", + "ed25519-dalek", + "fnv", + "futures 0.3.4", + "futures-timer 3.0.2", + "lazy_static", + "libsecp256k1", + "log 0.4.8", + "multistream-select", + "parity-multiaddr 0.7.2", + "parity-multihash 0.2.3", + "parking_lot 0.10.0", + "pin-project", + "prost", + "prost-build", + "rand 0.7.3", + "ring", + "rw-stream-sink", + "sha2", + "smallvec 1.2.0", + "thiserror", + "unsigned-varint 0.3.1", + "void", + "zeroize 1.1.0", ] [[package]] name = "libp2p-core-derive" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d472e9d522f588805c77801de10b957be84e10f019ca5f869fa1825b15ea9b" dependencies = [ - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2", + "syn", ] [[package]] name = "libp2p-deflate" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e25004d4d9837b44b22c5f1a69be1724a5168fef6cff1716b5176a972c3aa62" dependencies = [ - "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2", + "futures 0.3.4", + "libp2p-core", ] [[package]] name = "libp2p-dns" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99e552f9939b606eb4b59f7f64d9b01e3f96752f47e350fc3c5fc646ed3f649" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "libp2p-core", + "log 0.4.8", ] [[package]] name = "libp2p-floodsub" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d3234f12e44f9a50351a9807b97fe7de11eb9ae4482370392ba10da6dc90722" dependencies = [ - "cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-swarm 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cuckoofilter", + "fnv", + "futures 0.3.4", + "libp2p-core", + "libp2p-swarm", + "prost", + "prost-build", + "rand 0.7.3", + "smallvec 1.2.0", ] [[package]] name = "libp2p-gossipsub" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d46cb3e0841bd951cbf4feae56cdc081e6347836a644fb260c3ec554149b4006" dependencies = [ - "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures_codec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-swarm 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lru 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.11.0", + "byteorder 1.3.4", + "bytes 0.5.4", + "fnv", + "futures 0.3.4", + "futures_codec", + "libp2p-core", + "libp2p-swarm", + "log 0.4.8", + "lru 0.4.3", + "prost", + "prost-build", + "rand 0.7.3", + "sha2", + "smallvec 1.2.0", + "unsigned-varint 0.3.1", + "wasm-timer", ] [[package]] name = "libp2p-identify" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfeb935a9bd41263e4f3a24b988e9f4a044f3ae89ac284e83c17fe2f84e0d66b" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-swarm 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "libp2p-core", + "libp2p-swarm", + "log 0.4.8", + "prost", + "prost-build", + "smallvec 1.2.0", + "wasm-timer", ] [[package]] name = "libp2p-kad" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures_codec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-swarm 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multihash 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uint 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", +checksum = "76c260a92309112fff855ab2bd8f26c246c1dd380b87021abe61358dedb9748d" +dependencies = [ + "arrayvec 0.5.1", + "bytes 0.5.4", + "either", + "fnv", + "futures 0.3.4", + "futures_codec", + "libp2p-core", + "libp2p-swarm", + "log 0.4.8", + "parity-multihash 0.2.3", + "prost", + "prost-build", + "rand 0.7.3", + "sha2", + "smallvec 1.2.0", + "uint", + "unsigned-varint 0.3.1", + "void", + "wasm-timer", ] [[package]] name = "libp2p-mdns" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881fcfb360c2822db9f0e6bb6f89529621556ed9a8b038313414eda5107334de" dependencies = [ - "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "dns-parser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-swarm 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "async-std", + "data-encoding", + "dns-parser", + "either", + "futures 0.3.4", + "lazy_static", + "libp2p-core", + "libp2p-swarm", + "log 0.4.8", + "net2", + "rand 0.7.3", + "smallvec 1.2.0", + "void", + "wasm-timer", ] [[package]] name = "libp2p-mplex" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8507b37ad0eed275efcde67a023c3d85af6c80768b193845b9288e848e1af95" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures_codec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "fnv", + "futures 0.3.4", + "futures_codec", + "libp2p-core", + "log 0.4.8", + "parking_lot 0.10.0", + "unsigned-varint 0.3.1", ] [[package]] name = "libp2p-noise" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac7d33809afdf6794f09fdb2f9f94e1550ae230be5bae6430a078eb96fc9e5a6" dependencies = [ - "curve25519-dalek 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "snow 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "x25519-dalek 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.2.3", + "futures 0.3.4", + "lazy_static", + "libp2p-core", + "log 0.4.8", + "prost", + "prost-build", + "rand 0.7.3", + "sha2", + "snow", + "static_assertions", + "x25519-dalek 0.5.2", + "zeroize 1.1.0", ] [[package]] name = "libp2p-ping" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d22f2f228b3a828dca1cb8aa9fa331e0bc9c36510cb2c1916956e20dc85e8c" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-swarm 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "libp2p-core", + "libp2p-swarm", + "log 0.4.8", + "rand 0.7.3", + "void", + "wasm-timer", ] [[package]] name = "libp2p-plaintext" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56126a204d7b3382bac163143ff4125a14570b3ba76ba979103d1ae1abed1923" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures_codec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "futures 0.3.4", + "futures_codec", + "libp2p-core", + "log 0.4.8", + "prost", + "prost-build", + "rw-stream-sink", + "unsigned-varint 0.3.1", + "void", ] [[package]] name = "libp2p-pnet" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b916938a8868f75180aeeffcc6a516a922d165e8fa2a90b57bad989d1ccbb57a" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "salsa20 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "log 0.4.8", + "pin-project", + "rand 0.7.3", + "salsa20", + "sha3", ] [[package]] name = "libp2p-secio" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-send-wrapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "quicksink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", +checksum = "1219e9ecb4945d7331a05f5ffe96a1f6e28051bfa1223d4c60353c251de0354e" +dependencies = [ + "aes-ctr", + "ctr", + "futures 0.3.4", + "hmac", + "js-sys", + "lazy_static", + "libp2p-core", + "log 0.4.8", + "parity-send-wrapper", + "pin-project", + "prost", + "prost-build", + "quicksink", + "rand 0.7.3", + "ring", + "rw-stream-sink", + "sha2", + "static_assertions", + "twofish", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", ] [[package]] name = "libp2p-swarm" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "275471e7c0e88ae004660866cd54f603bd8bd1f4caef541a27f50dd8640c4d4c" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "libp2p-core", + "log 0.4.8", + "smallvec 1.2.0", + "void", + "wasm-timer", ] [[package]] name = "libp2p-tcp" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9e80ad4e3535345f3d666554ce347d3100453775611c05c60786bf9a1747a10" dependencies = [ - "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "ipnet 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "async-std", + "futures 0.3.4", + "futures-timer 3.0.2", + "get_if_addrs", + "ipnet", + "libp2p-core", + "log 0.4.8", ] [[package]] name = "libp2p-uds" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76d329564a43da9d0e055a5b938633c4a8ceab1f59cec133fbc4647917c07341" dependencies = [ - "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "async-std", + "futures 0.3.4", + "libp2p-core", + "log 0.4.8", ] [[package]] name = "libp2p-wasm-ext" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d40c95ac1a9b7fb7770616e4165f34559885337f3be485b32acdd085261be3a" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-send-wrapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "js-sys", + "libp2p-core", + "parity-send-wrapper", + "wasm-bindgen", + "wasm-bindgen-futures", ] [[package]] name = "libp2p-websocket" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5351ca9eea122081c1c0f9323164d2918cac29b5a6bfe5054d4ba8ec9447cf42" dependencies = [ - "async-tls 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quicksink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "soketto 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki-roots 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", + "async-tls", + "bytes 0.5.4", + "either", + "futures 0.3.4", + "libp2p-core", + "log 0.4.8", + "quicksink", + "rustls", + "rw-stream-sink", + "soketto", + "url 2.1.1", + "webpki", + "webpki-roots 0.18.0", ] [[package]] name = "libp2p-yamux" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f72aa5a7273c29c6eaea09108a49feaefc7456164863f64f86a193f9e78a4b7f" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "yamux 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "libp2p-core", + "parking_lot 0.10.0", + "thiserror", + "yamux", ] [[package]] name = "librocksdb-sys" version = "6.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a0785e816e1e11e7599388a492c61ef80ddc2afc91e313e61662cce537809be" dependencies = [ - "bindgen 0.49.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "bindgen", + "cc", + "glob 0.3.0", + "libc", ] [[package]] name = "libsecp256k1" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" dependencies = [ - "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac-drbg 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)", + "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 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "libc", + "pkg-config", + "vcpkg", ] [[package]] name = "linked-hash-map" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" [[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 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "linked-hash-map", ] [[package]] name = "lock_api" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b" dependencies = [ - "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard", ] [[package]] name = "log" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" dependencies = [ - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8", ] [[package]] name = "log" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", ] [[package]] name = "lru" version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d8f669d42c72d18514dfca8115689c5f6370a17d980cb5bd777a67f404594c8" dependencies = [ - "hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hashbrown 0.5.0", ] [[package]] name = "lru" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237" dependencies = [ - "hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "hashbrown 0.6.3", ] [[package]] name = "mach" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86dd2487cdfea56def77b88438a2c915fb45113c5319bfe7e14306ca4cd0b0e1" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[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.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53445de381a1f436797497c61d851644d0e8e88e6140f22872ad33a704933978" [[package]] name = "memoffset" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" dependencies = [ - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version", ] [[package]] name = "memory-db" version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "198831fe8722331a395bc199a5d08efbc197497ef354cb4c77b969c02ffc0fc4" dependencies = [ - "ahash 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ahash", + "hash-db", + "hashbrown 0.6.3", + "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 = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b0942b357c1b4d0dc43ba724674ec89c3218e6ca2b3e8269e7cb53bcecd2f6e" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "keccak", + "rand_core 0.4.2", + "zeroize 1.1.0", ] [[package]] name = "mime" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" dependencies = [ - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9", ] [[package]] name = "miniz_oxide" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" dependencies = [ - "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "adler32", ] [[package]] name = "mio" version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log 0.4.8", + "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 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell", + "log 0.4.8", + "mio", + "slab", ] [[package]] name = "mio-uds" version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" dependencies = [ - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", ] [[package]] name = "more-asserts" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" [[package]] name = "multimap" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97fbd5d00e0e37bfb10f433af8f5aaf631e739368dc9fc28286ca81ca4948dc" [[package]] name = "multistream-select" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f938ffe420493e77c8b6cbcc3f282283f68fc889c5dcbc8e51668d5f3a01ad94" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "futures 0.1.29", + "log 0.4.8", + "smallvec 1.2.0", + "tokio-io", + "unsigned-varint 0.3.1", ] [[package]] name = "names" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da" dependencies = [ - "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.23", ] [[package]] name = "native-tls" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.28 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "libc", + "log 0.4.8", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", ] [[package]] name = "net2" version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "winapi 0.3.8", ] [[package]] name = "nix" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "cc", + "cfg-if", + "libc", + "void", ] [[package]] name = "node-cli" version = "2.0.0" dependencies = [ - "assert_cmd 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "browser-utils 0.8.0", - "frame-benchmarking-cli 2.0.0", - "frame-support 2.0.0", - "frame-system 2.0.0", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "nix 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", - "node-executor 2.0.0", - "node-inspect 0.8.0", - "node-primitives 2.0.0", - "node-rpc 2.0.0", - "node-runtime 2.0.0", - "node-transaction-factory 0.8.0", - "pallet-authority-discovery 2.0.0", - "pallet-balances 2.0.0", - "pallet-contracts 2.0.0", - "pallet-im-online 2.0.0", - "pallet-indices 2.0.0", - "pallet-timestamp 2.0.0", - "pallet-transaction-payment 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-authority-discovery 0.8.0", - "sc-basic-authorship 0.8.0", - "sc-chain-spec 2.0.0", - "sc-cli 0.8.0", - "sc-client 0.8.0", - "sc-client-api 2.0.0", - "sc-client-db 0.8.0", - "sc-consensus-babe 0.8.0", - "sc-consensus-epochs 0.8.0", - "sc-finality-grandpa 0.8.0", - "sc-keystore 2.0.0", - "sc-network 0.8.0", - "sc-offchain 2.0.0", - "sc-rpc 2.0.0", - "sc-service 0.8.0", - "sc-service-test 2.0.0", - "sc-telemetry 2.0.0", - "sc-tracing 2.0.0", - "sc-transaction-pool 2.0.0", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-authority-discovery 2.0.0", - "sp-consensus 0.8.0", - "sp-consensus-babe 0.8.0", - "sp-core 2.0.0", - "sp-finality-grandpa 2.0.0", - "sp-finality-tracker 2.0.0", - "sp-inherents 2.0.0", - "sp-io 2.0.0", - "sp-keyring 2.0.0", - "sp-runtime 2.0.0", - "sp-timestamp 2.0.0", - "sp-transaction-pool 2.0.0", - "structopt 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-build-script-utils 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "assert_cmd", + "browser-utils", + "frame-benchmarking-cli", + "frame-support", + "frame-system", + "futures 0.3.4", + "hex-literal", + "jsonrpc-core", + "log 0.4.8", + "nix", + "node-executor", + "node-inspect", + "node-primitives", + "node-rpc", + "node-runtime", + "node-transaction-factory", + "pallet-authority-discovery", + "pallet-balances", + "pallet-contracts", + "pallet-im-online", + "pallet-indices", + "pallet-timestamp", + "pallet-transaction-payment", + "parity-scale-codec", + "rand 0.7.3", + "sc-authority-discovery", + "sc-basic-authorship", + "sc-chain-spec", + "sc-cli", + "sc-client", + "sc-client-api", + "sc-client-db", + "sc-consensus-babe", + "sc-consensus-epochs", + "sc-finality-grandpa", + "sc-keystore", + "sc-network", + "sc-offchain", + "sc-rpc", + "sc-service", + "sc-service-test", + "sc-telemetry", + "sc-tracing", + "sc-transaction-pool", + "serde", + "sp-authority-discovery", + "sp-consensus", + "sp-consensus-babe", + "sp-core", + "sp-finality-grandpa", + "sp-finality-tracker", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-runtime", + "sp-timestamp", + "sp-transaction-pool", + "structopt", + "substrate-build-script-utils", + "tempfile", + "tracing", + "vergen", + "wasm-bindgen", + "wasm-bindgen-futures", ] [[package]] name = "node-executor" version = "2.0.0" dependencies = [ - "criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "frame-benchmarking 2.0.0", - "frame-support 2.0.0", - "frame-system 2.0.0", - "node-primitives 2.0.0", - "node-runtime 2.0.0", - "node-testing 2.0.0", - "pallet-balances 2.0.0", - "pallet-contracts 2.0.0", - "pallet-grandpa 2.0.0", - "pallet-im-online 2.0.0", - "pallet-indices 2.0.0", - "pallet-session 2.0.0", - "pallet-timestamp 2.0.0", - "pallet-transaction-payment 2.0.0", - "pallet-treasury 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-executor 0.8.0", - "sp-application-crypto 2.0.0", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-state-machine 0.8.0", - "sp-trie 2.0.0", - "substrate-test-client 2.0.0", - "trie-root 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.3.1", + "frame-benchmarking", + "frame-support", + "frame-system", + "node-primitives", + "node-runtime", + "node-testing", + "pallet-balances", + "pallet-contracts", + "pallet-grandpa", + "pallet-im-online", + "pallet-indices", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-treasury", + "parity-scale-codec", + "sc-executor", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-trie", + "substrate-test-client", + "trie-root", + "wabt", ] [[package]] name = "node-inspect" version = "0.8.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-cli 0.8.0", - "sc-client-api 2.0.0", - "sc-service 0.8.0", - "sp-blockchain 2.0.0", - "sp-core 2.0.0", - "sp-runtime 2.0.0", - "structopt 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more", + "log 0.4.8", + "parity-scale-codec", + "sc-cli", + "sc-client-api", + "sc-service", + "sp-blockchain", + "sp-core", + "sp-runtime", + "structopt", ] [[package]] name = "node-primitives" version = "2.0.0" dependencies = [ - "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-runtime 2.0.0", - "sp-serializer 2.0.0", + "pretty_assertions", + "sp-core", + "sp-runtime", + "sp-serializer", ] [[package]] name = "node-rpc" version = "2.0.0" dependencies = [ - "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "node-primitives 2.0.0", - "node-runtime 2.0.0", - "pallet-contracts-rpc 0.8.0", - "pallet-transaction-payment-rpc 2.0.0", - "sc-client 0.8.0", - "sc-consensus-babe 0.8.0", - "sc-consensus-babe-rpc 0.8.0", - "sc-consensus-epochs 0.8.0", - "sc-keystore 2.0.0", - "sp-api 2.0.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-consensus-babe 0.8.0", - "sp-runtime 2.0.0", - "sp-transaction-pool 2.0.0", - "substrate-frame-rpc-system 2.0.0", + "jsonrpc-core", + "node-primitives", + "node-runtime", + "pallet-contracts-rpc", + "pallet-transaction-payment-rpc", + "sc-client", + "sc-consensus-babe", + "sc-consensus-babe-rpc", + "sc-consensus-epochs", + "sc-keystore", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-runtime", + "sp-transaction-pool", + "substrate-frame-rpc-system", ] [[package]] name = "node-rpc-client" version = "2.0.0" dependencies = [ - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "node-primitives 2.0.0", - "sc-rpc 2.0.0", + "env_logger 0.7.1", + "futures 0.1.29", + "hyper 0.12.35", + "jsonrpc-core-client", + "log 0.4.8", + "node-primitives", + "sc-rpc", ] [[package]] name = "node-runtime" version = "2.0.0" dependencies = [ - "frame-benchmarking 2.0.0", - "frame-executive 2.0.0", - "frame-support 2.0.0", - "frame-system 2.0.0", - "frame-system-rpc-runtime-api 2.0.0", - "integer-sqrt 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "node-primitives 2.0.0", - "pallet-authority-discovery 2.0.0", - "pallet-authorship 2.0.0", - "pallet-babe 2.0.0", - "pallet-balances 2.0.0", - "pallet-collective 2.0.0", - "pallet-contracts 2.0.0", - "pallet-contracts-primitives 2.0.0", - "pallet-contracts-rpc-runtime-api 0.8.0", - "pallet-democracy 2.0.0", - "pallet-elections-phragmen 2.0.0", - "pallet-finality-tracker 2.0.0", - "pallet-grandpa 2.0.0", - "pallet-identity 2.0.0", - "pallet-im-online 2.0.0", - "pallet-indices 2.0.0", - "pallet-membership 2.0.0", - "pallet-offences 2.0.0", - "pallet-randomness-collective-flip 2.0.0", - "pallet-recovery 2.0.0", - "pallet-session 2.0.0", - "pallet-society 2.0.0", - "pallet-staking 2.0.0", - "pallet-staking-reward-curve 2.0.0", - "pallet-sudo 2.0.0", - "pallet-timestamp 2.0.0", - "pallet-transaction-payment 2.0.0", - "pallet-transaction-payment-rpc-runtime-api 2.0.0", - "pallet-treasury 2.0.0", - "pallet-utility 2.0.0", - "pallet-vesting 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-authority-discovery 2.0.0", - "sp-block-builder 2.0.0", - "sp-consensus-babe 0.8.0", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-io 2.0.0", - "sp-keyring 2.0.0", - "sp-offchain 2.0.0", - "sp-runtime 2.0.0", - "sp-session 2.0.0", - "sp-staking 2.0.0", - "sp-std 2.0.0", - "sp-transaction-pool 2.0.0", - "sp-version 2.0.0", - "substrate-wasm-builder-runner 1.0.5", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-rpc-runtime-api", + "integer-sqrt", + "node-primitives", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-balances", + "pallet-collective", + "pallet-contracts", + "pallet-contracts-primitives", + "pallet-contracts-rpc-runtime-api", + "pallet-democracy", + "pallet-elections-phragmen", + "pallet-finality-tracker", + "pallet-grandpa", + "pallet-identity", + "pallet-im-online", + "pallet-indices", + "pallet-membership", + "pallet-offences", + "pallet-randomness-collective-flip", + "pallet-recovery", + "pallet-session", + "pallet-society", + "pallet-staking", + "pallet-staking-reward-curve", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", + "parity-scale-codec", + "rustc-hex", + "serde", + "sp-api", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "sp-transaction-pool", + "sp-version", + "substrate-wasm-builder-runner", ] [[package]] name = "node-template" version = "2.0.0" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "node-template-runtime 2.0.0", - "sc-basic-authorship 0.8.0", - "sc-cli 0.8.0", - "sc-client 0.8.0", - "sc-consensus-aura 0.8.0", - "sc-executor 0.8.0", - "sc-finality-grandpa 0.8.0", - "sc-network 0.8.0", - "sc-service 0.8.0", - "sc-transaction-pool 2.0.0", - "sp-consensus 0.8.0", - "sp-consensus-aura 0.8.0", - "sp-core 2.0.0", - "sp-finality-grandpa 2.0.0", - "sp-inherents 2.0.0", - "sp-runtime 2.0.0", - "sp-transaction-pool 2.0.0", - "structopt 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-build-script-utils 2.0.0", - "vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "log 0.4.8", + "node-template-runtime", + "sc-basic-authorship", + "sc-cli", + "sc-client", + "sc-consensus-aura", + "sc-executor", + "sc-finality-grandpa", + "sc-network", + "sc-service", + "sc-transaction-pool", + "sp-consensus", + "sp-consensus-aura", + "sp-core", + "sp-finality-grandpa", + "sp-inherents", + "sp-runtime", + "sp-transaction-pool", + "structopt", + "substrate-build-script-utils", + "vergen", ] [[package]] name = "node-template-runtime" version = "2.0.0" dependencies = [ - "frame-executive 2.0.0", - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-aura 2.0.0", - "pallet-balances 2.0.0", - "pallet-grandpa 2.0.0", - "pallet-indices 2.0.0", - "pallet-randomness-collective-flip 2.0.0", - "pallet-sudo 2.0.0", - "pallet-template 2.0.0", - "pallet-timestamp 2.0.0", - "pallet-transaction-payment 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-block-builder 2.0.0", - "sp-consensus-aura 0.8.0", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-io 2.0.0", - "sp-offchain 2.0.0", - "sp-runtime 2.0.0", - "sp-session 2.0.0", - "sp-std 2.0.0", - "sp-transaction-pool 2.0.0", - "sp-version 2.0.0", - "substrate-wasm-builder-runner 1.0.5", + "frame-executive", + "frame-support", + "frame-system", + "pallet-aura", + "pallet-balances", + "pallet-grandpa", + "pallet-indices", + "pallet-randomness-collective-flip", + "pallet-sudo", + "pallet-template", + "pallet-timestamp", + "pallet-transaction-payment", + "parity-scale-codec", + "serde", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "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 = "node-testing" version = "2.0.0" dependencies = [ - "criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "frame-support 2.0.0", - "frame-system 2.0.0", - "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "node-executor 2.0.0", - "node-primitives 2.0.0", - "node-runtime 2.0.0", - "pallet-balances 2.0.0", - "pallet-contracts 2.0.0", - "pallet-grandpa 2.0.0", - "pallet-indices 2.0.0", - "pallet-session 2.0.0", - "pallet-society 2.0.0", - "pallet-staking 2.0.0", - "pallet-timestamp 2.0.0", - "pallet-transaction-payment 2.0.0", - "pallet-treasury 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-cli 0.8.0", - "sc-client 0.8.0", - "sc-client-api 2.0.0", - "sc-client-db 0.8.0", - "sc-executor 0.8.0", - "sc-service 0.8.0", - "sp-api 2.0.0", - "sp-block-builder 2.0.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-core 2.0.0", - "sp-finality-tracker 2.0.0", - "sp-inherents 2.0.0", - "sp-io 2.0.0", - "sp-keyring 2.0.0", - "sp-runtime 2.0.0", - "sp-timestamp 2.0.0", - "substrate-test-client 2.0.0", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.3.1", + "frame-support", + "frame-system", + "fs_extra", + "log 0.4.8", + "node-executor", + "node-primitives", + "node-runtime", + "pallet-balances", + "pallet-contracts", + "pallet-grandpa", + "pallet-indices", + "pallet-session", + "pallet-society", + "pallet-staking", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-treasury", + "parity-scale-codec", + "sc-cli", + "sc-client", + "sc-client-api", + "sc-client-db", + "sc-executor", + "sc-service", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-finality-tracker", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-runtime", + "sp-timestamp", + "substrate-test-client", + "tempdir", + "wabt", ] [[package]] name = "node-transaction-factory" version = "0.8.0" dependencies = [ - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-cli 0.8.0", - "sc-client 0.8.0", - "sc-client-api 2.0.0", - "sc-service 0.8.0", - "sp-api 2.0.0", - "sp-block-builder 2.0.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-core 2.0.0", - "sp-runtime 2.0.0", + "log 0.4.8", + "parity-scale-codec", + "sc-cli", + "sc-client", + "sc-client-api", + "sc-service", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-runtime", ] [[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 = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" dependencies = [ - "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", + "version_check 0.1.5", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", + "num-integer", + "num-traits", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", + "num-traits", ] [[package]] name = "num-rational" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da4dc79f9e6c81bef96148c8f6b8e72ad4541caa4a24373e900a36da07de03a3" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", + "num-bigint", + "num-integer", + "num-traits", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", ] [[package]] name = "num_cpus" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" dependencies = [ - "hermit-abi 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi", + "libc", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0", ] [[package]] name = "oorandom" version = "11.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcec7c9c2a95cacc7cd0ecb89d8a8454eca13906f6deb55258ffff0adeb9405" [[package]] name = "opaque-debug" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "openssl" version = "0.10.28" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "973293749822d7dd6370d6da1e523b0d1db19f06c459134c658b2a4261378b52" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "cfg-if", + "foreign-types", + "lazy_static", + "libc", + "openssl-sys", ] [[package]] name = "openssl-probe" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" [[package]] name = "openssl-sys" version = "0.9.54" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", + "cc", + "libc", + "pkg-config", + "vcpkg", ] [[package]] name = "output_vt100" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8", ] [[package]] name = "owning_ref" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" dependencies = [ - "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "stable_deref_trait", ] [[package]] name = "pallet-assets" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-aura" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pallet-session 2.0.0", - "pallet-timestamp 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-application-crypto 2.0.0", - "sp-consensus-aura 0.8.0", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", - "sp-timestamp 2.0.0", + "frame-support", + "frame-system", + "lazy_static", + "pallet-session", + "pallet-timestamp", + "parity-scale-codec", + "parking_lot 0.10.0", + "serde", + "sp-application-crypto", + "sp-consensus-aura", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-std", + "sp-timestamp", ] [[package]] name = "pallet-authority-discovery" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-session 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-application-crypto 2.0.0", - "sp-authority-discovery 2.0.0", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-staking 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "pallet-session", + "parity-scale-codec", + "serde", + "sp-application-crypto", + "sp-authority-discovery", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", ] [[package]] name = "pallet-authorship" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-authorship 2.0.0", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "parity-scale-codec", + "sp-authorship", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-babe" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pallet-session 2.0.0", - "pallet-timestamp 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-consensus-babe 0.8.0", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-staking 2.0.0", - "sp-std 2.0.0", - "sp-timestamp 2.0.0", - "sp-version 2.0.0", - "substrate-test-runtime 2.0.0", + "frame-support", + "frame-system", + "hex-literal", + "lazy_static", + "pallet-session", + "pallet-timestamp", + "parity-scale-codec", + "parking_lot 0.10.0", + "serde", + "sp-consensus-babe", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", + "sp-timestamp", + "sp-version", + "substrate-test-runtime", ] [[package]] name = "pallet-balances" version = "2.0.0" dependencies = [ - "frame-benchmarking 2.0.0", - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-transaction-payment 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-transaction-payment", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-collective" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pallet-balances 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "hex-literal", + "pallet-balances", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-contracts" version = "2.0.0" dependencies = [ - "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "frame-support 2.0.0", - "frame-system 2.0.0", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pallet-balances 2.0.0", - "pallet-contracts-primitives 2.0.0", - "pallet-randomness-collective-flip 2.0.0", - "pallet-timestamp 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pwasm-utils 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-sandbox 0.8.0", - "sp-std 2.0.0", - "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi-validation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "assert_matches", + "frame-support", + "frame-system", + "hex-literal", + "pallet-balances", + "pallet-contracts-primitives", + "pallet-randomness-collective-flip", + "pallet-timestamp", + "parity-scale-codec", + "parity-wasm 0.41.0", + "pwasm-utils", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-sandbox", + "sp-std", + "wabt", + "wasmi-validation", ] [[package]] name = "pallet-contracts-primitives" version = "2.0.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "parity-scale-codec", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-contracts-rpc" version = "0.8.0" dependencies = [ - "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "pallet-contracts-primitives 2.0.0", - "pallet-contracts-rpc-runtime-api 0.8.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-blockchain 2.0.0", - "sp-core 2.0.0", - "sp-rpc 2.0.0", - "sp-runtime 2.0.0", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "pallet-contracts-primitives", + "pallet-contracts-rpc-runtime-api", + "parity-scale-codec", + "serde", + "serde_json", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-rpc", + "sp-runtime", ] [[package]] name = "pallet-contracts-rpc-runtime-api" version = "0.8.0" dependencies = [ - "pallet-contracts-primitives 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "pallet-contracts-primitives", + "parity-scale-codec", + "sp-api", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-democracy" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pallet-balances 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", - "sp-storage 2.0.0", + "frame-support", + "frame-system", + "hex-literal", + "pallet-balances", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-storage", ] [[package]] name = "pallet-elections" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pallet-balances 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "hex-literal", + "pallet-balances", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-elections-phragmen" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pallet-balances 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-phragmen 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", - "substrate-test-utils 2.0.0", + "frame-support", + "frame-system", + "hex-literal", + "pallet-balances", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-phragmen", + "sp-runtime", + "sp-std", + "substrate-test-utils", ] [[package]] name = "pallet-evm" version = "2.0.0" dependencies = [ - "evm 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-balances 2.0.0", - "pallet-timestamp 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rlp 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "evm", + "frame-support", + "frame-system", + "pallet-balances", + "pallet-timestamp", + "parity-scale-codec", + "primitive-types", + "rlp", + "serde", + "sha3", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-example" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-balances 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-example-offchain-worker" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "serde_json", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-finality-tracker" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-finality-tracker 2.0.0", - "sp-inherents 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "parity-scale-codec", + "serde", + "sp-core", + "sp-finality-tracker", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-generic-asset" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-grandpa" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-finality-tracker 2.0.0", - "pallet-session 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-finality-grandpa 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-staking 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "pallet-finality-tracker", + "pallet-session", + "parity-scale-codec", + "serde", + "sp-core", + "sp-finality-grandpa", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", ] [[package]] name = "pallet-identity" version = "2.0.0" dependencies = [ - "enumflags2 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "frame-benchmarking 2.0.0", - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-balances 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "enumflags2", + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-im-online" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-authorship 2.0.0", - "pallet-session 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-application-crypto 2.0.0", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-staking 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "pallet-authorship", + "pallet-session", + "parity-scale-codec", + "serde", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", ] [[package]] name = "pallet-indices" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-balances 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-keyring 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-keyring", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-membership" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-nicks" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-balances 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-offences" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-balances 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-staking 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", ] [[package]] name = "pallet-randomness-collective-flip" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "safe-mix 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "parity-scale-codec", + "safe-mix", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-recovery" version = "2.0.0" dependencies = [ - "enumflags2 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-balances 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "enumflags2", + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-scored-pool" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-balances 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-session" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pallet-timestamp 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-application-crypto 2.0.0", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-staking 2.0.0", - "sp-std 2.0.0", - "sp-trie 2.0.0", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "lazy_static", + "pallet-timestamp", + "parity-scale-codec", + "serde", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", + "sp-trie", ] [[package]] name = "pallet-society" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-balances 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "rand_chacha 0.2.1", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-staking" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-authorship 2.0.0", - "pallet-balances 2.0.0", - "pallet-session 2.0.0", - "pallet-staking-reward-curve 2.0.0", - "pallet-timestamp 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-keyring 2.0.0", - "sp-phragmen 2.0.0", - "sp-runtime 2.0.0", - "sp-staking 2.0.0", - "sp-std 2.0.0", - "substrate-test-utils 2.0.0", + "frame-support", + "frame-system", + "pallet-authorship", + "pallet-balances", + "pallet-session", + "pallet-staking-reward-curve", + "pallet-timestamp", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-keyring", + "sp-phragmen", + "sp-runtime", + "sp-staking", + "sp-std", + "substrate-test-utils", ] [[package]] name = "pallet-staking-reward-curve" version = "2.0.0" dependencies = [ - "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime 2.0.0", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-crate", + "proc-macro2 1.0.8", + "quote 1.0.2", + "sp-runtime", + "syn", ] [[package]] name = "pallet-sudo" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-template" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "safe-mix 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", + "frame-support", + "frame-system", + "parity-scale-codec", + "safe-mix", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] name = "pallet-timestamp" version = "2.0.0" dependencies = [ - "frame-benchmarking 2.0.0", - "frame-support 2.0.0", - "frame-system 2.0.0", - "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", - "sp-timestamp 2.0.0", + "frame-benchmarking", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "parity-scale-codec", + "serde", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-std", + "sp-timestamp", ] [[package]] name = "pallet-transaction-payment" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-balances 2.0.0", - "pallet-transaction-payment-rpc-runtime-api 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "pallet-balances", + "pallet-transaction-payment-rpc-runtime-api", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-transaction-payment-rpc" version = "2.0.0" dependencies = [ - "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "pallet-transaction-payment-rpc-runtime-api 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-blockchain 2.0.0", - "sp-core 2.0.0", - "sp-rpc 2.0.0", - "sp-runtime 2.0.0", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "pallet-transaction-payment-rpc-runtime-api", + "parity-scale-codec", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-rpc", + "sp-runtime", ] [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "parity-scale-codec", + "serde", + "serde_json", + "sp-api", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-treasury" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-balances 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-utility" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "pallet-balances 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "frame-support", + "frame-system", + "pallet-balances", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-vesting" version = "2.0.0" dependencies = [ - "enumflags2 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "frame-support 2.0.0", - "frame-system 2.0.0", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pallet-balances 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", - "sp-storage 2.0.0", + "enumflags2", + "frame-support", + "frame-system", + "hex-literal", + "pallet-balances", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-storage", ] [[package]] name = "parity-bytes" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c276d76c5333b8c2579e02d49a06733a55b8282d2d9b13e8d53b6406bd7e30a" [[package]] name = "parity-multiaddr" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "045b3c7af871285146300da35b1932bb6e4639b66c7c98e85d06a32cbc4e8fa7" dependencies = [ - "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "bs58 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multihash 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayref", + "bs58 0.2.5", + "byteorder 1.3.4", + "bytes 0.4.12", + "data-encoding", + "parity-multihash 0.1.3", + "percent-encoding 1.0.1", + "serde", + "unsigned-varint 0.2.3", + "url 1.7.2", ] [[package]] name = "parity-multiaddr" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26df883298bc3f4e92528b4c5cc9f806b791955b136da3e5e939ed9de0fd958b" dependencies = [ - "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "bs58 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multihash 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayref", + "bs58 0.3.0", + "byteorder 1.3.4", + "data-encoding", + "parity-multihash 0.2.3", + "percent-encoding 2.1.0", + "serde", + "static_assertions", + "unsigned-varint 0.3.1", + "url 2.1.1", ] [[package]] name = "parity-multihash" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3a17dc27848fd99e4f87eb0f8c9baba6ede0a6d555400c850ca45254ef4ce3" dependencies = [ - "blake2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "blake2", + "bytes 0.4.12", + "rand 0.6.5", + "sha-1", + "sha2", + "sha3", + "unsigned-varint 0.2.3", ] [[package]] name = "parity-multihash" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a1cd2ba02391b81367bec529fb209019d718684fdc8ad6a712c2b536e46f775" dependencies = [ - "blake2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "blake2", + "bytes 0.5.4", + "rand 0.7.3", + "sha-1", + "sha2", + "sha3", + "unsigned-varint 0.3.1", ] [[package]] name = "parity-scale-codec" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f747c06d9f3b2ad387ac881b9667298c81b1243aa9833f086e05996937c35507" dependencies = [ - "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bitvec 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-slice-cast 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec-derive 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.5.1", + "bitvec", + "byte-slice-cast", + "parity-scale-codec-derive", + "serde", ] [[package]] name = "parity-scale-codec-derive" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34e513ff3e406f3ede6796dcdc83d0b32ffb86668cea1ccf7363118abeb00476" dependencies = [ - "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-crate", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[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.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1476e40bf8f5c6776e9600983435821ca86eb9819d74a6207cca69d091406a" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-util-mem-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "impl-trait-for-tuples", + "parity-util-mem-derive", + "parking_lot 0.10.0", + "primitive-types", + "smallvec 1.2.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.8 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "syn", + "synstructure", ] [[package]] name = "parity-wasm" version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ad52817c4d343339b3bc2e26861bd21478eda0b7509acf83505727000512ac" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", ] [[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 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api", + "parking_lot_core 0.6.2", + "rustc_version", ] [[package]] name = "parking_lot" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e98c49ab0b7ce5b222f2cc9193fc4efe11c6d0bd4f648e374684a6857b1cfc" dependencies = [ - "lock_api 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api", + "parking_lot_core 0.7.0", ] [[package]] name = "parking_lot_core" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "cloudabi", + "libc", + "redox_syscall", + "rustc_version", + "smallvec 0.6.13", + "winapi 0.3.8", ] [[package]] name = "parking_lot_core" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7582838484df45743c8434fbff785e8edf260c28748353d44bc0da32e0ceabf1" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "cloudabi", + "libc", + "redox_syscall", + "smallvec 1.2.0", + "winapi 0.3.8", ] [[package]] name = "paste" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "423a519e1c6e828f1e73b720f9d9ed2fa643dce8a7737fb43235ce0b41eeaa49" dependencies = [ - "paste-impl 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "paste-impl", + "proc-macro-hack", ] [[package]] name = "paste-impl" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4214c9e912ef61bf42b81ba9a47e8aad1b2ffaf739ab162bf96d1e011f54e6c5" dependencies = [ - "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "pbkdf2" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "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 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "fixedbitset", + "indexmap", ] [[package]] name = "pin-project" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c" dependencies = [ - "pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-internal", ] [[package]] name = "pin-project-internal" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "pin-project-lite" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" [[package]] name = "pin-utils" version = "0.1.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" [[package]] name = "pkg-config" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" [[package]] name = "plain" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" [[package]] name = "plotters" version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e3bb8da247d27ae212529352020f3e5ee16e83c0c258061d27b08ab92675eeb" dependencies = [ - "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys", + "num-traits", + "wasm-bindgen", + "web-sys", ] [[package]] name = "ppv-lite86" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" [[package]] name = "predicates" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9bfe52247e5cc9b2f943682a85a5549fb9662245caf094504e69a2f03fe64d4" dependencies = [ - "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "difference", + "predicates-core", ] [[package]] name = "predicates-core" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" [[package]] name = "predicates-tree" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" dependencies = [ - "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates-core", + "treeline", ] [[package]] name = "pretty_assertions" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427" dependencies = [ - "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ctor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "output_vt100 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term 0.11.0", + "ctor", + "difference", + "output_vt100", ] [[package]] name = "primitive-types" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4336f4f5d5524fa60bcbd6fe626f9223d8142a50e7053e979acdf0da41ab975" dependencies = [ - "fixed-hash 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "impl-codec 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "impl-rlp 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "impl-serde 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uint 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde 0.3.0", + "uint", ] [[package]] name = "proc-macro-crate" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10d4b51f154c8a7fb96fd6dad097cb74b863943ec010ac94b9fd1be8861fe1e" dependencies = [ - "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "toml", ] [[package]] name = "proc-macro-error" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052b3c9af39c7e5e94245f820530487d19eb285faedcb40e0c3275132293f242" dependencies = [ - "proc-macro-error-attr 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-error-attr", + "proc-macro2 1.0.8", + "quote 1.0.2", + "rustversion", + "syn", ] [[package]] name = "proc-macro-error-attr" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d175bef481c7902e63e3165627123fff3502f06ac043d3ef42d08c1246da9253" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", - "syn-mid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "rustversion", + "syn", + "syn-mid", ] [[package]] name = "proc-macro-hack" version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "proc-macro-nested" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" [[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 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0", ] [[package]] name = "proc-macro2" version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" dependencies = [ - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0", ] [[package]] name = "prometheus" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5567486d5778e2c6455b1b90ff1c558f29e751fc018130fa182e15828e728af1" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "fnv", + "lazy_static", + "protobuf", + "quick-error", + "spin", ] [[package]] name = "prometheus-exporter" version = "0.8.0" dependencies = [ - "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "prometheus 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "async-std", + "derive_more", + "futures-util", + "hyper 0.13.2", + "log 0.4.8", + "prometheus", + "tokio 0.2.11", ] [[package]] name = "prost" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce49aefe0a6144a45de32927c77bd2859a5f7677b55f220ae5b744e87389c212" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-derive 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "multimap 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "petgraph 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "which 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "heck", + "itertools", + "log 0.4.8", + "multimap", + "petgraph", + "prost", + "prost-types", + "tempfile", + "which 3.1.0", ] [[package]] name = "prost-derive" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" dependencies = [ - "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow", + "itertools", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "prost", ] [[package]] name = "protobuf" version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6686ddd96a8dbe2687b5f2a687b2cfb520854010ec480f2d74c32e7c9873d3c5" [[package]] name = "pwasm-utils" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f7a12f176deee919f4ba55326ee17491c8b707d0987aed822682c821b660192" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "log 0.4.8", + "parity-wasm 0.41.0", ] [[package]] name = "quick-error" version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quickcheck" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44883e74aa97ad63db83c4bf8ca490f02b2fc02f92575e720c8551e843c945f" dependencies = [ - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1", + "log 0.4.8", + "rand 0.7.3", + "rand_core 0.5.1", ] [[package]] name = "quicksink" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8461ef7445f61fd72d8dcd0629ce724b9131b3c2eb36e83a5d3d4161c127530" dependencies = [ - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", + "futures-sink", + "pin-project-lite", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", ] [[package]] name = "quote" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", ] [[package]] name = "rand" version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-cprng", + "libc", + "rand_core 0.3.1", + "rdrand", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "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", + "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 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", + "libc", + "rand_chacha 0.2.1", + "rand_core 0.5.1", + "rand_hc 0.2.0", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7", + "rand_core 0.3.1", ] [[package]] name = "rand_chacha" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" dependencies = [ - "c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "c2-chacha", + "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 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.4.2", + "rdrand", + "wasm-bindgen", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7", + "rand_core 0.4.2", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1", ] [[package]] name = "rand_xoshiro" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03b418169fb9c46533f326efd6eed2576699c44ca92d3052a066214a8d828929" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "rand_core 0.3.1", ] [[package]] name = "raw-cpuid" version = "7.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4a349ca83373cfa5d6dbb66fd76e58b2cca08da71a5f6400de0a0a6a9bceeaf" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "cc", + "rustc_version", ] [[package]] name = "rayon" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" dependencies = [ - "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", + "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 = "redox_users" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" dependencies = [ - "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-argon2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", + "redox_syscall", + "rust-argon2", ] [[package]] name = "regex" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" dependencies = [ - "aho-corasick 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", ] [[package]] name = "regex-automata" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", ] [[package]] name = "regex-syntax" version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06" [[package]] name = "region" version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "448e868c6e4cfddfa49b6a72c95906c04e8547465e9536575b95c70a4044f856" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "mach 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "libc", + "mach", + "winapi 0.3.8", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8", ] [[package]] name = "ring" version = "0.16.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "741ba1704ae21999c00942f9f5944f801e977f54302af346b596287599ad1862" dependencies = [ - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "lazy_static", + "libc", + "spin", + "untrusted", + "web-sys", + "winapi 0.3.8", ] [[package]] name = "rlp" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a44d5ae8afcb238af8b75640907edc6c931efcfab2c854e81ed35fa080f84cd" dependencies = [ - "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex", ] [[package]] name = "rocksdb" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12069b106981c6103d3eab7dd1c86751482d0779a520b7c14954c8b586c1e643" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "librocksdb-sys 6.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "librocksdb-sys", ] [[package]] name = "rpassword" version = "4.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "winapi 0.3.8", ] [[package]] name = "rust-argon2" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" dependencies = [ - "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.11.0", + "blake2b_simd", + "constant_time_eq", + "crossbeam-utils", ] [[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 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.9.0", ] [[package]] name = "rustls" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", - "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.10.1", + "log 0.4.8", + "ring", + "sct", + "webpki", ] [[package]] name = "rustls-native-certs" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51ffebdbb48c14f84eba0b715197d673aff1dd22cc1007ca647e28483bbcc307" dependencies = [ - "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-probe", + "rustls", + "schannel", + "security-framework", ] [[package]] name = "rustversion" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3bba175698996010c4f6dce5e7f173b6eb781fce25d2cfc45e27091ce0b79f6" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "pin-project", + "static_assertions", ] [[package]] name = "ryu" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" [[package]] name = "safe-mix" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c" dependencies = [ - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version", ] [[package]] name = "safemem" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" [[package]] name = "salsa20" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2324b0e8c3bb9a586a571fdb3136f70e7e2c748de00a78043f86e0cff91f91fe" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "salsa20-core 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "salsa20-core", + "stream-cipher", ] [[package]] name = "salsa20-core" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fe6cc1b9f5a5867853ade63099de70f042f7679e408d1ffe52821c9248e6e69" dependencies = [ - "stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "stream-cipher", ] [[package]] name = "same-file" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ - "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util", ] [[package]] name = "sc-authority-discovery" version = "0.8.0" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "quickcheck 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client-api 2.0.0", - "sc-keystore 2.0.0", - "sc-network 0.8.0", - "sc-peerset 2.0.0", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-authority-discovery 2.0.0", - "sp-blockchain 2.0.0", - "sp-core 2.0.0", - "sp-runtime 2.0.0", - "substrate-test-runtime-client 2.0.0", + "bytes 0.4.12", + "derive_more", + "env_logger 0.7.1", + "futures 0.3.4", + "futures-timer 3.0.2", + "libp2p", + "log 0.4.8", + "parity-scale-codec", + "prost", + "prost-build", + "quickcheck", + "rand 0.7.3", + "sc-client-api", + "sc-keystore", + "sc-network", + "sc-peerset", + "serde_json", + "sp-api", + "sp-authority-discovery", + "sp-blockchain", + "sp-core", + "sp-runtime", + "substrate-test-runtime-client", ] [[package]] name = "sc-basic-authorship" version = "0.8.0" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-block-builder 0.8.0", - "sc-client 0.8.0", - "sc-client-api 2.0.0", - "sc-telemetry 2.0.0", - "sc-transaction-pool 2.0.0", - "sp-api 2.0.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-runtime 2.0.0", - "sp-transaction-pool 2.0.0", - "substrate-test-runtime-client 2.0.0", - "tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "log 0.4.8", + "parity-scale-codec", + "parking_lot 0.10.0", + "sc-block-builder", + "sc-client", + "sc-client-api", + "sc-telemetry", + "sc-transaction-pool", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-transaction-pool", + "substrate-test-runtime-client", + "tokio-executor 0.2.0-alpha.6", ] [[package]] name = "sc-block-builder" version = "0.8.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client-api 2.0.0", - "sp-api 2.0.0", - "sp-block-builder 2.0.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-core 2.0.0", - "sp-runtime 2.0.0", - "sp-state-machine 0.8.0", + "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" dependencies = [ - "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-chain-spec-derive 2.0.0", - "sc-network 0.8.0", - "sc-telemetry 2.0.0", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-runtime 2.0.0", + "impl-trait-for-tuples", + "sc-chain-spec-derive", + "sc-network", + "sc-telemetry", + "serde", + "serde_json", + "sp-core", + "sp-runtime", ] [[package]] name = "sc-chain-spec-derive" version = "2.0.0" dependencies = [ - "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-crate", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "sc-cli" version = "0.8.0" dependencies = [ - "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", - "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fdlimit 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "names 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prometheus-exporter 0.8.0", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rpassword 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client-api 2.0.0", - "sc-informant 0.8.0", - "sc-network 0.8.0", - "sc-service 0.8.0", - "sc-telemetry 2.0.0", - "sc-tracing 2.0.0", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sp-core 2.0.0", - "sp-keyring 2.0.0", - "sp-panic-handler 2.0.0", - "sp-runtime 2.0.0", - "sp-state-machine 0.8.0", - "structopt 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term 0.12.1", + "app_dirs", + "atty", + "chrono", + "clap", + "derive_more", + "env_logger 0.7.1", + "fdlimit", + "futures 0.3.4", + "lazy_static", + "log 0.4.8", + "names", + "parity-util-mem", + "prometheus-exporter", + "regex", + "rpassword", + "sc-client-api", + "sc-informant", + "sc-network", + "sc-service", + "sc-telemetry", + "sc-tracing", + "serde_json", + "sp-blockchain", + "sp-core", + "sp-keyring", + "sp-panic-handler", + "sp-runtime", + "sp-state-machine", + "structopt", + "tempfile", + "time", + "tokio 0.2.11", ] [[package]] name = "sc-client" version = "0.8.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb-memorydb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-block-builder 0.8.0", - "sc-client-api 2.0.0", - "sc-executor 0.8.0", - "sc-telemetry 2.0.0", - "sp-api 2.0.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-core 2.0.0", - "sp-externalities 0.8.0", - "sp-inherents 2.0.0", - "sp-keyring 2.0.0", - "sp-panic-handler 2.0.0", - "sp-runtime 2.0.0", - "sp-state-machine 0.8.0", - "sp-std 2.0.0", - "sp-trie 2.0.0", - "sp-version 2.0.0", - "substrate-test-runtime-client 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more", + "env_logger 0.7.1", + "fnv", + "futures 0.3.4", + "hash-db", + "hex-literal", + "kvdb", + "kvdb-memorydb", + "log 0.4.8", + "parity-scale-codec", + "parking_lot 0.10.0", + "sc-block-builder", + "sc-client-api", + "sc-executor", + "sc-telemetry", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-externalities", + "sp-inherents", + "sp-keyring", + "sp-panic-handler", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-trie", + "sp-version", + "substrate-test-runtime-client", + "tempfile", + "tracing", ] [[package]] name = "sc-client-api" version = "2.0.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-executor 0.8.0", - "sc-telemetry 2.0.0", - "sp-api 2.0.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-core 2.0.0", - "sp-externalities 0.8.0", - "sp-inherents 2.0.0", - "sp-keyring 2.0.0", - "sp-runtime 2.0.0", - "sp-state-machine 0.8.0", - "sp-std 2.0.0", - "sp-test-primitives 2.0.0", - "sp-transaction-pool 2.0.0", - "sp-trie 2.0.0", - "sp-version 2.0.0", + "derive_more", + "fnv", + "futures 0.3.4", + "hash-db", + "hex-literal", + "kvdb", + "log 0.4.8", + "parity-scale-codec", + "parking_lot 0.10.0", + "sc-executor", + "sc-telemetry", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-externalities", + "sp-inherents", + "sp-keyring", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-test-primitives", + "sp-transaction-pool", + "sp-trie", + "sp-version", ] [[package]] name = "sc-client-db" version = "0.8.0" dependencies = [ - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb-memorydb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb-rocksdb 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "quickcheck 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client 0.8.0", - "sc-client-api 2.0.0", - "sc-executor 0.8.0", - "sc-state-db 0.8.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-core 2.0.0", - "sp-keyring 2.0.0", - "sp-runtime 2.0.0", - "sp-state-machine 0.8.0", - "sp-trie 2.0.0", - "substrate-test-runtime-client 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1", + "hash-db", + "kvdb", + "kvdb-memorydb", + "kvdb-rocksdb", + "linked-hash-map", + "log 0.4.8", + "parity-scale-codec", + "parity-util-mem", + "parking_lot 0.10.0", + "quickcheck", + "rand 0.7.3", + "sc-client", + "sc-client-api", + "sc-executor", + "sc-state-db", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-keyring", + "sp-runtime", + "sp-state-machine", + "sp-trie", + "substrate-test-runtime-client", + "tempfile", ] [[package]] name = "sc-consensus-aura" version = "0.8.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client 0.8.0", - "sc-client-api 2.0.0", - "sc-consensus-slots 0.8.0", - "sc-executor 0.8.0", - "sc-keystore 2.0.0", - "sc-network 0.8.0", - "sc-network-test 0.8.0", - "sc-service 0.8.0", - "sc-telemetry 2.0.0", - "sp-api 2.0.0", - "sp-application-crypto 2.0.0", - "sp-block-builder 2.0.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-consensus-aura 0.8.0", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-io 2.0.0", - "sp-keyring 2.0.0", - "sp-runtime 2.0.0", - "sp-timestamp 2.0.0", - "sp-version 2.0.0", - "substrate-test-runtime-client 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more", + "env_logger 0.7.1", + "futures 0.1.29", + "futures 0.3.4", + "futures-timer 3.0.2", + "log 0.4.8", + "parity-scale-codec", + "parking_lot 0.10.0", + "sc-client", + "sc-client-api", + "sc-consensus-slots", + "sc-executor", + "sc-keystore", + "sc-network", + "sc-network-test", + "sc-service", + "sc-telemetry", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-aura", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-runtime", + "sp-timestamp", + "sp-version", + "substrate-test-runtime-client", + "tempfile", + "tokio 0.1.22", ] [[package]] name = "sc-consensus-babe" version = "0.8.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fork-tree 2.0.0", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "merlin 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pdqselect 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-block-builder 0.8.0", - "sc-client 0.8.0", - "sc-client-api 2.0.0", - "sc-consensus-epochs 0.8.0", - "sc-consensus-slots 0.8.0", - "sc-consensus-uncles 0.8.0", - "sc-executor 0.8.0", - "sc-keystore 2.0.0", - "sc-network 0.8.0", - "sc-network-test 0.8.0", - "sc-service 0.8.0", - "sc-telemetry 2.0.0", - "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-application-crypto 2.0.0", - "sp-block-builder 2.0.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-consensus-babe 0.8.0", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-io 2.0.0", - "sp-keyring 2.0.0", - "sp-runtime 2.0.0", - "sp-timestamp 2.0.0", - "sp-version 2.0.0", - "substrate-test-runtime-client 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more", + "env_logger 0.7.1", + "fork-tree", + "futures 0.1.29", + "futures 0.3.4", + "futures-timer 3.0.2", + "log 0.4.8", + "merlin", + "num-bigint", + "num-rational", + "num-traits", + "parity-scale-codec", + "parking_lot 0.10.0", + "pdqselect", + "rand 0.7.3", + "sc-block-builder", + "sc-client", + "sc-client-api", + "sc-consensus-epochs", + "sc-consensus-slots", + "sc-consensus-uncles", + "sc-executor", + "sc-keystore", + "sc-network", + "sc-network-test", + "sc-service", + "sc-telemetry", + "schnorrkel", + "serde", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-runtime", + "sp-timestamp", + "sp-version", + "substrate-test-runtime-client", + "tempfile", + "tokio 0.1.22", ] [[package]] name = "sc-consensus-babe-rpc" version = "0.8.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-consensus-babe 0.8.0", - "sc-consensus-epochs 0.8.0", - "sc-keystore 2.0.0", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-application-crypto 2.0.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-consensus-babe 0.8.0", - "sp-core 2.0.0", - "sp-keyring 2.0.0", - "sp-runtime 2.0.0", - "substrate-test-runtime-client 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more", + "futures 0.3.4", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "sc-consensus-babe", + "sc-consensus-epochs", + "sc-keystore", + "serde", + "sp-api", + "sp-application-crypto", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-core", + "sp-keyring", + "sp-runtime", + "substrate-test-runtime-client", + "tempfile", ] [[package]] name = "sc-consensus-epochs" version = "0.8.0" dependencies = [ - "fork-tree 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client-api 2.0.0", - "sp-blockchain 2.0.0", - "sp-runtime 2.0.0", + "fork-tree", + "parity-scale-codec", + "parking_lot 0.10.0", + "sc-client-api", + "sp-blockchain", + "sp-runtime", ] [[package]] name = "sc-consensus-manual-seal" version = "0.8.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-basic-authorship 0.8.0", - "sc-client 0.8.0", - "sc-client-api 2.0.0", - "sc-transaction-pool 2.0.0", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-inherents 2.0.0", - "sp-runtime 2.0.0", - "sp-transaction-pool 2.0.0", - "substrate-test-runtime-client 2.0.0", - "substrate-test-runtime-transaction-pool 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more", + "env_logger 0.7.1", + "futures 0.3.4", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "log 0.4.8", + "parking_lot 0.10.0", + "sc-basic-authorship", + "sc-client", + "sc-client-api", + "sc-transaction-pool", + "serde", + "sp-blockchain", + "sp-consensus", + "sp-inherents", + "sp-runtime", + "sp-transaction-pool", + "substrate-test-runtime-client", + "substrate-test-runtime-transaction-pool", + "tempfile", + "tokio 0.2.11", ] [[package]] name = "sc-consensus-pow" version = "0.8.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client-api 2.0.0", - "sp-api 2.0.0", - "sp-block-builder 2.0.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-consensus-pow 0.8.0", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-runtime 2.0.0", - "sp-timestamp 2.0.0", + "derive_more", + "futures 0.3.4", + "log 0.4.8", + "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" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client-api 2.0.0", - "sc-telemetry 2.0.0", - "sp-api 2.0.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-runtime 2.0.0", - "sp-state-machine 0.8.0", - "substrate-test-runtime-client 2.0.0", + "futures 0.3.4", + "futures-timer 3.0.2", + "log 0.4.8", + "parity-scale-codec", + "parking_lot 0.10.0", + "sc-client-api", + "sc-telemetry", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "substrate-test-runtime-client", ] [[package]] name = "sc-consensus-uncles" version = "0.8.0" dependencies = [ - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client-api 2.0.0", - "sp-authorship 2.0.0", - "sp-consensus 0.8.0", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-runtime 2.0.0", + "log 0.4.8", + "sc-client-api", + "sp-authorship", + "sp-consensus", + "sp-core", + "sp-inherents", + "sp-runtime", ] [[package]] name = "sc-executor" version = "0.8.0" dependencies = [ - "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-executor-common 0.8.0", - "sc-executor-wasmi 0.8.0", - "sc-executor-wasmtime 0.8.0", - "sc-runtime-test 2.0.0", - "sp-core 2.0.0", - "sp-externalities 0.8.0", - "sp-io 2.0.0", - "sp-panic-handler 2.0.0", - "sp-runtime-interface 2.0.0", - "sp-serializer 2.0.0", - "sp-state-machine 0.8.0", - "sp-trie 2.0.0", - "sp-version 2.0.0", - "sp-wasm-interface 2.0.0", - "substrate-test-runtime 2.0.0", - "test-case 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "assert_matches", + "derive_more", + "hex-literal", + "lazy_static", + "libsecp256k1", + "log 0.4.8", + "parity-scale-codec", + "parity-wasm 0.41.0", + "parking_lot 0.10.0", + "sc-executor-common", + "sc-executor-wasmi", + "sc-executor-wasmtime", + "sc-runtime-test", + "sp-core", + "sp-externalities", + "sp-io", + "sp-panic-handler", + "sp-runtime-interface", + "sp-serializer", + "sp-state-machine", + "sp-trie", + "sp-version", + "sp-wasm-interface", + "substrate-test-runtime", + "test-case", + "wabt", + "wasmi", ] [[package]] name = "sc-executor-common" version = "0.8.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-allocator 2.0.0", - "sp-core 2.0.0", - "sp-runtime-interface 2.0.0", - "sp-serializer 2.0.0", - "sp-wasm-interface 2.0.0", - "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more", + "log 0.4.8", + "parity-scale-codec", + "sp-allocator", + "sp-core", + "sp-runtime-interface", + "sp-serializer", + "sp-wasm-interface", + "wasmi", ] [[package]] name = "sc-executor-wasmi" version = "0.8.0" dependencies = [ - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-executor-common 0.8.0", - "sp-allocator 2.0.0", - "sp-core 2.0.0", - "sp-runtime-interface 2.0.0", - "sp-wasm-interface 2.0.0", - "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8", + "parity-scale-codec", + "parity-wasm 0.41.0", + "sc-executor-common", + "sp-allocator", + "sp-core", + "sp-runtime-interface", + "sp-wasm-interface", + "wasmi", ] [[package]] name = "sc-executor-wasmtime" version = "0.8.0" dependencies = [ - "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-executor-common 0.8.0", - "sp-allocator 2.0.0", - "sp-core 2.0.0", - "sp-runtime-interface 2.0.0", - "sp-wasm-interface 2.0.0", - "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmtime 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "assert_matches", + "log 0.4.8", + "parity-scale-codec", + "parity-wasm 0.41.0", + "sc-executor-common", + "sp-allocator", + "sp-core", + "sp-runtime-interface", + "sp-wasm-interface", + "wasmi", + "wasmtime", ] [[package]] name = "sc-finality-grandpa" version = "0.8.0" dependencies = [ - "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "finality-grandpa 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fork-tree 2.0.0", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client 0.8.0", - "sc-client-api 2.0.0", - "sc-keystore 2.0.0", - "sc-network 0.8.0", - "sc-network-gossip 0.8.0", - "sc-network-test 0.8.0", - "sc-telemetry 2.0.0", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-arithmetic 2.0.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-consensus-babe 0.8.0", - "sp-core 2.0.0", - "sp-finality-grandpa 2.0.0", - "sp-finality-tracker 2.0.0", - "sp-inherents 2.0.0", - "sp-keyring 2.0.0", - "sp-runtime 2.0.0", - "sp-state-machine 0.8.0", - "substrate-test-runtime-client 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "assert_matches", + "env_logger 0.7.1", + "finality-grandpa", + "fork-tree", + "futures 0.1.29", + "futures 0.3.4", + "futures-timer 3.0.2", + "log 0.4.8", + "parity-scale-codec", + "parking_lot 0.10.0", + "pin-project", + "rand 0.7.3", + "sc-client", + "sc-client-api", + "sc-keystore", + "sc-network", + "sc-network-gossip", + "sc-network-test", + "sc-telemetry", + "serde_json", + "sp-api", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-core", + "sp-finality-grandpa", + "sp-finality-tracker", + "sp-inherents", + "sp-keyring", + "sp-runtime", + "sp-state-machine", + "substrate-test-runtime-client", + "tempfile", + "tokio 0.1.22", ] [[package]] name = "sc-informant" version = "0.8.0" dependencies = [ - "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client-api 2.0.0", - "sc-network 0.8.0", - "sc-service 0.8.0", - "sp-blockchain 2.0.0", - "sp-runtime 2.0.0", - "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term 0.12.1", + "futures 0.3.4", + "log 0.4.8", + "parity-util-mem", + "sc-client-api", + "sc-network", + "sc-service", + "sp-blockchain", + "sp-runtime", + "wasm-timer", ] [[package]] name = "sc-keystore" version = "2.0.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-application-crypto 2.0.0", - "sp-core 2.0.0", - "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more", + "hex", + "parking_lot 0.10.0", + "rand 0.7.3", + "serde_json", + "sp-application-crypto", + "sp-core", + "subtle 2.2.2", + "tempfile", ] [[package]] name = "sc-network" version = "0.8.0" dependencies = [ - "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "erased-serde 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "fork-tree 2.0.0", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures_codec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "linked_hash_set 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lru 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "nohash-hasher 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "quickcheck 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-block-builder 0.8.0", - "sc-client 0.8.0", - "sc-client-api 2.0.0", - "sc-peerset 2.0.0", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "slog_derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-arithmetic 2.0.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-consensus-babe 0.8.0", - "sp-core 2.0.0", - "sp-keyring 2.0.0", - "sp-runtime 2.0.0", - "sp-test-primitives 2.0.0", - "substrate-test-client 2.0.0", - "substrate-test-runtime 2.0.0", - "substrate-test-runtime-client 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "assert_matches", + "async-std", + "bitflags", + "bytes 0.5.4", + "derive_more", + "either", + "env_logger 0.7.1", + "erased-serde", + "fnv", + "fork-tree", + "futures 0.3.4", + "futures-timer 3.0.2", + "futures_codec", + "libp2p", + "linked-hash-map", + "linked_hash_set", + "log 0.4.8", + "lru 0.4.3", + "nohash-hasher", + "parity-scale-codec", + "parking_lot 0.10.0", + "prost", + "prost-build", + "quickcheck", + "rand 0.7.3", + "rustc-hex", + "sc-block-builder", + "sc-client", + "sc-client-api", + "sc-peerset", + "serde", + "serde_json", + "slog", + "slog_derive", + "smallvec 0.6.13", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-core", + "sp-keyring", + "sp-runtime", + "sp-test-primitives", + "substrate-test-client", + "substrate-test-runtime", + "substrate-test-runtime-client", + "tempfile", + "thiserror", + "unsigned-varint 0.3.1", + "void", + "wasm-timer", + "zeroize 1.1.0", ] [[package]] name = "sc-network-gossip" version = "0.8.0" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lru 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-network 0.8.0", - "sp-runtime 2.0.0", - "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "futures-timer 3.0.2", + "libp2p", + "log 0.4.8", + "lru 0.1.17", + "parking_lot 0.10.0", + "sc-network", + "sp-runtime", + "wasm-timer", ] [[package]] name = "sc-network-test" version = "0.8.0" dependencies = [ - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-block-builder 0.8.0", - "sc-client 0.8.0", - "sc-client-api 2.0.0", - "sc-network 0.8.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-consensus-babe 0.8.0", - "sp-core 2.0.0", - "sp-runtime 2.0.0", - "substrate-test-runtime 2.0.0", - "substrate-test-runtime-client 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1", + "futures 0.1.29", + "futures 0.3.4", + "futures-timer 3.0.2", + "libp2p", + "log 0.4.8", + "parking_lot 0.10.0", + "rand 0.7.3", + "sc-block-builder", + "sc-client", + "sc-client-api", + "sc-network", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-core", + "sp-runtime", + "substrate-test-runtime", + "substrate-test-runtime-client", + "tempfile", + "tokio 0.1.22", ] [[package]] name = "sc-offchain" version = "2.0.0" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-rustls 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client-api 2.0.0", - "sc-client-db 0.8.0", - "sc-keystore 2.0.0", - "sc-network 0.8.0", - "sc-transaction-pool 2.0.0", - "sp-api 2.0.0", - "sp-core 2.0.0", - "sp-offchain 2.0.0", - "sp-runtime 2.0.0", - "sp-transaction-pool 2.0.0", - "substrate-test-runtime-client 2.0.0", - "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "env_logger 0.7.1", + "fnv", + "futures 0.3.4", + "futures-timer 3.0.2", + "hyper 0.13.2", + "hyper-rustls", + "log 0.4.8", + "num_cpus", + "parity-scale-codec", + "parking_lot 0.10.0", + "rand 0.7.3", + "sc-client-api", + "sc-client-db", + "sc-keystore", + "sc-network", + "sc-transaction-pool", + "sp-api", + "sp-core", + "sp-offchain", + "sp-runtime", + "sp-transaction-pool", + "substrate-test-runtime-client", + "threadpool", + "tokio 0.2.11", ] [[package]] name = "sc-peerset" version = "2.0.0" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "libp2p", + "log 0.4.8", + "rand 0.7.3", + "serde_json", + "wasm-timer", ] [[package]] name = "sc-rpc" version = "2.0.0" dependencies = [ - "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client 0.8.0", - "sc-client-api 2.0.0", - "sc-executor 0.8.0", - "sc-keystore 2.0.0", - "sc-network 0.8.0", - "sc-rpc-api 0.8.0", - "sc-transaction-pool 2.0.0", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-blockchain 2.0.0", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-offchain 2.0.0", - "sp-rpc 2.0.0", - "sp-runtime 2.0.0", - "sp-session 2.0.0", - "sp-state-machine 0.8.0", - "sp-transaction-pool 2.0.0", - "sp-version 2.0.0", - "substrate-test-runtime-client 2.0.0", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "assert_matches", + "futures 0.1.29", + "futures 0.3.4", + "hash-db", + "jsonrpc-core", + "jsonrpc-pubsub", + "log 0.4.8", + "parity-scale-codec", + "parking_lot 0.10.0", + "rustc-hex", + "sc-client", + "sc-client-api", + "sc-executor", + "sc-keystore", + "sc-network", + "sc-rpc-api", + "sc-transaction-pool", + "serde_json", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-io", + "sp-offchain", + "sp-rpc", + "sp-runtime", + "sp-session", + "sp-state-machine", + "sp-transaction-pool", + "sp-version", + "substrate-test-runtime-client", + "tokio 0.1.22", ] [[package]] name = "sc-rpc-api" version = "0.8.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-rpc 2.0.0", - "sp-runtime 2.0.0", - "sp-transaction-pool 2.0.0", - "sp-version 2.0.0", + "derive_more", + "futures 0.3.4", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "jsonrpc-pubsub", + "log 0.4.8", + "parity-scale-codec", + "parking_lot 0.10.0", + "serde", + "serde_json", + "sp-core", + "sp-rpc", + "sp-runtime", + "sp-transaction-pool", + "sp-version", ] [[package]] name = "sc-rpc-server" version = "2.0.0" dependencies = [ - "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-http-server 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-ws-server 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime 2.0.0", + "jsonrpc-core", + "jsonrpc-http-server", + "jsonrpc-pubsub", + "jsonrpc-ws-server", + "log 0.4.8", + "serde", + "serde_json", + "sp-runtime", ] [[package]] name = "sc-runtime-test" version = "2.0.0" dependencies = [ - "sp-allocator 2.0.0", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-sandbox 0.8.0", - "sp-std 2.0.0", - "substrate-wasm-builder-runner 1.0.5", + "sp-allocator", + "sp-core", + "sp-io", + "sp-runtime", + "sp-sandbox", + "sp-std", + "substrate-wasm-builder-runner", ] [[package]] name = "sc-service" version = "0.8.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "exit-future 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-diagnose 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "prometheus-exporter 0.8.0", - "sc-chain-spec 2.0.0", - "sc-client 0.8.0", - "sc-client-api 2.0.0", - "sc-client-db 0.8.0", - "sc-executor 0.8.0", - "sc-finality-grandpa 0.8.0", - "sc-keystore 2.0.0", - "sc-network 0.8.0", - "sc-offchain 2.0.0", - "sc-rpc 2.0.0", - "sc-rpc-server 2.0.0", - "sc-telemetry 2.0.0", - "sc-tracing 2.0.0", - "sc-transaction-pool 2.0.0", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-application-crypto 2.0.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-consensus-babe 0.8.0", - "sp-core 2.0.0", - "sp-finality-grandpa 2.0.0", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-session 2.0.0", - "sp-transaction-pool 2.0.0", - "substrate-test-runtime-client 2.0.0", - "sysinfo 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", - "target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more", + "exit-future", + "futures 0.1.29", + "futures 0.3.4", + "futures-diagnose", + "futures-timer 3.0.2", + "lazy_static", + "log 0.4.8", + "parity-multiaddr 0.5.0", + "parity-scale-codec", + "parity-util-mem", + "parking_lot 0.10.0", + "prometheus-exporter", + "sc-chain-spec", + "sc-client", + "sc-client-api", + "sc-client-db", + "sc-executor", + "sc-finality-grandpa", + "sc-keystore", + "sc-network", + "sc-offchain", + "sc-rpc", + "sc-rpc-server", + "sc-telemetry", + "sc-tracing", + "sc-transaction-pool", + "serde", + "serde_json", + "slog", + "sp-api", + "sp-application-crypto", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-core", + "sp-finality-grandpa", + "sp-io", + "sp-runtime", + "sp-session", + "sp-transaction-pool", + "substrate-test-runtime-client", + "sysinfo", + "target_info", + "tokio 0.2.11", + "tracing", + "wasm-timer", ] [[package]] name = "sc-service-test" version = "2.0.0" dependencies = [ - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fdlimit 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client 0.8.0", - "sc-network 0.8.0", - "sc-service 0.8.0", - "sp-consensus 0.8.0", - "sp-core 2.0.0", - "sp-runtime 2.0.0", - "sp-transaction-pool 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1", + "fdlimit", + "futures 0.1.29", + "futures 0.3.4", + "log 0.4.8", + "sc-client", + "sc-network", + "sc-service", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-transaction-pool", + "tempfile", + "tokio 0.1.22", ] [[package]] name = "sc-state-db" version = "0.8.0" dependencies = [ - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", + "env_logger 0.7.1", + "log 0.4.8", + "parity-scale-codec", + "parking_lot 0.10.0", + "sp-core", ] [[package]] name = "sc-telemetry" version = "2.0.0" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slog-scope 4.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "futures 0.3.4", + "futures-timer 3.0.2", + "libp2p", + "log 0.4.8", + "parking_lot 0.10.0", + "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" dependencies = [ - "erased-serde 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-telemetry 2.0.0", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "erased-serde", + "log 0.4.8", + "parking_lot 0.10.0", + "sc-telemetry", + "serde", + "serde_json", + "slog", + "tracing", + "tracing-core", ] [[package]] name = "sc-transaction-graph" version = "2.0.0" dependencies = [ - "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sp-core 2.0.0", - "sp-runtime 2.0.0", - "sp-transaction-pool 2.0.0", - "substrate-test-runtime 2.0.0", - "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "assert_matches", + "criterion 0.3.1", + "derive_more", + "futures 0.3.4", + "linked-hash-map", + "log 0.4.8", + "parity-scale-codec", + "parity-util-mem", + "parking_lot 0.10.0", + "serde", + "sp-blockchain", + "sp-core", + "sp-runtime", + "sp-transaction-pool", + "substrate-test-runtime", + "wasm-timer", ] [[package]] name = "sc-transaction-pool" version = "2.0.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-diagnose 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client-api 2.0.0", - "sc-transaction-graph 2.0.0", - "sp-api 2.0.0", - "sp-blockchain 2.0.0", - "sp-core 2.0.0", - "sp-keyring 2.0.0", - "sp-runtime 2.0.0", - "sp-transaction-pool 2.0.0", - "substrate-test-runtime-client 2.0.0", - "substrate-test-runtime-transaction-pool 2.0.0", - "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more", + "futures 0.3.4", + "futures-diagnose", + "futures-timer 2.0.2", + "log 0.4.8", + "parity-scale-codec", + "parity-util-mem", + "parking_lot 0.10.0", + "sc-client-api", + "sc-transaction-graph", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-keyring", + "sp-runtime", + "sp-transaction-pool", + "substrate-test-runtime-client", + "substrate-test-runtime-transaction-pool", + "wasm-timer", ] [[package]] name = "schannel" version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "winapi 0.3.8", ] [[package]] name = "schnorrkel" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eacd8381b3c37840c9c9f40472af529e49975bdcbc24f83c31059fd6539023d3" dependencies = [ - "curve25519-dalek 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "merlin 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.2.3", + "failure", + "merlin", + "rand 0.6.5", + "rand_core 0.4.2", + "rand_os", + "sha2", + "subtle 2.2.2", + "zeroize 0.9.3", ] [[package]] name = "scopeguard" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scroll" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb2332cb595d33f7edd5700f4cbf94892e680c7f0ae56adab58a35190b66cb1" dependencies = [ - "scroll_derive 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "scroll_derive", ] [[package]] name = "scroll_derive" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8584eea9b9ff42825b46faf46a8c24d2cff13ec152fa2a50df788b87c07ee28" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "sct" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" dependencies = [ - "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ring", + "untrusted", ] [[package]] name = "security-framework" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" dependencies = [ - "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", ] [[package]] name = "security-framework-sys" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" dependencies = [ - "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys", ] [[package]] name = "semver" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" dependencies = [ - "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver-parser", ] [[package]] name = "semver" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "semver-parser", + "serde", ] [[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 = "send_wrapper" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686ef91cf020ad8d4aca9a7047641fd6add626b7b89e14546c2b6a76781cf822" [[package]] name = "send_wrapper" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "serde" version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" dependencies = [ - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "serde_json" version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" dependencies = [ - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "arc-swap", + "libc", ] [[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 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", + "erased-serde", ] [[package]] name = "slog-json" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc0d2aff1f8f325ef660d9a0eb6e6dcd20b30b3f581a5897f58bf42d061c37a" dependencies = [ - "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "erased-serde 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono", + "erased-serde", + "serde", + "serde_json", + "slog", ] [[package]] name = "slog-scope" version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c44c89dd8b0ae4537d1ae318353eaf7840b4869c536e31c41e963d1ea523ee6" dependencies = [ - "arc-swap 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "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.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "smallvec" version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" dependencies = [ - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "maybe-uninit", ] [[package]] name = "smallvec" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc" [[package]] name = "snow" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb767eee7d257ba202f0b9b08673bc13b22281632ef45267b19f13100accd2f" dependencies = [ - "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "chacha20-poly1305-aead 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "x25519-dalek 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.6.0", ] [[package]] name = "soketto" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c9dab3f95c9ebdf3a88268c19af668f637a3c5039c2c56ff2d40b1b2d64a25b" dependencies = [ - "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.11.0", + "bytes 0.5.4", + "flate2", + "futures 0.3.4", + "http 0.2.0", + "httparse", + "log 0.4.8", + "rand 0.7.3", + "sha1", + "smallvec 1.2.0", + "static_assertions", + "thiserror", ] [[package]] name = "sourcefile" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" [[package]] name = "sp-allocator" version = "2.0.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-std 2.0.0", - "sp-wasm-interface 2.0.0", + "derive_more", + "log 0.4.8", + "sp-core", + "sp-std", + "sp-wasm-interface", ] [[package]] name = "sp-api" version = "2.0.0" dependencies = [ - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api-proc-macro 2.0.0", - "sp-core 2.0.0", - "sp-runtime 2.0.0", - "sp-state-machine 0.8.0", - "sp-std 2.0.0", - "sp-test-primitives 2.0.0", - "sp-version 2.0.0", + "hash-db", + "parity-scale-codec", + "sp-api-proc-macro", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-test-primitives", + "sp-version", ] [[package]] name = "sp-api-proc-macro" version = "2.0.0" dependencies = [ - "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "blake2-rfc", + "proc-macro-crate", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "sp-api-test" version = "2.0.0" dependencies = [ - "criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-runtime 2.0.0", - "sp-state-machine 0.8.0", - "sp-version 2.0.0", - "substrate-test-runtime-client 2.0.0", - "trybuild 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.3.1", + "parity-scale-codec", + "rustversion", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-runtime", + "sp-state-machine", + "sp-version", + "substrate-test-runtime-client", + "trybuild", ] [[package]] name = "sp-application-crypto" version = "2.0.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-std 2.0.0", + "parity-scale-codec", + "serde", + "sp-core", + "sp-io", + "sp-std", ] [[package]] name = "sp-application-crypto-test" version = "2.0.0" dependencies = [ - "sp-api 2.0.0", - "sp-application-crypto 2.0.0", - "sp-core 2.0.0", - "sp-runtime 2.0.0", - "substrate-test-runtime-client 2.0.0", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-runtime", + "substrate-test-runtime-client", ] [[package]] name = "sp-arithmetic" version = "2.0.0" dependencies = [ - "criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "integer-sqrt 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-debug-derive 2.0.0", - "sp-std 2.0.0", + "criterion 0.3.1", + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "primitive-types", + "rand 0.7.3", + "serde", + "sp-debug-derive", + "sp-std", ] [[package]] name = "sp-authority-discovery" version = "2.0.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-application-crypto 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "parity-scale-codec", + "sp-api", + "sp-application-crypto", + "sp-runtime", + "sp-std", ] [[package]] name = "sp-authorship" version = "2.0.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-inherents 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "parity-scale-codec", + "sp-inherents", + "sp-runtime", + "sp-std", ] [[package]] name = "sp-block-builder" version = "2.0.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-inherents 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "parity-scale-codec", + "sp-api", + "sp-inherents", + "sp-runtime", + "sp-std", ] [[package]] name = "sp-blockchain" version = "2.0.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lru 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-block-builder 2.0.0", - "sp-consensus 0.8.0", - "sp-runtime 2.0.0", - "sp-state-machine 0.8.0", + "derive_more", + "log 0.4.8", + "lru 0.4.3", + "parity-scale-codec", + "parking_lot 0.10.0", + "sp-block-builder", + "sp-consensus", + "sp-runtime", + "sp-state-machine", ] [[package]] name = "sp-consensus" version = "0.8.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-diagnose 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-runtime 2.0.0", - "sp-state-machine 0.8.0", - "sp-std 2.0.0", - "sp-test-primitives 2.0.0", - "sp-version 2.0.0", + "derive_more", + "futures 0.3.4", + "futures-diagnose", + "futures-timer 3.0.2", + "libp2p", + "log 0.4.8", + "parity-scale-codec", + "parking_lot 0.10.0", + "serde", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-test-primitives", + "sp-version", ] [[package]] name = "sp-consensus-aura" version = "0.8.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-application-crypto 2.0.0", - "sp-inherents 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", - "sp-timestamp 2.0.0", + "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" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-application-crypto 2.0.0", - "sp-consensus 0.8.0", - "sp-inherents 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", - "sp-timestamp 2.0.0", + "parity-scale-codec", + "schnorrkel", + "sp-api", + "sp-application-crypto", + "sp-consensus", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-timestamp", ] [[package]] name = "sp-consensus-pow" version = "0.8.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-core 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "parity-scale-codec", + "sp-api", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] name = "sp-core" version = "2.0.0" dependencies = [ - "base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "ed25519-dalek 1.0.0-pre.3 (registry+https://github.com/rust-lang/crates.io-index)", - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hash256-std-hasher 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "impl-serde 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-debug-derive 2.0.0", - "sp-externalities 0.8.0", - "sp-runtime-interface 2.0.0", - "sp-serializer 2.0.0", - "sp-std 2.0.0", - "sp-storage 2.0.0", - "substrate-bip39 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tiny-bip39 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tiny-keccak 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "twox-hash 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base58", + "blake2-rfc", + "byteorder 1.3.4", + "criterion 0.2.11", + "ed25519-dalek", + "hash-db", + "hash256-std-hasher", + "hex", + "hex-literal", + "impl-serde 0.3.0", + "lazy_static", + "libsecp256k1", + "log 0.4.8", + "num-traits", + "parity-scale-codec", + "parity-util-mem", + "parking_lot 0.10.0", + "pretty_assertions", + "primitive-types", + "rand 0.7.3", + "regex", + "rustc-hex", + "schnorrkel", + "serde", + "serde_json", + "sha2", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-serializer", + "sp-std", + "sp-storage", + "substrate-bip39", + "tiny-bip39", + "tiny-keccak 2.0.1", + "twox-hash", + "wasmi", + "zeroize 1.1.0", ] [[package]] name = "sp-debug-derive" version = "2.0.0" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "sp-externalities" version = "0.8.0" dependencies = [ - "environmental 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 2.0.0", - "sp-storage 2.0.0", + "environmental", + "sp-std", + "sp-storage", ] [[package]] name = "sp-finality-grandpa" version = "2.0.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-application-crypto 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "parity-scale-codec", + "serde", + "sp-api", + "sp-application-crypto", + "sp-runtime", + "sp-std", ] [[package]] name = "sp-finality-tracker" version = "2.0.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-inherents 2.0.0", - "sp-std 2.0.0", + "parity-scale-codec", + "sp-inherents", + "sp-std", ] [[package]] name = "sp-inherents" version = "2.0.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-std 2.0.0", + "derive_more", + "parity-scale-codec", + "parking_lot 0.10.0", + "sp-core", + "sp-std", ] [[package]] name = "sp-io" version = "2.0.0" dependencies = [ - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-externalities 0.8.0", - "sp-runtime-interface 2.0.0", - "sp-state-machine 0.8.0", - "sp-std 2.0.0", - "sp-trie 2.0.0", - "sp-wasm-interface 2.0.0", + "hash-db", + "libsecp256k1", + "log 0.4.8", + "parity-scale-codec", + "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" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-runtime 2.0.0", - "strum 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "sp-core", + "sp-runtime", + "strum", ] [[package]] name = "sp-offchain" version = "2.0.0" dependencies = [ - "sp-api 2.0.0", - "sp-runtime 2.0.0", + "sp-api", + "sp-runtime", ] [[package]] name = "sp-panic-handler" version = "2.0.0" dependencies = [ - "backtrace 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace", + "log 0.4.8", ] [[package]] name = "sp-phragmen" version = "2.0.0" dependencies = [ - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-io 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", - "substrate-test-utils 2.0.0", + "rand 0.7.3", + "serde", + "sp-io", + "sp-runtime", + "sp-std", + "substrate-test-utils", ] [[package]] name = "sp-rpc" version = "2.0.0" dependencies = [ - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", + "serde", + "serde_json", + "sp-core", ] [[package]] name = "sp-runtime" version = "2.0.0" dependencies = [ - "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-application-crypto 2.0.0", - "sp-arithmetic 2.0.0", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-io 2.0.0", - "sp-std 2.0.0", + "impl-trait-for-tuples", + "log 0.4.8", + "parity-scale-codec", + "parity-util-mem", + "paste", + "rand 0.7.3", + "serde", + "serde_json", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-inherents", + "sp-io", + "sp-std", ] [[package]] name = "sp-runtime-interface" version = "2.0.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-externalities 0.8.0", - "sp-io 2.0.0", - "sp-runtime-interface-proc-macro 2.0.0", - "sp-runtime-interface-test-wasm 2.0.0", - "sp-state-machine 0.8.0", - "sp-std 2.0.0", - "sp-wasm-interface 2.0.0", - "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "trybuild 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec", + "primitive-types", + "rustversion", + "sp-core", + "sp-externalities", + "sp-io", + "sp-runtime-interface-proc-macro", + "sp-runtime-interface-test-wasm", + "sp-state-machine", + "sp-std", + "sp-wasm-interface", + "static_assertions", + "trybuild", ] [[package]] name = "sp-runtime-interface-proc-macro" version = "2.0.0" dependencies = [ - "Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "Inflector", + "proc-macro-crate", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "sp-runtime-interface-test" version = "2.0.0" dependencies = [ - "sc-executor 0.8.0", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime-interface 2.0.0", - "sp-runtime-interface-test-wasm 2.0.0", - "sp-state-machine 0.8.0", + "sc-executor", + "sp-core", + "sp-io", + "sp-runtime-interface", + "sp-runtime-interface-test-wasm", + "sp-state-machine", ] [[package]] name = "sp-runtime-interface-test-wasm" version = "2.0.0" dependencies = [ - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-runtime-interface 2.0.0", - "sp-std 2.0.0", - "substrate-wasm-builder-runner 1.0.5", + "sp-core", + "sp-io", + "sp-runtime-interface", + "sp-std", + "substrate-wasm-builder-runner", ] [[package]] name = "sp-sandbox" version = "0.8.0" dependencies = [ - "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-io 2.0.0", - "sp-std 2.0.0", - "sp-wasm-interface 2.0.0", - "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "assert_matches", + "parity-scale-codec", + "sp-core", + "sp-io", + "sp-std", + "sp-wasm-interface", + "wabt", + "wasmi", ] [[package]] name = "sp-serializer" version = "2.0.0" dependencies = [ - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", + "serde_json", ] [[package]] name = "sp-session" version = "2.0.0" dependencies = [ - "sp-api 2.0.0", - "sp-core 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "sp-api", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] name = "sp-staking" version = "2.0.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "parity-scale-codec", + "sp-runtime", + "sp-std", ] [[package]] name = "sp-state-machine" version = "0.8.0" dependencies = [ - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-externalities 0.8.0", - "sp-panic-handler 2.0.0", - "sp-trie 2.0.0", - "trie-db 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-root 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db", + "hex-literal", + "log 0.4.8", + "num-traits", + "parity-scale-codec", + "parking_lot 0.10.0", + "rand 0.7.3", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-trie", + "trie-db", + "trie-root", ] [[package]] @@ -6988,212 +7436,224 @@ version = "2.0.0" name = "sp-storage" version = "2.0.0" dependencies = [ - "impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-debug-derive 2.0.0", - "sp-std 2.0.0", + "impl-serde 0.2.3", + "serde", + "sp-debug-derive", + "sp-std", ] [[package]] name = "sp-test-primitives" version = "2.0.0" dependencies = [ - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-application-crypto 2.0.0", - "sp-core 2.0.0", - "sp-runtime 2.0.0", + "parity-scale-codec", + "parity-util-mem", + "serde", + "sp-application-crypto", + "sp-core", + "sp-runtime", ] [[package]] name = "sp-timestamp" version = "2.0.0" dependencies = [ - "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-inherents 2.0.0", - "sp-runtime 2.0.0", - "sp-std 2.0.0", - "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "impl-trait-for-tuples", + "parity-scale-codec", + "sp-api", + "sp-inherents", + "sp-runtime", + "sp-std", + "wasm-timer", ] [[package]] name = "sp-transaction-pool" version = "2.0.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-runtime 2.0.0", + "derive_more", + "futures 0.3.4", + "log 0.4.8", + "parity-scale-codec", + "serde", + "sp-api", + "sp-runtime", ] [[package]] name = "sp-trie" version = "2.0.0" dependencies = [ - "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "memory-db 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-std 2.0.0", - "trie-bench 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-db 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-root 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-standardmap 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.2.11", + "hash-db", + "hex-literal", + "memory-db", + "parity-scale-codec", + "sp-core", + "sp-std", + "trie-bench", + "trie-db", + "trie-root", + "trie-standardmap", ] [[package]] name = "sp-version" version = "2.0.0" dependencies = [ - "impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime 2.0.0", - "sp-std 2.0.0", + "impl-serde 0.2.3", + "parity-scale-codec", + "serde", + "sp-runtime", + "sp-std", ] [[package]] name = "sp-wasm-interface" version = "2.0.0" dependencies = [ - "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 2.0.0", - "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "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 = "stream-cipher" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8131256a5896cabcf5eb04f4d6dacbe1aefda854b0d9896e09cb58829ec5638c" dependencies = [ - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array", ] [[package]] name = "string" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12", ] [[package]] name = "string-interner" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd710eadff449a1531351b0e43eb81ea404336fa2f56c777427ab0e32a4cf183" dependencies = [ - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", ] [[package]] name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "structopt" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1bcbed7d48956fcbb5d80c6b95aedb553513de0a1b451ea92679d999c010e98" dependencies = [ - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "structopt-derive 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "clap", + "lazy_static", + "structopt-derive", ] [[package]] name = "structopt-derive" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "095064aa1f5b94d14e635d0a5684cf140c43ae40a0fd990708d38f5d669e5f64" dependencies = [ - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-error 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "heck", + "proc-macro-error", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "strum" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6138f8f88a16d90134763314e3fc76fa3ed6a7db4725d6acf9a3ef95a3188d22" dependencies = [ - "strum_macros 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "strum_macros", ] [[package]] name = "strum_macros" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0054a7df764039a6cd8592b9de84be4bec368ff081d203a7d5371cbfa8e65c81" dependencies = [ - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "heck", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "subkey" version = "2.0.0" dependencies = [ - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "frame-system 2.0.0", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", - "node-primitives 2.0.0", - "node-runtime 2.0.0", - "pallet-balances 2.0.0", - "pallet-transaction-payment 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rpassword 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-rpc 2.0.0", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 2.0.0", - "sp-runtime 2.0.0", - "substrate-bip39 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tiny-bip39 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap", + "derive_more", + "frame-system", + "futures 0.1.29", + "hex", + "hex-literal", + "hyper 0.12.35", + "itertools", + "jsonrpc-core-client", + "libp2p", + "node-primitives", + "node-runtime", + "pallet-balances", + "pallet-transaction-payment", + "parity-scale-codec", + "rand 0.7.3", + "rpassword", + "rustc-hex", + "sc-rpc", + "serde_json", + "sp-core", + "sp-runtime", + "substrate-bip39", + "tiny-bip39", ] [[package]] name = "substrate-bip39" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be511be555a3633e71739a79e4ddff6a6aaa6579fa6114182a51d72c3eb93c5" dependencies = [ - "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac", + "pbkdf2", + "schnorrkel", + "sha2", ] [[package]] @@ -7204,131 +7664,131 @@ version = "2.0.0" name = "substrate-frame-rpc-support" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-client-transports 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-rpc-api 0.8.0", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 2.0.0", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-support", + "frame-system", + "futures 0.3.4", + "jsonrpc-client-transports", + "jsonrpc-core", + "parity-scale-codec", + "sc-rpc-api", + "serde", + "sp-storage", + "tokio 0.1.22", ] [[package]] name = "substrate-frame-rpc-system" version = "2.0.0" dependencies = [ - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "frame-system-rpc-runtime-api 2.0.0", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client 0.8.0", - "sc-transaction-pool 2.0.0", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-blockchain 2.0.0", - "sp-core 2.0.0", - "sp-runtime 2.0.0", - "sp-transaction-pool 2.0.0", - "substrate-test-runtime-client 2.0.0", + "env_logger 0.7.1", + "frame-system-rpc-runtime-api", + "futures 0.3.4", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "log 0.4.8", + "parity-scale-codec", + "sc-client", + "sc-transaction-pool", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-runtime", + "sp-transaction-pool", + "substrate-test-runtime-client", ] [[package]] name = "substrate-test-client" version = "2.0.0" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client 0.8.0", - "sc-client-api 2.0.0", - "sc-client-db 0.8.0", - "sc-executor 0.8.0", - "sp-blockchain 2.0.0", - "sp-consensus 0.8.0", - "sp-core 2.0.0", - "sp-keyring 2.0.0", - "sp-runtime 2.0.0", - "sp-state-machine 0.8.0", + "futures 0.3.4", + "hash-db", + "parity-scale-codec", + "sc-client", + "sc-client-api", + "sc-client-db", + "sc-executor", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-keyring", + "sp-runtime", + "sp-state-machine", ] [[package]] name = "substrate-test-runtime" version = "2.0.0" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "frame-executive 2.0.0", - "frame-support 2.0.0", - "frame-system 2.0.0", - "frame-system-rpc-runtime-api 2.0.0", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memory-db 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pallet-babe 2.0.0", - "pallet-timestamp 2.0.0", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-client 0.8.0", - "sc-executor 0.8.0", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-api 2.0.0", - "sp-application-crypto 2.0.0", - "sp-block-builder 2.0.0", - "sp-consensus-aura 0.8.0", - "sp-consensus-babe 0.8.0", - "sp-core 2.0.0", - "sp-inherents 2.0.0", - "sp-io 2.0.0", - "sp-keyring 2.0.0", - "sp-offchain 2.0.0", - "sp-runtime 2.0.0", - "sp-runtime-interface 2.0.0", - "sp-session 2.0.0", - "sp-state-machine 0.8.0", - "sp-std 2.0.0", - "sp-transaction-pool 2.0.0", - "sp-trie 2.0.0", - "sp-version 2.0.0", - "substrate-test-runtime-client 2.0.0", - "substrate-wasm-builder-runner 1.0.5", - "trie-db 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-rpc-runtime-api", + "log 0.4.8", + "memory-db", + "pallet-babe", + "pallet-timestamp", + "parity-scale-codec", + "parity-util-mem", + "sc-client", + "sc-executor", + "serde", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-consensus-aura", + "sp-consensus-babe", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-offchain", + "sp-runtime", + "sp-runtime-interface", + "sp-session", + "sp-state-machine", + "sp-std", + "sp-transaction-pool", + "sp-trie", + "sp-version", + "substrate-test-runtime-client", + "substrate-wasm-builder-runner", + "trie-db", ] [[package]] name = "substrate-test-runtime-client" version = "2.0.0" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-block-builder 0.8.0", - "sc-client 0.8.0", - "sc-client-api 2.0.0", - "sp-api 2.0.0", - "sp-blockchain 2.0.0", - "sp-core 2.0.0", - "sp-runtime 2.0.0", - "substrate-test-client 2.0.0", - "substrate-test-runtime 2.0.0", + "futures 0.3.4", + "parity-scale-codec", + "sc-block-builder", + "sc-client", + "sc-client-api", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-runtime", + "substrate-test-client", + "substrate-test-runtime", ] [[package]] name = "substrate-test-runtime-transaction-pool" version = "2.0.0" dependencies = [ - "derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-transaction-graph 2.0.0", - "sp-blockchain 2.0.0", - "sp-runtime 2.0.0", - "sp-transaction-pool 2.0.0", - "substrate-test-runtime-client 2.0.0", + "derive_more", + "futures 0.3.4", + "parity-scale-codec", + "parking_lot 0.10.0", + "sc-transaction-graph", + "sp-blockchain", + "sp-runtime", + "sp-transaction-pool", + "substrate-test-runtime-client", ] [[package]] @@ -7339,14 +7799,14 @@ version = "2.0.0" name = "substrate-wasm-builder" version = "1.0.9" dependencies = [ - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "build-helper 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cargo_metadata 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fs2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-gc-api 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "atty", + "build-helper", + "cargo_metadata", + "fs2", + "tempfile", + "toml", + "walkdir", + "wasm-gc-api", ] [[package]] @@ -7357,1897 +7817,1436 @@ version = "1.0.5" 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 = "syn" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "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.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "synstructure" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", + "unicode-xid 0.2.0", ] [[package]] name = "sysinfo" version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f4b2468c629cffba39c0a4425849ab3cdb03d9dfacba69684609aea04d08ff9" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "doc-comment 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "doc-comment", + "libc", + "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 = "target-lexicon" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d" [[package]] name = "target_info" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe" [[package]] name = "tempdir" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" dependencies = [ - "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.6", + "remove_dir_all", ] [[package]] name = "tempfile" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util", ] [[package]] name = "test-case" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a605baa797821796a751f4a959e1206079b24a4b7e1ed302b7d785d81a9276c9" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", + "version_check 0.9.1", ] [[package]] name = "textwrap" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width", ] [[package]] name = "thiserror" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee14bf8e6767ab4c687c9e8bc003879e042a96fd67a3ba5934eadb6536bef4db" dependencies = [ - "thiserror-impl 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror-impl", ] [[package]] name = "thiserror-impl" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7b51e1fbc44b5a0840be594fbc0f960be09050f2617e61e6aa43bef97cd3ef4" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "thread_local" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", ] [[package]] name = "threadpool" version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" dependencies = [ - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus", ] [[package]] name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "redox_syscall", + "winapi 0.3.8", ] [[package]] name = "tiny-bip39" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd1fb03fe8e07d17cd851a624a9fff74642a997b67fbd1ccd77533241640d92" dependencies = [ - "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "once_cell 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "failure", + "hmac", + "once_cell", + "pbkdf2", + "rand 0.7.3", + "rustc-hash", + "sha2", ] [[package]] name = "tiny-keccak" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d8a021c69bb74a44ccedb824a046447e2c84a01df9e5c20779750acb38e11b2" dependencies = [ - "crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crunchy", ] [[package]] name = "tiny-keccak" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2953ca5148619bc99695c1274cb54c5275bbb913c6adad87e72eaf8db9787f69" dependencies = [ - "crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crunchy", ] [[package]] name = "tinytemplate" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57a3c6667d3e65eb1bc3aed6fd14011c6cbc3a0665218ab7f5daf040b9ec371a" dependencies = [ - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", + "serde_json", ] [[package]] name = "tokio" version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-fs 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-udp 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-uds 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "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.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fdd17989496f49cdc57978c96f0c9fe5e4a58a8bddc6813c449a4624f6a030b" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-macros 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "fnv", + "iovec", + "lazy_static", + "libc", + "memchr", + "mio", + "mio-uds", + "num_cpus", + "pin-project-lite", + "signal-hook-registry", + "slab", + "tokio-macros", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12", + "futures 0.1.29", + "log 0.4.8", ] [[package]] name = "tokio-macros" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4b1e7ed7d5d4c2af3d999904b0eebe76544897cdbfb2b9684bed2174ab20f7c" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", ] [[package]] name = "tokio-reactor" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" dependencies = [ - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils", + "futures 0.1.29", + "lazy_static", + "log 0.4.8", + "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.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "141afec0978abae6573065a48882c6bae44c5cc61db9b511ac4abf6a09bfd9cc" dependencies = [ - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", + "rustls", + "tokio 0.2.11", + "webpki", ] [[package]] name = "tokio-sync" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" dependencies = [ - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "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 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque", + "crossbeam-queue", + "crossbeam-utils", + "futures 0.1.29", + "lazy_static", + "log 0.4.8", + "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 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils", + "futures 0.1.29", + "slab", + "tokio-executor 0.1.10", ] [[package]] name = "tokio-tls" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "354b8cd83825b3c20217a9dc174d6a0c67441a2fae5c41bcb1ea6679f6ae0f7c" dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29", + "native-tls", + "tokio-io", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12", + "futures 0.1.29", + "log 0.4.8", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12", + "futures 0.1.29", + "iovec", + "libc", + "log 0.4.8", + "mio", + "mio-uds", + "tokio-codec", + "tokio-io", + "tokio-reactor", ] [[package]] name = "tokio-util" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "futures-core", + "futures-sink", + "log 0.4.8", + "pin-project-lite", + "tokio 0.2.11", ] [[package]] name = "toml" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" dependencies = [ - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "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.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e213bd24252abeb86a0b7060e02df677d367ce6cb772cef17e9214b8390a8d3" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing-attributes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "tracing-attributes", + "tracing-core", ] [[package]] name = "tracing-attributes" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04cfd395def5a60236e187e1ff905cb55668a59f29928dec05e6e1b1fd2ac1f3" dependencies = [ - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2", + "syn", ] [[package]] name = "tracing-core" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13a46f11e372b8bd4b4398ea54353412fdd7fd42a8370c7e543e218cf7661978" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", ] [[package]] name = "traitobject" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" [[package]] name = "treeline" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" [[package]] name = "trie-bench" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dcd9bac85703d8f974ee1e6dfe668784b105d3385c174ad729adb7427ad5d81" dependencies = [ - "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak-hasher 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "memory-db 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-db 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-root 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-standardmap 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.2.11", + "hash-db", + "keccak-hasher", + "memory-db", + "parity-scale-codec", + "trie-db", + "trie-root", + "trie-standardmap", ] [[package]] name = "trie-db" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de9222c50cc325855621271157c973da27a0dcd26fa06f8edf81020bd2333df0" dependencies = [ - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db", + "hashbrown 0.6.3", + "log 0.4.8", + "rustc-hex", + "smallvec 1.2.0", ] [[package]] name = "trie-root" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "652931506d2c1244d7217a70b99f56718a7b4161b37f04e7cd868072a99f68cd" dependencies = [ - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db", ] [[package]] name = "trie-standardmap" version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3161ba520ab28cd8e6b68e1126f1009f6e335339d1a73b978139011703264c8" dependencies = [ - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak-hasher 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db", + "keccak-hasher", ] [[package]] name = "try-lock" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" [[package]] name = "trybuild" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5867c525891caf154503954cb743ff7f1c4ca2c3e8578f6a5af84c913aa084c8" dependencies = [ - "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "glob 0.3.0", + "lazy_static", + "serde", + "serde_json", + "termcolor", + "toml", ] [[package]] name = "twofish" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712d261e83e727c8e2dbb75dacac67c36e35db36a958ee504f2164fc052434e1" dependencies = [ - "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "block-cipher-trait", + "byteorder 1.3.4", + "opaque-debug", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3", ] [[package]] name = "typeable" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" [[package]] name = "typenum" version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" [[package]] name = "uint" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e75a4cdd7b87b28840dba13c483b9a88ee6bbf16ba5c951ee1ecfcf723078e0d" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "crunchy", + "rustc-hex", + "static_assertions", ] [[package]] name = "unicase" version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" dependencies = [ - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5", ] [[package]] name = "unicase" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ - "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.9.1", ] [[package]] name = "unicode-bidi" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", ] [[package]] name = "unicode-normalization" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" dependencies = [ - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.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.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.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7f0023a96687fe169081e8adce3f65e3874426b7886e9234d490af2dc077959" [[package]] name = "unsigned-varint" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b7ffb36714206d2f5f05d61a2bc350415c642f2c54433f0ebf829afbe41d570" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures_codec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "futures_codec", ] [[package]] name = "untrusted" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60369ef7a31de49bcb3f6ca728d4ba7300d9a1658f94c727d4cab8c8d9f4aece" [[package]] name = "url" version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" dependencies = [ - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "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_map" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" [[package]] name = "vergen" version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aba5e34f93dc7051dfad05b98a18e9156f27e7b431fe1d2398cb6061c0a1dba" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "chrono", + "failure", ] [[package]] name = "version_check" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" [[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 = "wabt" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5c5c1286c6e578416982609f47594265f9d489f9b836157d403ad605a46693" dependencies = [ - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "wabt-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", + "serde_derive", + "serde_json", + "wabt-sys", ] [[package]] name = "wabt-sys" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af5d153dc96aad7dc13ab90835b892c69867948112d95299e522d370c4e13a08" dependencies = [ - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "cmake", + "glob 0.2.11", ] [[package]] name = "walkdir" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" dependencies = [ - "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file", + "winapi 0.3.8", + "winapi-util", ] [[package]] name = "want" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29", + "log 0.4.8", + "try-lock", ] [[package]] name = "want" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8", + "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.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45" dependencies = [ - "bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "bumpalo", + "lazy_static", + "log 0.4.8", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bbdd49e3e28b40dec6a9ba8d17798245ce32b019513a845369c641b275135d9" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", ] [[package]] name = "wasm-bindgen-macro" version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3" dependencies = [ - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2", + "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" dependencies = [ - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601" [[package]] name = "wasm-bindgen-webidl" version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d" dependencies = [ - "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow", + "heck", + "log 0.4.8", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", + "wasm-bindgen-backend", + "weedle", ] [[package]] name = "wasm-gc-api" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0c32691b6c7e6c14e7f8fd55361a9088b507aa49620fcd06c09b3a1082186b9" dependencies = [ - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-wasm 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8", + "parity-wasm 0.32.0", + "rustc-demangle", ] [[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 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", - "send_wrapper 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "js-sys", + "parking_lot 0.9.0", + "pin-utils", + "send_wrapper 0.2.0", + "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 = [ - "errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi-validation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "errno", + "libc", + "memory_units", + "num-rational", + "num-traits", + "parity-wasm 0.41.0", + "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 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wasm 0.41.0", ] [[package]] name = "wasmparser" version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "073da89bf1c84db000dd68ce660c1b4a08e3a2d28fd1e3394ab9e7abdde4a0f8" [[package]] name = "wasmparser" version = "0.51.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a40d24f114a3f24b459ec292019220cff6388673b4a2c0a11483665b599ef15c" [[package]] name = "wasmtime" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5614d964c3e7d07a13b59aca66103c52656bd80430f0d86dc7eeb3af4f03d4a2" dependencies = [ - "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "backtrace 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "region 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmparser 0.51.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmtime-environ 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmtime-jit 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmtime-runtime 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wat 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow", + "backtrace", + "cfg-if", + "lazy_static", + "libc", + "region", + "rustc-demangle", + "target-lexicon", + "wasmparser 0.51.2", + "wasmtime-environ", + "wasmtime-jit", + "wasmtime-runtime", + "wat", + "winapi 0.3.8", ] [[package]] name = "wasmtime-debug" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feb5900275b4ef0b621ce725b9d5660b12825d7f7d79b392b97baf089ffab8c0" dependencies = [ - "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "faerie 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gimli 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "more-asserts 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmparser 0.51.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmtime-environ 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow", + "faerie", + "gimli 0.19.0", + "more-asserts", + "target-lexicon", + "thiserror", + "wasmparser 0.51.2", + "wasmtime-environ", ] [[package]] name = "wasmtime-environ" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-codegen 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-entity 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-wasm 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "directories 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "file-per-thread-logger 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "more-asserts 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmparser 0.51.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "zstd 0.5.1+zstd.1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", +checksum = "f04661851e133fb11691c4a0f92a705766b4bbf7afc06811f949e295cc8414fc" +dependencies = [ + "anyhow", + "base64 0.11.0", + "bincode", + "cranelift-codegen", + "cranelift-entity", + "cranelift-wasm", + "directories", + "errno", + "file-per-thread-logger", + "indexmap", + "libc", + "log 0.4.8", + "more-asserts", + "rayon", + "serde", + "sha2", + "thiserror", + "toml", + "wasmparser 0.51.2", + "winapi 0.3.8", + "zstd", ] [[package]] name = "wasmtime-jit" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d451353764ce55c9bb6a8b260063cfc209b7adadd277a9a872ab4563a69e357c" dependencies = [ - "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-codegen 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-entity 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-frontend 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-native 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-wasm 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)", - "more-asserts 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "region 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmparser 0.51.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmtime-debug 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmtime-environ 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmtime-runtime 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow", + "cfg-if", + "cranelift-codegen", + "cranelift-entity", + "cranelift-frontend", + "cranelift-native", + "cranelift-wasm", + "more-asserts", + "region", + "target-lexicon", + "thiserror", + "wasmparser 0.51.2", + "wasmtime-debug", + "wasmtime-environ", + "wasmtime-runtime", + "winapi 0.3.8", ] [[package]] name = "wasmtime-runtime" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dbd4fc114b828cae3e405fed413df4b3814d87a92ea029640cec9ba41f0c162" dependencies = [ - "backtrace 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "more-asserts 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "region 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmtime-environ 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace", + "cc", + "cfg-if", + "indexmap", + "libc", + "memoffset", + "more-asserts", + "region", + "thiserror", + "wasmtime-environ", + "winapi 0.3.8", ] [[package]] name = "wast" version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9df3d716118a503b2f6bbb6ff46b21997ab0cc167b01de7a188e45e4b01e8d" dependencies = [ - "leb128 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "leb128", ] [[package]] name = "wat" version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a927b35badc29c97d97e82689eef7f72fc936d884b3391804c1bb6cd2bdccbb" dependencies = [ - "wast 8.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wast", ] [[package]] name = "web-sys" version = "0.3.35" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b" dependencies = [ - "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow", + "js-sys", + "sourcefile", + "wasm-bindgen", + "wasm-bindgen-webidl", ] [[package]] name = "webpki" version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" dependencies = [ - "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ring", + "untrusted", ] [[package]] name = "webpki-roots" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a262ae37dd9d60f60dd473d1158f9fbebf110ba7b6a5051c8160460f6043718b" dependencies = [ - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki", ] [[package]] name = "webpki-roots" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cd5736df7f12a964a5067a12c62fa38e1bd8080aff1f80bc29be7c80d19ab4" dependencies = [ - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki", ] [[package]] name = "websocket" version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413b37840b9e27b340ce91b319ede10731de8c72f5bc4cb0206ec1ca4ce581d0" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "websocket-base 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12", + "futures 0.1.29", + "hyper 0.10.16", + "native-tls", + "rand 0.6.5", + "tokio-codec", + "tokio-io", + "tokio-reactor", + "tokio-tcp", + "tokio-tls", + "unicase 1.4.2", + "url 1.7.2", + "websocket-base", ] [[package]] name = "websocket-base" version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e3810f0d00c4dccb54c30a4eee815e703232819dec7b007db115791c42aa374" dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.10.1", + "bitflags", + "byteorder 1.3.4", + "bytes 0.4.12", + "futures 0.1.29", + "native-tls", + "rand 0.6.5", + "sha1", + "tokio-codec", + "tokio-io", + "tokio-tcp", + "tokio-tls", ] [[package]] name = "weedle" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164" dependencies = [ - "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "nom", ] [[package]] name = "which" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164" dependencies = [ - "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "failure", + "libc", ] [[package]] name = "which" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5475d47078209a02e60614f7ba5e645ef3ed60f771920ac1906d7c1cc65024c8" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "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 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "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.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80" dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "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 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4", + "bytes 0.4.12", + "httparse", + "log 0.4.8", + "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 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8", + "winapi-build", ] [[package]] name = "x25519-dalek" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee1585dc1484373cbc1cee7aafda26634665cf449436fd6e24bfd1fad230538" dependencies = [ - "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "clear_on_drop", + "curve25519-dalek 1.2.3", + "rand_core 0.3.1", ] [[package]] name = "x25519-dalek" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "637ff90c9540fa3073bb577e65033069e4bae7c79d49d74aa3ffdf5342a53217" dependencies = [ - "curve25519-dalek 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 2.0.0", + "rand_core 0.5.1", + "zeroize 1.1.0", ] [[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.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d73295bc9d9acf89dd9336b3b5f5b57731ee72b587857dd4312721a0196b48e5" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "nohash-hasher 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "futures 0.3.4", + "log 0.4.8", + "nohash-hasher", + "parking_lot 0.10.0", + "rand 0.7.3", + "thiserror", ] [[package]] name = "zeroize" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45af6a010d13e4cf5b54c94ba5a2b2eba5596b9e46bf5875612d332a1f2b3f86" [[package]] name = "zeroize" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8" dependencies = [ - "zeroize_derive 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "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.8 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn", + "synstructure", ] [[package]] name = "zstd" version = "0.5.1+zstd.1.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5d978b793ae64375b80baf652919b148f6a496ac8802922d9999f5a553194f" dependencies = [ - "zstd-safe 2.0.3+zstd.1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "zstd-safe", ] [[package]] name = "zstd-safe" version = "2.0.3+zstd.1.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee25eac9753cfedd48133fa1736cbd23b774e253d89badbeac7d12b23848d3f" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "zstd-sys 1.4.15+zstd.1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "zstd-sys", ] [[package]] name = "zstd-sys" version = "1.4.15+zstd.1.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89719b034dc22d240d5b407fb0a3fe6d29952c181cff9a9f95c0bd40b4f8f7d8" dependencies = [ - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[metadata] -"checksum Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -"checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" -"checksum aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2e5b0458ea3beae0d1d8c0f3946564f8e10f90646cf78c06b4351052058d1ee" -"checksum aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d" -"checksum aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100" -"checksum ahash 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "6f33b5018f120946c1dcf279194f238a9f146725593ead1c08fa47ff22b0b5d3" -"checksum aho-corasick 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "743ad5a418686aad3b87fd14c43badd828cf26e214a00f92a384291cf22e1811" -"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -"checksum anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" -"checksum app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" -"checksum arc-swap 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d7b8a9123b8027467bce0099fe556c628a53c8d83df0507084c31e9ba2e39aff" -"checksum arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" -"checksum arrayvec 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" -"checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" -"checksum asn1_der 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6fce6b6a0ffdafebd82c87e79e3f40e8d2c523e5fea5566ff6b90509bf98d638" -"checksum asn1_der_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502" -"checksum assert_cmd 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6283bac8dd7226470d491bc4737816fea4ca1fba7a2847f2e9097fd6bfb4624c" -"checksum assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7deb0a829ca7bcfaf5da70b073a8d128619259a7be8216a355e23f00763059e5" -"checksum async-std 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "538ecb01eb64eecd772087e5b6f7540cbc917f047727339a472dafed2185b267" -"checksum async-task 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0ac2c016b079e771204030951c366db398864f5026f84a44dafb0ff20f02085d" -"checksum async-tls 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce6977f57fa68da77ffe5542950d47e9c23d65f5bc7cb0a9f8700996913eec7" -"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" -"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" -"checksum backtrace 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)" = "e4036b9bf40f3cf16aba72a3d65e8a520fc4bafcdc7079aea8f848c58c5b5536" -"checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" -"checksum base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" -"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" -"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" -"checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" -"checksum bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5753e2a71534719bf3f4e57006c3a4f0d2c672a4b676eec84161f763eca87dbf" -"checksum bindgen 0.49.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4c07087f3d5731bf3fb375a81841b99597e25dc11bd3bc72d16d43adf6624a6e" -"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5da9b3d9f6f585199287a473f4f8dfab6566cf827d15c00c219f53c645687ead" -"checksum bitvec 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a993f74b4c99c1908d156b8d2e0fb6277736b0ecbd833982fd1241d39b2766a6" -"checksum blake2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330" -"checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" -"checksum blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" -"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -"checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" -"checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -"checksum broadcaster 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9c972e21e0d055a36cf73e4daae870941fe7a8abcd5ac3396aab9e4c126bd87" -"checksum bs58 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c95ee6bba9d950218b6cc910cf62bc9e0a171d0f4537e3627b0f54d08549b188" -"checksum bs58 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b170cd256a3f9fa6b9edae3e44a7dfdfc77e8124dbc3e2612d75f9c3e2396dae" -"checksum bstr 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "502ae1441a0a5adb8fbd38a5955a6416b9493e92b465de5e4a9bde6a539c2c48" -"checksum build-helper 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdce191bf3fa4995ce948c8c83b4640a1745457a149e73c6db75b4ffe36aad5f" -"checksum bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1f359dc14ff8911330a51ef78022d376f25ed00248912803b58f00cb1c27f742" -"checksum byte-slice-cast 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b0a5e3906bcbf133e33c1d4d95afc664ad37fbdb9f6568d8043e7ea8c27d93d3" -"checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" -"checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" -"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" -"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -"checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" -"checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" -"checksum c_linked_list 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" -"checksum cargo_metadata 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "46e3374c604fb39d1a2f35ed5e4a4e30e60d01fab49446e08f1b3e9a90aef202" -"checksum cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0" -"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" -"checksum cexpr 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fce5b5fb86b0c57c20c834c1b412fd09c77c8a59b9473f86272709e78874cd1d" -"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -"checksum chacha20-poly1305-aead 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77d2058ba29594f69c75e8a9018e0485e3914ca5084e3613cd64529042f5423b" -"checksum chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01" -"checksum clang-sys 0.28.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81de550971c976f176130da4b2978d3b524eaa0fd9ac31f3ceb5ae1231fb4853" -"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" -"checksum clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "97276801e127ffb46b66ce23f35cc96bd454fa311294bced4bbace7baa8b1d17" -"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "81fb25b677f8bf1eb325017cb6bb8452f87969db0fedb4f757b297bee78a7c62" -"checksum console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d976903543e0c48546a91908f21588a680a8c8f984df9a5d69feccb2b2a211" -"checksum console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1e7871d2947441b0fdd8e2bd1ce2a2f75304f896582c0d572162d48290683c48" -"checksum const-random 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "2f1af9ac737b2dd2d577701e59fd09ba34822f6f2ebdb30a7647405d9e55e16a" -"checksum const-random-macro 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "25e4c606eb459dd29f7c57b2e0879f2b6f14ee130918c2b78ccb58a9624e6c7a" -"checksum constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" -"checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" -"checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" -"checksum cranelift-bforest 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0f53d59dc9ab1c8ab68c991d8406b52b7a0aab0b15b05a3a6895579c4e5dd9" -"checksum cranelift-codegen 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0381a794836fb994c47006465d46d46be072483b667f36013d993b9895117fee" -"checksum cranelift-codegen-meta 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "208c3c8d82bfef32a534c5020c6cfc3bc92f41388f1246b7bb98cf543331abaa" -"checksum cranelift-codegen-shared 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea048c456a517e56fd6df8f0e3947922897e6e6f61fbc5eb557a36c7b8ff6394" -"checksum cranelift-entity 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0c8c7ed50812194c9e9de1fa39c77b39fc9ab48173d5e7ee88b25b6a8953e9b8" -"checksum cranelift-frontend 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "21ceb931d9f919731df1b1ecdc716b5c66384b413a7f95909d1f45441ab9bef5" -"checksum cranelift-native 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "564ee82268bc25b914fcf331edfc2452f2d9ca34f976b187b4ca668beba250c8" -"checksum cranelift-wasm 0.58.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de63e2271b374be5b07f359184e2126a08fb24d24a740cbc178b7e0107ddafa5" -"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" -"checksum criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0363053954f3e679645fc443321ca128b7b950a6fe288cf5f9335cc22ee58394" -"checksum criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1fc755679c12bda8e5523a71e4d654b6bf2e14bd838dfc48cde6559a05caf7d1" -"checksum criterion-plot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76f9212ddf2f4a9eb2d401635190600656a1f88a932ef53d06e7fa4c7e02fb8e" -"checksum criterion-plot 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a01e15e0ea58e8234f96146b1f91fa9d0e4dd7a38da93ff7a75d42c0b9d3a545" -"checksum crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "acec9a3b0b3559f15aee4f90746c4e5e293b701c0f7d3925d24e01645267b68c" -"checksum crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca" -"checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" -"checksum crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" -"checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" -"checksum crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -"checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" -"checksum csv 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279" -"checksum csv-core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" -"checksum ct-logs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113" -"checksum ctor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8ce37ad4184ab2ce004c33bf6379185d3b1c95801cab51026bd271bf68eedc" -"checksum ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "022cd691704491df67d25d006fe8eca083098253c4d43516c2206479c58c6736" -"checksum cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" -"checksum curve25519-dalek 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8b7dcd30ba50cdf88b55b033456138b7c0ac4afdc436d82e1b79f370f24cc66d" -"checksum curve25519-dalek 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26778518a7f6cffa1d25a44b602b62b979bd88adb9e99ffec546998cf3404839" -"checksum data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" -"checksum derive_more 0.99.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a806e96c59a76a5ba6e18735b6cf833344671e61e7863f2edb5c518ea2cac95c" -"checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" -"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -"checksum directories 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "551a778172a450d7fc12e629ca3b0428d00f6afa9a43da1b630d54604e97371c" -"checksum dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" -"checksum dns-parser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" -"checksum doc-comment 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "923dea538cea0aa3025e8685b20d6ee21ef99c4f77e954a30febbaac5ec73a97" -"checksum ed25519-dalek 1.0.0-pre.3 (registry+https://github.com/rust-lang/crates.io-index)" = "978710b352437433c97b2bff193f2fb1dfd58a093f863dd95e225a19baa599a2" -"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" -"checksum enumflags2 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "33121c8782ba948ba332dab29311b026a8716dc65a1599e5b88f392d38496af8" -"checksum enumflags2_derive 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ecf634c5213044b8d54a46dd282cf5dd1f86bb5cb53e92c409cb4680a7fb9894" -"checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" -"checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -"checksum environmental 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "516aa8d7a71cb00a1c4146f0798549b93d083d4f189b3ced8f3de6b8f11ee6c4" -"checksum erased-serde 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)" = "cd7d80305c9bd8cd78e3c753eb9fb110f83621e5211f1a3afffcc812b104daf9" -"checksum errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e" -"checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" -"checksum escargot 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74cf96bec282dcdb07099f7e31d9fed323bca9435a09aba7b6d99b7617bca96d" -"checksum evm 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "272f65e18a2b6449b682bfcdf6c3ccc63db0b93898d89c0fb237548bbfc764a5" -"checksum evm-core 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "66534d42e13d50f9101bed87cb568fd5aa929c600c3c13f8dadbbf39f5635945" -"checksum evm-gasometer 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "39bc5b592803ca644781fe2290b7305ea5182f7c9516d615ddfb2308c2cab639" -"checksum evm-runtime 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "389e4b447fb26971a9c76c8aa49c0ab435f8e46e8fc46e1bc4ebf01f3c2b428f" -"checksum exit-future 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" -"checksum faerie 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74b9ed6159e4a6212c61d9c6a86bee01876b192a64accecf58d5b5ae3b667b52" -"checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" -"checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" -"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" -"checksum fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" -"checksum fdlimit 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9084c55bb76efb1496328976db88320fe7d9ee86e649e83c4ecce3ba7a9a35d1" -"checksum file-per-thread-logger 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8505b75b31ef7285168dd237c4a7db3c1f3e0927e7d314e670bc98e854272fe9" -"checksum finality-grandpa 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3cbb25bef9fcad97fb31e817da280b1c9174435b8769c770ee190a330dd181ea" -"checksum fixed-hash 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3367952ceb191f4ab95dd5685dc163ac539e36202f9fcfd0cb22f9f9c542fefc" -"checksum fixedbitset 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" -"checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" -"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" -"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -"checksum fs-swap 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "921d332c89b3b61a826de38c61ee5b6e02c56806cade1b0e5d81bd71f57a71bb" -"checksum fs2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -"checksum fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5f2a4a2034423744d2cc7ca2068453168dcdb82c438419e639a26bd87839c674" -"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" -"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" -"checksum futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780" -"checksum futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" -"checksum futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "d5e5f4df964fa9c1c2f8bddeb5c3611631cacd93baf810fc8bb2fb4b495c263a" -"checksum futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" -"checksum futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "b35b6263fb1ef523c3056565fa67b1d16f0a8604ff12b11b08c25f28a734c60a" -"checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" -"checksum futures-diagnose 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fdcef58a173af8148b182684c9f2d5250875adbcaff7b5794073894f9d8634a9" -"checksum futures-executor 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f674f3e1bcb15b37284a90cedf55afdba482ab061c407a9c0ebbd0f3109741ba" -"checksum futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" -"checksum futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" -"checksum futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" -"checksum futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" -"checksum futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a1de7508b218029b0f01662ed8f61b1c964b3ae99d6f25462d0f55a595109df6" -"checksum futures-timer 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" -"checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" -"checksum futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "5ce968633c17e5f97936bd2797b6e38fb56cf16a7422319f7ec2e30d3c470e8d" -"checksum futures_codec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a0a73299e4718f5452e45980fc1d6957a070abe308d3700b63b8673f47e1c2b3" -"checksum fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -"checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" -"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" -"checksum get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7" -"checksum get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48" -"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" -"checksum gimli 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "162d18ae5f2e3b90a993d202f1ba17a5633c2484426f8bcae201f86194bacd00" -"checksum gimli 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "81dd6190aad0f05ddbbf3245c54ed14ca4aa6dd32f22312b70d8f168c3e3e633" -"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" -"checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" -"checksum globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "925aa2cac82d8834e2b2a4415b6f6879757fb5c0928fc445ae76461a12eed8f2" -"checksum gloo-timers 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0b2d17dbd803c2fc86cb1b613adf63192046a7176f383a8302594654752c4c4a" -"checksum goblin 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3081214398d39e4bd7f2c1975f0488ed04614ffdd976c6fc7a0708278552c0da" -"checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" -"checksum h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1" -"checksum hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" -"checksum hash256-std-hasher 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" -"checksum hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1de41fb8dba9714efd92241565cdff73f78508c95697dd56787d3cba27e2353" -"checksum hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" -"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -"checksum hermit-abi 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "e2c55f143919fbc0bc77e427fe2d74cf23786d7c1875666f2fde3ac3c659bb67" -"checksum hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" -"checksum hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "961de220ec9a91af2e1e5bd80d02109155695e516771762381ef8581317066e0" -"checksum hex-literal-impl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9d4c5c844e2fee0bf673d54c2c177f1713b3d2af2ff6e666b49cb7572e6cf42d" -"checksum hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" -"checksum hmac-drbg 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" -"checksum http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" -"checksum http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b" -"checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" -"checksum http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" -"checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" -"checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -"checksum hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" -"checksum hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)" = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" -"checksum hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fa1c527bbc634be72aa7ba31e4e4def9bbb020f5416916279b7c705cd838893e" -"checksum hyper-rustls 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6ea6215c7314d450ee45970ab8b3851ab447a0e6bafdd19e31b20a42dbb7faf" -"checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" -"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" -"checksum impl-codec 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53" -"checksum impl-rlp 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8f7a72f11830b52333f36e3b09a288333888bf54380fd0ac0790a3c31ab0f3c5" -"checksum impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "58e3cae7e99c7ff5a995da2cf78dd0a5383740eda71d98cf7b1910c301ac69b8" -"checksum impl-serde 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5bbe9ea9b182f0fb1cabbd61f4ff9b7b7b9197955e95a7e4c27de5055eb29ff8" -"checksum impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" -"checksum indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" -"checksum integer-sqrt 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f65877bf7d44897a473350b1046277941cee20b263397e90869c50b6e766088b" -"checksum interleaved-ordered 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "141340095b15ed7491bd3d4ced9d20cebfb826174b6bb03386381f62b01e3d77" -"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -"checksum ipnet 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a859057dc563d1388c1e816f98a1892629075fc046ed06e845b883bb8b2916fb" -"checksum itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" -"checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" -"checksum jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" -"checksum js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9" -"checksum jsonrpc-client-transports 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0a9ae166c4d1f702d297cd76d4b55758ace80272ffc6dbb139fdc1bf810de40b" -"checksum jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fe3b688648f1ef5d5072229e2d672ecb92cbff7d1c79bcf3fd5898f3f3df0970" -"checksum jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "080dc110be17701097df238fad3c816d4a478a1899dfbcf8ec8957dd40ec7304" -"checksum jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8609af8f63b626e8e211f52441fcdb6ec54f1a446606b10d5c89ae9bf8a20058" -"checksum jsonrpc-http-server 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "816d63997ea45d3634608edbef83ddb35e661f7c0b27b5b72f237e321f0e9807" -"checksum jsonrpc-pubsub 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5b31c9b90731276fdd24d896f31bb10aecf2e5151733364ae81123186643d939" -"checksum jsonrpc-server-utils 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "95b7635e618a0edbbe0d2a2bbbc69874277c49383fcf6c3c0414491cfb517d22" -"checksum jsonrpc-ws-server 14.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b94e5773b2ae66e0e02c80775ce6bbba6f15d5bb47c14ec36a36fcf94f8df851" -"checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" -"checksum keccak-hasher 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3468207deea1359a0e921591ae9b4c928733d94eb9d6a2eeda994cfd59f42cf8" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum kv-log-macro 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c54d9f465d530a752e6ebdc217e081a7a614b48cb200f6f0aee21ba6bc9aabb" -"checksum kvdb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03080afe6f42cd996da9f568d6add5d7fb5ee2ea7fb7802d2d2cbd836958fd87" -"checksum kvdb-memorydb 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b9355274e5a9e0a7e8ef43916950eae3949024de2a8dffe4d5a6c13974a37c8e" -"checksum kvdb-rocksdb 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "af36fd66ccd99f3f771ae39b75aaba28b952372b6debfb971134bf1f03466ab2" -"checksum kvdb-web 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a985c47b4c46429e96033ebf6eaed784a81ceccb4e5df13d63f3b9078a4df81" -"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" -"checksum leb128 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" -"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" -"checksum libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" -"checksum libp2p 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6bf152b510950e1030f2d3dcca5f0b4017892be50348a15fd3eec8b90c826fb" -"checksum libp2p-core 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3b874594c4b29de1a29f27871feba8e6cd13aa54a8a1e8f8c7cf3dfac5ca287c" -"checksum libp2p-core-derive 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96d472e9d522f588805c77801de10b957be84e10f019ca5f869fa1825b15ea9b" -"checksum libp2p-deflate 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e25004d4d9837b44b22c5f1a69be1724a5168fef6cff1716b5176a972c3aa62" -"checksum libp2p-dns 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b99e552f9939b606eb4b59f7f64d9b01e3f96752f47e350fc3c5fc646ed3f649" -"checksum libp2p-floodsub 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d3234f12e44f9a50351a9807b97fe7de11eb9ae4482370392ba10da6dc90722" -"checksum libp2p-gossipsub 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d46cb3e0841bd951cbf4feae56cdc081e6347836a644fb260c3ec554149b4006" -"checksum libp2p-identify 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfeb935a9bd41263e4f3a24b988e9f4a044f3ae89ac284e83c17fe2f84e0d66b" -"checksum libp2p-kad 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76c260a92309112fff855ab2bd8f26c246c1dd380b87021abe61358dedb9748d" -"checksum libp2p-mdns 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "881fcfb360c2822db9f0e6bb6f89529621556ed9a8b038313414eda5107334de" -"checksum libp2p-mplex 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d8507b37ad0eed275efcde67a023c3d85af6c80768b193845b9288e848e1af95" -"checksum libp2p-noise 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac7d33809afdf6794f09fdb2f9f94e1550ae230be5bae6430a078eb96fc9e5a6" -"checksum libp2p-ping 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "33d22f2f228b3a828dca1cb8aa9fa331e0bc9c36510cb2c1916956e20dc85e8c" -"checksum libp2p-plaintext 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "56126a204d7b3382bac163143ff4125a14570b3ba76ba979103d1ae1abed1923" -"checksum libp2p-pnet 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b916938a8868f75180aeeffcc6a516a922d165e8fa2a90b57bad989d1ccbb57a" -"checksum libp2p-secio 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1219e9ecb4945d7331a05f5ffe96a1f6e28051bfa1223d4c60353c251de0354e" -"checksum libp2p-swarm 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "275471e7c0e88ae004660866cd54f603bd8bd1f4caef541a27f50dd8640c4d4c" -"checksum libp2p-tcp 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f9e80ad4e3535345f3d666554ce347d3100453775611c05c60786bf9a1747a10" -"checksum libp2p-uds 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "76d329564a43da9d0e055a5b938633c4a8ceab1f59cec133fbc4647917c07341" -"checksum libp2p-wasm-ext 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7d40c95ac1a9b7fb7770616e4165f34559885337f3be485b32acdd085261be3a" -"checksum libp2p-websocket 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5351ca9eea122081c1c0f9323164d2918cac29b5a6bfe5054d4ba8ec9447cf42" -"checksum libp2p-yamux 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f72aa5a7273c29c6eaea09108a49feaefc7456164863f64f86a193f9e78a4b7f" -"checksum librocksdb-sys 6.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0a0785e816e1e11e7599388a492c61ef80ddc2afc91e313e61662cce537809be" -"checksum libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" -"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" -"checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" -"checksum linked_hash_set 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3c7c91c4c7bbeb4f2f7c4e5be11e6a05bd6830bc37249c47ce1ad86ad453ff9c" -"checksum lock_api 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b" -"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" -"checksum lru 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "5d8f669d42c72d18514dfca8115689c5f6370a17d980cb5bd777a67f404594c8" -"checksum lru 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237" -"checksum mach 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "86dd2487cdfea56def77b88438a2c915fb45113c5319bfe7e14306ca4cd0b0e1" -"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" -"checksum memchr 2.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53445de381a1f436797497c61d851644d0e8e88e6140f22872ad33a704933978" -"checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" -"checksum memory-db 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "198831fe8722331a395bc199a5d08efbc197497ef354cb4c77b969c02ffc0fc4" -"checksum memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" -"checksum merlin 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2b0942b357c1b4d0dc43ba724674ec89c3218e6ca2b3e8269e7cb53bcecd2f6e" -"checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" -"checksum miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" -"checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" -"checksum mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" -"checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" -"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum more-asserts 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" -"checksum multimap 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a97fbd5d00e0e37bfb10f433af8f5aaf631e739368dc9fc28286ca81ca4948dc" -"checksum multistream-select 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f938ffe420493e77c8b6cbcc3f282283f68fc889c5dcbc8e51668d5f3a01ad94" -"checksum names 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da" -"checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" -"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" -"checksum nix 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" -"checksum nodrop 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" -"checksum nohash-hasher 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" -"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" -"checksum num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" -"checksum num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" -"checksum num-rational 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "da4dc79f9e6c81bef96148c8f6b8e72ad4541caa4a24373e900a36da07de03a3" -"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" -"checksum num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" -"checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" -"checksum once_cell 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b1c601810575c99596d4afc46f78a678c80105117c379eb3650cf99b8a21ce5b" -"checksum oorandom 11.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ebcec7c9c2a95cacc7cd0ecb89d8a8454eca13906f6deb55258ffff0adeb9405" -"checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" -"checksum openssl 0.10.28 (registry+https://github.com/rust-lang/crates.io-index)" = "973293749822d7dd6370d6da1e523b0d1db19f06c459134c658b2a4261378b52" -"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)" = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986" -"checksum output_vt100 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" -"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" -"checksum parity-bytes 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0c276d76c5333b8c2579e02d49a06733a55b8282d2d9b13e8d53b6406bd7e30a" -"checksum parity-multiaddr 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "045b3c7af871285146300da35b1932bb6e4639b66c7c98e85d06a32cbc4e8fa7" -"checksum parity-multiaddr 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "26df883298bc3f4e92528b4c5cc9f806b791955b136da3e5e939ed9de0fd958b" -"checksum parity-multihash 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "df3a17dc27848fd99e4f87eb0f8c9baba6ede0a6d555400c850ca45254ef4ce3" -"checksum parity-multihash 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7a1cd2ba02391b81367bec529fb209019d718684fdc8ad6a712c2b536e46f775" -"checksum parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f747c06d9f3b2ad387ac881b9667298c81b1243aa9833f086e05996937c35507" -"checksum parity-scale-codec-derive 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "34e513ff3e406f3ede6796dcdc83d0b32ffb86668cea1ccf7363118abeb00476" -"checksum parity-send-wrapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" -"checksum parity-util-mem 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ef1476e40bf8f5c6776e9600983435821ca86eb9819d74a6207cca69d091406a" -"checksum parity-util-mem-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" -"checksum parity-wasm 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "16ad52817c4d343339b3bc2e26861bd21478eda0b7509acf83505727000512ac" -"checksum parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" -"checksum parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92e98c49ab0b7ce5b222f2cc9193fc4efe11c6d0bd4f648e374684a6857b1cfc" -"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -"checksum parking_lot_core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7582838484df45743c8434fbff785e8edf260c28748353d44bc0da32e0ceabf1" -"checksum paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "423a519e1c6e828f1e73b720f9d9ed2fa643dce8a7737fb43235ce0b41eeaa49" -"checksum paste-impl 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4214c9e912ef61bf42b81ba9a47e8aad1b2ffaf739ab162bf96d1e011f54e6c5" -"checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" -"checksum pdqselect 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ec91767ecc0a0bbe558ce8c9da33c068066c57ecc8bb8477ef8c1ad3ef77c27" -"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" -"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" -"checksum petgraph 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "29c127eea4a29ec6c85d153c59dc1213f33ec74cead30fe4730aecc88cc1fd92" -"checksum pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c" -"checksum pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f" -"checksum pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" -"checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" -"checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" -"checksum plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" -"checksum plotters 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "4e3bb8da247d27ae212529352020f3e5ee16e83c0c258061d27b08ab92675eeb" -"checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" -"checksum predicates 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a9bfe52247e5cc9b2f943682a85a5549fb9662245caf094504e69a2f03fe64d4" -"checksum predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" -"checksum predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" -"checksum pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427" -"checksum primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e4336f4f5d5524fa60bcbd6fe626f9223d8142a50e7053e979acdf0da41ab975" -"checksum proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e10d4b51f154c8a7fb96fd6dad097cb74b863943ec010ac94b9fd1be8861fe1e" -"checksum proc-macro-error 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "052b3c9af39c7e5e94245f820530487d19eb285faedcb40e0c3275132293f242" -"checksum proc-macro-error-attr 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "d175bef481c7902e63e3165627123fff3502f06ac043d3ef42d08c1246da9253" -"checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" -"checksum proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" -"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -"checksum proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" -"checksum prometheus 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5567486d5778e2c6455b1b90ff1c558f29e751fc018130fa182e15828e728af1" -"checksum prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce49aefe0a6144a45de32927c77bd2859a5f7677b55f220ae5b744e87389c212" -"checksum prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "02b10678c913ecbd69350e8535c3aef91a8676c0773fc1d7b95cdd196d7f2f26" -"checksum prost-derive 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" -"checksum prost-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1834f67c0697c001304b75be76f67add9c89742eda3a085ad8ee0bb38c3417aa" -"checksum protobuf 2.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6686ddd96a8dbe2687b5f2a687b2cfb520854010ec480f2d74c32e7c9873d3c5" -"checksum pwasm-utils 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f7a12f176deee919f4ba55326ee17491c8b707d0987aed822682c821b660192" -"checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -"checksum quickcheck 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a44883e74aa97ad63db83c4bf8ca490f02b2fc02f92575e720c8551e843c945f" -"checksum quicksink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a8461ef7445f61fd72d8dcd0629ce724b9131b3c2eb36e83a5d3d4161c127530" -"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" -"checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" -"checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -"checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -"checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" -"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" -"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -"checksum rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03b418169fb9c46533f326efd6eed2576699c44ca92d3052a066214a8d828929" -"checksum raw-cpuid 7.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4a349ca83373cfa5d6dbb66fd76e58b2cca08da71a5f6400de0a0a6a9bceeaf" -"checksum rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" -"checksum rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" -"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" -"checksum regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" -"checksum regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9" -"checksum regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06" -"checksum region 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "448e868c6e4cfddfa49b6a72c95906c04e8547465e9536575b95c70a4044f856" -"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" -"checksum ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)" = "741ba1704ae21999c00942f9f5944f801e977f54302af346b596287599ad1862" -"checksum rlp 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3a44d5ae8afcb238af8b75640907edc6c931efcfab2c854e81ed35fa080f84cd" -"checksum rocksdb 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "12069b106981c6103d3eab7dd1c86751482d0779a520b7c14954c8b586c1e643" -"checksum rpassword 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" -"checksum rust-argon2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" -"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" -"checksum rustc-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -"checksum rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" -"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" -"checksum rustls-native-certs 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51ffebdbb48c14f84eba0b715197d673aff1dd22cc1007ca647e28483bbcc307" -"checksum rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b3bba175698996010c4f6dce5e7f173b6eb781fce25d2cfc45e27091ce0b79f6" -"checksum rw-stream-sink 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" -"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" -"checksum safe-mix 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c" -"checksum safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" -"checksum salsa20 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2324b0e8c3bb9a586a571fdb3136f70e7e2c748de00a78043f86e0cff91f91fe" -"checksum salsa20-core 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2fe6cc1b9f5a5867853ade63099de70f042f7679e408d1ffe52821c9248e6e69" -"checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -"checksum schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295" -"checksum schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)" = "eacd8381b3c37840c9c9f40472af529e49975bdcbc24f83c31059fd6539023d3" -"checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -"checksum scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "abb2332cb595d33f7edd5700f4cbf94892e680c7f0ae56adab58a35190b66cb1" -"checksum scroll_derive 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8584eea9b9ff42825b46faf46a8c24d2cff13ec152fa2a50df788b87c07ee28" -"checksum sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" -"checksum security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" -"checksum security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" -"checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" -"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum send_wrapper 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4" -"checksum send_wrapper 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "686ef91cf020ad8d4aca9a7047641fd6add626b7b89e14546c2b6a76781cf822" -"checksum send_wrapper 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" -"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" -"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" -"checksum serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" -"checksum sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" -"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" -"checksum sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0" -"checksum sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" -"checksum shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" -"checksum shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" -"checksum signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" -"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -"checksum slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1cc9c640a4adbfbcc11ffb95efe5aa7af7309e002adab54b185507dbf2377b99" -"checksum slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddc0d2aff1f8f325ef660d9a0eb6e6dcd20b30b3f581a5897f58bf42d061c37a" -"checksum slog-scope 4.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c44c89dd8b0ae4537d1ae318353eaf7840b4869c536e31c41e963d1ea523ee6" -"checksum slog_derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a945ec7f7ce853e89ffa36be1e27dce9a43e82ff9093bf3461c30d5da74ed11b" -"checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" -"checksum smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc" -"checksum snow 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "afb767eee7d257ba202f0b9b08673bc13b22281632ef45267b19f13100accd2f" -"checksum soketto 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c9dab3f95c9ebdf3a88268c19af668f637a3c5039c2c56ff2d40b1b2d64a25b" -"checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" -"checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" -"checksum static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -"checksum stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8131256a5896cabcf5eb04f4d6dacbe1aefda854b0d9896e09cb58829ec5638c" -"checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" -"checksum string-interner 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd710eadff449a1531351b0e43eb81ea404336fa2f56c777427ab0e32a4cf183" -"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" -"checksum structopt 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "a1bcbed7d48956fcbb5d80c6b95aedb553513de0a1b451ea92679d999c010e98" -"checksum structopt-derive 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "095064aa1f5b94d14e635d0a5684cf140c43ae40a0fd990708d38f5d669e5f64" -"checksum strum 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6138f8f88a16d90134763314e3fc76fa3ed6a7db4725d6acf9a3ef95a3188d22" -"checksum strum_macros 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0054a7df764039a6cd8592b9de84be4bec368ff081d203a7d5371cbfa8e65c81" -"checksum substrate-bip39 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3be511be555a3633e71739a79e4ddff6a6aaa6579fa6114182a51d72c3eb93c5" -"checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" -"checksum subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c65d530b10ccaeac294f349038a597e435b18fb456aadd0840a623f83b9e941" -"checksum syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5" -"checksum syn-mid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" -"checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" -"checksum sysinfo 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6f4b2468c629cffba39c0a4425849ab3cdb03d9dfacba69684609aea04d08ff9" -"checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" -"checksum target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d" -"checksum target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe" -"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -"checksum termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" -"checksum test-case 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a605baa797821796a751f4a959e1206079b24a4b7e1ed302b7d785d81a9276c9" -"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -"checksum thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ee14bf8e6767ab4c687c9e8bc003879e042a96fd67a3ba5934eadb6536bef4db" -"checksum thiserror-impl 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "a7b51e1fbc44b5a0840be594fbc0f960be09050f2617e61e6aa43bef97cd3ef4" -"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" -"checksum threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" -"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -"checksum tiny-bip39 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1cd1fb03fe8e07d17cd851a624a9fff74642a997b67fbd1ccd77533241640d92" -"checksum tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d8a021c69bb74a44ccedb824a046447e2c84a01df9e5c20779750acb38e11b2" -"checksum tiny-keccak 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2953ca5148619bc99695c1274cb54c5275bbb913c6adad87e72eaf8db9787f69" -"checksum tinytemplate 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "57a3c6667d3e65eb1bc3aed6fd14011c6cbc3a0665218ab7f5daf040b9ec371a" -"checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -"checksum tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8fdd17989496f49cdc57978c96f0c9fe5e4a58a8bddc6813c449a4624f6a030b" -"checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" -"checksum tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" -"checksum tokio-current-thread 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" -"checksum tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" -"checksum tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee9ceecf69145923834ea73f32ba40c790fd877b74a7817dd0b089f1eb9c7c8" -"checksum tokio-fs 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" -"checksum tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" -"checksum tokio-macros 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f4b1e7ed7d5d4c2af3d999904b0eebe76544897cdbfb2b9684bed2174ab20f7c" -"checksum tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" -"checksum tokio-rustls 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "141afec0978abae6573065a48882c6bae44c5cc61db9b511ac4abf6a09bfd9cc" -"checksum tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" -"checksum tokio-sync 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4f1aaeb685540f7407ea0e27f1c9757d258c7c6bf4e3eb19da6fc59b747239d2" -"checksum tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" -"checksum tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" -"checksum tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" -"checksum tokio-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "354b8cd83825b3c20217a9dc174d6a0c67441a2fae5c41bcb1ea6679f6ae0f7c" -"checksum tokio-udp 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" -"checksum tokio-uds 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5076db410d6fdc6523df7595447629099a1fdc47b3d9f896220780fa48faf798" -"checksum tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" -"checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" -"checksum tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" -"checksum tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1e213bd24252abeb86a0b7060e02df677d367ce6cb772cef17e9214b8390a8d3" -"checksum tracing-attributes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04cfd395def5a60236e187e1ff905cb55668a59f29928dec05e6e1b1fd2ac1f3" -"checksum tracing-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "13a46f11e372b8bd4b4398ea54353412fdd7fd42a8370c7e543e218cf7661978" -"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" -"checksum trie-bench 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6dcd9bac85703d8f974ee1e6dfe668784b105d3385c174ad729adb7427ad5d81" -"checksum trie-db 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de9222c50cc325855621271157c973da27a0dcd26fa06f8edf81020bd2333df0" -"checksum trie-root 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "652931506d2c1244d7217a70b99f56718a7b4161b37f04e7cd868072a99f68cd" -"checksum trie-standardmap 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3161ba520ab28cd8e6b68e1126f1009f6e335339d1a73b978139011703264c8" -"checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" -"checksum trybuild 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5867c525891caf154503954cb743ff7f1c4ca2c3e8578f6a5af84c913aa084c8" -"checksum twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d261e83e727c8e2dbb75dacac67c36e35db36a958ee504f2164fc052434e1" -"checksum twox-hash 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bfd5b7557925ce778ff9b9ef90e3ade34c524b5ff10e239c69a42d546d2af56" -"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" -"checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" -"checksum uint 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e75a4cdd7b87b28840dba13c483b9a88ee6bbf16ba5c951ee1ecfcf723078e0d" -"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -"checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" -"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" -"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" -"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" -"checksum unsigned-varint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f0023a96687fe169081e8adce3f65e3874426b7886e9234d490af2dc077959" -"checksum unsigned-varint 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3b7ffb36714206d2f5f05d61a2bc350415c642f2c54433f0ebf829afbe41d570" -"checksum untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60369ef7a31de49bcb3f6ca728d4ba7300d9a1658f94c727d4cab8c8d9f4aece" -"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -"checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" -"checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" -"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" -"checksum vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6aba5e34f93dc7051dfad05b98a18e9156f27e7b431fe1d2398cb6061c0a1dba" -"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" -"checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" -"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3c5c5c1286c6e578416982609f47594265f9d489f9b836157d403ad605a46693" -"checksum wabt-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "af5d153dc96aad7dc13ab90835b892c69867948112d95299e522d370c4e13a08" -"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" -"checksum want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" -"checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -"checksum wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c" -"checksum wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45" -"checksum wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8bbdd49e3e28b40dec6a9ba8d17798245ce32b019513a845369c641b275135d9" -"checksum wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3" -"checksum wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" -"checksum wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601" -"checksum wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d" -"checksum wasm-gc-api 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c32691b6c7e6c14e7f8fd55361a9088b507aa49620fcd06c09b3a1082186b9" -"checksum wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "324c5e65a08699c9c4334ba136597ab22b85dccd4b65dd1e36ccf8f723a95b54" -"checksum wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bf617d864d25af3587aa745529f7aaa541066c876d57e050c0d0c85c61c92aff" -"checksum wasmi-validation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea78c597064ba73596099281e2f4cfc019075122a65cdda3205af94f0b264d93" -"checksum wasmparser 0.48.2 (registry+https://github.com/rust-lang/crates.io-index)" = "073da89bf1c84db000dd68ce660c1b4a08e3a2d28fd1e3394ab9e7abdde4a0f8" -"checksum wasmparser 0.51.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a40d24f114a3f24b459ec292019220cff6388673b4a2c0a11483665b599ef15c" -"checksum wasmtime 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5614d964c3e7d07a13b59aca66103c52656bd80430f0d86dc7eeb3af4f03d4a2" -"checksum wasmtime-debug 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "feb5900275b4ef0b621ce725b9d5660b12825d7f7d79b392b97baf089ffab8c0" -"checksum wasmtime-environ 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f04661851e133fb11691c4a0f92a705766b4bbf7afc06811f949e295cc8414fc" -"checksum wasmtime-jit 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d451353764ce55c9bb6a8b260063cfc209b7adadd277a9a872ab4563a69e357c" -"checksum wasmtime-runtime 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7dbd4fc114b828cae3e405fed413df4b3814d87a92ea029640cec9ba41f0c162" -"checksum wast 8.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f9df3d716118a503b2f6bbb6ff46b21997ab0cc167b01de7a188e45e4b01e8d" -"checksum wat 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "4a927b35badc29c97d97e82689eef7f72fc936d884b3391804c1bb6cd2bdccbb" -"checksum web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b" -"checksum webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" -"checksum webpki-roots 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a262ae37dd9d60f60dd473d1158f9fbebf110ba7b6a5051c8160460f6043718b" -"checksum webpki-roots 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "91cd5736df7f12a964a5067a12c62fa38e1bd8080aff1f80bc29be7c80d19ab4" -"checksum websocket 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)" = "413b37840b9e27b340ce91b319ede10731de8c72f5bc4cb0206ec1ca4ce581d0" -"checksum websocket-base 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5e3810f0d00c4dccb54c30a4eee815e703232819dec7b007db115791c42aa374" -"checksum weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164" -"checksum which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164" -"checksum which 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5475d47078209a02e60614f7ba5e645ef3ed60f771920ac1906d7c1cc65024c8" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum ws 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a2c47b5798ccc774ffb93ff536aec7c4275d722fd9c740c83cdd1af1f2d94" -"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -"checksum x25519-dalek 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ee1585dc1484373cbc1cee7aafda26634665cf449436fd6e24bfd1fad230538" -"checksum x25519-dalek 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "637ff90c9540fa3073bb577e65033069e4bae7c79d49d74aa3ffdf5342a53217" -"checksum xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" -"checksum yamux 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d73295bc9d9acf89dd9336b3b5f5b57731ee72b587857dd4312721a0196b48e5" -"checksum zeroize 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "45af6a010d13e4cf5b54c94ba5a2b2eba5596b9e46bf5875612d332a1f2b3f86" -"checksum zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8" -"checksum zeroize_derive 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2" -"checksum zstd 0.5.1+zstd.1.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c5d978b793ae64375b80baf652919b148f6a496ac8802922d9999f5a553194f" -"checksum zstd-safe 2.0.3+zstd.1.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bee25eac9753cfedd48133fa1736cbd23b774e253d89badbeac7d12b23848d3f" -"checksum zstd-sys 1.4.15+zstd.1.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "89719b034dc22d240d5b407fb0a3fe6d29952c181cff9a9f95c0bd40b4f8f7d8" + "cc", + "glob 0.3.0", + "libc", +] diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index 617ca2257a3..76b77d39f02 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -82,7 +82,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. spec_version: 224, - impl_version: 0, + impl_version: 1, apis: RUNTIME_API_VERSIONS, }; diff --git a/frame/balances/src/benchmarking.rs b/frame/balances/src/benchmarking.rs index e564824aaa3..371692b650f 100644 --- a/frame/balances/src/benchmarking.rs +++ b/frame/balances/src/benchmarking.rs @@ -19,305 +19,101 @@ use super::*; use frame_system::RawOrigin; -use sp_io::hashing::blake2_256; -use frame_benchmarking::{ - BenchmarkResults, BenchmarkParameter, Benchmarking, BenchmarkingSetup, benchmarking, -}; +use frame_benchmarking::{benchmarks, account}; use sp_runtime::traits::{Bounded, Dispatchable}; use crate::Module as Balances; -// Support Functions -fn account(name: &'static str, index: u32) -> T::AccountId { - let entropy = (name, index).using_encoded(blake2_256); - T::AccountId::decode(&mut &entropy[..]).unwrap_or_default() -} +const SEED: u32 = 0; +const MAX_EXISTENTIAL_DEPOSIT: u32 = 1000; +const MAX_USER_INDEX: u32 = 1000; -// Benchmark `transfer` extrinsic with the worst possible conditions: -// * Transfer will kill the sender account. -// * Transfer will create the recipient account. -struct Transfer; -impl BenchmarkingSetup, RawOrigin> for Transfer { - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Existential Deposit Multiplier - (BenchmarkParameter::E, 2, 1000), - // User Seed - (BenchmarkParameter::U, 1, 1000), - ] +benchmarks! { + _ { + let e in 2 .. MAX_EXISTENTIAL_DEPOSIT => (); + let u in 1 .. MAX_USER_INDEX => (); } - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - // Constants - let ed = T::ExistentialDeposit::get(); + // Benchmark `transfer` extrinsic with the worst possible conditions: + // * Transfer will kill the sender account. + // * Transfer will create the recipient account. + transfer { + let u in ...; + let e in ...; - // Select an account - let u = components.iter().find(|&c| c.0 == BenchmarkParameter::U).unwrap().1; - let user = account::("user", u); - let user_origin = RawOrigin::Signed(user.clone()); + let existential_deposit = T::ExistentialDeposit::get(); + let caller = account("caller", u, SEED); // Give some multiple of the existential deposit + creation fee + transfer fee - let e = components.iter().find(|&c| c.0 == BenchmarkParameter::E).unwrap().1; - let balance = ed.saturating_mul(e.into()); - let _ = as Currency<_>>::make_free_balance_be(&user, balance); + let balance = existential_deposit.saturating_mul(e.into()); + let _ = as Currency<_>>::make_free_balance_be(&caller, balance); // Transfer `e - 1` existential deposits + 1 unit, which guarantees to create one account, and reap this user. - let recipient = account::("recipient", u); + let recipient = account("recipient", u, SEED); let recipient_lookup: ::Source = T::Lookup::unlookup(recipient); - let transfer_amt = ed.saturating_mul((e - 1).into()) + 1.into(); + let transfer_amount = existential_deposit.saturating_mul((e - 1).into()) + 1.into(); + }: _(RawOrigin::Signed(caller), recipient_lookup, transfer_amount) - // Return the `transfer` call - Ok((crate::Call::::transfer(recipient_lookup, transfer_amt), user_origin)) - } -} - -// Benchmark `transfer` with the best possible condition: -// * Both accounts exist and will continue to exist. -struct TransferBestCase; -impl BenchmarkingSetup, RawOrigin> for TransferBestCase { - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Existential Deposit Multiplier - (BenchmarkParameter::E, 2, 1000), - // User Seed - (BenchmarkParameter::U, 1, 1000), - ] - } - - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - // Constants - let ed = T::ExistentialDeposit::get(); - - // Select a sender - let u = components.iter().find(|&c| c.0 == BenchmarkParameter::U).unwrap().1; - let user = account::("user", u); - let user_origin = RawOrigin::Signed(user.clone()); + // Benchmark `transfer` with the best possible condition: + // * Both accounts exist and will continue to exist. + transfer_best_case { + let u in ...; + let e in ...; - // Select a recipient - let recipient = account::("recipient", u); + let caller = account("caller", u, SEED); + let recipient: T::AccountId = account("recipient", u, SEED); let recipient_lookup: ::Source = T::Lookup::unlookup(recipient.clone()); - // Get the existential deposit multiplier - let e = components.iter().find(|&c| c.0 == BenchmarkParameter::E).unwrap().1; - // Give the sender account max funds for transfer (their account will never reasonably be killed). - let _ = as Currency<_>>::make_free_balance_be(&user, T::Balance::max_value()); + let _ = as Currency<_>>::make_free_balance_be(&caller, T::Balance::max_value()); // Give the recipient account existential deposit (thus their account already exists). - let _ = as Currency<_>>::make_free_balance_be(&recipient, ed); - - // Transfer e * existential deposit. - let transfer_amt = ed.saturating_mul(e.into()); - - // Return the `transfer` call - Ok((crate::Call::::transfer(recipient_lookup, transfer_amt), user_origin)) - } -} - -// Benchmark `transfer_keep_alive` with the worst possible condition: -// * The recipient account is created. -struct TransferKeepAlive; -impl BenchmarkingSetup, RawOrigin> for TransferKeepAlive { - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Existential Deposit Multiplier - (BenchmarkParameter::E, 2, 1000), - // User Seed - (BenchmarkParameter::U, 1, 1000), - ] - } - - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - // Constants - let ed = T::ExistentialDeposit::get(); - - // Select a sender - let u = components.iter().find(|&c| c.0 == BenchmarkParameter::U).unwrap().1; - let user = account::("user", u); - let user_origin = RawOrigin::Signed(user.clone()); - - // Select a recipient - let recipient = account::("recipient", u); - let recipient_lookup: ::Source = T::Lookup::unlookup(recipient.clone()); - - // Get the existential deposit multiplier - let e = components.iter().find(|&c| c.0 == BenchmarkParameter::E).unwrap().1; + let existential_deposit = T::ExistentialDeposit::get(); + let _ = as Currency<_>>::make_free_balance_be(&recipient, existential_deposit); + let transfer_amount = existential_deposit.saturating_mul(e.into()); + }: transfer(RawOrigin::Signed(caller), recipient_lookup, transfer_amount) + + // Benchmark `transfer_keep_alive` with the worst possible condition: + // * The recipient account is created. + transfer_keep_alive { + let u in ...; + let e in ...; + + let caller = account("caller", u, SEED); + let recipient = account("recipient", u, SEED); + let recipient_lookup: ::Source = T::Lookup::unlookup(recipient); // Give the sender account max funds, thus a transfer will not kill account. - let _ = as Currency<_>>::make_free_balance_be(&user, T::Balance::max_value()); + let _ = as Currency<_>>::make_free_balance_be(&caller, T::Balance::max_value()); + let existential_deposit = T::ExistentialDeposit::get(); + let transfer_amount = existential_deposit.saturating_mul(e.into()); + }: _(RawOrigin::Signed(caller), recipient_lookup, transfer_amount) - // Transfer e * existential deposit. - let transfer_amt = ed.saturating_mul(e.into()); + // Benchmark `set_balance` coming from ROOT account. This always creates an account. + set_balance { + let u in ...; + let e in ...; - // Return the `transfer_keep_alive` call - Ok((crate::Call::::transfer_keep_alive(recipient_lookup, transfer_amt), user_origin)) - } -} - -// Benchmark `set_balance` coming from ROOT account. This always creates an account. -struct SetBalance; -impl BenchmarkingSetup, RawOrigin> for SetBalance { - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Existential Deposit Multiplier - (BenchmarkParameter::E, 2, 1000), - // User Seed - (BenchmarkParameter::U, 1, 1000), - ] - } - - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - // Constants - let ed = T::ExistentialDeposit::get(); - - // Select a sender - let u = components.iter().find(|&c| c.0 == BenchmarkParameter::U).unwrap().1; - let user = account::("user", u); + let user: T::AccountId = account("user", u, SEED); let user_lookup: ::Source = T::Lookup::unlookup(user.clone()); - // Get the existential deposit multiplier for free and reserved - let e = components.iter().find(|&c| c.0 == BenchmarkParameter::E).unwrap().1; - let balance_amt = ed.saturating_mul(e.into()); - - // Return the `set_balance` call - Ok((crate::Call::::set_balance(user_lookup, balance_amt, balance_amt), RawOrigin::Root)) - } -} - -// Benchmark `set_balance` coming from ROOT account. This always kills an account. -struct SetBalanceKilling; -impl BenchmarkingSetup, RawOrigin> for SetBalanceKilling { - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Existential Deposit Multiplier - (BenchmarkParameter::E, 2, 1000), - // User Seed - (BenchmarkParameter::U, 1, 1000), - ] - } + // Give the user some initial balance. + let existential_deposit = T::ExistentialDeposit::get(); + let balance_amount = existential_deposit.saturating_mul(e.into()); + let _ = as Currency<_>>::make_free_balance_be(&user, balance_amount); + }: _(RawOrigin::Root, user_lookup, balance_amount, balance_amount) - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - // Constants - let ed = T::ExistentialDeposit::get(); + // Benchmark `set_balance` coming from ROOT account. This always kills an account. + set_balance_killing { + let u in ...; + let e in ...; - // Select a sender - let u = components.iter().find(|&c| c.0 == BenchmarkParameter::U).unwrap().1; - let user = account::("user", u); + let user: T::AccountId = account("user", u, SEED); let user_lookup: ::Source = T::Lookup::unlookup(user.clone()); - // Get the existential deposit multiplier for free and reserved - let e = components.iter().find(|&c| c.0 == BenchmarkParameter::E).unwrap().1; - // Give the user some initial balance - let balance_amt = ed.saturating_mul(e.into()); - let _ = as Currency<_>>::make_free_balance_be(&user, balance_amt); - - // Return the `set_balance` call that will kill the account - Ok((crate::Call::::set_balance(user_lookup, 0.into(), 0.into()), RawOrigin::Root)) - } -} - -// The list of available benchmarks for this pallet. -enum SelectedBenchmark { - Transfer, - TransferBestCase, - TransferKeepAlive, - SetBalance, - SetBalanceKilling, -} - -// Allow us to select a benchmark from the list of available benchmarks. -impl BenchmarkingSetup, RawOrigin> for SelectedBenchmark { - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - match self { - Self::Transfer => , RawOrigin>>::components(&Transfer), - Self::TransferBestCase => , RawOrigin>>::components(&TransferBestCase), - Self::TransferKeepAlive => , RawOrigin>>::components(&TransferKeepAlive), - Self::SetBalance => , RawOrigin>>::components(&SetBalance), - Self::SetBalanceKilling => , RawOrigin>>::components(&SetBalanceKilling), - } - } - - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - match self { - Self::Transfer => , RawOrigin>>::instance(&Transfer, components), - Self::TransferBestCase => , RawOrigin>>::instance(&TransferBestCase, components), - Self::TransferKeepAlive => , RawOrigin>>::instance(&TransferKeepAlive, components), - Self::SetBalance => , RawOrigin>>::instance(&SetBalance, components), - Self::SetBalanceKilling => , RawOrigin>>::instance(&SetBalanceKilling, components), - } - } -} - -impl Benchmarking for Module { - fn run_benchmark(extrinsic: Vec, steps: u32, repeat: u32) -> Result, &'static str> { - // Map the input to the selected benchmark. - let selected_benchmark = match extrinsic.as_slice() { - b"transfer" => SelectedBenchmark::Transfer, - b"transfer_best_case" => SelectedBenchmark::TransferBestCase, - b"transfer_keep_alive" => SelectedBenchmark::TransferKeepAlive, - b"set_balance" => SelectedBenchmark::SetBalance, - b"set_balance_killing" => SelectedBenchmark::SetBalanceKilling, - _ => return Err("Could not find extrinsic."), - }; - - // Warm up the DB - benchmarking::commit_db(); - benchmarking::wipe_db(); - - let components = , RawOrigin>>::components(&selected_benchmark); - // results go here - let mut results: Vec = Vec::new(); - // Select the component we will be benchmarking. Each component will be benchmarked. - for (name, low, high) in components.iter() { - // Create up to `STEPS` steps for that component between high and low. - let step_size = ((high - low) / steps).max(1); - let num_of_steps = (high - low) / step_size; - for s in 0..num_of_steps { - // This is the value we will be testing for component `name` - let component_value = low + step_size * s; - - // Select the mid value for all the other components. - let c: Vec<(BenchmarkParameter, u32)> = components.iter() - .map(|(n, l, h)| - (*n, if n == name { component_value } else { (h - l) / 2 + l }) - ).collect(); - - // Run the benchmark `repeat` times. - for _r in 0..repeat { - // Set up the externalities environment for the setup we want to benchmark. - let (call, caller) = , RawOrigin>>::instance(&selected_benchmark, &c)?; - // Commit the externalities to the database, flushing the DB cache. - // This will enable worst case scenario for reading from the database. - benchmarking::commit_db(); - // Run the benchmark. - let start = benchmarking::current_time(); - call.dispatch(caller.clone().into())?; - let finish = benchmarking::current_time(); - let elapsed = finish - start; - sp_std::if_std!{ - if let RawOrigin::Signed(who) = caller.clone() { - let balance = Account::::get(&who).free; - println!("Free Balance {:?}", balance); - } - } - results.push((c.clone(), elapsed)); - // Wipe the DB back to the genesis state. - benchmarking::wipe_db(); - } - } - } - return Ok(results); - } -} + // Give the user some initial balance. + let existential_deposit = T::ExistentialDeposit::get(); + let balance_amount = existential_deposit.saturating_mul(e.into()); + let _ = as Currency<_>>::make_free_balance_be(&user, balance_amount); + }: set_balance(RawOrigin::Root, user_lookup, 0.into(), 0.into()) +} \ No newline at end of file diff --git a/frame/benchmarking/Cargo.toml b/frame/benchmarking/Cargo.toml index c2748e080de..87c51c70e88 100644 --- a/frame/benchmarking/Cargo.toml +++ b/frame/benchmarking/Cargo.toml @@ -10,6 +10,7 @@ codec = { package = "parity-scale-codec", version = "1.1.2", default-features = sp-api = { version = "2.0.0", path = "../../primitives/api", default-features = false } sp-runtime-interface = { version = "2.0.0", path = "../../primitives/runtime-interface", default-features = false } sp-std = { version = "2.0.0", path = "../../primitives/std", default-features = false } +sp-io ={ path = "../../primitives/io", default-features = false } [features] default = [ "std" ] diff --git a/frame/benchmarking/src/lib.rs b/frame/benchmarking/src/lib.rs index c57cfb49140..a78d59ef339 100644 --- a/frame/benchmarking/src/lib.rs +++ b/frame/benchmarking/src/lib.rs @@ -14,79 +14,396 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Interfaces and types for benchmarking a FRAME runtime. +//! Macro for benchmarking a FRAME runtime. #![cfg_attr(not(feature = "std"), no_std)] -use sp_std::vec::Vec; +mod utils; +pub use utils::*; -/// An alphabet of possible parameters to use for benchmarking. -#[derive(codec::Encode, codec::Decode, Clone, Copy, PartialEq, Debug)] -#[allow(missing_docs)] -pub enum BenchmarkParameter { - A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, -} - -/// Results from running benchmarks on a FRAME pallet. -/// Contains duration of the function call in nanoseconds along with the benchmark parameters -/// used for that benchmark result. -pub type BenchmarkResults = (Vec<(BenchmarkParameter, u32)>, u128); - -sp_api::decl_runtime_apis! { - /// Runtime api for benchmarking a FRAME runtime. - pub trait Benchmark { - /// Dispatch the given benchmark. - fn dispatch_benchmark( - module: Vec, - extrinsic: Vec, - steps: u32, - repeat: u32, - ) -> Option>; +/// Construct pallet benchmarks for weighing dispatchables. +/// +/// Works around the idea of complexity parameters, named by a single letter (which is usually +/// upper cased in complexity notation but is lower-cased for use in this macro). +/// +/// Complexity parameters ("parameters") have a range which is a `u32` pair. Every time a benchmark +/// is prepared and run, this parameter takes a concrete value within the range. There is an +/// associated instancing block, which is a single expression that is evaluated during +/// preparation. It may use `?` (`i.e. `return Err(...)`) to bail with a string error. Here's a +/// few examples: +/// +/// ```ignore +/// // These two are equivalent: +/// let x in 0 .. 10; +/// let x in 0 .. 10 => (); +/// // This one calls a setup function and might return an error (which would be terminal). +/// let y in 0 .. 10 => setup(y)?; +/// // This one uses a code block to do lots of stuff: +/// let z in 0 .. 10 => { +/// let a = z * z / 5; +/// let b = do_something(a)?; +/// combine_into(z, b); +/// } +/// ``` +/// +/// Note that due to parsing restrictions, if the `from` expression is not a single token (i.e. a +/// literal or constant), then it must be parenthesised. +/// +/// The macro allows for a number of "arms", each representing an individual benchmark. Using the +/// simple syntax, the associated dispatchable function maps 1:1 with the benchmark and the name of +/// the benchmark is the same as that of the associated function. However, extended syntax allows +/// for arbitrary expresions to be evaluated in a benchmark (including for example, +/// `on_initialize`). +/// +/// The macro allows for common parameters whose ranges and instancing expressions may be drawn upon +/// (or not) by each arm. Syntax is available to allow for only the range to be drawn upon if +/// desired, allowing an alternative instancing expression to be given. +/// +/// Each arm may also have a block of code which is run prior to any instancing and a block of code +/// which is run afterwards. All code blocks may draw upon the specific value of each parameter +/// at any time. Local variables are shared between the two pre- and post- code blocks, but do not +/// leak from the interior of any instancing expressions. +/// +/// Any common parameters that are unused in an arm do not have their instancing expressions +/// evaluated. +/// +/// Example: +/// ```ignore +/// benchmarks! { +/// // common parameter; just one for this example. +/// _ { +/// let l in 1 .. MAX_LENGTH => initialize_l(l); +/// } +/// +/// // first dispatchable: foo; this is a user dispatchable and operates on a `u8` vector of +/// // size `l`, which we allow to be initialised as usual. +/// foo { +/// let caller = account::(b"caller", 0, benchmarks_seed); +/// let l = ...; +/// } _(Origin::Signed(caller), vec![0u8; l]) +/// +/// // second dispatchable: bar; this is a root dispatchable and accepts a `u8` vector of size +/// // `l`. We don't want it preininitialised like before so we override using the `=> ()` +/// // notation. +/// // In this case, we explicitly name the call using `bar` instead of `_`. +/// bar { +/// let l = _ .. _ => (); +/// } bar(Origin::Root, vec![0u8; l]) +/// +/// // third dispatchable: baz; this is a user dispatchable. It isn't dependent on length like the +/// // other two but has its own complexity `c` that needs setting up. It uses `caller` (in the +/// // pre-instancing block) within the code block. This is only allowed in the param instancers +/// // of arms. Instancers of common params cannot optimistically draw upon hypothetical variables +/// // that the arm's pre-instancing code block might have declared. +/// baz1 { +/// let caller = account::(b"caller", 0, benchmarks_seed); +/// let c = 0 .. 10 => setup_c(&caller, c); +/// } baz(Origin::Signed(caller)) +/// +/// // this is a second benchmark of the baz dispatchable with a different setup. +/// baz2 { +/// let caller = account::(b"caller", 0, benchmarks_seed); +/// let c = 0 .. 10 => setup_c_in_some_other_way(&caller, c); +/// } baz(Origin::Signed(caller)) +/// +/// // this is benchmarking some code that is not a dispatchable. +/// populate_a_set { +/// let x in 0 .. 10_000; +/// let mut m = Vec::::new(); +/// for i in 0..x { +/// m.insert(i); +/// } +/// } { m.into_iter().collect::() } +/// } +/// ``` +#[macro_export] +macro_rules! benchmarks { + ( + _ { + $( + let $common:ident in $common_from:tt .. $common_to:expr => $common_instancer:expr; + )* + } + $( $rest:tt )* + ) => { + $crate::benchmarks_iter!({ + $( { $common , $common_from , $common_to , $common_instancer } )* + } ( ) $( $rest )* ); } } -/// Interface that provides functions for benchmarking the runtime. -#[sp_runtime_interface::runtime_interface] -pub trait Benchmarking { - /// Get the number of nanoseconds passed since the UNIX epoch - /// - /// WARNING! This is a non-deterministic call. Do not use this within - /// consensus critical logic. - fn current_time() -> u128 { - std::time::SystemTime::now().duration_since(std::time::SystemTime::UNIX_EPOCH) - .expect("Unix time doesn't go backwards; qed") - .as_nanos() - } +#[macro_export] +macro_rules! impl_benchmark { + ( + $( $name:ident ),* + ) => { + impl $crate::Benchmarking<$crate::BenchmarkResults> for Module { + fn run_benchmark(extrinsic: Vec, steps: u32, repeat: u32) -> Result, &'static str> { + // Map the input to the selected benchmark. + let extrinsic = sp_std::str::from_utf8(extrinsic.as_slice()) + .map_err(|_| "Could not find extrinsic")?; + let selected_benchmark = match extrinsic { + $( stringify!($name) => SelectedBenchmark::$name, )* + _ => return Err("Could not find extrinsic."), + }; - /// Reset the trie database to the genesis state. - fn wipe_db(&mut self) { - self.wipe() - } + // Warm up the DB + $crate::benchmarking::commit_db(); + $crate::benchmarking::wipe_db(); + + // first one is set_identity. + let components = , RawOrigin>>::components(&selected_benchmark); + // results go here + let mut results: Vec<$crate::BenchmarkResults> = Vec::new(); + // Select the component we will be benchmarking. Each component will be benchmarked. + for (name, low, high) in components.iter() { + // Create up to `STEPS` steps for that component between high and low. + let step_size = ((high - low) / steps).max(1); + let num_of_steps = (high - low) / step_size; + for s in 0..num_of_steps { + // This is the value we will be testing for component `name` + let component_value = low + step_size * s; - /// Commit pending storage changes to the trie database and clear the database cache. - fn commit_db(&mut self) { - self.commit() + // Select the mid value for all the other components. + let c: Vec<($crate::BenchmarkParameter, u32)> = components.iter() + .map(|(n, l, h)| + (*n, if n == name { component_value } else { (h - l) / 2 + l }) + ).collect(); + + // Run the benchmark `repeat` times. + for _ in 0..repeat { + // Set up the externalities environment for the setup we want to benchmark. + let (call, caller) = , RawOrigin>>::instance(&selected_benchmark, &c)?; + // Commit the externalities to the database, flushing the DB cache. + // This will enable worst case scenario for reading from the database. + $crate::benchmarking::commit_db(); + // Run the benchmark. + let start = $crate::benchmarking::current_time(); + call.dispatch(caller.into())?; + let finish = $crate::benchmarking::current_time(); + let elapsed = finish - start; + results.push((c.clone(), elapsed)); + // Wipe the DB back to the genesis state. + $crate::benchmarking::wipe_db(); + } + } + } + return Ok(results); + } + } } } -/// The pallet benchmarking trait. -pub trait Benchmarking { - /// Run the benchmarks for this pallet. - /// - /// Parameters - /// - `extrinsic`: The name of extrinsic function you want to benchmark encoded as bytes. - /// - `steps`: The number of sample points you want to take across the range of parameters. - /// - `repeat`: The number of times you want to repeat a benchmark. - fn run_benchmark(extrinsic: Vec, steps: u32, repeat: u32) -> Result, &'static str>; +#[macro_export] +#[allow(missing_docs)] +macro_rules! benchmarks_iter { + // mutation arm: + ( + { $( $common:tt )* } + ( $( $names:ident )* ) + $name:ident { $( $code:tt )* }: _ ( $origin:expr $( , $arg:expr )* ) + $( $rest:tt )* + ) => { + $crate::benchmarks_iter! { + { $( $common )* } ( $( $names )* ) $name { $( $code )* }: $name ( $origin $( , $arg )* ) $( $rest )* + } + }; + // mutation arm: + ( + { $( $common:tt )* } + ( $( $names:ident )* ) + $name:ident { $( $code:tt )* }: $dispatch:ident ( $origin:expr $( , $arg:expr )* ) + $( $rest:tt )* + ) => { + $crate::benchmarks_iter! { + { $( $common )* } ( $( $names )* ) $name { $( $code )* }: { Ok((crate::Call::::$dispatch($($arg),*), $origin)) } $( $rest )* + } + }; + // iteration arm: + ( + { $( $common:tt )* } + ( $( $names:ident )* ) + $name:ident { $( $code:tt )* }: { $eval:expr } + $( $rest:tt )* + ) => { + $crate::benchmark_backend! { + $name { $( $common )* } { } { $eval } { $( $code )* } + } + $crate::benchmarks_iter!( { $( $common )* } ( $( $names )* $name ) $( $rest )* ); + }; + // iteration-exit arm + ( { $( $common:tt )* } ( $( $names:ident )* ) ) => { + $crate::selected_benchmark!( $( $names ),* ); + $crate::impl_benchmark!( $( $names ),* ); + } } -/// The required setup for creating a benchmark. -pub trait BenchmarkingSetup { - /// Return the components and their ranges which should be tested in this benchmark. - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)>; +#[macro_export] +#[allow(missing_docs)] +macro_rules! benchmark_backend { + // parsing arms + ($name:ident { + $( $common:tt )* + } { + $( PRE { $( $pre_parsed:tt )* } )* + } { $eval:expr } { + let $pre_id:tt : $pre_ty:ty = $pre_ex:expr; + $( $rest:tt )* + } ) => { + $crate::benchmark_backend! { + $name { $( $common )* } { + $( PRE { $( $pre_parsed )* } )* + PRE { $pre_id , $pre_ty , $pre_ex } + } { $eval } { $( $rest )* } + } + }; + ($name:ident { + $( $common:tt )* + } { + $( $parsed:tt )* + } { $eval:expr } { + let $param:ident in ( $param_from:expr ) .. $param_to:expr => $param_instancer:expr; + $( $rest:tt )* + }) => { + $crate::benchmark_backend! { + $name { $( $common )* } { + $( $parsed )* + PARAM { $param , $param_from , $param_to , $param_instancer } + } { $eval } { $( $rest )* } + } + }; + // mutation arm to look after defaulting to a common param + ($name:ident { + $( { $common:ident , $common_from:tt , $common_to:expr , $common_instancer:expr } )* + } { + $( $parsed:tt )* + } { $eval:expr } { + let $param:ident in ...; + $( $rest:tt )* + }) => { + $crate::benchmark_backend! { + $name { + $( { $common , $common_from , $common_to , $common_instancer } )* + } { + $( $parsed )* + } { $eval } { + let $param + in ({ $( let $common = $common_from; )* $param }) + .. ({ $( let $common = $common_to; )* $param }) + => ({ $( let $common = || -> Result<(), &'static str> { $common_instancer ; Ok(()) }; )* $param()? }); + $( $rest )* + } + } + }; + // mutation arm to look after defaulting only the range to common param + ($name:ident { + $( { $common:ident , $common_from:tt , $common_to:expr , $common_instancer:expr } )* + } { + $( $parsed:tt )* + } { $eval:expr } { + let $param:ident in _ .. _ => $param_instancer:expr ; + $( $rest:tt )* + }) => { + $crate::benchmark_backend! { + $name { + $( { $common , $common_from , $common_to , $common_instancer } )* + } { + $( $parsed )* + } { $eval } { + let $param + in ({ $( let $common = $common_from; )* $param }) + .. ({ $( let $common = $common_to; )* $param }) + => $param_instancer ; + $( $rest )* + } + } + }; + // mutation arm to look after a single tt for param_from. + ($name:ident { + $( $common:tt )* + } { + $( $parsed:tt )* + } { $eval:expr } { + let $param:ident in $param_from:tt .. $param_to:expr => $param_instancer:expr ; + $( $rest:tt )* + }) => { + $crate::benchmark_backend! { + $name { $( $common )* } { $( $parsed )* } { $eval } { + let $param in ( $param_from ) .. $param_to => $param_instancer; + $( $rest )* + } + } + }; + // mutation arm to look after the default tail of `=> ()` + ($name:ident { + $( $common:tt )* + } { + $( $parsed:tt )* + } { $eval:expr } { + let $param:ident in $param_from:tt .. $param_to:expr; + $( $rest:tt )* + }) => { + $crate::benchmark_backend! { + $name { $( $common )* } { $( $parsed )* } { $eval } { + let $param in $param_from .. $param_to => (); + $( $rest )* + } + } + }; + // mutation arm to look after `let _ =` + ($name:ident { + $( $common:tt )* + } { + $( $parsed:tt )* + } { $eval:expr } { + let $pre_id:tt = $pre_ex:expr; + $( $rest:tt )* + }) => { + $crate::benchmark_backend! { + $name { $( $common )* } { $( $parsed )* } { $eval } { + let $pre_id : _ = $pre_ex; + $( $rest )* + } + } + }; + // actioning arm + ($name:ident { + $( { $common:ident , $common_from:tt , $common_to:expr , $common_instancer:expr } )* + } { + $( PRE { $pre_id:tt , $pre_ty:ty , $pre_ex:expr } )* + $( PARAM { $param:ident , $param_from:expr , $param_to:expr , $param_instancer:expr } )* + } { $eval:expr } { $( $post:tt )* } ) => { + #[allow(non_camel_case_types)] + struct $name; + #[allow(unused_variables)] + impl $crate::BenchmarkingSetup, RawOrigin> for $name { + fn components(&self) -> Vec<($crate::BenchmarkParameter, u32, u32)> { + vec! [ + $( + ($crate::BenchmarkParameter::$param, $param_from, $param_to) + ),* + ] + } - /// Set up the storage, and prepare a call and caller to test in a single run of the benchmark. - fn instance(&self, components: &[(BenchmarkParameter, u32)]) -> Result<(Call, RawOrigin), &'static str>; + fn instance(&self, components: &[($crate::BenchmarkParameter, u32)]) + -> Result<(crate::Call, RawOrigin), &'static str> + { + $( + let $common = $common_from; + )* + $( + // Prepare instance + let $param = components.iter().find(|&c| c.0 == $crate::BenchmarkParameter::$param).unwrap().1; + )* + $( + let $pre_id : $pre_ty = $pre_ex; + )* + $( $param_instancer ; )* + $( $post )* + $eval + } + } + } } /// Creates a `SelectedBenchmark` enum implementing `BenchmarkingSetup`. @@ -109,6 +426,7 @@ macro_rules! selected_benchmark { $( $bench:ident ),* ) => { // The list of available benchmarks for this pallet. + #[allow(non_camel_case_types)] enum SelectedBenchmark { $( $bench, )* } diff --git a/frame/benchmarking/src/utils.rs b/frame/benchmarking/src/utils.rs new file mode 100644 index 00000000000..81e87a45f89 --- /dev/null +++ b/frame/benchmarking/src/utils.rs @@ -0,0 +1,97 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Interfaces, types and utils for benchmarking a FRAME runtime. + +use codec::{Encode, Decode}; +use sp_std::vec::Vec; +use sp_io::hashing::blake2_256; + +/// An alphabet of possible parameters to use for benchmarking. +#[derive(codec::Encode, codec::Decode, Clone, Copy, PartialEq, Debug)] +#[allow(missing_docs)] +#[allow(non_camel_case_types)] +pub enum BenchmarkParameter { + a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, +} + +/// Results from running benchmarks on a FRAME pallet. +/// Contains duration of the function call in nanoseconds along with the benchmark parameters +/// used for that benchmark result. +pub type BenchmarkResults = (Vec<(BenchmarkParameter, u32)>, u128); + +sp_api::decl_runtime_apis! { + /// Runtime api for benchmarking a FRAME runtime. + pub trait Benchmark { + /// Dispatch the given benchmark. + fn dispatch_benchmark( + module: Vec, + extrinsic: Vec, + steps: u32, + repeat: u32, + ) -> Option>; + } +} + +/// Interface that provides functions for benchmarking the runtime. +#[sp_runtime_interface::runtime_interface] +pub trait Benchmarking { + /// Get the number of nanoseconds passed since the UNIX epoch + /// + /// WARNING! This is a non-deterministic call. Do not use this within + /// consensus critical logic. + fn current_time() -> u128 { + std::time::SystemTime::now().duration_since(std::time::SystemTime::UNIX_EPOCH) + .expect("Unix time doesn't go backwards; qed") + .as_nanos() + } + + /// Reset the trie database to the genesis state. + fn wipe_db(&mut self) { + self.wipe() + } + + /// Commit pending storage changes to the trie database and clear the database cache. + fn commit_db(&mut self) { + self.commit() + } +} + +/// The pallet benchmarking trait. +pub trait Benchmarking { + /// Run the benchmarks for this pallet. + /// + /// Parameters + /// - `extrinsic`: The name of extrinsic function you want to benchmark encoded as bytes. + /// - `steps`: The number of sample points you want to take across the range of parameters. + /// - `repeat`: The number of times you want to repeat a benchmark. + fn run_benchmark(extrinsic: Vec, steps: u32, repeat: u32) -> Result, &'static str>; +} + +/// The required setup for creating a benchmark. +pub trait BenchmarkingSetup { + /// Return the components and their ranges which should be tested in this benchmark. + fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)>; + + /// Set up the storage, and prepare a call and caller to test in a single run of the benchmark. + fn instance(&self, components: &[(BenchmarkParameter, u32)]) -> Result<(Call, RawOrigin), &'static str>; +} + +/// Grab an account, seeded by a name and index. +pub fn account(name: &'static str, index: u32, seed: u32) -> AccountId { + let entropy = (name, index, seed).using_encoded(blake2_256); + AccountId::decode(&mut &entropy[..]).unwrap_or_default() +} diff --git a/frame/identity/src/benchmarking.rs b/frame/identity/src/benchmarking.rs index c208d327177..20ff66f0db8 100644 --- a/frame/identity/src/benchmarking.rs +++ b/frame/identity/src/benchmarking.rs @@ -20,10 +20,7 @@ use super::*; use frame_system::RawOrigin; use sp_io::hashing::blake2_256; -use frame_benchmarking::{ - BenchmarkResults, BenchmarkParameter, selected_benchmark, benchmarking, Benchmarking, - BenchmarkingSetup, -}; +use frame_benchmarking::benchmarks; use sp_runtime::traits::{Bounded, Dispatchable}; use crate::Module as Identity; @@ -90,150 +87,89 @@ fn create_identity_info(num_fields: u32) -> IdentityInfo { return info } -// Benchmark `add_registrar` extrinsic. -struct AddRegistrar; -impl BenchmarkingSetup, RawOrigin> for AddRegistrar { - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Registrar Count - (BenchmarkParameter::R, 1, MAX_REGISTRARS), - ] - } - - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - // Add r registrars - let r = components.iter().find(|&c| c.0 == BenchmarkParameter::R).unwrap().1; - add_registrars::(r)?; - - // Return the `add_registrar` r + 1 call - Ok((crate::Call::::add_registrar(account::("registrar", r + 1)), RawOrigin::Root)) - } -} - -// Benchmark `set_identity` extrinsic. -struct SetIdentity; -impl BenchmarkingSetup, RawOrigin> for SetIdentity { - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Registrar Count - (BenchmarkParameter::R, 1, MAX_REGISTRARS), - // Additional Field Count - (BenchmarkParameter::X, 1, T::MaxAdditionalFields::get()) - ] - } - - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - // Add r registrars - let r = components.iter().find(|&c| c.0 == BenchmarkParameter::R).unwrap().1; - add_registrars::(r)?; - - // The target user - let caller = account::("caller", r); - let caller_lookup: ::Source = T::Lookup::unlookup(caller.clone()); - let caller_origin: ::Origin = RawOrigin::Signed(caller.clone()).into(); - let _ = T::Currency::make_free_balance_be(&caller, BalanceOf::::max_value()); - - // Add an initial identity - let initial_info = create_identity_info::(1); - Identity::::set_identity(caller_origin.clone(), initial_info)?; - - // User requests judgement from all the registrars, and they approve - for i in 0..r { - Identity::::request_judgement(caller_origin.clone(), i, 10.into())?; - Identity::::provide_judgement( - RawOrigin::Signed(account::("registrar", i)).into(), - i, - caller_lookup.clone(), - Judgement::Reasonable - )?; - } - - // Create identity info with x additional fields - let x = components.iter().find(|&c| c.0 == BenchmarkParameter::X).unwrap().1; - // 32 byte data that we reuse below - let info = create_identity_info::(x); - - // Return the `set_identity` call - Ok((crate::Call::::set_identity(info), RawOrigin::Signed(caller))) +benchmarks! { + // These are the common parameters along with their instancing. + _ { + let r in 1 .. MAX_REGISTRARS => add_registrars::(r)?; + let s in 1 .. T::MaxSubAccounts::get() => { + // Give them s many sub accounts + let caller = account::("caller", 0); + let _ = add_sub_accounts::(caller, s)?; + }; + let x in 1 .. T::MaxAdditionalFields::get() => { + // Create their main identity with x additional fields + let info = create_identity_info::(x); + let caller = account::("caller", 0); + let caller_origin = ::Origin::from(RawOrigin::Signed(caller)); + Identity::::set_identity(caller_origin, info)?; + }; } -} -// Benchmark `set_subs` extrinsic. -struct SetSubs; -impl BenchmarkingSetup, RawOrigin> for SetSubs { - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Subs Count - (BenchmarkParameter::S, 1, T::MaxSubAccounts::get()), - ] - } + add_registrar { + let r in ...; + }: _(RawOrigin::Root, account::("registrar", r + 1)) + + set_identity { + let r in ...; + // This X doesn't affect the caller ID up front like with the others, so we don't use the + // standard preparation. + let x in _ .. _ => (); + let caller = { + // The target user + let caller = account::("caller", 0); + let caller_lookup: ::Source = T::Lookup::unlookup(caller.clone()); + let caller_origin: ::Origin = RawOrigin::Signed(caller.clone()).into(); + let _ = T::Currency::make_free_balance_be(&caller, BalanceOf::::max_value()); + + // Add an initial identity + let initial_info = create_identity_info::(1); + Identity::::set_identity(caller_origin.clone(), initial_info)?; + + // User requests judgement from all the registrars, and they approve + for i in 0..r { + Identity::::request_judgement(caller_origin.clone(), i, 10.into())?; + Identity::::provide_judgement( + RawOrigin::Signed(account::("registrar", i)).into(), + i, + caller_lookup.clone(), + Judgement::Reasonable + )?; + } + caller + }; + }: _( + RawOrigin::Signed(caller), + create_identity_info::(x) + ) - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - // Generic data to be used. - let data = Data::Raw(vec![0; 32]); + set_subs { + let s in ...; - // The target user let caller = account::("caller", 0); let caller_origin: ::Origin = RawOrigin::Signed(caller.clone()).into(); let _ = T::Currency::make_free_balance_be(&caller, BalanceOf::::max_value()); // Create their main identity let info = create_identity_info::(1); - Identity::::set_identity(caller_origin.clone(), info)?; - - // Give them s many sub accounts - let s = components.iter().find(|&c| c.0 == BenchmarkParameter::S).unwrap().1; - let mut subs = add_sub_accounts::(caller.clone(), s)?; - + Identity::::set_identity(caller_origin, info)?; + }: _(RawOrigin::Signed(caller), { + let mut subs = Module::::subs(&caller); + // Generic data to be used. + let data = Data::Raw(vec![0; 32]); // Create an s+1 sub account to add - subs.push((account::("sub", s+1), data)); - - // Return the `set_subs` call - Ok((crate::Call::::set_subs(subs), RawOrigin::Signed(caller))) - } -} - -// Benchmark `clear_identity` extrinsic. -struct ClearIdentity; -impl BenchmarkingSetup, RawOrigin> for ClearIdentity { - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Registrar Count - (BenchmarkParameter::R, 1, MAX_REGISTRARS), - // Subs Count - (BenchmarkParameter::S, 1, T::MaxSubAccounts::get()), - // Additional Field Count - (BenchmarkParameter::X, 1, T::MaxAdditionalFields::get()), - ] - } + subs.push((account::("sub", s + 1), data)); + subs + }) - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - // The target user + clear_identity { let caller = account::("caller", 0); - let caller_origin: ::Origin = RawOrigin::Signed(caller.clone()).into(); - let caller_lookup: ::Source = T::Lookup::unlookup(caller.clone()); + let caller_origin = ::Origin::from(RawOrigin::Signed(caller.clone())); + let caller_lookup = ::unlookup(caller.clone()); let _ = T::Currency::make_free_balance_be(&caller, BalanceOf::::max_value()); - // Register r registrars - let r = components.iter().find(|&c| c.0 == BenchmarkParameter::R).unwrap().1; - add_registrars::(r)?; - - // Create their main identity with x additional fields - let x = components.iter().find(|&c| c.0 == BenchmarkParameter::X).unwrap().1; - let info = create_identity_info::(x); - Identity::::set_identity(caller_origin.clone(), info)?; - - // Give them s many sub accounts - let s = components.iter().find(|&c| c.0 == BenchmarkParameter::S).unwrap().1; - let _ = add_sub_accounts::(caller.clone(), s)?; + let r in ...; + let s in ...; + let x in ...; // User requests judgement from all the registrars, and they approve for i in 0..r { @@ -245,260 +181,87 @@ impl BenchmarkingSetup, RawOrigin> for Judgement::Reasonable )?; } + }: _(RawOrigin::Signed(caller)) - // Return the `clear_identity` call - Ok((crate::Call::::clear_identity(), RawOrigin::Signed(caller))) - } -} - -// Benchmark `request_judgement` extrinsic. -struct RequestJudgement; -impl BenchmarkingSetup, RawOrigin> for RequestJudgement { - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Registrar Count - (BenchmarkParameter::R, 1, MAX_REGISTRARS), - // Additional Field Count - (BenchmarkParameter::X, 1, T::MaxAdditionalFields::get()), - ] - } - - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - // The target user + request_judgement { let caller = account::("caller", 0); - let caller_origin: ::Origin = RawOrigin::Signed(caller.clone()).into(); let _ = T::Currency::make_free_balance_be(&caller, BalanceOf::::max_value()); - // Register r registrars - let r = components.iter().find(|&c| c.0 == BenchmarkParameter::R).unwrap().1; - add_registrars::(r)?; + let r in ...; + let x in ...; + }: _(RawOrigin::Signed(caller), r - 1, 10.into()) - // Create their main identity with x additional fields - let x = components.iter().find(|&c| c.0 == BenchmarkParameter::X).unwrap().1; - let info = create_identity_info::(x); - Identity::::set_identity(caller_origin.clone(), info)?; - - // Return the `request_judgement` call - Ok((crate::Call::::request_judgement(r-1, 10.into()), RawOrigin::Signed(caller))) - } -} - -// Benchmark `cancel_request` extrinsic. -struct CancelRequest; -impl BenchmarkingSetup, RawOrigin> for CancelRequest { - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Registrar Count - (BenchmarkParameter::R, 1, MAX_REGISTRARS), - // Additional Field Count - (BenchmarkParameter::X, 1, T::MaxAdditionalFields::get()), - ] - } - - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - // The target user + cancel_request { let caller = account::("caller", 0); - let caller_origin: ::Origin = RawOrigin::Signed(caller.clone()).into(); + let caller_origin = ::Origin::from(RawOrigin::Signed(caller.clone())); let _ = T::Currency::make_free_balance_be(&caller, BalanceOf::::max_value()); - // Register r registrars - let r = components.iter().find(|&c| c.0 == BenchmarkParameter::R).unwrap().1; - add_registrars::(r)?; + let r in ...; + let x in ...; - // Create their main identity with x additional fields - let x = components.iter().find(|&c| c.0 == BenchmarkParameter::X).unwrap().1; - let info = create_identity_info::(x); - Identity::::set_identity(caller_origin.clone(), info)?; - - // Request judgement - Identity::::request_judgement(caller_origin.clone(), r-1, 10.into())?; - - Ok((crate::Call::::cancel_request(r-1), RawOrigin::Signed(caller))) - } -} - -// Benchmark `set_fee` extrinsic. -struct SetFee; -impl BenchmarkingSetup, RawOrigin> for SetFee { - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Registrar Count - (BenchmarkParameter::R, 1, MAX_REGISTRARS), - ] - } + Identity::::request_judgement(caller_origin, r - 1, 10.into())?; + }: _(RawOrigin::Signed(caller), r - 1) - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - // The target user + set_fee { let caller = account::("caller", 0); - let _ = T::Currency::make_free_balance_be(&caller, BalanceOf::::max_value()); - // Register r registrars - let r = components.iter().find(|&c| c.0 == BenchmarkParameter::R).unwrap().1; - add_registrars::(r)?; + let r in ...; - // Add caller as registrar Identity::::add_registrar(RawOrigin::Root.into(), caller.clone())?; + }: _(RawOrigin::Signed(caller), r, 10.into()) - // Return `set_fee` call - Ok((crate::Call::::set_fee(r, 10.into()), RawOrigin::Signed(caller))) - } -} - -// Benchmark `set_account_id` extrinsic. -struct SetAccountId; -impl BenchmarkingSetup, RawOrigin> for SetAccountId { - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Registrar Count - (BenchmarkParameter::R, 1, MAX_REGISTRARS), - ] - } - - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - // The target user + set_account_id { let caller = account::("caller", 0); let _ = T::Currency::make_free_balance_be(&caller, BalanceOf::::max_value()); - // Register r registrars - let r = components.iter().find(|&c| c.0 == BenchmarkParameter::R).unwrap().1; - add_registrars::(r)?; + let r in ...; - // Add caller as registrar Identity::::add_registrar(RawOrigin::Root.into(), caller.clone())?; + }: _(RawOrigin::Signed(caller), r, account::("new", 0)) - // Return `set_account_id` call - Ok((crate::Call::::set_account_id(r, account::("new", 0)), RawOrigin::Signed(caller))) - } -} - -// Benchmark `set_fields` extrinsic. -struct SetFields; -impl BenchmarkingSetup, RawOrigin> for SetFields { - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Registrar Count - (BenchmarkParameter::R, 1, MAX_REGISTRARS), - ] - } - - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - // The target user + set_fields { let caller = account::("caller", 0); let _ = T::Currency::make_free_balance_be(&caller, BalanceOf::::max_value()); - // Register r registrars - let r = components.iter().find(|&c| c.0 == BenchmarkParameter::R).unwrap().1; - add_registrars::(r)?; + let r in ...; - // Add caller as registrar Identity::::add_registrar(RawOrigin::Root.into(), caller.clone())?; - let fields = IdentityFields( IdentityField::Display | IdentityField::Legal | IdentityField::Web | IdentityField::Riot | IdentityField::Email | IdentityField::PgpFingerprint | IdentityField::Image | IdentityField::Twitter ); + }: _(RawOrigin::Signed(caller), r, fields) - // Return `set_account_id` call - Ok((crate::Call::::set_fields(r, fields), RawOrigin::Signed(caller))) - } -} - -// Benchmark `provide_judgement` extrinsic.g -struct ProvideJudgement; -impl BenchmarkingSetup, RawOrigin> for ProvideJudgement { - - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Registrar Count - (BenchmarkParameter::R, 1, MAX_REGISTRARS), - // Additional Field Count - (BenchmarkParameter::X, 1, T::MaxAdditionalFields::get()), - ] - } - - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - // Add r registrars - let r = components.iter().find(|&c| c.0 == BenchmarkParameter::R).unwrap().1; - add_registrars::(r)?; - + provide_judgement { // The user let user = account::("user", r); - let user_origin: ::Origin = RawOrigin::Signed(user.clone()).into(); - let user_lookup: ::Source = T::Lookup::unlookup(user.clone()); + let user_origin = ::Origin::from(RawOrigin::Signed(user.clone())); + let user_lookup = ::unlookup(user.clone()); let _ = T::Currency::make_free_balance_be(&user, BalanceOf::::max_value()); - // Create their main identity with x additional fields - let x = components.iter().find(|&c| c.0 == BenchmarkParameter::X).unwrap().1; - let info = create_identity_info::(x); - Identity::::set_identity(user_origin.clone(), info)?; - - // The caller registrar - let caller = account::("caller", r); + let caller = account::("caller", 0); let _ = T::Currency::make_free_balance_be(&caller, BalanceOf::::max_value()); - // Add caller as registrar - Identity::::add_registrar(RawOrigin::Root.into(), caller.clone())?; + let r in ...; + // For this x, it's the user identity that gts the fields, not the caller. + let x in _ .. _ => { + let info = create_identity_info::(x); + Identity::::set_identity(user_origin.clone(), info)?; + }; - // User requests judgement from caller registrar + Identity::::add_registrar(RawOrigin::Root.into(), caller.clone())?; Identity::::request_judgement(user_origin.clone(), r, 10.into())?; + }: _(RawOrigin::Signed(caller), r, user_lookup, Judgement::Reasonable) - // Return `provide_judgement` call - Ok((crate::Call::::provide_judgement( - r, - user_lookup.clone(), - Judgement::Reasonable - ), RawOrigin::Signed(caller))) - } -} - -// Benchmark `kill_identity` extrinsic. -struct KillIdentity; -impl BenchmarkingSetup, RawOrigin> for KillIdentity { - - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Registrar Count - (BenchmarkParameter::R, 1, MAX_REGISTRARS), - // Subs Count - (BenchmarkParameter::S, 1, T::MaxSubAccounts::get()), - // Additional Field Count - (BenchmarkParameter::X, 1, T::MaxAdditionalFields::get()), - ] - } - - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> - { - // The target user + kill_identity { let caller = account::("caller", 0); let caller_origin: ::Origin = RawOrigin::Signed(caller.clone()).into(); let caller_lookup: ::Source = T::Lookup::unlookup(caller.clone()); let _ = T::Currency::make_free_balance_be(&caller, BalanceOf::::max_value()); - // Register r registrars - let r = components.iter().find(|&c| c.0 == BenchmarkParameter::R).unwrap().1; - add_registrars::(r)?; - - // Create their main identity with x additional fields - let x = components.iter().find(|&c| c.0 == BenchmarkParameter::X).unwrap().1; - let info = create_identity_info::(x); - Identity::::set_identity(caller_origin.clone(), info)?; - - // Give them s many sub accounts - let s = components.iter().find(|&c| c.0 == BenchmarkParameter::S).unwrap().1; - let _ = add_sub_accounts::(caller.clone(), s)?; + let r in ...; + let s in ...; + let x in ...; // User requests judgement from all the registrars, and they approve for i in 0..r { @@ -510,86 +273,5 @@ impl BenchmarkingSetup, RawOrigin> for Judgement::Reasonable )?; } - - // Return the `kill_identity` call - Ok((crate::Call::::kill_identity(caller_lookup), RawOrigin::Root)) - } -} - -// The list of available benchmarks for this pallet. -selected_benchmark!( - AddRegistrar, - SetIdentity, - SetSubs, - ClearIdentity, - RequestJudgement, - CancelRequest, - SetFee, - SetAccountId, - SetFields, - ProvideJudgement, - KillIdentity -); - -impl Benchmarking for Module { - fn run_benchmark(extrinsic: Vec, steps: u32, repeat: u32) -> Result, &'static str> { - // Map the input to the selected benchmark. - let selected_benchmark = match extrinsic.as_slice() { - b"add_registrar" => SelectedBenchmark::AddRegistrar, - b"set_identity" => SelectedBenchmark::SetIdentity, - b"set_subs" => SelectedBenchmark::SetSubs, - b"clear_identity" => SelectedBenchmark::ClearIdentity, - b"request_judgement" => SelectedBenchmark::RequestJudgement, - b"cancel_request" => SelectedBenchmark::CancelRequest, - b"set_fee" => SelectedBenchmark::SetFee, - b"set_account_id" => SelectedBenchmark::SetAccountId, - b"set_fields" => SelectedBenchmark::SetFields, - b"provide_judgement" => SelectedBenchmark::ProvideJudgement, - b"kill_identity" => SelectedBenchmark::KillIdentity, - _ => return Err("Could not find extrinsic."), - }; - - // Warm up the DB - benchmarking::commit_db(); - benchmarking::wipe_db(); - - // first one is set_identity. - let components = , RawOrigin>>::components(&selected_benchmark); - // results go here - let mut results: Vec = Vec::new(); - // Select the component we will be benchmarking. Each component will be benchmarked. - for (name, low, high) in components.iter() { - // Create up to `STEPS` steps for that component between high and low. - let step_size = ((high - low) / steps).max(1); - let num_of_steps = (high - low) / step_size; - for s in 0..num_of_steps { - // This is the value we will be testing for component `name` - let component_value = low + step_size * s; - - // Select the mid value for all the other components. - let c: Vec<(BenchmarkParameter, u32)> = components.iter() - .map(|(n, l, h)| - (*n, if n == name { component_value } else { (h - l) / 2 + l }) - ).collect(); - - // Run the benchmark `repeat` times. - for _ in 0..repeat { - // Set up the externalities environment for the setup we want to benchmark. - let (call, caller) = , RawOrigin>>::instance(&selected_benchmark, &c)?; - // Commit the externalities to the database, flushing the DB cache. - // This will enable worst case scenario for reading from the database. - benchmarking::commit_db(); - // Run the benchmark. - let start = benchmarking::current_time(); - call.dispatch(caller.into())?; - let finish = benchmarking::current_time(); - let elapsed = finish - start; - results.push((c.clone(), elapsed)); - // Wipe the DB back to the genesis state. - benchmarking::wipe_db(); - } - } - } - return Ok(results); - } + }: _(RawOrigin::Root, caller_lookup) } diff --git a/frame/identity/src/lib.rs b/frame/identity/src/lib.rs index 895efa1c819..23a0620edff 100644 --- a/frame/identity/src/lib.rs +++ b/frame/identity/src/lib.rs @@ -394,7 +394,7 @@ decl_storage! { /// Alternative "sub" identities of this account. /// /// The first item is the deposit, the second is a vector of the accounts. - pub SubsOf get(fn subs): + pub SubsOf get(fn subs_of): map hasher(blake2_256) T::AccountId => (BalanceOf, Vec); /// The set of registrars. Not expected to get very big as can only be added through a @@ -875,6 +875,16 @@ decl_module! { } } +impl Module { + /// Get the subs of an account. + pub fn subs(who: &T::AccountId) -> Vec<(T::AccountId, Data)> { + SubsOf::::get(who).1 + .into_iter() + .filter_map(|a| SuperOf::::get(&a).map(|x| (a, x.1))) + .collect() + } +} + #[cfg(test)] mod tests { use super::*; @@ -1097,14 +1107,14 @@ mod tests { assert_ok!(Identity::set_identity(Origin::signed(10), ten())); assert_ok!(Identity::set_subs(Origin::signed(10), subs.clone())); assert_eq!(Balances::free_balance(10), 80); - assert_eq!(Identity::subs(10), (10, vec![20])); + assert_eq!(Identity::subs_of(10), (10, vec![20])); assert_eq!(Identity::super_of(20), Some((10, Data::Raw(vec![40; 1])))); // push another item and re-set it. subs.push((30, Data::Raw(vec![50; 1]))); assert_ok!(Identity::set_subs(Origin::signed(10), subs.clone())); assert_eq!(Balances::free_balance(10), 70); - assert_eq!(Identity::subs(10), (20, vec![20, 30])); + assert_eq!(Identity::subs_of(10), (20, vec![20, 30])); assert_eq!(Identity::super_of(20), Some((10, Data::Raw(vec![40; 1])))); assert_eq!(Identity::super_of(30), Some((10, Data::Raw(vec![50; 1])))); @@ -1112,7 +1122,7 @@ mod tests { subs[0] = (40, Data::Raw(vec![60; 1])); assert_ok!(Identity::set_subs(Origin::signed(10), subs.clone())); assert_eq!(Balances::free_balance(10), 70); // no change in the balance - assert_eq!(Identity::subs(10), (20, vec![40, 30])); + assert_eq!(Identity::subs_of(10), (20, vec![40, 30])); assert_eq!(Identity::super_of(20), None); assert_eq!(Identity::super_of(30), Some((10, Data::Raw(vec![50; 1])))); assert_eq!(Identity::super_of(40), Some((10, Data::Raw(vec![60; 1])))); @@ -1120,7 +1130,7 @@ mod tests { // clear assert_ok!(Identity::set_subs(Origin::signed(10), vec![])); assert_eq!(Balances::free_balance(10), 90); - assert_eq!(Identity::subs(10), (0, vec![])); + assert_eq!(Identity::subs_of(10), (0, vec![])); assert_eq!(Identity::super_of(30), None); assert_eq!(Identity::super_of(40), None); diff --git a/frame/timestamp/src/benchmarking.rs b/frame/timestamp/src/benchmarking.rs index 9310d39dfde..52b589773e9 100644 --- a/frame/timestamp/src/benchmarking.rs +++ b/frame/timestamp/src/benchmarking.rs @@ -21,88 +21,17 @@ use super::*; use sp_std::prelude::*; use frame_system::RawOrigin; -use frame_benchmarking::{ - BenchmarkResults, BenchmarkParameter, selected_benchmark, benchmarking, - Benchmarking, BenchmarkingSetup, -}; +use frame_benchmarking::benchmarks; use sp_runtime::traits::Dispatchable; -/// Benchmark `set` extrinsic. -struct Set; -impl BenchmarkingSetup, RawOrigin> for Set { - fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)> { - vec![ - // Current time ("Now") - (BenchmarkParameter::N, 1, 100), - ] - } - - fn instance(&self, components: &[(BenchmarkParameter, u32)]) - -> Result<(Call, RawOrigin), &'static str> - { - let user_origin = RawOrigin::None; - let now = components.iter().find(|&c| c.0 == BenchmarkParameter::N).unwrap().1; +const MAX_TIME: u32 = 100; - // Return the `set` call - Ok((Call::::set(now.into()), user_origin)) +benchmarks! { + _ { + let n in 1 .. MAX_TIME => (); } -} - -selected_benchmark!(Set); - -impl Benchmarking for Module { - fn run_benchmark(extrinsic: Vec, steps: u32, repeat: u32) -> Result, &'static str> { - // Map the input to the selected benchmark. - let selected_benchmark = match extrinsic.as_slice() { - b"set" => SelectedBenchmark::Set, - _ => return Err("Could not find extrinsic."), - }; - - // Warm up the DB - benchmarking::commit_db(); - benchmarking::wipe_db(); - let components = , RawOrigin>>::components(&selected_benchmark); - let mut results: Vec = Vec::new(); - - // Select the component we will be benchmarking. Each component will be benchmarked. - for (name, low, high) in components.iter() { - // Create up to `STEPS` steps for that component between high and low. - let step_size = ((high - low) / steps).max(1); - let num_of_steps = (high - low) / step_size; - for s in 0..num_of_steps { - // This is the value we will be testing for component `name` - let component_value = low + step_size * s; - - // Select the mid value for all the other components. - let c: Vec<(BenchmarkParameter, u32)> = components.iter() - .map(|(n, l, h)| - (*n, if n == name { component_value } else { (h - l) / 2 + l }) - ).collect(); - - // Run the benchmark `repeat` times. - for _ in 0..repeat { - // Set up the externalities environment for the setup we want to benchmark. - let (call, caller) = , - RawOrigin, - >>::instance(&selected_benchmark, &c)?; - // Commit the externalities to the database, flushing the DB cache. - // This will enable worst case scenario for reading from the database. - benchmarking::commit_db(); - // Run the benchmark. - let start = benchmarking::current_time(); - call.dispatch(caller.into())?; - let finish = benchmarking::current_time(); - let elapsed = finish - start; - results.push((c.clone(), elapsed)); - // Wipe the DB back to the genesis state. - benchmarking::wipe_db(); - } - } - } - - return Ok(results); - } + set { + let n in ...; + }: _(RawOrigin::None, n.into()) } -- GitLab From 3bc3bb6b385f275e482935f82ae4b8ab5c0e00e8 Mon Sep 17 00:00:00 2001 From: s3krit Date: Thu, 20 Feb 2020 22:32:30 +0100 Subject: [PATCH 017/106] CI: Add example CI job template to .gitlab-ci.yml (#5012) --- .gitlab-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 62a6c2de32d..3b634793adf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,21 @@ # pipelines can be triggered manually in the web # setting DEPLOY_TAG will only deploy the tagged image +# SAMPLE JOB TEMPLATE - This is not a complete example but is enough to build a +# simple CI job. For full documentation, visit https://docs.gitlab.com/ee/ci/yaml/ +# +# my-example-job: +# stage: test # One of the stages listed below this job (required) +# image: parity/tools:latest # Any docker image (required) +# allow_failure: true # Allow the pipeline to continue if this job fails (default: false) +# dependencies: +# - build-rust-doc-release # Any jobs that are required to run before this job (optional) +# variables: +# MY_ENVIRONMENT_VARIABLE: "some useful value" # Environment variables passed to the job (optional) +# script: +# - echo "List of shell commands to run in your job" +# - echo "You can also just specify a script here, like so:" +# - ./scripts/gitlab/my_amazing_script.sh stages: - test -- GitLab From e0c96edad907fcd28b3a62ed8e038b64b8a8bf05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Fri, 21 Feb 2020 10:42:55 +0100 Subject: [PATCH 018/106] Un-deprecate ValidateUnsigned (#5003) * Un-deprecate ValidateUnsigned. * Bump runtime. * Bump runtime. Co-authored-by: Shawn Tabrizi --- bin/node/runtime/src/lib.rs | 2 +- frame/executive/src/lib.rs | 6 ------ frame/im-online/src/lib.rs | 1 - frame/im-online/src/tests.rs | 2 -- frame/support/src/unsigned.rs | 3 --- primitives/runtime/src/generic/checked_extrinsic.rs | 3 --- primitives/runtime/src/testing.rs | 3 --- primitives/runtime/src/traits.rs | 3 --- 8 files changed, 1 insertion(+), 22 deletions(-) diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index 76b77d39f02..b6be9335ca9 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -82,7 +82,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. spec_version: 224, - impl_version: 1, + impl_version: 2, apis: RUNTIME_API_VERSIONS, }; diff --git a/frame/executive/src/lib.rs b/frame/executive/src/lib.rs index e68681af197..f58833440c2 100644 --- a/frame/executive/src/lib.rs +++ b/frame/executive/src/lib.rs @@ -60,9 +60,7 @@ //! # pub type AllModules = u64; //! # pub enum Runtime {}; //! # use sp_runtime::transaction_validity::{TransactionValidity, UnknownTransaction}; -//! # #[allow(deprecated)] //! # use sp_runtime::traits::ValidateUnsigned; -//! # #[allow(deprecated)] //! # impl ValidateUnsigned for Runtime { //! # type Call = (); //! # @@ -88,7 +86,6 @@ use sp_runtime::{ transaction_validity::TransactionValidity, }; use sp_runtime::generic::CheckSignature; -#[allow(deprecated)] use sp_runtime::traits::ValidateUnsigned; use codec::{Codec, Encode}; use frame_system::{extrinsics_root, DigestOf}; @@ -107,7 +104,6 @@ pub struct Executive( PhantomData<(System, Block, Context, UnsignedValidator, AllModules)> ); -#[allow(deprecated)] // Allow ValidateUnsigned, remove the attribute when the trait is removed. impl< System: frame_system::Trait, Block: traits::Block, @@ -133,7 +129,6 @@ where } } -#[allow(deprecated)] // Allow ValidateUnsigned, remove the attribute when the trait is removed. impl< System: frame_system::Trait, Block: traits::Block, @@ -501,7 +496,6 @@ mod tests { } impl custom::Trait for Runtime {} - #[allow(deprecated)] impl ValidateUnsigned for Runtime { type Call = Call; diff --git a/frame/im-online/src/lib.rs b/frame/im-online/src/lib.rs index 0132bcedd20..d6d13c66c25 100644 --- a/frame/im-online/src/lib.rs +++ b/frame/im-online/src/lib.rs @@ -617,7 +617,6 @@ impl pallet_session::OneSessionHandler for Module { } } -#[allow(deprecated)] impl frame_support::unsigned::ValidateUnsigned for Module { type Call = Call; diff --git a/frame/im-online/src/tests.rs b/frame/im-online/src/tests.rs index 4ce5dec9613..b43adca0fd4 100644 --- a/frame/im-online/src/tests.rs +++ b/frame/im-online/src/tests.rs @@ -112,7 +112,6 @@ fn heartbeat( authority_index: u32, id: UintAuthorityId, ) -> dispatch::DispatchResult { - #[allow(deprecated)] use frame_support::unsigned::ValidateUnsigned; let heartbeat = Heartbeat { @@ -126,7 +125,6 @@ fn heartbeat( }; let signature = id.sign(&heartbeat.encode()).unwrap(); - #[allow(deprecated)] // Allow ValidateUnsigned ImOnline::pre_dispatch(&crate::Call::heartbeat(heartbeat.clone(), signature.clone())) .map_err(|e| <&'static str>::from(e))?; ImOnline::heartbeat( diff --git a/frame/support/src/unsigned.rs b/frame/support/src/unsigned.rs index 319fa3adb44..4289e4e474f 100644 --- a/frame/support/src/unsigned.rs +++ b/frame/support/src/unsigned.rs @@ -15,7 +15,6 @@ // along with Substrate. If not, see . #[doc(hidden)] -#[allow(deprecated)] pub use crate::sp_runtime::traits::ValidateUnsigned; #[doc(hidden)] pub use crate::sp_runtime::transaction_validity::{ @@ -66,7 +65,6 @@ macro_rules! impl_outer_validate_unsigned { $( $module:ident )* } ) => { - #[allow(deprecated)] // Allow ValidateUnsigned impl $crate::unsigned::ValidateUnsigned for $runtime { type Call = Call; @@ -109,7 +107,6 @@ mod test_partial_and_full_call { pub mod timestamp { pub struct Module; - #[allow(deprecated)] // Allow ValidateUnsigned impl super::super::ValidateUnsigned for Module { type Call = Call; diff --git a/primitives/runtime/src/generic/checked_extrinsic.rs b/primitives/runtime/src/generic/checked_extrinsic.rs index b2d247ef5f9..20aefbdf990 100644 --- a/primitives/runtime/src/generic/checked_extrinsic.rs +++ b/primitives/runtime/src/generic/checked_extrinsic.rs @@ -20,7 +20,6 @@ use crate::traits::{ self, Member, MaybeDisplay, SignedExtension, Dispatchable, }; -#[allow(deprecated)] use crate::traits::ValidateUnsigned; use crate::transaction_validity::TransactionValidity; @@ -54,7 +53,6 @@ where self.signed.as_ref().map(|x| &x.0) } - #[allow(deprecated)] // Allow ValidateUnsigned fn validate>( &self, info: Self::DispatchInfo, @@ -69,7 +67,6 @@ where } } - #[allow(deprecated)] // Allow ValidateUnsigned fn apply>( self, info: Self::DispatchInfo, diff --git a/primitives/runtime/src/testing.rs b/primitives/runtime/src/testing.rs index be0e36b2d1a..6f6ea3dd164 100644 --- a/primitives/runtime/src/testing.rs +++ b/primitives/runtime/src/testing.rs @@ -23,7 +23,6 @@ use crate::traits::{ self, Checkable, Applyable, BlakeTwo256, OpaqueKeys, SignedExtension, Dispatchable, }; -#[allow(deprecated)] use crate::traits::ValidateUnsigned; use crate::{generic::{self, CheckSignature}, KeyTypeId, ApplyExtrinsicResult}; pub use sp_core::{H256, sr25519}; @@ -418,7 +417,6 @@ impl Applyable for TestXt where fn sender(&self) -> Option<&Self::AccountId> { self.signature.as_ref().map(|x| &x.0) } /// Checks to see if this is a valid *transaction*. It returns information on it if so. - #[allow(deprecated)] // Allow ValidateUnsigned fn validate>( &self, _info: Self::DispatchInfo, @@ -429,7 +427,6 @@ impl Applyable for TestXt where /// Executes all necessary logic needed prior to dispatch and deconstructs into function call, /// index and sender. - #[allow(deprecated)] // Allow ValidateUnsigned fn apply>( self, info: Self::DispatchInfo, diff --git a/primitives/runtime/src/traits.rs b/primitives/runtime/src/traits.rs index f6655f68b45..fef20c826af 100644 --- a/primitives/runtime/src/traits.rs +++ b/primitives/runtime/src/traits.rs @@ -889,7 +889,6 @@ pub trait Applyable: Sized + Send + Sync { fn sender(&self) -> Option<&Self::AccountId>; /// Checks to see if this is a valid *transaction*. It returns information on it if so. - #[allow(deprecated)] // Allow ValidateUnsigned fn validate>( &self, info: Self::DispatchInfo, @@ -898,7 +897,6 @@ pub trait Applyable: Sized + Send + Sync { /// Executes all necessary logic needed prior to dispatch and deconstructs into function call, /// index and sender. - #[allow(deprecated)] // Allow ValidateUnsigned fn apply>( self, info: Self::DispatchInfo, @@ -924,7 +922,6 @@ pub trait GetNodeBlockType { /// the transaction for the transaction pool. /// During block execution phase one need to perform the same checks anyway, /// since this function is not being called. -#[deprecated(note = "Use SignedExtensions instead.")] pub trait ValidateUnsigned { /// The call to validate type Call; -- GitLab From c24d8cc89ccdf29bae2f0f06187ce5b29aeea29c Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Fri, 21 Feb 2020 10:43:42 +0100 Subject: [PATCH 019/106] babe: directly using append_u64 in transcript instead of to_le_bytes (#5005) --- client/consensus/babe/src/authorship.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/consensus/babe/src/authorship.rs b/client/consensus/babe/src/authorship.rs index a3254d0fcb4..a01ea63bbe1 100644 --- a/client/consensus/babe/src/authorship.rs +++ b/client/consensus/babe/src/authorship.rs @@ -92,8 +92,8 @@ pub(super) fn make_transcript( epoch: u64, ) -> Transcript { let mut transcript = Transcript::new(&BABE_ENGINE_ID); - transcript.append_message(b"slot number", &slot_number.to_le_bytes()); - transcript.append_message(b"current epoch", &epoch.to_le_bytes()); + transcript.append_u64(b"slot number", slot_number); + transcript.append_u64(b"current epoch", epoch); transcript.append_message(b"chain randomness", randomness); transcript } -- GitLab From 0d3ff5c779d859cfd103a0937a7d687ffae068be Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Fri, 21 Feb 2020 10:48:18 +0100 Subject: [PATCH 020/106] aura: remove unneeded SlotDuration struct and rename digest -> digests (#4958) * aura: remove unneeded SlotDuration struct and rename digest -> digests * aura: add alias type for SlotDuration * aura: fix tests * Fix missing parameters in get_or_compute * Use special function for fetching aura slot_duration --- bin/node-template/node/src/service.rs | 6 +-- .../aura/src/{digest.rs => digests.rs} | 0 client/consensus/aura/src/lib.rs | 44 +++++++------------ 3 files changed, 19 insertions(+), 31 deletions(-) rename client/consensus/aura/src/{digest.rs => digests.rs} (100%) diff --git a/bin/node-template/node/src/service.rs b/bin/node-template/node/src/service.rs index 5466f3e919c..9be91e7ef98 100644 --- a/bin/node-template/node/src/service.rs +++ b/bin/node-template/node/src/service.rs @@ -57,7 +57,7 @@ macro_rules! new_full_start { ); let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _>( - sc_consensus_aura::SlotDuration::get_or_compute(&*client)?, + sc_consensus_aura::slot_duration(&*client)?, aura_block_import, Some(Box::new(grandpa_block_import.clone())), None, @@ -115,7 +115,7 @@ pub fn new_full(config: Configuration) sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _>( - sc_consensus_aura::SlotDuration::get_or_compute(&*client)?, + sc_consensus_aura::slot_duration(&*client)?, client, select_chain, block_import, @@ -220,7 +220,7 @@ pub fn new_light(config: Configuration) finality_proof_import.create_finality_proof_request_builder(); let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, ()>( - sc_consensus_aura::SlotDuration::get_or_compute(&*client)?, + sc_consensus_aura::slot_duration(&*client)?, grandpa_block_import, None, Some(Box::new(finality_proof_import)), diff --git a/client/consensus/aura/src/digest.rs b/client/consensus/aura/src/digests.rs similarity index 100% rename from client/consensus/aura/src/digest.rs rename to client/consensus/aura/src/digests.rs diff --git a/client/consensus/aura/src/lib.rs b/client/consensus/aura/src/lib.rs index db872f28c1b..9be52e02467 100644 --- a/client/consensus/aura/src/lib.rs +++ b/client/consensus/aura/src/lib.rs @@ -79,33 +79,23 @@ pub use sp_consensus_aura::{ }, }; pub use sp_consensus::SyncOracle; -pub use digest::CompatibleDigestItem; +pub use digests::CompatibleDigestItem; -mod digest; +mod digests; type AuthorityId

=

::Public; -/// A slot duration. Create with `get_or_compute`. -#[derive(Clone, Copy, Debug, Encode, Decode, Hash, PartialOrd, Ord, PartialEq, Eq)] -pub struct SlotDuration(sc_consensus_slots::SlotDuration); - -impl SlotDuration { - /// Either fetch the slot duration from disk or compute it from the genesis - /// state. - pub fn get_or_compute(client: &C) -> CResult - where - A: Codec, - B: BlockT, - C: AuxStore + ProvideRuntimeApi, - C::Api: AuraApi, - { - sc_consensus_slots::SlotDuration::get_or_compute(client, |a, b| a.slot_duration(b)).map(Self) - } +/// Slot duration type for Aura. +pub type SlotDuration = sc_consensus_slots::SlotDuration; - /// Get the slot duration in milliseconds. - pub fn get(&self) -> u64 { - self.0.get() - } +/// Get type of `SlotDuration` for Aura. +pub fn slot_duration(client: &C) -> CResult where + A: Codec, + B: BlockT, + C: AuxStore + ProvideRuntimeApi, + C::Api: AuraApi, +{ + SlotDuration::get_or_compute(client, |a, b| a.slot_duration(b)) } /// Get slot author for given block along with authorities. @@ -179,10 +169,10 @@ pub fn start_aura( }; register_aura_inherent_data_provider( &inherent_data_providers, - slot_duration.0.slot_duration() + slot_duration.slot_duration() )?; Ok(sc_consensus_slots::start_slot_worker::<_, _, _, _, _, AuraSlotCompatible, _>( - slot_duration.0, + slot_duration, select_chain, worker, sync_oracle, @@ -926,8 +916,7 @@ mod tests { { match client { PeersClient::Full(client, _) => { - let slot_duration = SlotDuration::get_or_compute(&*client) - .expect("slot duration available"); + let slot_duration = slot_duration(&*client).expect("slot duration available"); let inherent_data_providers = InherentDataProviders::new(); register_aura_inherent_data_provider( &inherent_data_providers, @@ -995,8 +984,7 @@ mod tests { .for_each(move |_| future::ready(())) ); - let slot_duration = SlotDuration::get_or_compute(&*client) - .expect("slot duration available"); + let slot_duration = slot_duration(&*client).expect("slot duration available"); let inherent_data_providers = InherentDataProviders::new(); register_aura_inherent_data_provider( -- GitLab From e146ecf66bc62fd2a6ba9eb627e42da74eed5fed Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Fri, 21 Feb 2020 10:48:42 +0100 Subject: [PATCH 021/106] Make sure we use libp2p 0.16.1 (#5017) --- bin/utils/subkey/Cargo.toml | 2 +- client/authority-discovery/Cargo.toml | 2 +- client/network-gossip/Cargo.toml | 2 +- client/network/Cargo.toml | 2 +- client/network/test/Cargo.toml | 2 +- client/peerset/Cargo.toml | 2 +- client/telemetry/Cargo.toml | 2 +- primitives/consensus/common/Cargo.toml | 2 +- utils/browser/Cargo.toml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/utils/subkey/Cargo.toml b/bin/utils/subkey/Cargo.toml index 8267366d7fe..9c96c7ffa87 100644 --- a/bin/utils/subkey/Cargo.toml +++ b/bin/utils/subkey/Cargo.toml @@ -28,7 +28,7 @@ derive_more = { version = "0.99.2" } sc-rpc = { version = "2.0.0", path = "../../../client/rpc" } jsonrpc-core-client = { version = "14.0.3", features = ["http"] } hyper = "0.12.35" -libp2p = "0.16.0" +libp2p = "0.16.1" serde_json = "1.0" [features] diff --git a/client/authority-discovery/Cargo.toml b/client/authority-discovery/Cargo.toml index 248304d1370..59ed5bc89da 100644 --- a/client/authority-discovery/Cargo.toml +++ b/client/authority-discovery/Cargo.toml @@ -15,7 +15,7 @@ codec = { package = "parity-scale-codec", default-features = false, version = "1 derive_more = "0.99.2" futures = "0.3.1" futures-timer = "3.0.1" -libp2p = { version = "0.16.0", default-features = false, features = ["secp256k1", "libp2p-websocket"] } +libp2p = { version = "0.16.1", default-features = false, features = ["secp256k1", "libp2p-websocket"] } log = "0.4.8" prost = "0.6.1" rand = "0.7.2" diff --git a/client/network-gossip/Cargo.toml b/client/network-gossip/Cargo.toml index 8866db1f343..08b63151db2 100644 --- a/client/network-gossip/Cargo.toml +++ b/client/network-gossip/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] futures = "0.3.1" futures-timer = "3.0.1" -libp2p = { version = "0.16.0", default-features = false, features = ["libp2p-websocket"] } +libp2p = { version = "0.16.1", default-features = false, features = ["libp2p-websocket"] } log = "0.4.8" lru = "0.1.2" parking_lot = "0.10.0" diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index e53ba13c8d2..e878e47e693 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -22,7 +22,7 @@ futures = "0.3.1" futures_codec = "0.3.3" futures-timer = "3.0.1" wasm-timer = "0.2" -libp2p = { version = "0.16.0", default-features = false, features = ["libp2p-websocket"] } +libp2p = { version = "0.16.1", default-features = false, features = ["libp2p-websocket"] } linked-hash-map = "0.5.2" linked_hash_set = "0.1.3" log = "0.4.8" diff --git a/client/network/test/Cargo.toml b/client/network/test/Cargo.toml index 339279c7048..54685bc00c8 100644 --- a/client/network/test/Cargo.toml +++ b/client/network/test/Cargo.toml @@ -14,7 +14,7 @@ futures = "0.1.29" futures03 = { package = "futures", version = "0.3.1", features = ["compat"] } futures-timer = "3.0.1" rand = "0.7.2" -libp2p = { version = "0.16.0", default-features = false, features = ["libp2p-websocket"] } +libp2p = { version = "0.16.1", default-features = false, features = ["libp2p-websocket"] } sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" } sc-client = { version = "0.8", path = "../../" } sc-client-api = { version = "2.0.0", path = "../../api" } diff --git a/client/peerset/Cargo.toml b/client/peerset/Cargo.toml index c17ffdc385b..b39aa404904 100644 --- a/client/peerset/Cargo.toml +++ b/client/peerset/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] futures = "0.3.1" -libp2p = { version = "0.16.0", default-features = false } +libp2p = { version = "0.16.1", default-features = false } log = "0.4.8" serde_json = "1.0.41" wasm-timer = "0.2" diff --git a/client/telemetry/Cargo.toml b/client/telemetry/Cargo.toml index 10f4b188af6..66d08e1b145 100644 --- a/client/telemetry/Cargo.toml +++ b/client/telemetry/Cargo.toml @@ -12,7 +12,7 @@ parking_lot = "0.10.0" futures = "0.3.1" futures-timer = "3.0.1" wasm-timer = "0.2.0" -libp2p = { version = "0.16.0", default-features = false, features = ["libp2p-websocket"] } +libp2p = { version = "0.16.1", default-features = false, features = ["libp2p-websocket"] } log = "0.4.8" pin-project = "0.4.6" rand = "0.7.2" diff --git a/primitives/consensus/common/Cargo.toml b/primitives/consensus/common/Cargo.toml index d7c33a6452c..5af55ad46d9 100644 --- a/primitives/consensus/common/Cargo.toml +++ b/primitives/consensus/common/Cargo.toml @@ -8,7 +8,7 @@ license = "GPL-3.0" [dependencies] derive_more = "0.99.2" -libp2p = { version = "0.16.0", default-features = false } +libp2p = { version = "0.16.1", default-features = false } log = "0.4.8" sp-core = { path= "../../core" } sp-inherents = { version = "2.0.0", path = "../../inherents" } diff --git a/utils/browser/Cargo.toml b/utils/browser/Cargo.toml index 7e101c438a8..803a9c5ce27 100644 --- a/utils/browser/Cargo.toml +++ b/utils/browser/Cargo.toml @@ -10,7 +10,7 @@ license = "GPL-3.0" futures = "0.3" futures01 = { package = "futures", version = "0.1.29" } log = "0.4.8" -libp2p = { version = "0.16.0", default-features = false } +libp2p = { version = "0.16.1", default-features = false } console_error_panic_hook = "0.1.6" console_log = "0.1.2" js-sys = "0.3.34" -- GitLab From b75151e20b3c5876f035a58f74663278f4b69865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Fri, 21 Feb 2020 09:50:42 +0000 Subject: [PATCH 022/106] node, node-template: disable GRANDPA observer (#5011) * node-template: disable grandpa observer * node: disable grandpa observer * node: add doc about grandpa-voter infallible task * grandpa: remove grandpa observer from public API * grandpa: ignore observer_enabled field in config --- bin/node-template/node/src/service.rs | 65 ++++++++++++------------ bin/node/cli/src/service.rs | 67 ++++++++++++------------- client/finality-grandpa/src/lib.rs | 9 +++- client/finality-grandpa/src/observer.rs | 3 ++ client/finality-grandpa/src/tests.rs | 2 +- 5 files changed, 73 insertions(+), 73 deletions(-) diff --git a/bin/node-template/node/src/service.rs b/bin/node-template/node/src/service.rs index 9be91e7ef98..c5b9bf336ee 100644 --- a/bin/node-template/node/src/service.rs +++ b/bin/node-template/node/src/service.rs @@ -145,44 +145,41 @@ pub fn new_full(config: Configuration) gossip_duration: Duration::from_millis(333), justification_period: 512, name: Some(name), - observer_enabled: true, + observer_enabled: false, keystore, is_authority, }; - match (is_authority, disable_grandpa) { - (false, false) => { - // start the lightweight GRANDPA observer - service.spawn_task("grandpa-observer", grandpa::run_grandpa_observer( - grandpa_config, - grandpa_link, - service.network(), - service.on_exit(), - )?); - }, - (true, false) => { - // start the full GRANDPA voter - let voter_config = grandpa::GrandpaParams { - config: grandpa_config, - link: grandpa_link, - network: service.network(), - inherent_data_providers: inherent_data_providers.clone(), - on_exit: service.on_exit(), - telemetry_on_connect: Some(service.telemetry_on_connect_stream()), - voting_rule: grandpa::VotingRulesBuilder::default().build(), - }; - - // the GRANDPA voter task is considered infallible, i.e. - // if it fails we take down the service with it. - service.spawn_essential_task("grandpa", grandpa::run_grandpa_voter(voter_config)?); - }, - (_, true) => { - grandpa::setup_disabled_grandpa( - service.client(), - &inherent_data_providers, - service.network(), - )?; - }, + 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 = grandpa::GrandpaParams { + config: grandpa_config, + link: grandpa_link, + network: service.network(), + inherent_data_providers: inherent_data_providers.clone(), + on_exit: service.on_exit(), + telemetry_on_connect: Some(service.telemetry_on_connect_stream()), + voting_rule: grandpa::VotingRulesBuilder::default().build(), + }; + + // 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", + grandpa::run_grandpa_voter(grandpa_config)? + ); + } else { + grandpa::setup_disabled_grandpa( + service.client(), + &inherent_data_providers, + service.network(), + )?; } Ok(service) diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs index 79e1f97169e..c60e150a4fe 100644 --- a/bin/node/cli/src/service.rs +++ b/bin/node/cli/src/service.rs @@ -215,46 +215,41 @@ macro_rules! new_full { gossip_duration: std::time::Duration::from_millis(333), justification_period: 512, name: Some(name), - observer_enabled: true, + observer_enabled: false, keystore, is_authority, }; - match (is_authority, disable_grandpa) { - (false, false) => { - // start the lightweight GRANDPA observer - service.spawn_task("grandpa-observer", grandpa::run_grandpa_observer( - config, - grandpa_link, - service.network(), - service.on_exit(), - )?); - }, - (true, false) => { - // start the full GRANDPA voter - let grandpa_config = grandpa::GrandpaParams { - config: config, - link: grandpa_link, - network: service.network(), - inherent_data_providers: inherent_data_providers.clone(), - on_exit: service.on_exit(), - telemetry_on_connect: Some(service.telemetry_on_connect_stream()), - voting_rule: grandpa::VotingRulesBuilder::default().build(), - }; - // 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", - grandpa::run_grandpa_voter(grandpa_config)? - ); - }, - (_, true) => { - grandpa::setup_disabled_grandpa( - service.client(), - &inherent_data_providers, - service.network(), - )?; - }, + 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 = grandpa::GrandpaParams { + config, + link: grandpa_link, + network: service.network(), + inherent_data_providers: inherent_data_providers.clone(), + on_exit: service.on_exit(), + telemetry_on_connect: Some(service.telemetry_on_connect_stream()), + voting_rule: grandpa::VotingRulesBuilder::default().build(), + }; + + // 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", + grandpa::run_grandpa_voter(grandpa_config)? + ); + } else { + grandpa::setup_disabled_grandpa( + service.client(), + &inherent_data_providers, + service.network(), + )?; } Ok((service, inherent_data_providers)) diff --git a/client/finality-grandpa/src/lib.rs b/client/finality-grandpa/src/lib.rs index e931271df91..36b57024c96 100644 --- a/client/finality-grandpa/src/lib.rs +++ b/client/finality-grandpa/src/lib.rs @@ -96,7 +96,6 @@ mod voting_rule; pub use finality_proof::FinalityProofProvider; pub use justification::GrandpaJustification; pub use light_import::light_block_import; -pub use observer::run_grandpa_observer; pub use voting_rule::{ BeforeBestBlockBy, ThreeQuartersOfTheUnfinalizedChain, VotingRule, VotingRulesBuilder }; @@ -551,7 +550,7 @@ pub fn run_grandpa_voter( Client: AuxStore, { let GrandpaParams { - config, + mut config, link, network, inherent_data_providers, @@ -560,6 +559,12 @@ pub fn run_grandpa_voter( voting_rule, } = grandpa_params; + // NOTE: we have recently removed `run_grandpa_observer` from the public + // API, I felt it is easier to just ignore this field rather than removing + // it from the config temporarily. This should be removed after #5013 is + // fixed and we re-add the observer to the public API. + config.observer_enabled = false; + let LinkHalf { client, select_chain, diff --git a/client/finality-grandpa/src/observer.rs b/client/finality-grandpa/src/observer.rs index 77227909dc8..8345a342099 100644 --- a/client/finality-grandpa/src/observer.rs +++ b/client/finality-grandpa/src/observer.rs @@ -150,6 +150,9 @@ fn grandpa_observer( /// listening for and validating GRANDPA commits instead of following the full /// protocol. Provide configuration and a link to a block import worker that has /// already been instantiated with `block_import`. +/// NOTE: this is currently not part of the crate's public API since we don't consider +/// it stable enough to use on a live network. +#[allow(unused)] pub fn run_grandpa_observer( config: Config, link: LinkHalf, diff --git a/client/finality-grandpa/src/tests.rs b/client/finality-grandpa/src/tests.rs index 24ab0dd41c5..5d01b257b6d 100644 --- a/client/finality-grandpa/src/tests.rs +++ b/client/finality-grandpa/src/tests.rs @@ -1376,7 +1376,7 @@ fn finalize_3_voters_1_light_observer() { run_to_completion_with(&mut runtime, 20, net.clone(), authorities, |executor| { executor.spawn( - run_grandpa_observer( + observer::run_grandpa_observer( Config { gossip_duration: TEST_GOSSIP_DURATION, justification_period: 32, -- GitLab From 397f53a161cd19de5ad3fe421bb30606d07cece2 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Fri, 21 Feb 2020 11:06:24 +0100 Subject: [PATCH 023/106] Open one substream for each notifications protocol (#4909) * Open one substream for each notifications protocol * Fix WASM build * Apply suggestions from code review Co-Authored-By: Toralf Wittner * Address concerns * Use unsigned-varint to read the varint * Use unsigned-varint * Forgot Cargo.lock Co-authored-by: Toralf Wittner --- Cargo.lock | 2 + .../finality-grandpa/src/communication/mod.rs | 8 +- .../src/communication/tests.rs | 4 +- client/finality-grandpa/src/lib.rs | 5 +- client/network-gossip/src/bridge.rs | 5 +- client/network-gossip/src/lib.rs | 8 +- client/network/Cargo.toml | 3 +- client/network/src/protocol.rs | 70 +- .../{legacy_proto.rs => generic_proto.rs} | 4 +- .../behaviour.rs | 202 ++++-- .../src/protocol/generic_proto/handler.rs | 22 + .../protocol/generic_proto/handler/group.rs | 523 +++++++++++++++ .../handler/legacy.rs} | 80 ++- .../generic_proto/handler/notif_in.rs | 256 +++++++ .../generic_proto/handler/notif_out.rs | 395 +++++++++++ .../{legacy_proto => generic_proto}/tests.rs | 32 +- .../src/protocol/generic_proto/upgrade.rs | 35 + .../protocol/generic_proto/upgrade/collec.rs | 97 +++ .../upgrade/legacy.rs} | 0 .../generic_proto/upgrade/notifications.rs | 622 ++++++++++++++++++ client/network/src/service.rs | 9 +- 21 files changed, 2231 insertions(+), 151 deletions(-) rename client/network/src/protocol/{legacy_proto.rs => generic_proto.rs} (86%) rename client/network/src/protocol/{legacy_proto => generic_proto}/behaviour.rs (86%) create mode 100644 client/network/src/protocol/generic_proto/handler.rs create mode 100644 client/network/src/protocol/generic_proto/handler/group.rs rename client/network/src/protocol/{legacy_proto/handler.rs => generic_proto/handler/legacy.rs} (90%) create mode 100644 client/network/src/protocol/generic_proto/handler/notif_in.rs create mode 100644 client/network/src/protocol/generic_proto/handler/notif_out.rs rename client/network/src/protocol/{legacy_proto => generic_proto}/tests.rs (92%) create mode 100644 client/network/src/protocol/generic_proto/upgrade.rs create mode 100644 client/network/src/protocol/generic_proto/upgrade/collec.rs rename client/network/src/protocol/{legacy_proto/upgrade.rs => generic_proto/upgrade/legacy.rs} (100%) create mode 100644 client/network/src/protocol/generic_proto/upgrade/notifications.rs diff --git a/Cargo.lock b/Cargo.lock index c17bd30b0b7..dddd6cddadc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6231,6 +6231,7 @@ dependencies = [ "nohash-hasher", "parity-scale-codec", "parking_lot 0.10.0", + "pin-project", "prost", "prost-build", "quickcheck", @@ -8564,6 +8565,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b7ffb36714206d2f5f05d61a2bc350415c642f2c54433f0ebf829afbe41d570" dependencies = [ "bytes 0.5.4", + "futures 0.3.4", "futures_codec", ] diff --git a/client/finality-grandpa/src/communication/mod.rs b/client/finality-grandpa/src/communication/mod.rs index 050a3c8642f..b5600c1c0d8 100644 --- a/client/finality-grandpa/src/communication/mod.rs +++ b/client/finality-grandpa/src/communication/mod.rs @@ -65,6 +65,7 @@ mod periodic; pub(crate) mod tests; pub use sp_finality_grandpa::GRANDPA_ENGINE_ID; +pub const GRANDPA_PROTOCOL_NAME: &[u8] = b"/paritytech/grandpa/1"; // cost scalars for reporting peers. mod cost { @@ -185,7 +186,12 @@ impl> NetworkBridge { ); let validator = Arc::new(validator); - let gossip_engine = GossipEngine::new(service.clone(), GRANDPA_ENGINE_ID, validator.clone()); + let gossip_engine = GossipEngine::new( + service.clone(), + GRANDPA_ENGINE_ID, + GRANDPA_PROTOCOL_NAME, + validator.clone() + ); { // register all previous votes with the gossip service so that they're diff --git a/client/finality-grandpa/src/communication/tests.rs b/client/finality-grandpa/src/communication/tests.rs index 5506512b531..96761a2f3c0 100644 --- a/client/finality-grandpa/src/communication/tests.rs +++ b/client/finality-grandpa/src/communication/tests.rs @@ -25,7 +25,7 @@ use std::sync::Arc; use sp_keyring::Ed25519Keyring; use parity_scale_codec::Encode; use sp_runtime::{ConsensusEngineId, traits::NumberFor}; -use std::{pin::Pin, task::{Context, Poll}}; +use std::{borrow::Cow, pin::Pin, task::{Context, Poll}}; use crate::environment::SharedVoterSetState; use sp_finality_grandpa::{AuthorityList, GRANDPA_ENGINE_ID}; use super::gossip::{self, GossipValidator}; @@ -61,7 +61,7 @@ impl sc_network_gossip::Network for TestNetwork { let _ = self.sender.unbounded_send(Event::WriteNotification(who, message)); } - fn register_notifications_protocol(&self, _: ConsensusEngineId) {} + fn register_notifications_protocol(&self, _: ConsensusEngineId, _: Cow<'static, [u8]>) {} fn announce(&self, block: Hash, _associated_data: Vec) { let _ = self.sender.unbounded_send(Event::Announce(block)); diff --git a/client/finality-grandpa/src/lib.rs b/client/finality-grandpa/src/lib.rs index 36b57024c96..650b59dfff6 100644 --- a/client/finality-grandpa/src/lib.rs +++ b/client/finality-grandpa/src/lib.rs @@ -886,7 +886,10 @@ pub fn setup_disabled_grandpa( // We register the GRANDPA protocol so that we don't consider it an anomaly // to receive GRANDPA messages on the network. We don't process the // messages. - network.register_notifications_protocol(communication::GRANDPA_ENGINE_ID); + network.register_notifications_protocol( + communication::GRANDPA_ENGINE_ID, + From::from(communication::GRANDPA_PROTOCOL_NAME), + ); Ok(()) } diff --git a/client/network-gossip/src/bridge.rs b/client/network-gossip/src/bridge.rs index 7968e59d070..c911766aba4 100644 --- a/client/network-gossip/src/bridge.rs +++ b/client/network-gossip/src/bridge.rs @@ -24,7 +24,7 @@ use futures::{prelude::*, channel::mpsc}; use libp2p::PeerId; use parking_lot::Mutex; use sp_runtime::{traits::Block as BlockT, ConsensusEngineId}; -use std::{pin::Pin, sync::Arc, task::{Context, Poll}}; +use std::{borrow::Cow, pin::Pin, sync::Arc, task::{Context, Poll}}; /// Wraps around an implementation of the `Network` crate and provides gossiping capabilities on /// top of it. @@ -48,6 +48,7 @@ impl GossipEngine { pub fn new + Send + Clone + 'static>( mut network: N, engine_id: ConsensusEngineId, + protocol_name: impl Into>, validator: Arc>, ) -> Self where B: 'static { let mut state_machine = ConsensusGossip::new(); @@ -56,7 +57,7 @@ impl GossipEngine { // might miss events. let network_event_stream = network.event_stream(); - network.register_notifications_protocol(engine_id); + network.register_notifications_protocol(engine_id, protocol_name.into()); state_machine.register_validator(&mut network, engine_id, validator); let inner = Arc::new(Mutex::new(GossipEngineInner { diff --git a/client/network-gossip/src/lib.rs b/client/network-gossip/src/lib.rs index c4f057a775f..abb3f32972b 100644 --- a/client/network-gossip/src/lib.rs +++ b/client/network-gossip/src/lib.rs @@ -61,7 +61,7 @@ pub use self::validator::{DiscardAll, MessageIntent, Validator, ValidatorContext use futures::prelude::*; use sc_network::{specialization::NetworkSpecialization, Event, ExHashT, NetworkService, PeerId, ReputationChange}; use sp_runtime::{traits::Block as BlockT, ConsensusEngineId}; -use std::{pin::Pin, sync::Arc}; +use std::{borrow::Cow, pin::Pin, sync::Arc}; mod bridge; mod state_machine; @@ -86,7 +86,8 @@ pub trait Network { /// See the documentation of [`NetworkService:register_notifications_protocol`] for more information. fn register_notifications_protocol( &self, - engine_id: ConsensusEngineId + engine_id: ConsensusEngineId, + protocol_name: Cow<'static, [u8]>, ); /// Notify everyone we're connected to that we have the given block. @@ -116,8 +117,9 @@ impl, H: ExHashT> Network for Arc, ) { - NetworkService::register_notifications_protocol(self, engine_id) + NetworkService::register_notifications_protocol(self, engine_id, protocol_name) } fn announce(&self, block: B::Hash, associated_data: Vec) { diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index e878e47e693..4c2f2d0c314 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -36,6 +36,7 @@ sc-block-builder = { version = "0.8", path = "../block-builder" } sc-client = { version = "0.8", path = "../" } sc-client-api = { version = "2.0.0", path = "../api" } sc-peerset = { version = "2.0.0", path = "../peerset" } +pin-project = "0.4.6" serde = { version = "1.0.101", features = ["derive"] } serde_json = "1.0.41" slog = { version = "2.5.2", features = ["nested-values"] } @@ -51,7 +52,7 @@ sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } substrate-test-client = { version = "2.0.0", optional = true, path = "../../test-utils/client" } substrate-test-runtime-client = { version = "2.0.0", optional = true, path = "../../test-utils/runtime/client" } thiserror = "1" -unsigned-varint = { version = "0.3.0", features = ["futures-codec"] } +unsigned-varint = { version = "0.3.1", features = ["futures", "futures-codec"] } void = "1.0.2" zeroize = "1.0.0" diff --git a/client/network/src/protocol.rs b/client/network/src/protocol.rs index d5e7ae6252c..fe75649baca 100644 --- a/client/network/src/protocol.rs +++ b/client/network/src/protocol.rs @@ -15,10 +15,10 @@ // along with Substrate. If not, see . use crate::{DiscoveryNetBehaviour, config::ProtocolId}; -use legacy_proto::{LegacyProto, LegacyProtoOut}; use crate::utils::interval; use bytes::{Bytes, BytesMut}; use futures::prelude::*; +use generic_proto::{GenericProto, GenericProtoOut}; use libp2p::{Multiaddr, PeerId}; use libp2p::core::{ConnectedPoint, nodes::listeners::ListenerId}; use libp2p::swarm::{ProtocolsHandler, IntoProtocolsHandler}; @@ -36,13 +36,14 @@ use sp_runtime::traits::{ }; use sp_arithmetic::traits::SaturatedConversion; use message::{BlockAnnounce, BlockAttributes, Direction, FromBlock, Message, RequestId}; -use message::generic::{Message as GenericMessage, ConsensusMessage}; +use message::generic::Message as GenericMessage; use light_dispatch::{LightDispatch, LightDispatchNetwork, RequestData}; use specialization::NetworkSpecialization; use sync::{ChainSync, SyncState}; use crate::service::{TransactionPool, ExHashT}; use crate::config::{BoxFinalityProofRequestBuilder, Roles}; use rustc_hex::ToHex; +use std::borrow::Cow; use std::collections::{BTreeMap, HashMap, HashSet}; use std::sync::Arc; use std::fmt::Write; @@ -64,7 +65,7 @@ pub mod api { } } -mod legacy_proto; +mod generic_proto; mod util; pub mod block_requests; @@ -158,9 +159,11 @@ pub struct Protocol, H: ExHashT> { /// When asked for a proof of finality, we use this struct to build one. finality_proof_provider: Option>>, /// Handles opening the unique substream and sending and receiving raw messages. - behaviour: LegacyProto, - /// List of notification protocols that have been registered. - registered_notif_protocols: HashSet, + behaviour: GenericProto, + /// For each legacy gossiping engine ID, the corresponding new protocol name. + protocol_name_by_engine: HashMap>, + /// For each protocol name, the legacy gossiping engine ID. + protocol_engine_by_name: HashMap, ConsensusEngineId>, } #[derive(Default)] @@ -207,7 +210,7 @@ pub struct PeerInfo { } struct LightDispatchIn<'a> { - behaviour: &'a mut LegacyProto, + behaviour: &'a mut GenericProto, peerset: sc_peerset::PeersetHandle, } @@ -347,7 +350,7 @@ pub trait Context { /// Protocol context. struct ProtocolContext<'a, B: 'a + BlockT, H: 'a + ExHashT> { - behaviour: &'a mut LegacyProto, + behaviour: &'a mut GenericProto, context_data: &'a mut ContextData, peerset_handle: &'a sc_peerset::PeersetHandle, } @@ -355,7 +358,7 @@ struct ProtocolContext<'a, B: 'a + BlockT, H: 'a + ExHashT> { impl<'a, B: BlockT + 'a, H: 'a + ExHashT> ProtocolContext<'a, B, H> { fn new( context_data: &'a mut ContextData, - behaviour: &'a mut LegacyProto, + behaviour: &'a mut GenericProto, peerset_handle: &'a sc_peerset::PeersetHandle, ) -> Self { ProtocolContext { context_data, peerset_handle, behaviour } @@ -442,7 +445,7 @@ impl, H: ExHashT> Protocol { let (peerset, peerset_handle) = sc_peerset::Peerset::from_config(peerset_config); let versions = &((MIN_VERSION as u8)..=(CURRENT_VERSION as u8)).collect::>(); - let behaviour = LegacyProto::new(protocol_id, versions, peerset); + let behaviour = GenericProto::new(protocol_id, versions, peerset); let protocol = Protocol { tick_timeout: Box::pin(interval(TICK_TIMEOUT)), @@ -463,7 +466,8 @@ impl, H: ExHashT> Protocol { finality_proof_provider, peerset_handle: peerset_handle.clone(), behaviour, - registered_notif_protocols: HashSet::new(), + protocol_name_by_engine: HashMap::new(), + protocol_engine_by_name: HashMap::new(), }; Ok((protocol, peerset_handle)) @@ -646,7 +650,7 @@ impl, H: ExHashT> Protocol { GenericMessage::RemoteReadChildRequest(request) => self.on_remote_read_child_request(who, request), GenericMessage::Consensus(msg) => - return if self.registered_notif_protocols.contains(&msg.engine_id) { + return if self.protocol_name_by_engine.contains_key(&msg.engine_id) { CustomMessageOutcome::NotificationsReceived { remote: who.clone(), messages: vec![(msg.engine_id, From::from(msg.data))], @@ -659,7 +663,7 @@ impl, H: ExHashT> Protocol { let messages = messages .into_iter() .filter_map(|msg| { - if self.registered_notif_protocols.contains(&msg.engine_id) { + if self.protocol_name_by_engine.contains_key(&msg.engine_id) { Some((msg.engine_id, From::from(msg.data))) } else { warn!(target: "sync", "Received message on non-registered protocol: {:?}", msg.engine_id); @@ -1060,7 +1064,7 @@ impl, H: ExHashT> Protocol { // Notify all the notification protocols as open. CustomMessageOutcome::NotificationStreamOpened { remote: who, - protocols: self.registered_notif_protocols.iter().cloned().collect(), + protocols: self.protocol_name_by_engine.keys().cloned().collect(), roles: info.roles, } } @@ -1075,18 +1079,15 @@ impl, H: ExHashT> Protocol { engine_id: ConsensusEngineId, message: impl Into> ) { - if !self.registered_notif_protocols.contains(&engine_id) { + if let Some(protocol_name) = self.protocol_name_by_engine.get(&engine_id) { + self.behaviour.write_notification(&target, engine_id, protocol_name.clone(), message); + } else { error!( target: "sub-libp2p", "Sending a notification with a protocol that wasn't registered: {:?}", engine_id ); } - - self.send_message(&target, GenericMessage::Consensus(ConsensusMessage { - engine_id, - data: message.into(), - })); } /// Registers a new notifications protocol. @@ -1096,9 +1097,14 @@ impl, H: ExHashT> Protocol { pub fn register_notifications_protocol( &mut self, engine_id: ConsensusEngineId, + protocol_name: impl Into>, ) -> Vec { - if !self.registered_notif_protocols.insert(engine_id) { - error!(target: "sub-libp2p", "Notifications protocol already registered: {:?}", engine_id); + let protocol_name = protocol_name.into(); + if self.protocol_name_by_engine.insert(engine_id, protocol_name.clone()).is_some() { + error!(target: "sub-libp2p", "Notifications protocol already registered: {:?}", protocol_name); + } else { + self.behaviour.register_notif_protocol(protocol_name.clone(), engine_id, Vec::new()); + self.protocol_engine_by_name.insert(protocol_name, engine_id); } // Registering a protocol while we already have open connections isn't great, but for now @@ -1833,7 +1839,7 @@ pub enum CustomMessageOutcome { } fn send_request( - behaviour: &mut LegacyProto, + behaviour: &mut GenericProto, stats: &mut HashMap<&'static str, PacketStats>, peers: &mut HashMap>, who: &PeerId, @@ -1854,7 +1860,7 @@ fn send_request( } fn send_message( - behaviour: &mut LegacyProto, + behaviour: &mut GenericProto, stats: &mut HashMap<&'static str, PacketStats>, who: &PeerId, message: Message, @@ -1868,7 +1874,7 @@ fn send_message( impl, H: ExHashT> NetworkBehaviour for Protocol { - type ProtocolsHandler = ::ProtocolsHandler; + type ProtocolsHandler = ::ProtocolsHandler; type OutEvent = CustomMessageOutcome; fn new_handler(&mut self) -> Self::ProtocolsHandler { @@ -1954,25 +1960,21 @@ Protocol { }; let outcome = match event { - LegacyProtoOut::CustomProtocolOpen { peer_id, version, .. } => { - debug_assert!( - version <= CURRENT_VERSION as u8 - && version >= MIN_VERSION as u8 - ); + GenericProtoOut::CustomProtocolOpen { peer_id, .. } => { self.on_peer_connected(peer_id.clone()); CustomMessageOutcome::None } - LegacyProtoOut::CustomProtocolClosed { peer_id, .. } => { + GenericProtoOut::CustomProtocolClosed { peer_id, .. } => { self.on_peer_disconnected(peer_id.clone()); // Notify all the notification protocols as closed. CustomMessageOutcome::NotificationStreamClosed { remote: peer_id, - protocols: self.registered_notif_protocols.iter().cloned().collect(), + protocols: self.protocol_name_by_engine.keys().cloned().collect(), } }, - LegacyProtoOut::CustomMessage { peer_id, message } => + GenericProtoOut::CustomMessage { peer_id, message } => self.on_custom_message(peer_id, message), - LegacyProtoOut::Clogged { peer_id, messages } => { + GenericProtoOut::Clogged { peer_id, messages } => { debug!(target: "sync", "{} clogging messages:", messages.len()); for msg in messages.into_iter().take(5) { let message: Option> = Decode::decode(&mut &msg[..]).ok(); diff --git a/client/network/src/protocol/legacy_proto.rs b/client/network/src/protocol/generic_proto.rs similarity index 86% rename from client/network/src/protocol/legacy_proto.rs rename to client/network/src/protocol/generic_proto.rs index 434782f7d50..f703287f386 100644 --- a/client/network/src/protocol/legacy_proto.rs +++ b/client/network/src/protocol/generic_proto.rs @@ -17,10 +17,10 @@ //! Implementation of libp2p's `NetworkBehaviour` trait that opens a single substream with the //! remote and then allows any communication with them. //! -//! The `Protocol` struct uses `LegacyProto` in order to open substreams with the rest of the +//! The `Protocol` struct uses `GenericProto` in order to open substreams with the rest of the //! network, then performs the Substrate protocol handling on top. -pub use self::behaviour::{LegacyProto, LegacyProtoOut}; +pub use self::behaviour::{GenericProto, GenericProtoOut}; mod behaviour; mod handler; diff --git a/client/network/src/protocol/legacy_proto/behaviour.rs b/client/network/src/protocol/generic_proto/behaviour.rs similarity index 86% rename from client/network/src/protocol/legacy_proto/behaviour.rs rename to client/network/src/protocol/generic_proto/behaviour.rs index 69c89be9a36..24e96681a08 100644 --- a/client/network/src/protocol/legacy_proto/behaviour.rs +++ b/client/network/src/protocol/generic_proto/behaviour.rs @@ -15,9 +15,12 @@ // along with Substrate. If not, see . use crate::{DiscoveryNetBehaviour, config::ProtocolId}; -use crate::protocol::legacy_proto::handler::{CustomProtoHandlerProto, CustomProtoHandlerOut, CustomProtoHandlerIn}; -use crate::protocol::legacy_proto::upgrade::RegisteredProtocol; +use crate::protocol::message::generic::{Message as GenericMessage, ConsensusMessage}; +use crate::protocol::generic_proto::handler::{NotifsHandlerProto, NotifsHandlerOut, NotifsHandlerIn}; +use crate::protocol::generic_proto::upgrade::RegisteredProtocol; + use bytes::BytesMut; +use codec::Encode as _; use fnv::FnvHashMap; use futures::prelude::*; use libp2p::core::{ConnectedPoint, Multiaddr, PeerId}; @@ -25,16 +28,32 @@ use libp2p::swarm::{NetworkBehaviour, NetworkBehaviourAction, PollParameters}; use log::{debug, error, trace, warn}; use rand::distributions::{Distribution as _, Uniform}; use smallvec::SmallVec; -use std::{borrow::Cow, collections::hash_map::Entry, cmp, error, mem, pin::Pin}; -use std::time::Duration; -use wasm_timer::Instant; +use sp_runtime::ConsensusEngineId; +use std::{borrow::Cow, collections::hash_map::Entry, cmp}; +use std::{error, mem, pin::Pin, str, time::Duration}; use std::task::{Context, Poll}; +use wasm_timer::Instant; /// Network behaviour that handles opening substreams for custom protocols with other nodes. /// +/// ## Legacy vs new protocol +/// +/// The `GenericProto` behaves as following: +/// +/// - Whenever a connection is established, we open a single substream (called "legay protocol" in +/// the source code). This substream name depends on the `protocol_id` and `versions` passed at +/// initialization. If the remote refuses this substream, we close the connection. +/// +/// - For each registered protocol, we also open an additional substream for this protocol. If the +/// remote refuses this substream, then it's fine. +/// +/// - Whenever we want to send a message, we can call either `send_packet` to force the legacy +/// substream, or `write_notification` to indicate a registered protocol. If the registered +/// protocol was refused or isn't supported by the remote, we always use the legacy instead. +/// /// ## How it works /// -/// The role of the `LegacyProto` is to synchronize the following components: +/// The role of the `GenericProto` is to synchronize the following components: /// /// - The libp2p swarm that opens new connections and reports disconnects. /// - The connection handler (see `handler.rs`) that handles individual connections. @@ -60,9 +79,12 @@ use std::task::{Context, Poll}; /// Note that this "banning" system is not an actual ban. If a "banned" node tries to connect to /// us, we accept the connection. The "banning" system is only about delaying dialing attempts. /// -pub struct LegacyProto { - /// List of protocols to open with peers. Never modified. - protocol: RegisteredProtocol, +pub struct GenericProto { + /// Legacy protocol to open with peers. Never modified. + legacy_protocol: RegisteredProtocol, + + /// Notification protocols. Entries are only ever added and not removed. + notif_protocols: Vec<(Cow<'static, [u8]>, ConsensusEngineId, Vec)>, /// Receiver for instructions about who to connect to or disconnect from. peerset: sc_peerset::Peerset, @@ -79,7 +101,7 @@ pub struct LegacyProto { next_incoming_index: sc_peerset::IncomingIndex, /// Events to produce from `poll()`. - events: SmallVec<[NetworkBehaviourAction; 4]>, + events: SmallVec<[NetworkBehaviourAction; 4]>, } /// State of a peer we're connected to. @@ -183,13 +205,11 @@ struct IncomingPeer { incoming_id: sc_peerset::IncomingIndex, } -/// Event that can be emitted by the `LegacyProto`. +/// Event that can be emitted by the `GenericProto`. #[derive(Debug)] -pub enum LegacyProtoOut { +pub enum GenericProtoOut { /// Opened a custom protocol with the remote. CustomProtocolOpen { - /// Version of the protocol that has been opened. - version: u8, /// Id of the node we have opened a connection with. peer_id: PeerId, /// Endpoint used for this custom protocol. @@ -205,6 +225,8 @@ pub enum LegacyProtoOut { }, /// Receives a message on a custom protocol substream. + /// + /// Also concerns received notifications for the notifications API. CustomMessage { /// Id of the peer the message came from. peer_id: PeerId, @@ -222,17 +244,18 @@ pub enum LegacyProtoOut { }, } -impl LegacyProto { +impl GenericProto { /// Creates a `CustomProtos`. pub fn new( protocol: impl Into, versions: &[u8], peerset: sc_peerset::Peerset, ) -> Self { - let protocol = RegisteredProtocol::new(protocol, versions); + let legacy_protocol = RegisteredProtocol::new(protocol, versions); - LegacyProto { - protocol, + GenericProto { + legacy_protocol, + notif_protocols: Vec::new(), peerset, peers: FnvHashMap::default(), incoming: SmallVec::new(), @@ -241,6 +264,19 @@ impl LegacyProto { } } + /// Registers a new notifications protocol. + /// + /// You are very strongly encouraged to call this method very early on. Any open connection + /// will retain the protocols that were registered then, and not any new one. + pub fn register_notif_protocol( + &mut self, + protocol_name: impl Into>, + engine_id: ConsensusEngineId, + handshake_msg: impl Into> + ) { + self.notif_protocols.push((protocol_name.into(), engine_id, handshake_msg.into())); + } + /// Returns the list of all the peers we have an open channel to. pub fn open_peers<'a>(&'a self) -> impl Iterator + 'a { self.peers.iter().filter(|(_, state)| state.is_open()).map(|(id, _)| id) @@ -292,7 +328,7 @@ impl LegacyProto { debug!(target: "sub-libp2p", "Handler({:?}) <= Disable", peer_id); self.events.push(NetworkBehaviourAction::SendEvent { peer_id: peer_id.clone(), - event: CustomProtoHandlerIn::Disable, + event: NotifsHandlerIn::Disable, }); let banned_until = ban.map(|dur| Instant::now() + dur); *entry.into_mut() = PeerState::Disabled { open, connected_point, banned_until } @@ -313,7 +349,7 @@ impl LegacyProto { debug!(target: "sub-libp2p", "Handler({:?}) <= Disable", peer_id); self.events.push(NetworkBehaviourAction::SendEvent { peer_id: peer_id.clone(), - event: CustomProtoHandlerIn::Disable, + event: NotifsHandlerIn::Disable, }); let banned_until = ban.map(|dur| Instant::now() + dur); *entry.into_mut() = PeerState::Disabled { open: false, connected_point, banned_until } @@ -339,6 +375,44 @@ impl LegacyProto { } } + /// Sends a notification to a peer. + /// + /// Has no effect if the custom protocol is not open with the given peer. + /// + /// Also note that even if we have a valid open substream, it may in fact be already closed + /// without us knowing, in which case the packet will not be received. + /// + /// > **Note**: Ideally the `engine_id` parameter wouldn't be necessary. See the documentation + /// > of [`NotifsHandlerIn`] for more information. + pub fn write_notification( + &mut self, + target: &PeerId, + engine_id: ConsensusEngineId, + protocol_name: Cow<'static, [u8]>, + message: impl Into>, + ) { + if !self.is_open(target) { + return; + } + + trace!( + target: "sub-libp2p", + "External API => Notification for {:?} with protocol {:?}", + target, + str::from_utf8(&protocol_name) + ); + trace!(target: "sub-libp2p", "Handler({:?}) <= Packet", target); + + self.events.push(NetworkBehaviourAction::SendEvent { + peer_id: target.clone(), + event: NotifsHandlerIn::SendNotification { + message: message.into(), + engine_id, + protocol_name, + }, + }); + } + /// Sends a message to a peer. /// /// Has no effect if the custom protocol is not open with the given peer. @@ -354,7 +428,7 @@ impl LegacyProto { trace!(target: "sub-libp2p", "Handler({:?}) <= Packet", target); self.events.push(NetworkBehaviourAction::SendEvent { peer_id: target.clone(), - event: CustomProtoHandlerIn::SendCustomMessage { + event: NotifsHandlerIn::SendLegacy { message, } }); @@ -416,7 +490,7 @@ impl LegacyProto { debug!(target: "sub-libp2p", "Handler({:?}) <= Enable", occ_entry.key()); self.events.push(NetworkBehaviourAction::SendEvent { peer_id: occ_entry.key().clone(), - event: CustomProtoHandlerIn::Enable, + event: NotifsHandlerIn::Enable, }); *occ_entry.into_mut() = PeerState::Enabled { connected_point, open }; }, @@ -434,7 +508,7 @@ impl LegacyProto { debug!(target: "sub-libp2p", "Handler({:?}) <= Enable", occ_entry.key()); self.events.push(NetworkBehaviourAction::SendEvent { peer_id: occ_entry.key().clone(), - event: CustomProtoHandlerIn::Enable, + event: NotifsHandlerIn::Enable, }); *occ_entry.into_mut() = PeerState::Enabled { connected_point, open: false }; }, @@ -491,7 +565,7 @@ impl LegacyProto { debug!(target: "sub-libp2p", "Handler({:?}) <= Disable", entry.key()); self.events.push(NetworkBehaviourAction::SendEvent { peer_id: entry.key().clone(), - event: CustomProtoHandlerIn::Disable, + event: NotifsHandlerIn::Disable, }); *entry.into_mut() = PeerState::Disabled { open, connected_point, banned_until: None } }, @@ -555,7 +629,7 @@ impl LegacyProto { debug!(target: "sub-libp2p", "Handler({:?}) <= Enable", incoming.peer_id); self.events.push(NetworkBehaviourAction::SendEvent { peer_id: incoming.peer_id, - event: CustomProtoHandlerIn::Enable, + event: NotifsHandlerIn::Enable, }); *state = PeerState::Enabled { open: false, connected_point }; @@ -597,13 +671,13 @@ impl LegacyProto { debug!(target: "sub-libp2p", "Handler({:?}) <= Disable", incoming.peer_id); self.events.push(NetworkBehaviourAction::SendEvent { peer_id: incoming.peer_id, - event: CustomProtoHandlerIn::Disable, + event: NotifsHandlerIn::Disable, }); *state = PeerState::Disabled { open: false, connected_point, banned_until: None }; } } -impl DiscoveryNetBehaviour for LegacyProto { +impl DiscoveryNetBehaviour for GenericProto { fn add_discovered_nodes(&mut self, peer_ids: impl Iterator) { self.peerset.discovered(peer_ids.into_iter().map(|peer_id| { debug!(target: "sub-libp2p", "PSM <= Discovered({:?})", peer_id); @@ -612,12 +686,12 @@ impl DiscoveryNetBehaviour for LegacyProto { } } -impl NetworkBehaviour for LegacyProto { - type ProtocolsHandler = CustomProtoHandlerProto; - type OutEvent = LegacyProtoOut; +impl NetworkBehaviour for GenericProto { + type ProtocolsHandler = NotifsHandlerProto; + type OutEvent = GenericProtoOut; fn new_handler(&mut self) -> Self::ProtocolsHandler { - CustomProtoHandlerProto::new(self.protocol.clone()) + NotifsHandlerProto::new(self.legacy_protocol.clone(), self.notif_protocols.clone()) } fn addresses_of_peer(&mut self, _: &PeerId) -> Vec { @@ -634,7 +708,7 @@ impl NetworkBehaviour for LegacyProto { debug!(target: "sub-libp2p", "Handler({:?}) <= Enable", peer_id); self.events.push(NetworkBehaviourAction::SendEvent { peer_id: peer_id.clone(), - event: CustomProtoHandlerIn::Enable, + event: NotifsHandlerIn::Enable, }); *st = PeerState::Enabled { open: false, connected_point }; } @@ -677,7 +751,7 @@ impl NetworkBehaviour for LegacyProto { debug!(target: "sub-libp2p", "Handler({:?}) <= Disable", peer_id); self.events.push(NetworkBehaviourAction::SendEvent { peer_id: peer_id.clone(), - event: CustomProtoHandlerIn::Disable, + event: NotifsHandlerIn::Disable, }); *st = PeerState::Disabled { open: false, connected_point, banned_until }; } @@ -707,7 +781,7 @@ impl NetworkBehaviour for LegacyProto { } if open { debug!(target: "sub-libp2p", "External API <= Closed({:?})", peer_id); - let event = LegacyProtoOut::CustomProtocolClosed { + let event = GenericProtoOut::CustomProtocolClosed { peer_id: peer_id.clone(), reason: "Disconnected by libp2p".into(), }; @@ -724,7 +798,7 @@ impl NetworkBehaviour for LegacyProto { self.peers.insert(peer_id.clone(), PeerState::Banned { until: timer_deadline }); if open { debug!(target: "sub-libp2p", "External API <= Closed({:?})", peer_id); - let event = LegacyProtoOut::CustomProtocolClosed { + let event = GenericProtoOut::CustomProtocolClosed { peer_id: peer_id.clone(), reason: "Disconnected by libp2p".into(), }; @@ -746,7 +820,7 @@ impl NetworkBehaviour for LegacyProto { if open { debug!(target: "sub-libp2p", "External API <= Closed({:?})", peer_id); - let event = LegacyProtoOut::CustomProtocolClosed { + let event = GenericProtoOut::CustomProtocolClosed { peer_id: peer_id.clone(), reason: "Disconnected by libp2p".into(), }; @@ -817,10 +891,10 @@ impl NetworkBehaviour for LegacyProto { fn inject_node_event( &mut self, source: PeerId, - event: CustomProtoHandlerOut, + event: NotifsHandlerOut, ) { match event { - CustomProtoHandlerOut::CustomProtocolClosed { reason } => { + NotifsHandlerOut::Closed { reason } => { debug!(target: "sub-libp2p", "Handler({:?}) => Closed: {}", source, reason); let mut entry = if let Entry::Occupied(entry) = self.peers.entry(source.clone()) { @@ -831,7 +905,7 @@ impl NetworkBehaviour for LegacyProto { }; debug!(target: "sub-libp2p", "External API <= Closed({:?})", source); - let event = LegacyProtoOut::CustomProtocolClosed { + let event = GenericProtoOut::CustomProtocolClosed { reason, peer_id: source.clone(), }; @@ -847,7 +921,7 @@ impl NetworkBehaviour for LegacyProto { debug!(target: "sub-libp2p", "Handler({:?}) <= Disable", source); self.events.push(NetworkBehaviourAction::SendEvent { peer_id: source.clone(), - event: CustomProtoHandlerIn::Disable, + event: NotifsHandlerIn::Disable, }); *entry.into_mut() = PeerState::Disabled { @@ -873,8 +947,8 @@ impl NetworkBehaviour for LegacyProto { } } - CustomProtoHandlerOut::CustomProtocolOpen { version } => { - debug!(target: "sub-libp2p", "Handler({:?}) => Open: version {:?}", source, version); + NotifsHandlerOut::Open => { + debug!(target: "sub-libp2p", "Handler({:?}) => Open", source); let endpoint = match self.peers.get_mut(&source) { Some(PeerState::Enabled { ref mut open, ref connected_point }) | Some(PeerState::DisabledPendingEnable { ref mut open, ref connected_point, .. }) | @@ -889,8 +963,7 @@ impl NetworkBehaviour for LegacyProto { }; debug!(target: "sub-libp2p", "External API <= Open({:?})", source); - let event = LegacyProtoOut::CustomProtocolOpen { - version, + let event = GenericProtoOut::CustomProtocolOpen { peer_id: source, endpoint, }; @@ -898,11 +971,11 @@ impl NetworkBehaviour for LegacyProto { self.events.push(NetworkBehaviourAction::GenerateEvent(event)); } - CustomProtoHandlerOut::CustomMessage { message } => { + NotifsHandlerOut::CustomMessage { message } => { debug_assert!(self.is_open(&source)); trace!(target: "sub-libp2p", "Handler({:?}) => Message", source); trace!(target: "sub-libp2p", "External API <= Message({:?})", source); - let event = LegacyProtoOut::CustomMessage { + let event = GenericProtoOut::CustomMessage { peer_id: source, message, }; @@ -910,25 +983,50 @@ impl NetworkBehaviour for LegacyProto { self.events.push(NetworkBehaviourAction::GenerateEvent(event)); } - CustomProtoHandlerOut::Clogged { messages } => { + NotifsHandlerOut::Notification { protocol_name, engine_id, message } => { + debug_assert!(self.is_open(&source)); + trace!( + target: "sub-libp2p", + "Handler({:?}) => Notification({:?})", + source, + str::from_utf8(&protocol_name) + ); + trace!(target: "sub-libp2p", "External API <= Message({:?})", source); + let event = GenericProtoOut::CustomMessage { + peer_id: source, + message: { + let message = GenericMessage::<(), (), (), ()>::Consensus(ConsensusMessage { + engine_id, + data: message.to_vec(), + }); + + // Note that we clone `message` here. + From::from(&message.encode()[..]) + }, + }; + + self.events.push(NetworkBehaviourAction::GenerateEvent(event)); + } + + NotifsHandlerOut::Clogged { messages } => { debug_assert!(self.is_open(&source)); trace!(target: "sub-libp2p", "Handler({:?}) => Clogged", source); trace!(target: "sub-libp2p", "External API <= Clogged({:?})", source); warn!(target: "sub-libp2p", "Queue of packets to send to {:?} is \ pretty large", source); - self.events.push(NetworkBehaviourAction::GenerateEvent(LegacyProtoOut::Clogged { + self.events.push(NetworkBehaviourAction::GenerateEvent(GenericProtoOut::Clogged { peer_id: source, messages, })); } // Don't do anything for non-severe errors except report them. - CustomProtoHandlerOut::ProtocolError { is_severe, ref error } if !is_severe => { + NotifsHandlerOut::ProtocolError { is_severe, ref error } if !is_severe => { debug!(target: "sub-libp2p", "Handler({:?}) => Benign protocol error: {:?}", source, error) } - CustomProtoHandlerOut::ProtocolError { error, .. } => { + NotifsHandlerOut::ProtocolError { error, .. } => { debug!(target: "sub-libp2p", "Handler({:?}) => Severe protocol error: {:?}", source, error); // A severe protocol error happens when we detect a "bad" node, such as a node on @@ -950,7 +1048,7 @@ impl NetworkBehaviour for LegacyProto { _params: &mut impl PollParameters, ) -> Poll< NetworkBehaviourAction< - CustomProtoHandlerIn, + NotifsHandlerIn, Self::OutEvent, >, > { @@ -1005,7 +1103,7 @@ impl NetworkBehaviour for LegacyProto { debug!(target: "sub-libp2p", "Handler({:?}) <= Enable now that ban has expired", peer_id); self.events.push(NetworkBehaviourAction::SendEvent { peer_id: peer_id.clone(), - event: CustomProtoHandlerIn::Enable, + event: NotifsHandlerIn::Enable, }); *peer_state = PeerState::Enabled { connected_point, open }; } diff --git a/client/network/src/protocol/generic_proto/handler.rs b/client/network/src/protocol/generic_proto/handler.rs new file mode 100644 index 00000000000..e97176cfbbf --- /dev/null +++ b/client/network/src/protocol/generic_proto/handler.rs @@ -0,0 +1,22 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +pub use self::group::{NotifsHandlerProto, NotifsHandler, NotifsHandlerIn, NotifsHandlerOut}; + +mod group; +mod legacy; +mod notif_in; +mod notif_out; diff --git a/client/network/src/protocol/generic_proto/handler/group.rs b/client/network/src/protocol/generic_proto/handler/group.rs new file mode 100644 index 00000000000..d6d9919d3e1 --- /dev/null +++ b/client/network/src/protocol/generic_proto/handler/group.rs @@ -0,0 +1,523 @@ +// Copyright 2019-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Implementations of the `IntoProtocolsHandler` and `ProtocolsHandler` traits for both incoming +//! and outgoing substreams for all gossiping protocols together. +//! +//! This is the main implementation of `ProtocolsHandler` in this crate, that handles all the +//! protocols that are Substrate-related and outside of the scope of libp2p. +//! +//! # Usage +//! +//! The handler can be in one of the following states: `Initial`, `Enabled`, `Disabled`. +//! +//! The `Initial` state is the state that the handler initially is in. It is a temporary state +//! during which the user must either enable or disable the handler. After that, the handler stays +//! either enabled or disabled. +//! +//! On the wire, we try to open the following substreams: +//! +//! - One substream for each notification protocol passed as parameter to the +//! `NotifsHandlerProto::new` function. +//! - One "legacy" substream used for anything non-related to gossiping, and used as a fallback +//! in case the notification protocol can't be opened. +//! +//! When the handler is in the `Enabled` state, we immediately open and try to maintain all the +//! aforementioned substreams. When the handler is in the `Disabled` state, we immediately close +//! (or abort opening) all these substreams. It is intended that in the future we allow states in +//! which some protocols are open and not others. Symmetrically, we allow incoming +//! Substrate-related substreams if and only if we are in the `Enabled` state. +//! +//! The user has the choice between sending a message with `SendNotification`, to send a +//! notification, and `SendLegacy`, to send any other kind of message. +//! + +use crate::protocol::generic_proto::{ + handler::legacy::{LegacyProtoHandler, LegacyProtoHandlerProto, LegacyProtoHandlerIn, LegacyProtoHandlerOut}, + handler::notif_in::{NotifsInHandlerProto, NotifsInHandler, NotifsInHandlerIn, NotifsInHandlerOut}, + handler::notif_out::{NotifsOutHandlerProto, NotifsOutHandler, NotifsOutHandlerIn, NotifsOutHandlerOut}, + upgrade::{NotificationsIn, NotificationsOut, NotificationsHandshakeError, RegisteredProtocol, UpgradeCollec}, +}; +use crate::protocol::message::generic::{Message as GenericMessage, ConsensusMessage}; + +use bytes::BytesMut; +use codec::Encode as _; +use libp2p::core::{either::{EitherError, EitherOutput}, ConnectedPoint, PeerId}; +use libp2p::core::upgrade::{EitherUpgrade, UpgradeError, SelectUpgrade, InboundUpgrade, OutboundUpgrade}; +use libp2p::swarm::{ + ProtocolsHandler, ProtocolsHandlerEvent, + IntoProtocolsHandler, + KeepAlive, + ProtocolsHandlerUpgrErr, + SubstreamProtocol, + NegotiatedSubstream, +}; +use log::error; +use sp_runtime::ConsensusEngineId; +use std::{borrow::Cow, error, io, task::{Context, Poll}}; + +/// Implements the `IntoProtocolsHandler` trait of libp2p. +/// +/// Every time a connection with a remote starts, an instance of this struct is created and +/// sent to a background task dedicated to this connection. Once the connection is established, +/// it is turned into a [`NotifsHandler`]. +/// +/// See the documentation at the module level for more information. +pub struct NotifsHandlerProto { + /// Prototypes for handlers for inbound substreams. + in_handlers: Vec<(NotifsInHandlerProto, ConsensusEngineId)>, + + /// Prototypes for handlers for outbound substreams. + out_handlers: Vec<(NotifsOutHandlerProto, ConsensusEngineId)>, + + /// Prototype for handler for backwards-compatibility. + legacy: LegacyProtoHandlerProto, +} + +/// The actual handler once the connection has been established. +/// +/// See the documentation at the module level for more information. +pub struct NotifsHandler { + /// Handlers for inbound substreams. + in_handlers: Vec<(NotifsInHandler, ConsensusEngineId)>, + + /// Handlers for outbound substreams. + out_handlers: Vec<(NotifsOutHandler, ConsensusEngineId)>, + + /// Handler for backwards-compatibility. + legacy: LegacyProtoHandler, + + /// State of this handler. + enabled: EnabledState, + + /// If we receive inbound substream requests while in initialization mode, + /// we push the corresponding index here and process them when the handler + /// gets enabled/disabled. + pending_in: Vec, +} + +#[derive(Debug, Clone, PartialEq, Eq)] +enum EnabledState { + Initial, + Enabled, + Disabled, +} + +impl IntoProtocolsHandler for NotifsHandlerProto { + type Handler = NotifsHandler; + + fn inbound_protocol(&self) -> SelectUpgrade, RegisteredProtocol> { + let in_handlers = self.in_handlers.iter() + .map(|(h, _)| h.inbound_protocol()) + .collect::>(); + + SelectUpgrade::new(in_handlers, self.legacy.inbound_protocol()) + } + + fn into_handler(self, remote_peer_id: &PeerId, connected_point: &ConnectedPoint) -> Self::Handler { + NotifsHandler { + in_handlers: self.in_handlers + .into_iter() + .map(|(p, e)| (p.into_handler(remote_peer_id, connected_point), e)) + .collect(), + out_handlers: self.out_handlers + .into_iter() + .map(|(p, e)| (p.into_handler(remote_peer_id, connected_point), e)) + .collect(), + legacy: self.legacy.into_handler(remote_peer_id, connected_point), + enabled: EnabledState::Initial, + pending_in: Vec::new(), + } + } +} + +/// Event that can be received by a `NotifsHandler`. +#[derive(Debug)] +pub enum NotifsHandlerIn { + /// The node should start using custom protocols. + Enable, + + /// The node should stop using custom protocols. + Disable, + + /// Sends a message through the custom protocol substream. + /// + /// > **Note**: This must **not** be an encoded `ConsensusMessage` message. + SendLegacy { + /// The message to send. + message: Vec, + }, + + /// Sends a notifications message. + SendNotification { + /// Name of the protocol for the message. + /// + /// Must match one of the registered protocols. For backwards-compatibility reasons, if + /// the remote doesn't support this protocol, we use the legacy substream to send a + /// `ConsensusMessage` message. + protocol_name: Cow<'static, [u8]>, + + /// The engine ID to use, in case we need to send this message over the legacy substream. + /// + /// > **Note**: Ideally this field wouldn't be necessary, and we would deduce the engine + /// > ID from the existing handlers. However, it is possible (especially in test + /// > situations) that we open connections before all the notification protocols + /// > have been registered, in which case we always rely on the legacy substream. + engine_id: ConsensusEngineId, + + /// The message to send. + message: Vec, + }, +} + +/// Event that can be emitted by a `NotifsHandler`. +#[derive(Debug)] +pub enum NotifsHandlerOut { + /// Opened the substreams with the remote. + Open, + + /// Closed the substreams with the remote. + Closed { + /// Reason why the substream closed, for diagnostic purposes. + reason: Cow<'static, str>, + }, + + /// Received a non-gossiping message on the legacy substream. + CustomMessage { + /// Message that has been received. + /// + /// Keep in mind that this can be a `ConsensusMessage` message, which then contains a + /// notification. + message: BytesMut, + }, + + /// Received a message on a custom protocol substream. + Notification { + /// Engine corresponding to the message. + protocol_name: Cow<'static, [u8]>, + + /// For legacy reasons, the name to use if we had received the message from the legacy + /// substream. + engine_id: ConsensusEngineId, + + /// Message that has been received. + /// + /// If `protocol_name` is `None`, this decodes to a `Message`. If `protocol_name` is `Some`, + /// this is directly a gossiping message. + message: BytesMut, + }, + + /// A substream to the remote is clogged. The send buffer is very large, and we should print + /// a diagnostic message and/or avoid sending more data. + Clogged { + /// Copy of the messages that are within the buffer, for further diagnostic. + messages: Vec>, + }, + + /// An error has happened on the protocol level with this node. + ProtocolError { + /// If true the error is severe, such as a protocol violation. + is_severe: bool, + /// The error that happened. + error: Box, + }, +} + +impl NotifsHandlerProto { + /// Builds a new handler. + pub fn new(legacy: RegisteredProtocol, list: impl Into, ConsensusEngineId, Vec)>>) -> Self { + let list = list.into(); + + NotifsHandlerProto { + in_handlers: list.clone().into_iter().map(|(p, e, _)| (NotifsInHandlerProto::new(p), e)).collect(), + out_handlers: list.clone().into_iter().map(|(p, e, _)| (NotifsOutHandlerProto::new(p), e)).collect(), + legacy: LegacyProtoHandlerProto::new(legacy), + } + } +} + +impl ProtocolsHandler for NotifsHandler { + type InEvent = NotifsHandlerIn; + type OutEvent = NotifsHandlerOut; + type Error = EitherError< + EitherError< + ::Error, + ::Error, + >, + ::Error, + >; + type InboundProtocol = SelectUpgrade, RegisteredProtocol>; + type OutboundProtocol = EitherUpgrade; + // Index within the `out_handlers`; None for legacy + type OutboundOpenInfo = Option; + + fn listen_protocol(&self) -> SubstreamProtocol { + let in_handlers = self.in_handlers.iter() + .map(|h| h.0.listen_protocol().into_upgrade().1) + .collect::>(); + + let proto = SelectUpgrade::new(in_handlers, self.legacy.listen_protocol().into_upgrade().1); + SubstreamProtocol::new(proto) + } + + fn inject_fully_negotiated_inbound( + &mut self, + out: >::Output + ) { + match out { + EitherOutput::First((out, num)) => + self.in_handlers[num].0.inject_fully_negotiated_inbound(out), + EitherOutput::Second(out) => + self.legacy.inject_fully_negotiated_inbound(out), + } + } + + fn inject_fully_negotiated_outbound( + &mut self, + out: >::Output, + num: Self::OutboundOpenInfo + ) { + match (out, num) { + (EitherOutput::First(out), Some(num)) => + self.out_handlers[num].0.inject_fully_negotiated_outbound(out, ()), + (EitherOutput::Second(out), None) => + self.legacy.inject_fully_negotiated_outbound(out, ()), + _ => error!("inject_fully_negotiated_outbound called with wrong parameters"), + } + } + + fn inject_event(&mut self, message: NotifsHandlerIn) { + match message { + NotifsHandlerIn::Enable => { + self.enabled = EnabledState::Enabled; + self.legacy.inject_event(LegacyProtoHandlerIn::Enable); + for (handler, _) in &mut self.out_handlers { + handler.inject_event(NotifsOutHandlerIn::Enable { + initial_message: vec![] + }); + } + for num in self.pending_in.drain(..) { + self.in_handlers[num].0.inject_event(NotifsInHandlerIn::Accept(vec![])); + } + }, + NotifsHandlerIn::Disable => { + self.legacy.inject_event(LegacyProtoHandlerIn::Disable); + // The notifications protocols start in the disabled state. If we were in the + // "Initial" state, then we shouldn't disable the notifications protocols again. + if self.enabled != EnabledState::Initial { + for (handler, _) in &mut self.out_handlers { + handler.inject_event(NotifsOutHandlerIn::Disable); + } + } + self.enabled = EnabledState::Disabled; + for num in self.pending_in.drain(..) { + self.in_handlers[num].0.inject_event(NotifsInHandlerIn::Refuse); + } + }, + NotifsHandlerIn::SendLegacy { message } => + self.legacy.inject_event(LegacyProtoHandlerIn::SendCustomMessage { message }), + NotifsHandlerIn::SendNotification { message, engine_id, protocol_name } => { + for (handler, ngn_id) in &mut self.out_handlers { + if handler.protocol_name() != &protocol_name[..] { + break; + } + + if handler.is_open() { + handler.inject_event(NotifsOutHandlerIn::Send(message)); + return; + } else { + debug_assert_eq!(engine_id, *ngn_id); + } + } + + let message = GenericMessage::<(), (), (), ()>::Consensus(ConsensusMessage { + engine_id, + data: message, + }); + + self.legacy.inject_event(LegacyProtoHandlerIn::SendCustomMessage { + message: message.encode() + }); + }, + } + } + + fn inject_dial_upgrade_error( + &mut self, + num: Option, + err: ProtocolsHandlerUpgrErr> + ) { + match (err, num) { + (ProtocolsHandlerUpgrErr::Timeout, Some(num)) => + self.out_handlers[num].0.inject_dial_upgrade_error( + (), + ProtocolsHandlerUpgrErr::Timeout + ), + (ProtocolsHandlerUpgrErr::Timeout, None) => + self.legacy.inject_dial_upgrade_error((), ProtocolsHandlerUpgrErr::Timeout), + (ProtocolsHandlerUpgrErr::Timer, Some(num)) => + self.out_handlers[num].0.inject_dial_upgrade_error( + (), + ProtocolsHandlerUpgrErr::Timer + ), + (ProtocolsHandlerUpgrErr::Timer, None) => + self.legacy.inject_dial_upgrade_error((), ProtocolsHandlerUpgrErr::Timer), + (ProtocolsHandlerUpgrErr::Upgrade(UpgradeError::Select(err)), Some(num)) => + self.out_handlers[num].0.inject_dial_upgrade_error( + (), + ProtocolsHandlerUpgrErr::Upgrade(UpgradeError::Select(err)) + ), + (ProtocolsHandlerUpgrErr::Upgrade(UpgradeError::Select(err)), None) => + self.legacy.inject_dial_upgrade_error( + (), + ProtocolsHandlerUpgrErr::Upgrade(UpgradeError::Select(err)) + ), + (ProtocolsHandlerUpgrErr::Upgrade(UpgradeError::Apply(EitherError::A(err))), Some(num)) => + self.out_handlers[num].0.inject_dial_upgrade_error( + (), + ProtocolsHandlerUpgrErr::Upgrade(UpgradeError::Apply(err)) + ), + (ProtocolsHandlerUpgrErr::Upgrade(UpgradeError::Apply(EitherError::B(err))), None) => + self.legacy.inject_dial_upgrade_error( + (), + ProtocolsHandlerUpgrErr::Upgrade(UpgradeError::Apply(err)) + ), + _ => error!("inject_dial_upgrade_error called with bad parameters"), + } + } + + fn connection_keep_alive(&self) -> KeepAlive { + // Iterate over each handler and return the maximum value. + + let mut ret = self.legacy.connection_keep_alive(); + if ret.is_yes() { + return KeepAlive::Yes; + } + + for (handler, _) in &self.in_handlers { + let val = handler.connection_keep_alive(); + if val.is_yes() { + return KeepAlive::Yes; + } + if ret < val { ret = val; } + } + + for (handler, _) in &self.out_handlers { + let val = handler.connection_keep_alive(); + if val.is_yes() { + return KeepAlive::Yes; + } + if ret < val { ret = val; } + } + + ret + } + + fn poll( + &mut self, + cx: &mut Context, + ) -> Poll< + ProtocolsHandlerEvent + > { + for (handler_num, (handler, engine_id)) in self.in_handlers.iter_mut().enumerate() { + while let Poll::Ready(ev) = handler.poll(cx) { + match ev { + ProtocolsHandlerEvent::OutboundSubstreamRequest { .. } => + error!("Incoming substream handler tried to open a substream"), + ProtocolsHandlerEvent::Close(err) => void::unreachable(err), + ProtocolsHandlerEvent::Custom(NotifsInHandlerOut::OpenRequest(_)) => + match self.enabled { + EnabledState::Initial => self.pending_in.push(handler_num), + EnabledState::Enabled => + handler.inject_event(NotifsInHandlerIn::Accept(vec![])), + EnabledState::Disabled => + handler.inject_event(NotifsInHandlerIn::Refuse), + }, + ProtocolsHandlerEvent::Custom(NotifsInHandlerOut::Closed) => {}, + ProtocolsHandlerEvent::Custom(NotifsInHandlerOut::Notif(message)) => { + // Note that right now the legacy substream has precedence over + // everything. If it is not open, then we consider that nothing is open. + if self.legacy.is_open() { + let msg = NotifsHandlerOut::Notification { + message, + engine_id: *engine_id, + protocol_name: handler.protocol_name().to_owned().into(), + }; + return Poll::Ready(ProtocolsHandlerEvent::Custom(msg)); + } + }, + } + } + } + + for (handler_num, (handler, _)) in self.out_handlers.iter_mut().enumerate() { + while let Poll::Ready(ev) = handler.poll(cx) { + match ev { + ProtocolsHandlerEvent::OutboundSubstreamRequest { protocol, info: () } => + return Poll::Ready(ProtocolsHandlerEvent::OutboundSubstreamRequest { + protocol: protocol.map_upgrade(EitherUpgrade::A), + info: Some(handler_num), + }), + ProtocolsHandlerEvent::Close(err) => void::unreachable(err), + + // At the moment we don't actually care whether any notifications protocol + // opens or closes. + // Whether our communications with the remote are open or closed entirely + // depends on the legacy substream, because as long as we are open the user of + // this struct might try to send legacy protocol messages which we need to + // deliver for things to work properly. + ProtocolsHandlerEvent::Custom(NotifsOutHandlerOut::Open { .. }) => {}, + ProtocolsHandlerEvent::Custom(NotifsOutHandlerOut::Closed) => {}, + ProtocolsHandlerEvent::Custom(NotifsOutHandlerOut::Refused) => {}, + } + } + } + + while let Poll::Ready(ev) = self.legacy.poll(cx) { + match ev { + ProtocolsHandlerEvent::OutboundSubstreamRequest { protocol, info: () } => + return Poll::Ready(ProtocolsHandlerEvent::OutboundSubstreamRequest { + protocol: protocol.map_upgrade(EitherUpgrade::B), + info: None, + }), + ProtocolsHandlerEvent::Custom(LegacyProtoHandlerOut::CustomProtocolOpen { .. }) => + return Poll::Ready(ProtocolsHandlerEvent::Custom( + NotifsHandlerOut::Open + )), + ProtocolsHandlerEvent::Custom(LegacyProtoHandlerOut::CustomProtocolClosed { reason }) => + return Poll::Ready(ProtocolsHandlerEvent::Custom( + NotifsHandlerOut::Closed { reason } + )), + ProtocolsHandlerEvent::Custom(LegacyProtoHandlerOut::CustomMessage { message }) => + return Poll::Ready(ProtocolsHandlerEvent::Custom( + NotifsHandlerOut::CustomMessage { message } + )), + ProtocolsHandlerEvent::Custom(LegacyProtoHandlerOut::Clogged { messages }) => + return Poll::Ready(ProtocolsHandlerEvent::Custom( + NotifsHandlerOut::Clogged { messages } + )), + ProtocolsHandlerEvent::Custom(LegacyProtoHandlerOut::ProtocolError { is_severe, error }) => + return Poll::Ready(ProtocolsHandlerEvent::Custom( + NotifsHandlerOut::ProtocolError { is_severe, error } + )), + ProtocolsHandlerEvent::Close(err) => + return Poll::Ready(ProtocolsHandlerEvent::Close(EitherError::B(err))), + } + } + + Poll::Pending + } +} diff --git a/client/network/src/protocol/legacy_proto/handler.rs b/client/network/src/protocol/generic_proto/handler/legacy.rs similarity index 90% rename from client/network/src/protocol/legacy_proto/handler.rs rename to client/network/src/protocol/generic_proto/handler/legacy.rs index e3490993dd4..a2d2fc9246d 100644 --- a/client/network/src/protocol/legacy_proto/handler.rs +++ b/client/network/src/protocol/generic_proto/handler/legacy.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -use super::upgrade::{RegisteredProtocol, RegisteredProtocolEvent, RegisteredProtocolSubstream}; +use crate::protocol::generic_proto::upgrade::{RegisteredProtocol, RegisteredProtocolEvent, RegisteredProtocolSubstream}; use bytes::BytesMut; use futures::prelude::*; use futures_timer::Delay; @@ -37,7 +37,7 @@ use std::{pin::Pin, task::{Context, Poll}}; /// /// Every time a connection with a remote starts, an instance of this struct is created and /// sent to a background task dedicated to this connection. Once the connection is established, -/// it is turned into a `CustomProtoHandler`. It then handles all communications that are specific +/// it is turned into a `LegacyProtoHandler`. It then handles all communications that are specific /// to Substrate on that single connection. /// /// Note that there can be multiple instance of this struct simultaneously for same peer. However @@ -87,29 +87,29 @@ use std::{pin::Pin, task::{Context, Poll}}; /// We consider that we are now "closed" if the remote closes all the existing substreams. /// Re-opening it can then be performed by closing all active substream and re-opening one. /// -pub struct CustomProtoHandlerProto { +pub struct LegacyProtoHandlerProto { /// Configuration for the protocol upgrade to negotiate. protocol: RegisteredProtocol, } -impl CustomProtoHandlerProto { - /// Builds a new `CustomProtoHandlerProto`. +impl LegacyProtoHandlerProto { + /// Builds a new `LegacyProtoHandlerProto`. pub fn new(protocol: RegisteredProtocol) -> Self { - CustomProtoHandlerProto { + LegacyProtoHandlerProto { protocol, } } } -impl IntoProtocolsHandler for CustomProtoHandlerProto { - type Handler = CustomProtoHandler; +impl IntoProtocolsHandler for LegacyProtoHandlerProto { + type Handler = LegacyProtoHandler; fn inbound_protocol(&self) -> RegisteredProtocol { self.protocol.clone() } fn into_handler(self, remote_peer_id: &PeerId, connected_point: &ConnectedPoint) -> Self::Handler { - CustomProtoHandler { + LegacyProtoHandler { protocol: self.protocol, endpoint: connected_point.to_endpoint(), remote_peer_id: remote_peer_id.clone(), @@ -123,7 +123,7 @@ impl IntoProtocolsHandler for CustomProtoHandlerProto { } /// The actual handler once the connection has been established. -pub struct CustomProtoHandler { +pub struct LegacyProtoHandler { /// Configuration for the protocol upgrade to negotiate. protocol: RegisteredProtocol, @@ -142,7 +142,7 @@ pub struct CustomProtoHandler { /// /// This queue must only ever be modified to insert elements at the back, or remove the first /// element. - events_queue: SmallVec<[ProtocolsHandlerEvent; 16]>, + events_queue: SmallVec<[ProtocolsHandlerEvent; 16]>, } /// State of the handler. @@ -195,9 +195,9 @@ enum ProtocolState { Poisoned, } -/// Event that can be received by a `CustomProtoHandler`. +/// Event that can be received by a `LegacyProtoHandler`. #[derive(Debug)] -pub enum CustomProtoHandlerIn { +pub enum LegacyProtoHandlerIn { /// The node should start using custom protocols. Enable, @@ -211,9 +211,9 @@ pub enum CustomProtoHandlerIn { }, } -/// Event that can be emitted by a `CustomProtoHandler`. +/// Event that can be emitted by a `LegacyProtoHandler`. #[derive(Debug)] -pub enum CustomProtoHandlerOut { +pub enum LegacyProtoHandlerOut { /// Opened a custom protocol with the remote. CustomProtocolOpen { /// Version of the protocol that has been opened. @@ -248,7 +248,19 @@ pub enum CustomProtoHandlerOut { }, } -impl CustomProtoHandler { +impl LegacyProtoHandler { + /// Returns true if the legacy substream is currently open. + pub fn is_open(&self) -> bool { + match &self.state { + ProtocolState::Init { substreams, .. } => !substreams.is_empty(), + ProtocolState::Opening { .. } => false, + ProtocolState::Normal { substreams, .. } => !substreams.is_empty(), + ProtocolState::Disabled { .. } => false, + ProtocolState::KillAsap => false, + ProtocolState::Poisoned => false, + } + } + /// Enables the handler. fn enable(&mut self) { self.state = match mem::replace(&mut self.state, ProtocolState::Poisoned) { @@ -271,7 +283,7 @@ impl CustomProtoHandler { } } else { - let event = CustomProtoHandlerOut::CustomProtocolOpen { + let event = LegacyProtoHandlerOut::CustomProtocolOpen { version: incoming[0].protocol_version() }; self.events_queue.push(ProtocolsHandlerEvent::Custom(event)); @@ -325,7 +337,7 @@ impl CustomProtoHandler { /// Polls the state for events. Optionally returns an event to produce. #[must_use] fn poll_state(&mut self, cx: &mut Context) - -> Option> { + -> Option> { match mem::replace(&mut self.state, ProtocolState::Poisoned) { ProtocolState::Poisoned => { error!(target: "sub-libp2p", "Handler with {:?} is in poisoned state", @@ -352,7 +364,7 @@ impl CustomProtoHandler { match Pin::new(&mut deadline).poll(cx) { Poll::Ready(()) => { deadline = Delay::new(Duration::from_secs(60)); - let event = CustomProtoHandlerOut::ProtocolError { + let event = LegacyProtoHandlerOut::ProtocolError { is_severe: true, error: "Timeout when opening protocol".to_string().into(), }; @@ -372,7 +384,7 @@ impl CustomProtoHandler { match Pin::new(&mut substream).poll_next(cx) { Poll::Pending => substreams.push(substream), Poll::Ready(Some(Ok(RegisteredProtocolEvent::Message(message)))) => { - let event = CustomProtoHandlerOut::CustomMessage { + let event = LegacyProtoHandlerOut::CustomMessage { message }; substreams.push(substream); @@ -380,7 +392,7 @@ impl CustomProtoHandler { return Some(ProtocolsHandlerEvent::Custom(event)); }, Poll::Ready(Some(Ok(RegisteredProtocolEvent::Clogged { messages }))) => { - let event = CustomProtoHandlerOut::Clogged { + let event = LegacyProtoHandlerOut::Clogged { messages, }; substreams.push(substream); @@ -390,7 +402,7 @@ impl CustomProtoHandler { Poll::Ready(None) => { shutdown.push(substream); if substreams.is_empty() { - let event = CustomProtoHandlerOut::CustomProtocolClosed { + let event = LegacyProtoHandlerOut::CustomProtocolClosed { reason: "All substreams have been closed by the remote".into(), }; self.state = ProtocolState::Disabled { @@ -402,7 +414,7 @@ impl CustomProtoHandler { } Poll::Ready(Some(Err(err))) => { if substreams.is_empty() { - let event = CustomProtoHandlerOut::CustomProtocolClosed { + let event = LegacyProtoHandlerOut::CustomProtocolClosed { reason: format!("Error on the last substream: {:?}", err).into(), }; self.state = ProtocolState::Disabled { @@ -466,7 +478,7 @@ impl CustomProtoHandler { } ProtocolState::Opening { .. } => { - let event = CustomProtoHandlerOut::CustomProtocolOpen { + let event = LegacyProtoHandlerOut::CustomProtocolOpen { version: substream.protocol_version() }; self.events_queue.push(ProtocolsHandlerEvent::Custom(event)); @@ -503,9 +515,9 @@ impl CustomProtoHandler { } } -impl ProtocolsHandler for CustomProtoHandler { - type InEvent = CustomProtoHandlerIn; - type OutEvent = CustomProtoHandlerOut; +impl ProtocolsHandler for LegacyProtoHandler { + type InEvent = LegacyProtoHandlerIn; + type OutEvent = LegacyProtoHandlerOut; type Error = ConnectionKillError; type InboundProtocol = RegisteredProtocol; type OutboundProtocol = RegisteredProtocol; @@ -530,11 +542,11 @@ impl ProtocolsHandler for CustomProtoHandler { self.inject_fully_negotiated(proto); } - fn inject_event(&mut self, message: CustomProtoHandlerIn) { + fn inject_event(&mut self, message: LegacyProtoHandlerIn) { match message { - CustomProtoHandlerIn::Disable => self.disable(), - CustomProtoHandlerIn::Enable => self.enable(), - CustomProtoHandlerIn::SendCustomMessage { message } => + LegacyProtoHandlerIn::Disable => self.disable(), + LegacyProtoHandlerIn::Enable => self.enable(), + LegacyProtoHandlerIn::SendCustomMessage { message } => self.send_message(message), } } @@ -546,7 +558,7 @@ impl ProtocolsHandler for CustomProtoHandler { _ => false, }; - self.events_queue.push(ProtocolsHandlerEvent::Custom(CustomProtoHandlerOut::ProtocolError { + self.events_queue.push(ProtocolsHandlerEvent::Custom(LegacyProtoHandlerOut::ProtocolError { is_severe, error: Box::new(err), })); @@ -587,9 +599,9 @@ impl ProtocolsHandler for CustomProtoHandler { } } -impl fmt::Debug for CustomProtoHandler { +impl fmt::Debug for LegacyProtoHandler { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { - f.debug_struct("CustomProtoHandler") + f.debug_struct("LegacyProtoHandler") .finish() } } diff --git a/client/network/src/protocol/generic_proto/handler/notif_in.rs b/client/network/src/protocol/generic_proto/handler/notif_in.rs new file mode 100644 index 00000000000..4e16fb1af41 --- /dev/null +++ b/client/network/src/protocol/generic_proto/handler/notif_in.rs @@ -0,0 +1,256 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Implementations of the `IntoProtocolsHandler` and `ProtocolsHandler` traits for ingoing +//! substreams for a single gossiping protocol. +//! +//! > **Note**: Each instance corresponds to a single protocol. In order to support multiple +//! > protocols, you need to create multiple instances and group them. +//! + +use crate::protocol::generic_proto::upgrade::{NotificationsIn, NotificationsInSubstream}; +use bytes::BytesMut; +use futures::prelude::*; +use libp2p::core::{ConnectedPoint, PeerId}; +use libp2p::core::upgrade::{DeniedUpgrade, InboundUpgrade, OutboundUpgrade}; +use libp2p::swarm::{ + ProtocolsHandler, ProtocolsHandlerEvent, + IntoProtocolsHandler, + KeepAlive, + ProtocolsHandlerUpgrErr, + SubstreamProtocol, + NegotiatedSubstream, +}; +use log::{error, warn}; +use smallvec::SmallVec; +use std::{borrow::Cow, fmt, pin::Pin, str, task::{Context, Poll}}; + +/// Implements the `IntoProtocolsHandler` trait of libp2p. +/// +/// Every time a connection with a remote starts, an instance of this struct is created and +/// sent to a background task dedicated to this connection. Once the connection is established, +/// it is turned into a [`NotifsInHandler`]. +pub struct NotifsInHandlerProto { + /// Configuration for the protocol upgrade to negotiate. + in_protocol: NotificationsIn, +} + +/// The actual handler once the connection has been established. +pub struct NotifsInHandler { + /// Configuration for the protocol upgrade to negotiate for inbound substreams. + in_protocol: NotificationsIn, + + /// Substream that is open with the remote. + substream: Option>, + + /// If the substream is opened and closed rapidly, we can emit several `OpenRequest` and + /// `Closed` messages in a row without the handler having time to respond with `Accept` or + /// `Refuse`. + /// + /// In order to keep the state consistent, we increment this variable every time an + /// `OpenRequest` is emitted and decrement it every time an `Accept` or `Refuse` is received. + pending_accept_refuses: usize, + + /// Queue of events to send to the outside. + /// + /// This queue is only ever modified to insert elements at the back, or remove the first + /// element. + events_queue: SmallVec<[ProtocolsHandlerEvent; 16]>, +} + +/// Event that can be received by a `NotifsInHandler`. +#[derive(Debug)] +pub enum NotifsInHandlerIn { + /// Can be sent back as a response to an `OpenRequest`. Contains the status message to send + /// to the remote. + /// + /// After sending this to the handler, the substream is now considered open and `Notif` events + /// can be received. + Accept(Vec), + + /// Can be sent back as a response to an `OpenRequest`. + Refuse, +} + +/// Event that can be emitted by a `NotifsInHandler`. +#[derive(Debug)] +pub enum NotifsInHandlerOut { + /// The remote wants to open a substream. Contains the initial message sent by the remote + /// when the substream has been opened. + /// + /// Every time this event is emitted, a corresponding `Accepted` or `Refused` **must** be sent + /// back even if a `Closed` is received. + OpenRequest(Vec), + + /// The notifications substream has been closed by the remote. In order to avoid race + /// conditions, this does **not** cancel any previously-sent `OpenRequest`. + Closed, + + /// Received a message on the notifications substream. + /// + /// Can only happen after an `Accept` and before a `Closed`. + Notif(BytesMut), +} + +impl NotifsInHandlerProto { + /// Builds a new `NotifsInHandlerProto`. + pub fn new( + protocol_name: impl Into> + ) -> Self { + NotifsInHandlerProto { + in_protocol: NotificationsIn::new(protocol_name), + } + } +} + +impl IntoProtocolsHandler for NotifsInHandlerProto { + type Handler = NotifsInHandler; + + fn inbound_protocol(&self) -> NotificationsIn { + self.in_protocol.clone() + } + + fn into_handler(self, _: &PeerId, _: &ConnectedPoint) -> Self::Handler { + NotifsInHandler { + in_protocol: self.in_protocol, + substream: None, + pending_accept_refuses: 0, + events_queue: SmallVec::new(), + } + } +} + +impl NotifsInHandler { + /// Returns the name of the protocol that we accept. + pub fn protocol_name(&self) -> &[u8] { + self.in_protocol.protocol_name() + } +} + +impl ProtocolsHandler for NotifsInHandler { + type InEvent = NotifsInHandlerIn; + type OutEvent = NotifsInHandlerOut; + type Error = void::Void; + type InboundProtocol = NotificationsIn; + type OutboundProtocol = DeniedUpgrade; + type OutboundOpenInfo = (); + + fn listen_protocol(&self) -> SubstreamProtocol { + SubstreamProtocol::new(self.in_protocol.clone()) + } + + fn inject_fully_negotiated_inbound( + &mut self, + (msg, proto): >::Output + ) { + if self.substream.is_some() { + warn!( + target: "sub-libp2p", + "Received duplicate inbound notifications substream for {:?}", + str::from_utf8(self.in_protocol.protocol_name()), + ); + return; + } + + self.substream = Some(proto); + self.events_queue.push(ProtocolsHandlerEvent::Custom(NotifsInHandlerOut::OpenRequest(msg))); + self.pending_accept_refuses = self.pending_accept_refuses + .checked_add(1) + .unwrap_or_else(|| { + error!(target: "sub-libp2p", "Overflow in pending_accept_refuses"); + usize::max_value() + }); + } + + fn inject_fully_negotiated_outbound( + &mut self, + out: >::Output, + _: Self::OutboundOpenInfo + ) { + // We never emit any outgoing substream. + void::unreachable(out) + } + + fn inject_event(&mut self, message: NotifsInHandlerIn) { + self.pending_accept_refuses = match self.pending_accept_refuses.checked_sub(1) { + Some(v) => v, + None => { + error!( + target: "sub-libp2p", + "Inconsistent state: received Accept/Refuse when no pending request exists" + ); + return; + } + }; + + // If we send multiple `OpenRequest`s in a row, we will receive back multiple + // `Accept`/`Refuse` messages. All of them are obsolete except the last one. + if self.pending_accept_refuses != 0 { + return; + } + + match (message, self.substream.as_mut()) { + (NotifsInHandlerIn::Accept(message), Some(sub)) => sub.send_handshake(message), + (NotifsInHandlerIn::Accept(_), None) => {}, + (NotifsInHandlerIn::Refuse, _) => self.substream = None, + } + } + + fn inject_dial_upgrade_error(&mut self, _: (), _: ProtocolsHandlerUpgrErr) { + error!(target: "sub-libp2p", "Received dial upgrade error in inbound-only handler"); + } + + fn connection_keep_alive(&self) -> KeepAlive { + if self.substream.is_some() { + KeepAlive::Yes + } else { + KeepAlive::No + } + } + + fn poll( + &mut self, + cx: &mut Context, + ) -> Poll< + ProtocolsHandlerEvent + > { + // Flush the events queue if necessary. + if !self.events_queue.is_empty() { + let event = self.events_queue.remove(0); + return Poll::Ready(event) + } + + match self.substream.as_mut().map(|s| Stream::poll_next(Pin::new(s), cx)) { + None | Some(Poll::Pending) => {}, + Some(Poll::Ready(Some(Ok(msg)))) => + return Poll::Ready(ProtocolsHandlerEvent::Custom(NotifsInHandlerOut::Notif(msg))), + Some(Poll::Ready(None)) | Some(Poll::Ready(Some(Err(_)))) => { + self.substream = None; + return Poll::Ready(ProtocolsHandlerEvent::Custom(NotifsInHandlerOut::Closed)); + }, + } + + Poll::Pending + } +} + +impl fmt::Debug for NotifsInHandler { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + f.debug_struct("NotifsInHandler") + .field("substream_open", &self.substream.is_some()) + .finish() + } +} diff --git a/client/network/src/protocol/generic_proto/handler/notif_out.rs b/client/network/src/protocol/generic_proto/handler/notif_out.rs new file mode 100644 index 00000000000..8c64491d997 --- /dev/null +++ b/client/network/src/protocol/generic_proto/handler/notif_out.rs @@ -0,0 +1,395 @@ +// Copyright 2019-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Implementations of the `IntoProtocolsHandler` and `ProtocolsHandler` traits for outgoing +//! substreams of a single gossiping protocol. +//! +//! > **Note**: Each instance corresponds to a single protocol. In order to support multiple +//! > protocols, you need to create multiple instances and group them. +//! + +use crate::protocol::generic_proto::upgrade::{NotificationsOut, NotificationsOutSubstream, NotificationsHandshakeError}; +use futures::prelude::*; +use libp2p::core::{ConnectedPoint, PeerId}; +use libp2p::core::upgrade::{DeniedUpgrade, InboundUpgrade, OutboundUpgrade}; +use libp2p::swarm::{ + ProtocolsHandler, ProtocolsHandlerEvent, + IntoProtocolsHandler, + KeepAlive, + ProtocolsHandlerUpgrErr, + SubstreamProtocol, + NegotiatedSubstream, +}; +use log::error; +use smallvec::SmallVec; +use std::{borrow::Cow, fmt, mem, pin::Pin, task::{Context, Poll}, time::Duration}; +use wasm_timer::Instant; + +/// Maximum duration to open a substream and receive the handshake message. After that, we +/// consider that we failed to open the substream. +const OPEN_TIMEOUT: Duration = Duration::from_secs(10); +/// After successfully establishing a connection with the remote, we keep the connection open for +/// at least this amount of time in order to give the rest of the code the chance to notify us to +/// open substreams. +const INITIAL_KEEPALIVE_TIME: Duration = Duration::from_secs(5); + +/// Implements the `IntoProtocolsHandler` trait of libp2p. +/// +/// Every time a connection with a remote starts, an instance of this struct is created and +/// sent to a background task dedicated to this connection. Once the connection is established, +/// it is turned into a [`NotifsOutHandler`]. +/// +/// See the documentation of [`NotifsOutHandler`] for more information. +pub struct NotifsOutHandlerProto { + /// Name of the protocol to negotiate. + protocol_name: Cow<'static, [u8]>, +} + +impl NotifsOutHandlerProto { + /// Builds a new [`NotifsOutHandlerProto`]. Will use the given protocol name for the + /// notifications substream. + pub fn new(protocol_name: impl Into>) -> Self { + NotifsOutHandlerProto { + protocol_name: protocol_name.into(), + } + } +} + +impl IntoProtocolsHandler for NotifsOutHandlerProto { + type Handler = NotifsOutHandler; + + fn inbound_protocol(&self) -> DeniedUpgrade { + DeniedUpgrade + } + + fn into_handler(self, _: &PeerId, _: &ConnectedPoint) -> Self::Handler { + NotifsOutHandler { + protocol_name: self.protocol_name, + when_connection_open: Instant::now(), + state: State::Disabled, + events_queue: SmallVec::new(), + } + } +} + +/// Handler for an outbound notification substream. +/// +/// When a connection is established, this handler starts in the "disabled" state, meaning that +/// no substream will be open. +/// +/// One can try open a substream by sending an [`NotifsOutHandlerIn::Enable`] message to the +/// handler. Once done, the handler will try to establish then maintain an outbound substream with +/// the remote for the purpose of sending notifications to it. +pub struct NotifsOutHandler { + /// Name of the protocol to negotiate. + protocol_name: Cow<'static, [u8]>, + + /// Relationship with the node we're connected to. + state: State, + + /// When the connection with the remote has been successfully established. + when_connection_open: Instant, + + /// Queue of events to send to the outside. + /// + /// This queue must only ever be modified to insert elements at the back, or remove the first + /// element. + events_queue: SmallVec<[ProtocolsHandlerEvent; 16]>, +} + +/// Our relationship with the node we're connected to. +enum State { + /// The handler is disabled and idle. No substream is open. + Disabled, + + /// The handler is disabled. A substream is still open and needs to be closed. + /// + /// > **Important**: Having this state means that `poll_close` has been called at least once, + /// > but the `Sink` API is unclear about whether or not the stream can then + /// > be recovered. Because of that, we must never switch from the + /// > `DisabledOpen` state to the `Open` state while keeping the same substream. + DisabledOpen(NotificationsOutSubstream), + + /// The handler is disabled but we are still trying to open a substream with the remote. + /// + /// If the handler gets enabled again, we can immediately switch to `Opening`. + DisabledOpening, + + /// The handler is enabled and we are trying to open a substream with the remote. + Opening { + /// The initial message that we sent. Necessary if we need to re-open a substream. + initial_message: Vec, + }, + + /// The handler is enabled. We have tried opening a substream in the past but the remote + /// refused it. + Refused, + + /// The handler is enabled and substream is open. + Open { + /// Substream that is currently open. + substream: NotificationsOutSubstream, + /// The initial message that we sent. Necessary if we need to re-open a substream. + initial_message: Vec, + }, + + /// Poisoned state. Shouldn't be found in the wild. + Poisoned, +} + +/// Event that can be received by a `NotifsOutHandler`. +#[derive(Debug)] +pub enum NotifsOutHandlerIn { + /// Enables the notifications substream for this node. The handler will try to maintain a + /// substream with the remote. + Enable { + /// Initial message to send to remote nodes when we open substreams. + initial_message: Vec, + }, + + /// Disables the notifications substream for this node. This is the default state. + Disable, + + /// Sends a message on the notifications substream. Ignored if the substream isn't open. + /// + /// It is only valid to send this if the notifications substream has been enabled. + Send(Vec), +} + +/// Event that can be emitted by a `NotifsOutHandler`. +#[derive(Debug)] +pub enum NotifsOutHandlerOut { + /// The notifications substream has been accepted by the remote. + Open { + /// Handshake message sent by the remote after we opened the substream. + handshake: Vec, + }, + + /// The notifications substream has been closed by the remote. + Closed, + + /// We tried to open a notifications substream, but the remote refused it. + /// + /// Can only happen if we're in a closed state. + Refused, +} + +impl NotifsOutHandler { + /// Returns true if the substream is currently open. + pub fn is_open(&self) -> bool { + match &self.state { + State::Disabled => false, + State::DisabledOpening => false, + State::DisabledOpen(_) => true, + State::Opening { .. } => false, + State::Refused => false, + State::Open { .. } => true, + State::Poisoned => false, + } + } + + /// Returns the name of the protocol that we negotiate. + pub fn protocol_name(&self) -> &[u8] { + &self.protocol_name + } +} + +impl ProtocolsHandler for NotifsOutHandler { + type InEvent = NotifsOutHandlerIn; + type OutEvent = NotifsOutHandlerOut; + type Error = void::Void; + type InboundProtocol = DeniedUpgrade; + type OutboundProtocol = NotificationsOut; + type OutboundOpenInfo = (); + + fn listen_protocol(&self) -> SubstreamProtocol { + SubstreamProtocol::new(DeniedUpgrade) + } + + fn inject_fully_negotiated_inbound( + &mut self, + proto: >::Output + ) { + // We should never reach here. `proto` is a `Void`. + void::unreachable(proto) + } + + fn inject_fully_negotiated_outbound( + &mut self, + (handshake_msg, substream): >::Output, + _: () + ) { + match mem::replace(&mut self.state, State::Poisoned) { + State::Opening { initial_message } => { + let ev = NotifsOutHandlerOut::Open { handshake: handshake_msg }; + self.events_queue.push(ProtocolsHandlerEvent::Custom(ev)); + self.state = State::Open { substream, initial_message }; + }, + // If the handler was disabled while we were negotiating the protocol, immediately + // close it. + State::DisabledOpening => self.state = State::DisabledOpen(substream), + + // Any other situation should never happen. + State::Disabled | State::Refused | State::Open { .. } | State::DisabledOpen(_) => + error!("State mismatch in notifications handler: substream already open"), + State::Poisoned => error!("Notifications handler in a poisoned state"), + } + } + + fn inject_event(&mut self, message: NotifsOutHandlerIn) { + match message { + NotifsOutHandlerIn::Enable { initial_message } => { + match mem::replace(&mut self.state, State::Poisoned) { + State::Disabled => { + let proto = NotificationsOut::new(self.protocol_name.clone(), initial_message.clone()); + self.events_queue.push(ProtocolsHandlerEvent::OutboundSubstreamRequest { + protocol: SubstreamProtocol::new(proto).with_timeout(OPEN_TIMEOUT), + info: (), + }); + self.state = State::Opening { initial_message }; + }, + State::DisabledOpening => self.state = State::Opening { initial_message }, + State::DisabledOpen(mut sub) => { + // As documented above, in this state we have already called `poll_close` + // once on the substream, and it is unclear whether the substream can then + // be recovered. When in doubt, let's drop the existing substream and + // open a new one. + if sub.close().now_or_never().is_none() { + log::warn!( + target: "sub-libp2p", + "Improperly closed outbound notifications substream" + ); + } + + let proto = NotificationsOut::new(self.protocol_name.clone(), initial_message.clone()); + self.events_queue.push(ProtocolsHandlerEvent::OutboundSubstreamRequest { + protocol: SubstreamProtocol::new(proto).with_timeout(OPEN_TIMEOUT), + info: (), + }); + self.state = State::Opening { initial_message }; + }, + State::Opening { .. } | State::Refused | State::Open { .. } => + error!("Tried to enable notifications handler that was already enabled"), + State::Poisoned => error!("Notifications handler in a poisoned state"), + } + } + + NotifsOutHandlerIn::Disable => { + match mem::replace(&mut self.state, State::Poisoned) { + State::Disabled | State::DisabledOpen(_) | State::DisabledOpening => + error!("Tried to disable notifications handler that was already disabled"), + State::Opening { .. } => self.state = State::DisabledOpening, + State::Refused => self.state = State::Disabled, + State::Open { substream, .. } => self.state = State::DisabledOpen(substream), + State::Poisoned => error!("Notifications handler in a poisoned state"), + } + } + + NotifsOutHandlerIn::Send(msg) => + if let State::Open { substream, .. } = &mut self.state { + if let Some(Ok(_)) = substream.send(msg).now_or_never() { + } else { + log::warn!( + target: "sub-libp2p", + "Failed to push message to queue, dropped it" + ); + } + } else { + // This is an API misuse. + log::warn!( + target: "sub-libp2p", + "Tried to send a notification on a disabled handler" + ); + }, + } + } + + fn inject_dial_upgrade_error(&mut self, _: (), _: ProtocolsHandlerUpgrErr) { + match mem::replace(&mut self.state, State::Poisoned) { + State::Disabled => {}, + State::DisabledOpen(_) | State::Refused | State::Open { .. } => + error!("State mismatch in NotificationsOut"), + State::Opening { .. } => { + self.state = State::Refused; + let ev = NotifsOutHandlerOut::Refused; + self.events_queue.push(ProtocolsHandlerEvent::Custom(ev)); + }, + State::DisabledOpening => self.state = State::Disabled, + State::Poisoned => error!("Notifications handler in a poisoned state"), + } + } + + fn connection_keep_alive(&self) -> KeepAlive { + match self.state { + // We have a small grace period of `INITIAL_KEEPALIVE_TIME` during which we keep the + // connection open no matter what, in order to avoid closing and reopening + // connections all the time. + State::Disabled | State::DisabledOpen(_) | State::DisabledOpening => + KeepAlive::Until(self.when_connection_open + INITIAL_KEEPALIVE_TIME), + State::Opening { .. } | State::Open { .. } => KeepAlive::Yes, + State::Refused | State::Poisoned => KeepAlive::No, + } + } + + fn poll( + &mut self, + cx: &mut Context, + ) -> Poll> { + // Flush the events queue if necessary. + if !self.events_queue.is_empty() { + let event = self.events_queue.remove(0); + return Poll::Ready(event); + } + + match &mut self.state { + State::Open { substream, initial_message } => + match Sink::poll_flush(Pin::new(substream), cx) { + Poll::Pending | Poll::Ready(Ok(())) => {}, + Poll::Ready(Err(_)) => { + // We try to re-open a substream. + let initial_message = mem::replace(initial_message, Vec::new()); + self.state = State::Opening { initial_message: initial_message.clone() }; + let proto = NotificationsOut::new(self.protocol_name.clone(), initial_message); + self.events_queue.push(ProtocolsHandlerEvent::OutboundSubstreamRequest { + protocol: SubstreamProtocol::new(proto).with_timeout(OPEN_TIMEOUT), + info: (), + }); + return Poll::Ready(ProtocolsHandlerEvent::Custom(NotifsOutHandlerOut::Closed)); + } + }, + + State::DisabledOpen(sub) => match Sink::poll_close(Pin::new(sub), cx) { + Poll::Pending => {}, + Poll::Ready(Ok(())) | Poll::Ready(Err(_)) => { + self.state = State::Disabled; + return Poll::Ready(ProtocolsHandlerEvent::Custom(NotifsOutHandlerOut::Closed)); + }, + }, + + _ => {} + } + + Poll::Pending + } +} + +impl fmt::Debug for NotifsOutHandler { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + f.debug_struct("NotifsOutHandler") + .field("open", &self.is_open()) + .finish() + } +} diff --git a/client/network/src/protocol/legacy_proto/tests.rs b/client/network/src/protocol/generic_proto/tests.rs similarity index 92% rename from client/network/src/protocol/legacy_proto/tests.rs rename to client/network/src/protocol/generic_proto/tests.rs index 89b0854d908..b331b3c2378 100644 --- a/client/network/src/protocol/legacy_proto/tests.rs +++ b/client/network/src/protocol/generic_proto/tests.rs @@ -26,7 +26,7 @@ use libp2p::{PeerId, Multiaddr, Transport}; use rand::seq::SliceRandom; use std::{error, io, task::Context, task::Poll, time::Duration}; use crate::message::Message; -use crate::protocol::legacy_proto::{LegacyProto, LegacyProtoOut}; +use crate::protocol::generic_proto::{GenericProto, GenericProtoOut}; use sp_test_primitives::Block; /// Builds two nodes that have each other as bootstrap nodes. @@ -81,7 +81,7 @@ fn build_nodes() -> (Swarm, Swarm) { }); let behaviour = CustomProtoWithAddr { - inner: LegacyProto::new(&b"test"[..], &[1], peerset), + inner: GenericProto::new(&b"test"[..], &[1], peerset), addrs: addrs .iter() .enumerate() @@ -111,12 +111,12 @@ fn build_nodes() -> (Swarm, Swarm) { /// Wraps around the `CustomBehaviour` network behaviour, and adds hardcoded node addresses to it. struct CustomProtoWithAddr { - inner: LegacyProto, + inner: GenericProto, addrs: Vec<(PeerId, Multiaddr)>, } impl std::ops::Deref for CustomProtoWithAddr { - type Target = LegacyProto; + type Target = GenericProto; fn deref(&self) -> &Self::Target { &self.inner @@ -130,8 +130,8 @@ impl std::ops::DerefMut for CustomProtoWithAddr { } impl NetworkBehaviour for CustomProtoWithAddr { - type ProtocolsHandler = ::ProtocolsHandler; - type OutEvent = ::OutEvent; + type ProtocolsHandler = ::ProtocolsHandler; + type OutEvent = ::OutEvent; fn new_handler(&mut self) -> Self::ProtocolsHandler { self.inner.new_handler() @@ -223,7 +223,7 @@ fn two_nodes_transfer_lots_of_packets() { let fut1 = future::poll_fn(move |cx| -> Poll<()> { loop { match ready!(service1.poll_next_unpin(cx)) { - Some(LegacyProtoOut::CustomProtocolOpen { peer_id, .. }) => { + Some(GenericProtoOut::CustomProtocolOpen { peer_id, .. }) => { for n in 0 .. NUM_PACKETS { service1.send_packet( &peer_id, @@ -240,8 +240,8 @@ fn two_nodes_transfer_lots_of_packets() { let fut2 = future::poll_fn(move |cx| { loop { match ready!(service2.poll_next_unpin(cx)) { - Some(LegacyProtoOut::CustomProtocolOpen { .. }) => {}, - Some(LegacyProtoOut::CustomMessage { message, .. }) => { + Some(GenericProtoOut::CustomProtocolOpen { .. }) => {}, + Some(GenericProtoOut::CustomMessage { message, .. }) => { match Message::::decode(&mut &message[..]).unwrap() { Message::::ChainSpecific(message) => { assert_eq!(message.len(), 1); @@ -285,7 +285,7 @@ fn basic_two_nodes_requests_in_parallel() { let fut1 = future::poll_fn(move |cx| -> Poll<()> { loop { match ready!(service1.poll_next_unpin(cx)) { - Some(LegacyProtoOut::CustomProtocolOpen { peer_id, .. }) => { + Some(GenericProtoOut::CustomProtocolOpen { peer_id, .. }) => { for msg in to_send.drain(..) { service1.send_packet(&peer_id, msg.encode()); } @@ -298,8 +298,8 @@ fn basic_two_nodes_requests_in_parallel() { let fut2 = future::poll_fn(move |cx| { loop { match ready!(service2.poll_next_unpin(cx)) { - Some(LegacyProtoOut::CustomProtocolOpen { .. }) => {}, - Some(LegacyProtoOut::CustomMessage { message, .. }) => { + Some(GenericProtoOut::CustomProtocolOpen { .. }) => {}, + Some(GenericProtoOut::CustomMessage { message, .. }) => { let pos = to_receive.iter().position(|m| m.encode() == message).unwrap(); to_receive.remove(pos); if to_receive.is_empty() { @@ -335,7 +335,7 @@ fn reconnect_after_disconnect() { let mut service1_not_ready = false; match service1.poll_next_unpin(cx) { - Poll::Ready(Some(LegacyProtoOut::CustomProtocolOpen { .. })) => { + Poll::Ready(Some(GenericProtoOut::CustomProtocolOpen { .. })) => { match service1_state { ServiceState::NotConnected => { service1_state = ServiceState::FirstConnec; @@ -347,7 +347,7 @@ fn reconnect_after_disconnect() { ServiceState::FirstConnec | ServiceState::ConnectedAgain => panic!(), } }, - Poll::Ready(Some(LegacyProtoOut::CustomProtocolClosed { .. })) => { + Poll::Ready(Some(GenericProtoOut::CustomProtocolClosed { .. })) => { match service1_state { ServiceState::FirstConnec => service1_state = ServiceState::Disconnected, ServiceState::ConnectedAgain| ServiceState::NotConnected | @@ -359,7 +359,7 @@ fn reconnect_after_disconnect() { } match service2.poll_next_unpin(cx) { - Poll::Ready(Some(LegacyProtoOut::CustomProtocolOpen { .. })) => { + Poll::Ready(Some(GenericProtoOut::CustomProtocolOpen { .. })) => { match service2_state { ServiceState::NotConnected => { service2_state = ServiceState::FirstConnec; @@ -371,7 +371,7 @@ fn reconnect_after_disconnect() { ServiceState::FirstConnec | ServiceState::ConnectedAgain => panic!(), } }, - Poll::Ready(Some(LegacyProtoOut::CustomProtocolClosed { .. })) => { + Poll::Ready(Some(GenericProtoOut::CustomProtocolClosed { .. })) => { match service2_state { ServiceState::FirstConnec => service2_state = ServiceState::Disconnected, ServiceState::ConnectedAgain| ServiceState::NotConnected | diff --git a/client/network/src/protocol/generic_proto/upgrade.rs b/client/network/src/protocol/generic_proto/upgrade.rs new file mode 100644 index 00000000000..36f82633653 --- /dev/null +++ b/client/network/src/protocol/generic_proto/upgrade.rs @@ -0,0 +1,35 @@ +// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +pub use self::collec::UpgradeCollec; +pub use self::legacy::{ + RegisteredProtocol, + RegisteredProtocolEvent, + RegisteredProtocolName, + RegisteredProtocolSubstream +}; +pub use self::notifications::{ + NotificationsIn, + NotificationsInSubstream, + NotificationsOut, + NotificationsOutSubstream, + NotificationsHandshakeError, + NotificationsOutError, +}; + +mod collec; +mod legacy; +mod notifications; diff --git a/client/network/src/protocol/generic_proto/upgrade/collec.rs b/client/network/src/protocol/generic_proto/upgrade/collec.rs new file mode 100644 index 00000000000..f8d19997494 --- /dev/null +++ b/client/network/src/protocol/generic_proto/upgrade/collec.rs @@ -0,0 +1,97 @@ +// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +use futures::prelude::*; +use libp2p::core::upgrade::{InboundUpgrade, ProtocolName, UpgradeInfo}; +use std::{iter::FromIterator, pin::Pin, task::{Context, Poll}, vec}; + +// TODO: move this to libp2p => https://github.com/libp2p/rust-libp2p/issues/1445 + +/// Upgrade that combines multiple upgrades of the same type into one. Supports all the protocols +/// supported by either sub-upgrade. +#[derive(Debug, Clone)] +pub struct UpgradeCollec(pub Vec); + +impl From> for UpgradeCollec { + fn from(list: Vec) -> Self { + UpgradeCollec(list) + } +} + +impl FromIterator for UpgradeCollec { + fn from_iter>(iter: I) -> Self { + UpgradeCollec(iter.into_iter().collect()) + } +} + +impl UpgradeInfo for UpgradeCollec { + type Info = ProtoNameWithUsize; + type InfoIter = vec::IntoIter; + + fn protocol_info(&self) -> Self::InfoIter { + self.0.iter().enumerate() + .flat_map(|(n, p)| + p.protocol_info().into_iter().map(move |i| ProtoNameWithUsize(i, n))) + .collect::>() + .into_iter() + } +} + +impl InboundUpgrade for UpgradeCollec +where + T: InboundUpgrade, +{ + type Output = (T::Output, usize); + type Error = (T::Error, usize); + type Future = FutWithUsize; + + fn upgrade_inbound(mut self, sock: C, info: Self::Info) -> Self::Future { + let fut = self.0.remove(info.1).upgrade_inbound(sock, info.0); + FutWithUsize(fut, info.1) + } +} + +/// Groups a `ProtocolName` with a `usize`. +#[derive(Debug, Clone)] +pub struct ProtoNameWithUsize(T, usize); + +impl ProtocolName for ProtoNameWithUsize { + fn protocol_name(&self) -> &[u8] { + self.0.protocol_name() + } +} + +/// Equivalent to `fut.map_ok(|v| (v, num)).map_err(|e| (e, num))`, where `fut` and `num` are +/// the two fields of this struct. +#[pin_project::pin_project] +pub struct FutWithUsize(#[pin] T, usize); + +impl>, O, E> Future for FutWithUsize { + type Output = Result<(O, usize), (E, usize)>; + + fn poll(self: Pin<&mut Self>, cx: &mut Context) -> Poll { + let this = self.project(); + match Future::poll(this.0, cx) { + Poll::Ready(Ok(v)) => Poll::Ready(Ok((v, *this.1))), + Poll::Ready(Err(e)) => Poll::Ready(Err((e, *this.1))), + Poll::Pending => Poll::Pending, + } + } +} diff --git a/client/network/src/protocol/legacy_proto/upgrade.rs b/client/network/src/protocol/generic_proto/upgrade/legacy.rs similarity index 100% rename from client/network/src/protocol/legacy_proto/upgrade.rs rename to client/network/src/protocol/generic_proto/upgrade/legacy.rs diff --git a/client/network/src/protocol/generic_proto/upgrade/notifications.rs b/client/network/src/protocol/generic_proto/upgrade/notifications.rs new file mode 100644 index 00000000000..ddc07b5d6f3 --- /dev/null +++ b/client/network/src/protocol/generic_proto/upgrade/notifications.rs @@ -0,0 +1,622 @@ +// Copyright 2019-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +/// Notifications protocol. +/// +/// The Substrate notifications protocol consists in the following: +/// +/// - Node A opens a substream to node B and sends a message which contains some protocol-specific +/// higher-level logic. This message is prefixed with a variable-length integer message length. +/// This message can be empty, in which case `0` is sent. +/// - If node B accepts the substream, it sends back a message with the same properties. +/// Afterwards, the sending side of B is closed. +/// - If instead B refuses the connection (which typically happens because no empty slot is +/// available), then it immediately closes the substream without sending back anything. +/// - Node A can then send notifications to B, prefixed with a variable-length integer indicating +/// the length of the message. +/// - Node A closes its writing side if it doesn't want the notifications substream anymore. +/// +/// Notification substreams are unidirectional. If A opens a substream with B, then B is +/// encouraged but not required to open a substream to A as well. +/// + +use bytes::BytesMut; +use futures::{prelude::*, ready}; +use futures_codec::Framed; +use libp2p::core::{UpgradeInfo, InboundUpgrade, OutboundUpgrade, upgrade}; +use log::error; +use std::{borrow::Cow, collections::VecDeque, io, iter, mem, pin::Pin, task::{Context, Poll}}; +use unsigned_varint::codec::UviBytes; + +/// Maximum allowed size of the two handshake messages, in bytes. +const MAX_HANDSHAKE_SIZE: usize = 1024; +/// Maximum number of buffered messages before we consider the remote unresponsive and kill the +/// substream. +const MAX_PENDING_MESSAGES: usize = 256; + +/// Upgrade that accepts a substream, sends back a status message, then becomes a unidirectional +/// stream of messages. +#[derive(Debug, Clone)] +pub struct NotificationsIn { + /// Protocol name to use when negotiating the substream. + protocol_name: Cow<'static, [u8]>, +} + +/// Upgrade that opens a substream, waits for the remote to accept by sending back a status +/// message, then becomes a unidirectional sink of data. +#[derive(Debug, Clone)] +pub struct NotificationsOut { + /// Protocol name to use when negotiating the substream. + protocol_name: Cow<'static, [u8]>, + /// Message to send when we start the handshake. + initial_message: Vec, +} + +/// A substream for incoming notification messages. +/// +/// When creating, this struct starts in a state in which we must first send back a handshake +/// message to the remote. No message will come before this has been done. +#[pin_project::pin_project] +pub struct NotificationsInSubstream { + #[pin] + socket: Framed>>>, + handshake: NotificationsInSubstreamHandshake, +} + +/// State of the handshake sending back process. +enum NotificationsInSubstreamHandshake { + /// Waiting for the user to give us the handshake message. + NotSent, + /// User gave us the handshake message. Trying to push it in the socket. + PendingSend(Vec), + /// Handshake message was pushed in the socket. Still need to flush. + Close, + /// Handshake message successfully sent. + Sent, +} + +/// A substream for outgoing notification messages. +#[pin_project::pin_project] +pub struct NotificationsOutSubstream { + /// Substream where to send messages. + #[pin] + socket: Framed>>>, + /// Queue of messages waiting to be sent. + messages_queue: VecDeque>, + /// If true, we need to flush `socket`. + need_flush: bool, +} + +impl NotificationsIn { + /// Builds a new potential upgrade. + pub fn new(protocol_name: impl Into>) -> Self { + NotificationsIn { + protocol_name: protocol_name.into(), + } + } + + /// Returns the name of the protocol that we accept. + pub fn protocol_name(&self) -> &[u8] { + &self.protocol_name + } +} + +impl UpgradeInfo for NotificationsIn { + type Info = Cow<'static, [u8]>; + type InfoIter = iter::Once; + + fn protocol_info(&self) -> Self::InfoIter { + iter::once(self.protocol_name.clone()) + } +} + +impl InboundUpgrade for NotificationsIn +where TSubstream: AsyncRead + AsyncWrite + Unpin + Send + 'static, +{ + type Output = (Vec, NotificationsInSubstream); + type Future = Pin> + Send>>; + type Error = NotificationsHandshakeError; + + fn upgrade_inbound( + self, + mut socket: TSubstream, + _: Self::Info, + ) -> Self::Future { + Box::pin(async move { + let initial_message_len = unsigned_varint::aio::read_usize(&mut socket).await?; + if initial_message_len > MAX_HANDSHAKE_SIZE { + return Err(NotificationsHandshakeError::TooLarge { + requested: initial_message_len, + max: MAX_HANDSHAKE_SIZE, + }); + } + + let mut initial_message = vec![0u8; initial_message_len]; + if !initial_message.is_empty() { + socket.read(&mut initial_message).await?; + } + + let substream = NotificationsInSubstream { + socket: Framed::new(socket, UviBytes::default()), + handshake: NotificationsInSubstreamHandshake::NotSent, + }; + + Ok((initial_message, substream)) + }) + } +} + +impl NotificationsInSubstream +where TSubstream: AsyncRead + AsyncWrite, +{ + /// Sends the handshake in order to inform the remote that we accept the substream. + pub fn send_handshake(&mut self, message: impl Into>) { + match self.handshake { + NotificationsInSubstreamHandshake::NotSent => {} + _ => { + error!(target: "sub-libp2p", "Tried to send handshake twice"); + return; + } + } + + self.handshake = NotificationsInSubstreamHandshake::PendingSend(message.into()); + } +} + +impl Stream for NotificationsInSubstream +where TSubstream: AsyncRead + AsyncWrite + Unpin, +{ + type Item = Result; + + fn poll_next(self: Pin<&mut Self>, cx: &mut Context) -> Poll> { + let mut this = self.project(); + + // This `Stream` implementation first tries to send back the handshake if necessary. + loop { + match mem::replace(this.handshake, NotificationsInSubstreamHandshake::Sent) { + NotificationsInSubstreamHandshake::Sent => + return Stream::poll_next(this.socket.as_mut(), cx), + NotificationsInSubstreamHandshake::NotSent => + return Poll::Pending, + NotificationsInSubstreamHandshake::PendingSend(msg) => + match Sink::poll_ready(this.socket.as_mut(), cx) { + Poll::Ready(_) => { + *this.handshake = NotificationsInSubstreamHandshake::Close; + match Sink::start_send(this.socket.as_mut(), io::Cursor::new(msg)) { + Ok(()) => {}, + Err(err) => return Poll::Ready(Some(Err(err))), + } + }, + Poll::Pending => + *this.handshake = NotificationsInSubstreamHandshake::PendingSend(msg), + }, + NotificationsInSubstreamHandshake::Close => + match Sink::poll_close(this.socket.as_mut(), cx)? { + Poll::Ready(()) => + *this.handshake = NotificationsInSubstreamHandshake::Sent, + Poll::Pending => + *this.handshake = NotificationsInSubstreamHandshake::Close, + }, + } + } + } +} + +impl NotificationsOut { + /// Builds a new potential upgrade. + pub fn new(protocol_name: impl Into>, initial_message: impl Into>) -> Self { + let initial_message = initial_message.into(); + if initial_message.len() > MAX_HANDSHAKE_SIZE { + error!(target: "sub-libp2p", "Outbound networking handshake is above allowed protocol limit"); + } + + NotificationsOut { + protocol_name: protocol_name.into(), + initial_message, + } + } +} + +impl UpgradeInfo for NotificationsOut { + type Info = Cow<'static, [u8]>; + type InfoIter = iter::Once; + + fn protocol_info(&self) -> Self::InfoIter { + iter::once(self.protocol_name.clone()) + } +} + +impl OutboundUpgrade for NotificationsOut +where TSubstream: AsyncRead + AsyncWrite + Unpin + Send + 'static, +{ + type Output = (Vec, NotificationsOutSubstream); + type Future = Pin> + Send>>; + type Error = NotificationsHandshakeError; + + fn upgrade_outbound( + self, + mut socket: TSubstream, + _: Self::Info, + ) -> Self::Future { + Box::pin(async move { + upgrade::write_with_len_prefix(&mut socket, &self.initial_message).await?; + + // Reading handshake. + let handshake_len = unsigned_varint::aio::read_usize(&mut socket).await?; + if handshake_len > MAX_HANDSHAKE_SIZE { + return Err(NotificationsHandshakeError::TooLarge { + requested: handshake_len, + max: MAX_HANDSHAKE_SIZE, + }); + } + + let mut handshake = vec![0u8; handshake_len]; + if !handshake.is_empty() { + socket.read(&mut handshake).await?; + } + + Ok((handshake, NotificationsOutSubstream { + socket: Framed::new(socket, UviBytes::default()), + messages_queue: VecDeque::with_capacity(MAX_PENDING_MESSAGES), + need_flush: false, + })) + }) + } +} + +impl Sink> for NotificationsOutSubstream + where TSubstream: AsyncRead + AsyncWrite + Unpin, +{ + type Error = NotificationsOutError; + + fn poll_ready(self: Pin<&mut Self>, _: &mut Context) -> Poll> { + Poll::Ready(Ok(())) + } + + fn start_send(mut self: Pin<&mut Self>, item: Vec) -> Result<(), Self::Error> { + if self.messages_queue.len() >= MAX_PENDING_MESSAGES { + return Err(NotificationsOutError::Clogged); + } + + self.messages_queue.push_back(item); + Ok(()) + } + + fn poll_flush(self: Pin<&mut Self>, cx: &mut Context) -> Poll> { + let mut this = self.project(); + + while !this.messages_queue.is_empty() { + match Sink::poll_ready(this.socket.as_mut(), cx) { + Poll::Ready(Err(err)) => return Poll::Ready(Err(From::from(err))), + Poll::Ready(Ok(())) => { + let msg = this.messages_queue.pop_front() + .expect("checked for !is_empty above; qed"); + Sink::start_send(this.socket.as_mut(), io::Cursor::new(msg))?; + *this.need_flush = true; + }, + Poll::Pending => return Poll::Pending, + } + } + + if *this.need_flush { + match Sink::poll_flush(this.socket.as_mut(), cx) { + Poll::Ready(Err(err)) => return Poll::Ready(Err(From::from(err))), + Poll::Ready(Ok(())) => *this.need_flush = false, + Poll::Pending => return Poll::Pending, + } + } + + Poll::Ready(Ok(())) + } + + fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { + ready!(Sink::poll_flush(self.as_mut(), cx))?; + let this = self.project(); + match Sink::poll_close(this.socket, cx) { + Poll::Ready(Ok(())) => Poll::Ready(Ok(())), + Poll::Ready(Err(err)) => Poll::Ready(Err(From::from(err))), + Poll::Pending => Poll::Pending, + } + } +} + +/// Error generated by sending on a notifications out substream. +#[derive(Debug, derive_more::From, derive_more::Display)] +pub enum NotificationsHandshakeError { + /// I/O error on the substream. + Io(io::Error), + + /// Initial message or handshake was too large. + #[display(fmt = "Initial message or handshake was too large: {}", requested)] + TooLarge { + /// Size requested by the remote. + requested: usize, + /// Maximum allowed, + max: usize, + }, + + /// Error while decoding the variable-length integer. + VarintDecode(unsigned_varint::decode::Error), +} + +impl From for NotificationsHandshakeError { + fn from(err: unsigned_varint::io::ReadError) -> Self { + match err { + unsigned_varint::io::ReadError::Io(err) => NotificationsHandshakeError::Io(err), + unsigned_varint::io::ReadError::Decode(err) => NotificationsHandshakeError::VarintDecode(err), + _ => { + log::warn!("Unrecognized varint decoding error"); + NotificationsHandshakeError::Io(From::from(io::ErrorKind::InvalidData)) + } + } + } +} + +/// Error generated by sending on a notifications out substream. +#[derive(Debug, derive_more::From, derive_more::Display)] +pub enum NotificationsOutError { + /// I/O error on the substream. + Io(io::Error), + + /// Remote doesn't process our messages quickly enough. + /// + /// > **Note**: This is not necessarily the remote's fault, and could also be caused by the + /// > local node sending data too quickly. Properly doing back-pressure, however, + /// > would require a deep refactoring effort in Substrate as a whole. + Clogged, +} + +#[cfg(test)] +mod tests { + use super::{NotificationsIn, NotificationsOut}; + + use async_std::net::{TcpListener, TcpStream}; + use futures::{prelude::*, channel::oneshot}; + use libp2p::core::upgrade; + use std::pin::Pin; + + #[test] + fn basic_works() { + const PROTO_NAME: &'static [u8] = b"/test/proto/1"; + let (listener_addr_tx, listener_addr_rx) = oneshot::channel(); + + let client = async_std::task::spawn(async move { + let socket = TcpStream::connect(listener_addr_rx.await.unwrap()).await.unwrap(); + let (handshake, mut substream) = upgrade::apply_outbound( + socket, + NotificationsOut::new(PROTO_NAME, &b"initial message"[..]), + upgrade::Version::V1 + ).await.unwrap(); + + assert_eq!(handshake, b"hello world"); + substream.send(b"test message".to_vec()).await.unwrap(); + }); + + async_std::task::block_on(async move { + let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); + listener_addr_tx.send(listener.local_addr().unwrap()).unwrap(); + + let (socket, _) = listener.accept().await.unwrap(); + let (initial_message, mut substream) = upgrade::apply_inbound( + socket, + NotificationsIn::new(PROTO_NAME) + ).await.unwrap(); + + assert_eq!(initial_message, b"initial message"); + substream.send_handshake(&b"hello world"[..]); + + let msg = substream.next().await.unwrap().unwrap(); + assert_eq!(msg.as_ref(), b"test message"); + }); + + async_std::task::block_on(client); + } + + #[test] + fn empty_handshake() { + // Check that everything still works when the handshake messages are empty. + + const PROTO_NAME: &'static [u8] = b"/test/proto/1"; + let (listener_addr_tx, listener_addr_rx) = oneshot::channel(); + + let client = async_std::task::spawn(async move { + let socket = TcpStream::connect(listener_addr_rx.await.unwrap()).await.unwrap(); + let (handshake, mut substream) = upgrade::apply_outbound( + socket, + NotificationsOut::new(PROTO_NAME, vec![]), + upgrade::Version::V1 + ).await.unwrap(); + + assert!(handshake.is_empty()); + substream.send(Default::default()).await.unwrap(); + }); + + async_std::task::block_on(async move { + let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); + listener_addr_tx.send(listener.local_addr().unwrap()).unwrap(); + + let (socket, _) = listener.accept().await.unwrap(); + let (initial_message, mut substream) = upgrade::apply_inbound( + socket, + NotificationsIn::new(PROTO_NAME) + ).await.unwrap(); + + assert!(initial_message.is_empty()); + substream.send_handshake(vec![]); + + let msg = substream.next().await.unwrap().unwrap(); + assert!(msg.as_ref().is_empty()); + }); + + async_std::task::block_on(client); + } + + #[test] + fn refused() { + const PROTO_NAME: &'static [u8] = b"/test/proto/1"; + let (listener_addr_tx, listener_addr_rx) = oneshot::channel(); + + let client = async_std::task::spawn(async move { + let socket = TcpStream::connect(listener_addr_rx.await.unwrap()).await.unwrap(); + let outcome = upgrade::apply_outbound( + socket, + NotificationsOut::new(PROTO_NAME, &b"hello"[..]), + upgrade::Version::V1 + ).await; + + // Despite the protocol negotiation being successfully conducted on the listener + // side, we have to receive an error here because the listener didn't send the + // handshake. + assert!(outcome.is_err()); + }); + + async_std::task::block_on(async move { + let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); + listener_addr_tx.send(listener.local_addr().unwrap()).unwrap(); + + let (socket, _) = listener.accept().await.unwrap(); + let (initial_msg, substream) = upgrade::apply_inbound( + socket, + NotificationsIn::new(PROTO_NAME) + ).await.unwrap(); + + assert_eq!(initial_msg, b"hello"); + + // We successfully upgrade to the protocol, but then close the substream. + drop(substream); + }); + + async_std::task::block_on(client); + } + + #[test] + fn large_initial_message_refused() { + const PROTO_NAME: &'static [u8] = b"/test/proto/1"; + let (listener_addr_tx, listener_addr_rx) = oneshot::channel(); + + let client = async_std::task::spawn(async move { + let socket = TcpStream::connect(listener_addr_rx.await.unwrap()).await.unwrap(); + let ret = upgrade::apply_outbound( + socket, + // We check that an initial message that is too large gets refused. + NotificationsOut::new(PROTO_NAME, (0..32768).map(|_| 0).collect::>()), + upgrade::Version::V1 + ).await; + assert!(ret.is_err()); + }); + + async_std::task::block_on(async move { + let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); + listener_addr_tx.send(listener.local_addr().unwrap()).unwrap(); + + let (socket, _) = listener.accept().await.unwrap(); + let ret = upgrade::apply_inbound( + socket, + NotificationsIn::new(PROTO_NAME) + ).await; + assert!(ret.is_err()); + }); + + async_std::task::block_on(client); + } + + #[test] + fn large_handshake_refused() { + const PROTO_NAME: &'static [u8] = b"/test/proto/1"; + let (listener_addr_tx, listener_addr_rx) = oneshot::channel(); + + let client = async_std::task::spawn(async move { + let socket = TcpStream::connect(listener_addr_rx.await.unwrap()).await.unwrap(); + let ret = upgrade::apply_outbound( + socket, + NotificationsOut::new(PROTO_NAME, &b"initial message"[..]), + upgrade::Version::V1 + ).await; + assert!(ret.is_err()); + }); + + async_std::task::block_on(async move { + let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); + listener_addr_tx.send(listener.local_addr().unwrap()).unwrap(); + + let (socket, _) = listener.accept().await.unwrap(); + let (initial_message, mut substream) = upgrade::apply_inbound( + socket, + NotificationsIn::new(PROTO_NAME) + ).await.unwrap(); + assert_eq!(initial_message, b"initial message"); + + // We check that a handshake that is too large gets refused. + substream.send_handshake((0..32768).map(|_| 0).collect::>()); + let _ = substream.next().await; + }); + + async_std::task::block_on(client); + } + + #[test] + fn buffer_is_full_closes_connection() { + const PROTO_NAME: &'static [u8] = b"/test/proto/1"; + let (listener_addr_tx, listener_addr_rx) = oneshot::channel(); + + let client = async_std::task::spawn(async move { + let socket = TcpStream::connect(listener_addr_rx.await.unwrap()).await.unwrap(); + let (handshake, mut substream) = upgrade::apply_outbound( + socket, + NotificationsOut::new(PROTO_NAME, vec![]), + upgrade::Version::V1 + ).await.unwrap(); + + assert!(handshake.is_empty()); + + // Push an item and flush so that the test works. + substream.send(b"hello world".to_vec()).await.unwrap(); + + for _ in 0..32768 { + // Push an item on the sink without flushing until an error happens because the + // buffer is full. + let message = b"hello world!".to_vec(); + if future::poll_fn(|cx| Sink::poll_ready(Pin::new(&mut substream), cx)).await.is_err() { + return Ok(()); + } + if Sink::start_send(Pin::new(&mut substream), message).is_err() { + return Ok(()); + } + } + + Err(()) + }); + + async_std::task::block_on(async move { + let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); + listener_addr_tx.send(listener.local_addr().unwrap()).unwrap(); + + let (socket, _) = listener.accept().await.unwrap(); + let (initial_message, mut substream) = upgrade::apply_inbound( + socket, + NotificationsIn::new(PROTO_NAME) + ).await.unwrap(); + + assert!(initial_message.is_empty()); + substream.send_handshake(vec![]); + + // Process one message so that the handshake and all works. + let _ = substream.next().await.unwrap().unwrap(); + + client.await.unwrap(); + }); + } +} diff --git a/client/network/src/service.rs b/client/network/src/service.rs index 5674d841b32..26facd98af9 100644 --- a/client/network/src/service.rs +++ b/client/network/src/service.rs @@ -25,7 +25,7 @@ //! The methods of the [`NetworkService`] are implemented by sending a message over a channel, //! which is then processed by [`NetworkWorker::poll`]. -use std::{collections::{HashMap, HashSet}, fs, marker::PhantomData, io, path::Path}; +use std::{borrow::Cow, collections::{HashMap, HashSet}, fs, marker::PhantomData, io, path::Path}; use std::sync::{Arc, atomic::{AtomicBool, AtomicUsize, Ordering}}; use std::pin::Pin; use std::task::Poll; @@ -490,9 +490,11 @@ impl, H: ExHashT> NetworkServic pub fn register_notifications_protocol( &self, engine_id: ConsensusEngineId, + protocol_name: impl Into>, ) { let _ = self.to_worker.unbounded_send(ServiceToWorkerMsg::RegisterNotifProtocol { engine_id, + protocol_name: protocol_name.into(), }); } @@ -710,6 +712,7 @@ enum ServiceToWorkerMsg> { }, RegisterNotifProtocol { engine_id: ConsensusEngineId, + protocol_name: Cow<'static, [u8]>, }, DisconnectPeer(PeerId), } @@ -791,8 +794,8 @@ impl, H: ExHashT> Future for Ne this.event_streams.push(sender), ServiceToWorkerMsg::WriteNotification { message, engine_id, target } => this.network_service.user_protocol_mut().write_notification(target, engine_id, message), - ServiceToWorkerMsg::RegisterNotifProtocol { engine_id } => { - let events = this.network_service.user_protocol_mut().register_notifications_protocol(engine_id); + ServiceToWorkerMsg::RegisterNotifProtocol { engine_id, protocol_name } => { + let events = this.network_service.user_protocol_mut().register_notifications_protocol(engine_id, protocol_name); for event in events { this.event_streams.retain(|sender| sender.unbounded_send(event.clone()).is_ok()); } -- GitLab From 32c08d40cfcdad731cbb49b662eeb6b33f93926e Mon Sep 17 00:00:00 2001 From: Arkadiy Paronyan Date: Fri, 21 Feb 2020 11:47:02 +0100 Subject: [PATCH 024/106] Wait for RPC server to cleanup on shutdown (#5004) --- client/service/src/lib.rs | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/client/service/src/lib.rs b/client/service/src/lib.rs index c45d44dfca6..8c5d5deccac 100644 --- a/client/service/src/lib.rs +++ b/client/service/src/lib.rs @@ -534,6 +534,30 @@ impl Drop for } } +#[cfg(not(target_os = "unknown"))] +// Wrapper for HTTP and WS servers that makes sure they are properly shut down. +mod waiting { + pub struct HttpServer(pub Option); + impl Drop for HttpServer { + fn drop(&mut self) { + if let Some(server) = self.0.take() { + server.close_handle().close(); + server.wait(); + } + } + } + + pub struct WsServer(pub Option); + impl Drop for WsServer { + fn drop(&mut self) { + if let Some(server) = self.0.take() { + server.close_handle().close(); + let _ = server.wait(); + } + } + } +} + /// Starts RPC servers that run in their own thread, and returns an opaque object that keeps them alive. #[cfg(not(target_os = "unknown"))] fn start_rpc_servers sc_rpc_server::RpcHandler>( @@ -562,7 +586,7 @@ fn start_rpc_servers sc_rpc_server::RpcHandler sc_rpc_server::RpcHandler Date: Fri, 21 Feb 2020 12:13:16 +0100 Subject: [PATCH 025/106] Removes use of sc_client::Client from sc_consensus_babe (#5014) * removes use of sc_client::Client from sc_consensus_babe * Update client/consensus/babe/src/lib.rs Co-authored-by: Benjamin Kampmann --- bin/node/cli/src/service.rs | 6 +- client/consensus/babe/rpc/src/lib.rs | 1 - client/consensus/babe/src/lib.rs | 119 +++++++++++---------------- client/consensus/babe/src/tests.rs | 10 +-- 4 files changed, 50 insertions(+), 86 deletions(-) diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs index c60e150a4fe..1dc5a061a37 100644 --- a/bin/node/cli/src/service.rs +++ b/bin/node/cli/src/service.rs @@ -79,7 +79,6 @@ macro_rules! new_full_start { sc_consensus_babe::Config::get_or_compute(&*client)?, grandpa_block_import, client.clone(), - client.clone(), )?; let import_queue = sc_consensus_babe::import_queue( @@ -87,7 +86,6 @@ macro_rules! new_full_start { block_import.clone(), Some(Box::new(justification_import)), None, - client.clone(), client, inherent_data_providers.clone(), )?; @@ -337,7 +335,6 @@ pub fn new_light(config: NodeConfiguration) sc_consensus_babe::Config::get_or_compute(&*client)?, grandpa_block_import, client.clone(), - client.clone(), )?; let import_queue = sc_consensus_babe::import_queue( @@ -346,7 +343,6 @@ pub fn new_light(config: NodeConfiguration) None, Some(Box::new(finality_proof_import)), client.clone(), - client, inherent_data_providers.clone(), )?; @@ -495,7 +491,7 @@ mod tests { |config| { let mut setup_handles = None; new_full!(config, | - block_import: &sc_consensus_babe::BabeBlockImport<_, _, Block, _, _, _>, + block_import: &sc_consensus_babe::BabeBlockImport, babe_link: &sc_consensus_babe::BabeLink, | { setup_handles = Some((block_import.clone(), babe_link.clone())); diff --git a/client/consensus/babe/rpc/src/lib.rs b/client/consensus/babe/rpc/src/lib.rs index 033a7d6b985..1ea7e423dc7 100644 --- a/client/consensus/babe/rpc/src/lib.rs +++ b/client/consensus/babe/rpc/src/lib.rs @@ -230,7 +230,6 @@ mod tests { config.clone(), client.clone(), client.clone(), - client.clone(), ).expect("can initialize block-import"); let epoch_changes = link.epoch_changes().clone(); diff --git a/client/consensus/babe/src/lib.rs b/client/consensus/babe/src/lib.rs index e04e112d7d7..000642fec4a 100644 --- a/client/consensus/babe/src/lib.rs +++ b/client/consensus/babe/src/lib.rs @@ -93,12 +93,9 @@ use sp_consensus_babe::inherents::BabeInherentData; use sp_timestamp::{TimestampInherentData, InherentType as TimestampInherent}; use sp_consensus::import_queue::{Verifier, BasicQueue, CacheKeyId}; use sc_client_api::{ - backend::{AuxStore, Backend}, - call_executor::CallExecutor, + backend::AuxStore, BlockchainEvents, ProvideUncles, }; -use sc_client::Client; - use sp_block_builder::BlockBuilder as BlockBuilderApi; use futures::prelude::*; @@ -655,27 +652,28 @@ impl BabeLink { } /// A verifier for Babe blocks. -pub struct BabeVerifier { - client: Arc>, - api: Arc, +pub struct BabeVerifier { + client: Arc, inherent_data_providers: sp_inherents::InherentDataProviders, config: Config, epoch_changes: SharedEpochChanges, time_source: TimeSource, } -impl BabeVerifier { +impl BabeVerifier + where + Block: BlockT, + Client: HeaderBackend + HeaderMetadata + ProvideRuntimeApi, + Client::Api: BlockBuilderApi, +{ fn check_inherents( &self, block: Block, block_id: BlockId, inherent_data: InherentData, ) -> Result<(), Error> - where - PRA: ProvideRuntimeApi, - PRA::Api: BlockBuilderApi { - let inherent_res = self.api.runtime_api().check_inherents( + let inherent_res = self.client.runtime_api().check_inherents( &block_id, block, inherent_data, @@ -693,14 +691,11 @@ impl BabeVerifier { } } -impl Verifier for BabeVerifier where +impl Verifier for BabeVerifier where Block: BlockT, - B: Backend + 'static, - E: CallExecutor + 'static + Clone + Send + Sync, - RA: Send + Sync, - PRA: ProvideRuntimeApi + Send + Sync + AuxStore + ProvideCache, - PRA::Api: BlockBuilderApi - + BabeApi, + Client: HeaderMetadata + HeaderBackend + ProvideRuntimeApi + + Send + Sync + AuxStore + ProvideCache, + Client::Api: BlockBuilderApi + BabeApi, { fn verify( &mut self, @@ -769,7 +764,7 @@ impl Verifier for BabeVerifier { +pub struct BabeBlockImport { inner: I, - client: Arc>, - api: Arc, + client: Arc, epoch_changes: SharedEpochChanges, config: Config, } -impl Clone for BabeBlockImport { +impl Clone for BabeBlockImport { fn clone(&self) -> Self { BabeBlockImport { inner: self.inner.clone(), client: self.client.clone(), - api: self.api.clone(), epoch_changes: self.epoch_changes.clone(), config: self.config.clone(), } } } -impl BabeBlockImport { +impl BabeBlockImport { fn new( - client: Arc>, - api: Arc, + client: Arc, epoch_changes: SharedEpochChanges, block_import: I, config: Config, ) -> Self { BabeBlockImport { client, - api, inner: block_import, epoch_changes, config, @@ -895,19 +886,16 @@ impl BabeBlockImport { } } -impl BlockImport for BabeBlockImport where +impl BlockImport for BabeBlockImport where Block: BlockT, - I: BlockImport> + Send + Sync, - I::Error: Into, - B: Backend + 'static, - E: CallExecutor + 'static + Clone + Send + Sync, - Client: AuxStore, - RA: Send + Sync, - PRA: ProvideRuntimeApi + ProvideCache, - PRA::Api: BabeApi + ApiExt, + Inner: BlockImport> + Send + Sync, + Inner::Error: Into, + Client: HeaderBackend + HeaderMetadata + + AuxStore + ProvideRuntimeApi + ProvideCache + Send + Sync, + Client::Api: BabeApi + ApiExt, { type Error = ConsensusError; - type Transaction = sp_api::TransactionFor; + type Transaction = sp_api::TransactionFor; fn import_block( &mut self, @@ -931,7 +919,7 @@ impl BlockImport for BabeBlockImport::ParentUnavailable(parent_hash, hash) @@ -1003,7 +991,7 @@ impl BlockImport for BabeBlockImport BlockImport for BabeBlockImport BlockImport for BabeBlockImport( - client: &Client, +fn prune_finalized( + client: Arc, epoch_changes: &mut EpochChangesFor, ) -> Result<(), ConsensusError> where Block: BlockT, - E: CallExecutor + Send + Sync, - B: Backend, - RA: Send + Sync, + Client: HeaderBackend + HeaderMetadata, { - let info = client.chain_info(); + let info = client.info(); let finalized_slot = { - let finalized_header = client.header(&BlockId::Hash(info.finalized_hash)) + let finalized_header = client.header(BlockId::Hash(info.finalized_hash)) .map_err(|e| ConsensusError::ClientImport(format!("{:?}", e)))? .expect("best finalized hash was given by client; \ finalized headers must exist in db; qed"); @@ -1147,16 +1133,12 @@ fn prune_finalized( /// /// Also returns a link object used to correctly instantiate the import queue /// and background worker. -pub fn block_import( +pub fn block_import( config: Config, wrapped_block_import: I, - client: Arc>, - api: Arc, -) -> ClientResult<(BabeBlockImport, BabeLink)> where - B: Backend, - E: CallExecutor + Send + Sync, - RA: Send + Sync, - Client: AuxStore, + client: Arc, +) -> ClientResult<(BabeBlockImport, BabeLink)> where + Client: AuxStore + HeaderBackend + HeaderMetadata, { let epoch_changes = aux_schema::load_epoch_changes::(&*client)?; let link = BabeLink { @@ -1169,13 +1151,12 @@ pub fn block_import( // epoch tree it is useful as a migration, so that nodes prune long trees on // startup rather than waiting until importing the next epoch change block. prune_finalized( - &client, + client.clone(), &mut epoch_changes.lock(), )?; let import = BabeBlockImport::new( client, - api, epoch_changes, wrapped_block_import, config, @@ -1193,28 +1174,24 @@ pub fn block_import( /// /// The block import object provided must be the `BabeBlockImport` or a wrapper /// of it, otherwise crucial import logic will be omitted. -pub fn import_queue( +pub fn import_queue( babe_link: BabeLink, - block_import: I, + block_import: Inner, justification_import: Option>, finality_proof_import: Option>, - client: Arc>, - api: Arc, + client: Arc, inherent_data_providers: InherentDataProviders, -) -> ClientResult>> where - B: Backend + 'static, - I: BlockImport> +) -> ClientResult>> where + Inner: BlockImport> + Send + Sync + 'static, - E: CallExecutor + Clone + Send + Sync + 'static, - RA: Send + Sync + 'static, - PRA: ProvideRuntimeApi + ProvideCache + Send + Sync + AuxStore + 'static, - PRA::Api: BlockBuilderApi + BabeApi + ApiExt, + Client: ProvideRuntimeApi + ProvideCache + Send + Sync + AuxStore + 'static, + Client: HeaderBackend + HeaderMetadata, + Client::Api: BlockBuilderApi + BabeApi + ApiExt, { register_babe_inherent_data_provider(&inherent_data_providers, babe_link.config.slot_duration)?; let verifier = BabeVerifier { client: client.clone(), - api, inherent_data_providers, config: babe_link.config, epoch_changes: babe_link.epoch_changes, diff --git a/client/consensus/babe/src/tests.rs b/client/consensus/babe/src/tests.rs index 6c1ffa2c3af..d8696d59442 100644 --- a/client/consensus/babe/src/tests.rs +++ b/client/consensus/babe/src/tests.rs @@ -206,13 +206,7 @@ type TestHeader = ::Header; type TestExtrinsic = ::Extrinsic; pub struct TestVerifier { - inner: BabeVerifier< - substrate_test_runtime_client::Backend, - substrate_test_runtime_client::Executor, - TestBlock, - substrate_test_runtime_client::runtime::RuntimeApi, - PeersFullClient, - >, + inner: BabeVerifier, mutator: Mutator, } @@ -271,7 +265,6 @@ impl TestNetFactory for BabeTestNet { config, client.clone(), client.clone(), - client.clone(), ).expect("can initialize block-import"); let block_import = PanickingBlockImport(block_import); @@ -305,7 +298,6 @@ impl TestNetFactory for BabeTestNet { TestVerifier { inner: BabeVerifier { client: client.clone(), - api: client, inherent_data_providers: data.inherent_data_providers.clone(), config: data.link.config.clone(), epoch_changes: data.link.epoch_changes.clone(), -- GitLab From f93e3120fdee1403aec45d8da5e0e7e345aa5e62 Mon Sep 17 00:00:00 2001 From: s3krit Date: Fri, 21 Feb 2020 13:08:45 +0100 Subject: [PATCH 026/106] Add gitlab job for publishing draft releases (#5009) Idea is much the same as we currently do on polkadot - When a new tag is pushed (that fits our pattern for tags, e.g. v1.2.3), find a list of labelled changes and generate a changelog based on that. Create a draft release on Github and post about it on Matrix. --- .gitlab-ci.yml | 11 ++- scripts/gitlab/lib.sh | 73 +++++++++++++++++++ scripts/gitlab/publish_draft_release.sh | 95 +++++++++++++++++++++++++ 3 files changed, 178 insertions(+), 1 deletion(-) create mode 100755 scripts/gitlab/lib.sh create mode 100755 scripts/gitlab/publish_draft_release.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3b634793adf..36e1da8d108 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -539,7 +539,16 @@ publish-gh-doc: after_script: - rm -vrf ${HOME}/.gitconfig - +publish-draft-release: + stage: publish + image: parity/tools:latest + only: + - tags + - /^v[0-9]+\.[0-9]+\.[0-9]+.*$/ + script: + - ./scripts/gitlab/publish_draft_release.sh + interruptible: true + allow_failure: true .deploy-template: &deploy stage: kubernetes diff --git a/scripts/gitlab/lib.sh b/scripts/gitlab/lib.sh new file mode 100755 index 00000000000..bc0e06a6d46 --- /dev/null +++ b/scripts/gitlab/lib.sh @@ -0,0 +1,73 @@ +#!/bin/sh + +api_base="https://api.github.com/repos" + +# Function to take 2 git tags/commits and get any lines from commit messages +# that contain something that looks like a PR reference: e.g., (#1234) +sanitised_git_logs(){ + git --no-pager log --pretty=format:"%s" "$1..$2" | + # Only find messages referencing a PR + grep -E '\(#[0-9]+\)' | + # Strip any asterisks + sed 's/^* //g' | + # And add them all back + sed 's/^/* /g' +} + +# Checks whether a tag on github has been verified +# repo: 'organization/repo' +# tagver: 'v1.2.3' +# Usage: check_tag $repo $tagver +check_tag () { + repo=$1 + tagver=$2 + tag_out=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$api_base/$repo/git/refs/tags/$tagver") + tag_sha=$(echo "$tag_out" | jq -r .object.sha) + object_url=$(echo "$tag_out" | jq -r .object.url) + if [ "$tag_sha" = "null" ]; then + return 2 + fi + verified_str=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$object_url" | jq -r .verification.verified) + if [ "$verified_str" = "true" ]; then + # Verified, everything is good + return 0 + else + # Not verified. Bad juju. + return 1 + fi +} + +# Checks whether a given PR has a given label. +# repo: 'organization/repo' +# pr_id: 12345 +# label: B1-silent +# Usage: has_label $repo $pr_id $label +has_label(){ + repo="$1" + pr_id="$2" + label="$3" + out=$(curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" -s "$api_base/$repo/pulls/$pr_id") + [ -n "$(echo "$out" | jq ".labels | .[] | select(.name==\"$label\")")" ] +} + +# Formats a message into a JSON string for posting to Matrix +# message: 'any plaintext message' +# formatted_message: 'optional message formatted in html' +# Usage: structure_message $content $formatted_content (optional) +structure_message() { + if [ -z "$2" ]; then + body=$(jq -Rs --arg body "$1" '{"msgtype": "m.text", $body}' < /dev/null) + else + body=$(jq -Rs --arg body "$1" --arg formatted_body "$2" '{"msgtype": "m.text", $body, "format": "org.matrix.custom.html", $formatted_body}' < /dev/null) + fi + echo "$body" +} + +# Post a message to a matrix room +# body: '{body: "JSON string produced by structure_message"}' +# room_id: !fsfSRjgjBWEWffws:matrix.parity.io +# access_token: see https://matrix.org/docs/guides/client-server-api/ +# Usage: send_message $body (json formatted) $room_id $access_token +send_message() { +curl -XPOST -d "$1" "https://matrix.parity.io/_matrix/client/r0/rooms/$2/send/m.room.message?access_token=$3" +} diff --git a/scripts/gitlab/publish_draft_release.sh b/scripts/gitlab/publish_draft_release.sh new file mode 100755 index 00000000000..463d8ee6c85 --- /dev/null +++ b/scripts/gitlab/publish_draft_release.sh @@ -0,0 +1,95 @@ +#!/usr/bin/env bash + +# shellcheck source=lib.sh +source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/lib.sh" + +# Substrate labels for PRs we want to include in the release notes +labels=( + 'B1-runtimenoteworthy' + 'B1-clientnoteworthy' + 'B1-apinoteworthy' +) + +version="$CI_COMMIT_TAG" +last_version=$(git tag -l | sort -V | grep -B 1 -x "$version" | head -n 1) +echo "[+] Version: $version; Previous version: $last_version" + +# Check that a signed tag exists on github for this version +echo '[+] Checking tag has been signed' +#check_tag "paritytech/substrate" "$version" +case $? in + 0) echo '[+] Tag found and has been signed' + ;; + 1) echo '[!] Tag found but has not been signed. Aborting release.'; exit 1 + ;; + 2) echo '[!] Tag not found. Aborting release.'; exit +esac + +all_changes="$(sanitised_git_logs "$last_version" "$version")" +labelled_changes="" +echo "[+] Iterating through $(wc -l <<< "$all_changes") changes to find labelled PRs" +while IFS= read -r line; do + pr_id=$(echo "$line" | sed -E 's/.*#([0-9]+)\)$/\1/') + + # Skip if the PR has the silent label - this allows us to skip a few requests + if has_label 'paritytech/substrate' "$pr_id" 'B0-silent'; then + continue + fi + for label in "${labels[@]}"; do + if has_label 'paritytech/substrate' "$pr_id" "$label"; then + labelled_changes="$labelled_changes +$line" + fi + done +done <<< "$all_changes" + + +release_text="Substrate $version +----------------- +$labelled_changes" + +echo "[+] Release text generated: " +echo "$release_text" +exit +echo "[+] Pushing release to github" +# Create release on github +release_name="Substrate $version" +data=$(jq -Rs --arg version "$version" \ + --arg release_name "$release_name" \ + --arg release_text "$release_text" \ +'{ + "tag_name": $version, + "target_commitish": "master", + "name": $release_name, + "body": $release_text, + "draft": true, + "prerelease": false +}' < /dev/null) + +out=$(curl -s -X POST --data "$data" -H "Authorization: token $GITHUB_RELEASE_TOKEN" "$api_base/paritytech/substrate/releases") + +html_url=$(echo "$out" | jq -r .html_url) + +if [ "$html_url" == "null" ] +then + echo "[!] Something went wrong posting:" + echo "$out" +else + echo "[+] Release draft created: $html_url" +fi + +echo '[+] Sending draft release URL to Matrix' + +msg_body=$(cat <Release pipeline for Substrate $version complete.
+Draft release created: $html_url +EOF +) +send_message "$(structure_message "$msg_body" "$formatted_msg_body")" "$MATRIX_ACCESS_TOKEN" + +echo "[+] Done! Maybe the release worked..." -- GitLab From 97ad80269db3acde1e2349ee96aefa5f517cf385 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Fri, 21 Feb 2020 13:53:01 +0100 Subject: [PATCH 027/106] Add tests & Service's Configuration has optional fields that shouldn't be optional (#4842) Related to #4776 Related to https://github.com/paritytech/polkadot/pull/832 To summarize the changes: 1. I did not manage to validate with types the service's Configuration. But I did reduce the possibility of errors by moving all the "fill" functions to their respective structopts 2. I split params.rs to multiple modules: one module params for just CLI parameters and one module commands for CLI subcommands (and RunCmd). Every command and params are in their own file so things are grouped better together and easier to remove 3. I removed the run and run_subcommand helpers as they are not helping much anymore. Running a command is always a set of 3 commands: 1. init 2. update config 3. run. This still allow the user to change the config before arguments get parsed or right after. 4. I added tests for all subcommands. 5. [deleted] Overall the aim is to improve the situation with the Configuration and the optional parameters, add tests, make the API more consistent and simpler. --- Cargo.lock | 1 + bin/node-template/node/src/command.rs | 39 +- bin/node-template/node/src/main.rs | 6 +- bin/node/cli/Cargo.toml | 1 + bin/node/cli/bin/main.rs | 6 +- bin/node/cli/src/cli.rs | 5 - bin/node/cli/src/command.rs | 62 +- bin/node/cli/tests/build_spec_works.rs | 37 + .../node/cli/tests/check_block_works.rs | 27 +- bin/node/cli/tests/common.rs | 32 +- bin/node/cli/tests/factory.rs | 40 + .../tests/import_export_and_revert_work.rs | 59 + bin/node/cli/tests/inspect_works.rs | 38 + bin/node/cli/tests/purge_chain_works.rs | 30 +- .../tests/running_the_node_and_interrupt.rs | 10 +- bin/node/inspect/src/cli.rs | 182 +-- bin/node/inspect/src/command.rs | 204 +++ bin/node/inspect/src/lib.rs | 17 +- bin/node/transaction-factory/src/lib.rs | 4 +- .../{execution_strategy.rs => arg_enums.rs} | 75 + client/cli/src/commands/build_spec_cmd.rs | 104 ++ client/cli/src/commands/check_block_cmd.rs | 105 ++ client/cli/src/commands/export_blocks_cmd.rs | 113 ++ client/cli/src/commands/import_blocks_cmd.rs | 107 ++ client/cli/src/commands/mod.rs | 145 ++ client/cli/src/commands/purge_chain_cmd.rs | 106 ++ client/cli/src/commands/revert_cmd.rs | 79 ++ client/cli/src/commands/runcmd.rs | 737 ++++++++++ client/cli/src/error.rs | 6 + client/cli/src/lib.rs | 724 +--------- client/cli/src/node_key.rs | 209 --- client/cli/src/params.rs | 1202 ----------------- client/cli/src/params/import_params.rs | 219 +++ client/cli/src/params/mod.rs | 65 + .../params/network_configuration_params.rs | 160 +++ client/cli/src/params/node_key_params.rs | 244 ++++ client/cli/src/params/shared_params.rs | 116 ++ .../cli/src/params/transaction_pool_params.rs | 49 + client/db/src/utils.rs | 1 + client/network/src/config.rs | 10 +- client/service/src/config.rs | 24 +- client/service/test/src/lib.rs | 2 +- utils/frame/benchmarking-cli/src/lib.rs | 42 +- 43 files changed, 3042 insertions(+), 2402 deletions(-) create mode 100644 bin/node/cli/tests/build_spec_works.rs rename client/cli/src/traits.rs => bin/node/cli/tests/check_block_works.rs (57%) create mode 100644 bin/node/cli/tests/factory.rs create mode 100644 bin/node/cli/tests/import_export_and_revert_work.rs create mode 100644 bin/node/cli/tests/inspect_works.rs create mode 100644 bin/node/inspect/src/command.rs rename client/cli/src/{execution_strategy.rs => arg_enums.rs} (51%) create mode 100644 client/cli/src/commands/build_spec_cmd.rs create mode 100644 client/cli/src/commands/check_block_cmd.rs create mode 100644 client/cli/src/commands/export_blocks_cmd.rs create mode 100644 client/cli/src/commands/import_blocks_cmd.rs create mode 100644 client/cli/src/commands/mod.rs create mode 100644 client/cli/src/commands/purge_chain_cmd.rs create mode 100644 client/cli/src/commands/revert_cmd.rs create mode 100644 client/cli/src/commands/runcmd.rs delete mode 100644 client/cli/src/node_key.rs delete mode 100644 client/cli/src/params.rs create mode 100644 client/cli/src/params/import_params.rs create mode 100644 client/cli/src/params/mod.rs create mode 100644 client/cli/src/params/network_configuration_params.rs create mode 100644 client/cli/src/params/node_key_params.rs create mode 100644 client/cli/src/params/shared_params.rs create mode 100644 client/cli/src/params/transaction_pool_params.rs diff --git a/Cargo.lock b/Cargo.lock index dddd6cddadc..4174b5bbc2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3412,6 +3412,7 @@ dependencies = [ "sc-tracing", "sc-transaction-pool", "serde", + "serde_json", "sp-authority-discovery", "sp-consensus", "sp-consensus-babe", diff --git a/bin/node-template/node/src/command.rs b/bin/node-template/node/src/command.rs index e7e386703de..0f4c301dbff 100644 --- a/bin/node-template/node/src/command.rs +++ b/bin/node-template/node/src/command.rs @@ -15,32 +15,35 @@ // along with Substrate. If not, see . use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair}; -use sc_cli::{VersionInfo, error}; +use sc_cli::VersionInfo; use crate::service; use crate::chain_spec; use crate::cli::Cli; /// Parse and run command line arguments -pub fn run(version: VersionInfo) -> error::Result<()> { +pub fn run(version: VersionInfo) -> sc_cli::Result<()> { let opt = sc_cli::from_args::(&version); - let config = sc_service::Configuration::new(&version); + let mut config = sc_service::Configuration::from_version(&version); match opt.subcommand { - Some(subcommand) => sc_cli::run_subcommand( - config, - subcommand, - chain_spec::load_spec, - |config: _| Ok(new_full_start!(config).0), - &version, - ), - None => sc_cli::run( - config, - opt.run, - service::new_light, - service::new_full, - chain_spec::load_spec, - &version, - ) + Some(subcommand) => { + subcommand.init(&version)?; + subcommand.update_config(&mut config, chain_spec::load_spec, &version)?; + subcommand.run( + config, + |config: _| Ok(new_full_start!(config).0), + ) + }, + None => { + opt.run.init(&version)?; + opt.run.update_config(&mut config, chain_spec::load_spec, &version)?; + opt.run.run( + config, + service::new_light, + service::new_full, + &version, + ) + }, } } diff --git a/bin/node-template/node/src/main.rs b/bin/node-template/node/src/main.rs index 9d0a57d77a8..91b2c257e0c 100644 --- a/bin/node-template/node/src/main.rs +++ b/bin/node-template/node/src/main.rs @@ -7,10 +7,8 @@ mod service; mod cli; mod command; -pub use sc_cli::{VersionInfo, error}; - -fn main() -> Result<(), error::Error> { - let version = VersionInfo { +fn main() -> sc_cli::Result<()> { + let version = sc_cli::VersionInfo { name: "Substrate Node", commit: env!("VERGEN_SHA_SHORT"), version: env!("CARGO_PKG_VERSION"), diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml index d383e2c05a9..52be9e1d95f 100644 --- a/bin/node/cli/Cargo.toml +++ b/bin/node/cli/Cargo.toml @@ -107,6 +107,7 @@ futures = "0.3.1" tempfile = "3.1.0" assert_cmd = "0.12" nix = "0.17" +serde_json = "1.0" [build-dependencies] build-script-utils = { version = "2.0.0", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } diff --git a/bin/node/cli/bin/main.rs b/bin/node/cli/bin/main.rs index e951c04710b..8c4412667ba 100644 --- a/bin/node/cli/bin/main.rs +++ b/bin/node/cli/bin/main.rs @@ -18,10 +18,8 @@ #![warn(missing_docs)] -use sc_cli::VersionInfo; - -fn main() -> Result<(), sc_cli::error::Error> { - let version = VersionInfo { +fn main() -> sc_cli::Result<()> { + let version = sc_cli::VersionInfo { name: "Substrate Node", commit: env!("VERGEN_SHA_SHORT"), version: env!("CARGO_PKG_VERSION"), diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs index 40f1dcf6f42..b6db9c3deb7 100644 --- a/bin/node/cli/src/cli.rs +++ b/bin/node/cli/src/cli.rs @@ -19,11 +19,6 @@ use structopt::StructOpt; /// An overarching CLI command definition. #[derive(Clone, Debug, StructOpt)] -#[structopt(settings = &[ - structopt::clap::AppSettings::GlobalVersion, - structopt::clap::AppSettings::ArgsNegateSubcommands, - structopt::clap::AppSettings::SubcommandsNegateReqs, -])] pub struct Cli { /// Possible subcommand with parameters. #[structopt(subcommand)] diff --git a/bin/node/cli/src/command.rs b/bin/node/cli/src/command.rs index 5a942d964c9..dfdf5533f2b 100644 --- a/bin/node/cli/src/command.rs +++ b/bin/node/cli/src/command.rs @@ -14,13 +14,13 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -use sc_cli::{VersionInfo, error}; +use sc_cli::VersionInfo; use sc_service::{Roles as ServiceRoles}; use node_transaction_factory::RuntimeAdapter; use crate::{Cli, service, ChainSpec, load_spec, Subcommand, factory_impl::FactoryState}; /// Parse command line arguments into service configuration. -pub fn run(args: I, version: VersionInfo) -> error::Result<()> +pub fn run(args: I, version: VersionInfo) -> sc_cli::Result<()> where I: Iterator, T: Into + Clone, @@ -28,19 +28,22 @@ where let args: Vec<_> = args.collect(); let opt = sc_cli::from_iter::(args.clone(), &version); - let mut config = sc_service::Configuration::new(&version); + let mut config = sc_service::Configuration::from_version(&version); match opt.subcommand { - None => sc_cli::run( - config, - opt.run, - service::new_light, - service::new_full, - load_spec, - &version, - ), + None => { + opt.run.init(&version)?; + opt.run.update_config(&mut config, load_spec, &version)?; + opt.run.run( + config, + service::new_light, + service::new_full, + &version, + ) + }, Some(Subcommand::Inspect(cmd)) => { - cmd.init(&mut config, load_spec, &version)?; + cmd.init(&version)?; + cmd.update_config(&mut config, load_spec, &version)?; let client = sc_service::new_full_client::< node_runtime::Block, node_runtime::RuntimeApi, node_executor::Executor, _, _, @@ -50,25 +53,27 @@ where cmd.run(inspect) }, Some(Subcommand::Benchmark(cmd)) => { - cmd.init(&mut config, load_spec, &version)?; + cmd.init(&version)?; + cmd.update_config(&mut config, load_spec, &version)?; cmd.run::<_, _, node_runtime::Block, node_executor::Executor>(config) }, Some(Subcommand::Factory(cli_args)) => { - sc_cli::init(&cli_args.shared_params, &version)?; - sc_cli::init_config(&mut config, &cli_args.shared_params, &version, load_spec)?; - sc_cli::fill_import_params( + cli_args.shared_params.init(&version)?; + cli_args.shared_params.update_config(&mut config, load_spec, &version)?; + cli_args.import_params.update_config( &mut config, - &cli_args.import_params, ServiceRoles::FULL, cli_args.shared_params.dev, )?; - sc_cli::fill_config_keystore_in_memory(&mut config)?; + config.use_in_memory_keystore()?; match ChainSpec::from(config.expect_chain_spec().id()) { Some(ref c) if c == &ChainSpec::Development || c == &ChainSpec::LocalTestnet => {}, - _ => panic!("Factory is only supported for development and local testnet."), + _ => return Err( + "Factory is only supported for development and local testnet.".into() + ), } // Setup tracing. @@ -77,7 +82,9 @@ where cli_args.import_params.tracing_receiver.into(), tracing_targets ); if let Err(e) = tracing::subscriber::set_global_default(subscriber) { - panic!("Unable to set global default subscriber {}", e); + return Err( + format!("Unable to set global default subscriber {}", e).into() + ); } } @@ -96,12 +103,13 @@ where Ok(()) }, - Some(Subcommand::Base(subcommand)) => sc_cli::run_subcommand( - config, - subcommand, - load_spec, - |config: service::NodeConfiguration| Ok(new_full_start!(config).0), - &version, - ), + Some(Subcommand::Base(subcommand)) => { + subcommand.init(&version)?; + subcommand.update_config(&mut config, load_spec, &version)?; + subcommand.run( + config, + |config: service::NodeConfiguration| Ok(new_full_start!(config).0), + ) + }, } } diff --git a/bin/node/cli/tests/build_spec_works.rs b/bin/node/cli/tests/build_spec_works.rs new file mode 100644 index 00000000000..2eca71a5b59 --- /dev/null +++ b/bin/node/cli/tests/build_spec_works.rs @@ -0,0 +1,37 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use assert_cmd::cargo::cargo_bin; +use std::process::Command; +use tempfile::tempdir; + +#[test] +fn build_spec_works() { + let base_path = tempdir().expect("could not create a temp dir"); + + let output = Command::new(cargo_bin("substrate")) + .args(&["build-spec", "--dev", "-d"]) + .arg(base_path.path()) + .output() + .unwrap(); + assert!(output.status.success()); + + // Make sure that the `dev` chain folder exists, but the `db` doesn't + assert!(base_path.path().join("chains/dev/").exists()); + assert!(!base_path.path().join("chains/dev/db").exists()); + + let _value: serde_json::Value = serde_json::from_slice(output.stdout.as_slice()).unwrap(); +} diff --git a/client/cli/src/traits.rs b/bin/node/cli/tests/check_block_works.rs similarity index 57% rename from client/cli/src/traits.rs rename to bin/node/cli/tests/check_block_works.rs index 96216a172b9..e4c93c9e885 100644 --- a/client/cli/src/traits.rs +++ b/bin/node/cli/tests/check_block_works.rs @@ -1,4 +1,4 @@ -// Copyright 2017-2020 Parity Technologies (UK) Ltd. +// Copyright 2020 Parity Technologies (UK) Ltd. // This file is part of Substrate. // Substrate is free software: you can redistribute it and/or modify @@ -14,10 +14,25 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -use crate::params::SharedParams; +#![cfg(unix)] -/// Supports getting common params. -pub trait GetSharedParams { - /// Returns shared params if any. - fn shared_params(&self) -> Option<&SharedParams>; +use assert_cmd::cargo::cargo_bin; +use std::process::Command; +use tempfile::tempdir; + +mod common; + +#[test] +fn check_block_works() { + let base_path = tempdir().expect("could not create a temp dir"); + + common::run_command_for_a_while(base_path.path(), false); + + let status = Command::new(cargo_bin("substrate")) + .args(&["check-block", "-d"]) + .arg(base_path.path()) + .arg("1") + .status() + .unwrap(); + assert!(status.success()); } diff --git a/bin/node/cli/tests/common.rs b/bin/node/cli/tests/common.rs index 4044f69d081..93a4a3e4e57 100644 --- a/bin/node/cli/tests/common.rs +++ b/bin/node/cli/tests/common.rs @@ -14,7 +14,14 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -use std::{process::{Child, ExitStatus}, thread, time::Duration}; +#![cfg(unix)] +#![allow(dead_code)] + +use std::{process::{Child, ExitStatus}, thread, time::Duration, path::Path}; +use assert_cmd::cargo::cargo_bin; +use std::{convert::TryInto, process::Command}; +use nix::sys::signal::{kill, Signal::SIGINT}; +use nix::unistd::Pid; /// Wait for the given `child` the given number of `secs`. /// @@ -32,3 +39,26 @@ pub fn wait_for(child: &mut Child, secs: usize) -> Option { None } + +/// Run the node for a while (30 seconds) +pub fn run_command_for_a_while(base_path: &Path, dev: bool) { + let mut cmd = Command::new(cargo_bin("substrate")); + + if dev { + cmd.arg("--dev"); + } + + let mut cmd = cmd + .arg("-d") + .arg(base_path) + .spawn() + .unwrap(); + + // Let it produce some blocks. + thread::sleep(Duration::from_secs(30)); + assert!(cmd.try_wait().unwrap().is_none(), "the process should still be running"); + + // Stop the process + kill(Pid::from_raw(cmd.id().try_into().unwrap()), SIGINT).unwrap(); + assert!(wait_for(&mut cmd, 20).map(|x| x.success()).unwrap_or_default()); +} diff --git a/bin/node/cli/tests/factory.rs b/bin/node/cli/tests/factory.rs new file mode 100644 index 00000000000..2930cd52e2e --- /dev/null +++ b/bin/node/cli/tests/factory.rs @@ -0,0 +1,40 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +#![cfg(unix)] + +use assert_cmd::cargo::cargo_bin; +use std::process::{Command, Stdio}; +use tempfile::tempdir; + +mod common; + +#[test] +fn factory_works() { + let base_path = tempdir().expect("could not create a temp dir"); + + let status = Command::new(cargo_bin("substrate")) + .stdout(Stdio::null()) + .args(&["factory", "--dev", "-d"]) + .arg(base_path.path()) + .status() + .unwrap(); + assert!(status.success()); + + // Make sure that the `dev` chain folder exists & `db` + assert!(base_path.path().join("chains/dev/").exists()); + assert!(base_path.path().join("chains/dev/db").exists()); +} diff --git a/bin/node/cli/tests/import_export_and_revert_work.rs b/bin/node/cli/tests/import_export_and_revert_work.rs new file mode 100644 index 00000000000..e109aa279eb --- /dev/null +++ b/bin/node/cli/tests/import_export_and_revert_work.rs @@ -0,0 +1,59 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +#![cfg(unix)] + +use assert_cmd::cargo::cargo_bin; +use std::{process::Command, fs}; +use tempfile::tempdir; + +mod common; + +#[test] +fn import_export_and_revert_work() { + let base_path = tempdir().expect("could not create a temp dir"); + let exported_blocks = base_path.path().join("exported_blocks"); + + common::run_command_for_a_while(base_path.path(), false); + + let status = Command::new(cargo_bin("substrate")) + .args(&["export-blocks", "-d"]) + .arg(base_path.path()) + .arg(&exported_blocks) + .status() + .unwrap(); + assert!(status.success()); + + let metadata = fs::metadata(&exported_blocks).unwrap(); + assert!(metadata.len() > 0, "file exported_blocks should not be empty"); + + let _ = fs::remove_dir_all(base_path.path().join("db")); + + let status = Command::new(cargo_bin("substrate")) + .args(&["import-blocks", "-d"]) + .arg(base_path.path()) + .arg(&exported_blocks) + .status() + .unwrap(); + assert!(status.success()); + + let status = Command::new(cargo_bin("substrate")) + .args(&["revert", "-d"]) + .arg(base_path.path()) + .status() + .unwrap(); + assert!(status.success()); +} diff --git a/bin/node/cli/tests/inspect_works.rs b/bin/node/cli/tests/inspect_works.rs new file mode 100644 index 00000000000..0bd48c36938 --- /dev/null +++ b/bin/node/cli/tests/inspect_works.rs @@ -0,0 +1,38 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +#![cfg(unix)] + +use assert_cmd::cargo::cargo_bin; +use std::process::Command; +use tempfile::tempdir; + +mod common; + +#[test] +fn inspect_works() { + let base_path = tempdir().expect("could not create a temp dir"); + + common::run_command_for_a_while(base_path.path(), false); + + let status = Command::new(cargo_bin("substrate")) + .args(&["inspect", "-d"]) + .arg(base_path.path()) + .args(&["block", "1"]) + .status() + .unwrap(); + assert!(status.success()); +} diff --git a/bin/node/cli/tests/purge_chain_works.rs b/bin/node/cli/tests/purge_chain_works.rs index e6b71db9910..42a5bc3ce14 100644 --- a/bin/node/cli/tests/purge_chain_works.rs +++ b/bin/node/cli/tests/purge_chain_works.rs @@ -15,39 +15,27 @@ // along with Substrate. If not, see . use assert_cmd::cargo::cargo_bin; -use std::{convert::TryInto, process::Command, thread, time::Duration, fs, path::PathBuf}; +use std::process::Command; +use tempfile::tempdir; mod common; #[test] #[cfg(unix)] fn purge_chain_works() { - use nix::sys::signal::{kill, Signal::SIGINT}; - use nix::unistd::Pid; + let base_path = tempdir().expect("could not create a temp dir"); - let base_path = "purge_chain_test"; - - let _ = fs::remove_dir_all(base_path); - let mut cmd = Command::new(cargo_bin("substrate")) - .args(&["--dev", "-d", base_path]) - .spawn() - .unwrap(); - - // Let it produce some blocks. - thread::sleep(Duration::from_secs(30)); - assert!(cmd.try_wait().unwrap().is_none(), "the process should still be running"); - - // Stop the process - kill(Pid::from_raw(cmd.id().try_into().unwrap()), SIGINT).unwrap(); - assert!(common::wait_for(&mut cmd, 30).map(|x| x.success()).unwrap_or_default()); + common::run_command_for_a_while(base_path.path(), true); let status = Command::new(cargo_bin("substrate")) - .args(&["purge-chain", "--dev", "-d", base_path, "-y"]) + .args(&["purge-chain", "--dev", "-d"]) + .arg(base_path.path()) + .arg("-y") .status() .unwrap(); assert!(status.success()); // Make sure that the `dev` chain folder exists, but the `db` is deleted. - assert!(PathBuf::from(base_path).join("chains/dev/").exists()); - assert!(!PathBuf::from(base_path).join("chains/dev/db").exists()); + assert!(base_path.path().join("chains/dev/").exists()); + assert!(!base_path.path().join("chains/dev/db").exists()); } diff --git a/bin/node/cli/tests/running_the_node_and_interrupt.rs b/bin/node/cli/tests/running_the_node_and_interrupt.rs index dbb57bdd21a..67efedccbe7 100644 --- a/bin/node/cli/tests/running_the_node_and_interrupt.rs +++ b/bin/node/cli/tests/running_the_node_and_interrupt.rs @@ -15,7 +15,8 @@ // along with Substrate. If not, see . use assert_cmd::cargo::cargo_bin; -use std::{convert::TryInto, process::Command, thread, time::Duration, fs}; +use std::{convert::TryInto, process::Command, thread, time::Duration}; +use tempfile::tempdir; mod common; @@ -26,13 +27,14 @@ fn running_the_node_works_and_can_be_interrupted() { use nix::unistd::Pid; fn run_command_and_kill(signal: Signal) { - let _ = fs::remove_dir_all("interrupt_test"); + let base_path = tempdir().expect("could not create a temp dir"); let mut cmd = Command::new(cargo_bin("substrate")) - .args(&["--dev", "-d", "interrupt_test"]) + .args(&["--dev", "-d"]) + .arg(base_path.path()) .spawn() .unwrap(); - thread::sleep(Duration::from_secs(30)); + thread::sleep(Duration::from_secs(20)); assert!(cmd.try_wait().unwrap().is_none(), "the process should still be running"); kill(Pid::from_raw(cmd.id().try_into().unwrap()), signal).unwrap(); assert_eq!( diff --git a/bin/node/inspect/src/cli.rs b/bin/node/inspect/src/cli.rs index 27afcfff919..5d51bd5848f 100644 --- a/bin/node/inspect/src/cli.rs +++ b/bin/node/inspect/src/cli.rs @@ -16,12 +16,8 @@ //! Structs to easily compose inspect sub-command for CLI. -use std::{ - fmt::Debug, - str::FromStr, -}; -use crate::{Inspector, PrettyPrinter}; -use sc_cli::{ImportParams, SharedParams, error}; +use std::fmt::Debug; +use sc_cli::{ImportParams, SharedParams}; use structopt::StructOpt; /// The `inspect` command used to print decoded chain data. @@ -64,177 +60,3 @@ pub enum InspectSubCmd { input: String, }, } - -impl InspectCmd { - /// Parse CLI arguments and initialize given config. - pub fn init( - &self, - config: &mut sc_service::config::Configuration, - spec_factory: impl FnOnce(&str) -> Result>, String>, - version: &sc_cli::VersionInfo, - ) -> error::Result<()> where - G: sc_service::RuntimeGenesis, - E: sc_service::ChainSpecExtension, - { - sc_cli::init_config(config, &self.shared_params, version, spec_factory)?; - // make sure to configure keystore - sc_cli::fill_config_keystore_in_memory(config)?; - // and all import params (especially pruning that has to match db meta) - sc_cli::fill_import_params( - config, - &self.import_params, - sc_service::Roles::FULL, - self.shared_params.dev, - )?; - Ok(()) - } - - /// Run the inspect command, passing the inspector. - pub fn run( - self, - inspect: Inspector, - ) -> error::Result<()> where - B: sp_runtime::traits::Block, - B::Hash: FromStr, - P: PrettyPrinter, - { - match self.command { - InspectSubCmd::Block { input } => { - let input = input.parse()?; - let res = inspect.block(input) - .map_err(|e| format!("{}", e))?; - println!("{}", res); - Ok(()) - }, - InspectSubCmd::Extrinsic { input } => { - let input = input.parse()?; - let res = inspect.extrinsic(input) - .map_err(|e| format!("{}", e))?; - println!("{}", res); - Ok(()) - }, - } - } -} - - -/// A block to retrieve. -#[derive(Debug, Clone, PartialEq)] -pub enum BlockAddress { - /// Get block by hash. - Hash(Hash), - /// Get block by number. - Number(Number), - /// Raw SCALE-encoded bytes. - Bytes(Vec), -} - -impl FromStr for BlockAddress { - type Err = String; - - fn from_str(s: &str) -> Result { - // try to parse hash first - if let Ok(hash) = s.parse() { - return Ok(Self::Hash(hash)) - } - - // then number - if let Ok(number) = s.parse() { - return Ok(Self::Number(number)) - } - - // then assume it's bytes (hex-encoded) - sp_core::bytes::from_hex(s) - .map(Self::Bytes) - .map_err(|e| format!( - "Given string does not look like hash or number. It could not be parsed as bytes either: {}", - e - )) - } -} - -/// An extrinsic address to decode and print out. -#[derive(Debug, Clone, PartialEq)] -pub enum ExtrinsicAddress { - /// Extrinsic as part of existing block. - Block(BlockAddress, usize), - /// Raw SCALE-encoded extrinsic bytes. - Bytes(Vec), -} - -impl FromStr for ExtrinsicAddress { - type Err = String; - - fn from_str(s: &str) -> Result { - // first try raw bytes - if let Ok(bytes) = sp_core::bytes::from_hex(s).map(Self::Bytes) { - return Ok(bytes) - } - - // split by a bunch of different characters - let mut it = s.split(|c| c == '.' || c == ':' || c == ' '); - let block = it.next() - .expect("First element of split iterator is never empty; qed") - .parse()?; - - let index = it.next() - .ok_or_else(|| format!("Extrinsic index missing: example \"5:0\""))? - .parse() - .map_err(|e| format!("Invalid index format: {}", e))?; - - Ok(Self::Block(block, index)) - } -} - - -#[cfg(test)] -mod tests { - use super::*; - use sp_core::hash::H160 as Hash; - - #[test] - fn should_parse_block_strings() { - type BlockAddress = super::BlockAddress; - - let b0 = BlockAddress::from_str("3BfC20f0B9aFcAcE800D73D2191166FF16540258"); - let b1 = BlockAddress::from_str("1234"); - let b2 = BlockAddress::from_str("0"); - let b3 = BlockAddress::from_str("0x0012345f"); - - - assert_eq!(b0, Ok(BlockAddress::Hash( - "3BfC20f0B9aFcAcE800D73D2191166FF16540258".parse().unwrap() - ))); - assert_eq!(b1, Ok(BlockAddress::Number(1234))); - assert_eq!(b2, Ok(BlockAddress::Number(0))); - assert_eq!(b3, Ok(BlockAddress::Bytes(vec![0, 0x12, 0x34, 0x5f]))); - } - - #[test] - fn should_parse_extrinsic_address() { - type BlockAddress = super::BlockAddress; - type ExtrinsicAddress = super::ExtrinsicAddress; - - let e0 = ExtrinsicAddress::from_str("1234"); - let b0 = ExtrinsicAddress::from_str("3BfC20f0B9aFcAcE800D73D2191166FF16540258:5"); - let b1 = ExtrinsicAddress::from_str("1234:0"); - let b2 = ExtrinsicAddress::from_str("0 0"); - let b3 = ExtrinsicAddress::from_str("0x0012345f"); - - - assert_eq!(e0, Err("Extrinsic index missing: example \"5:0\"".into())); - assert_eq!(b0, Ok(ExtrinsicAddress::Block( - BlockAddress::Hash("3BfC20f0B9aFcAcE800D73D2191166FF16540258".parse().unwrap()), - 5 - ))); - assert_eq!(b1, Ok(ExtrinsicAddress::Block( - BlockAddress::Number(1234), - 0 - ))); - assert_eq!(b2, Ok(ExtrinsicAddress::Block( - BlockAddress::Number(0), - 0 - ))); - assert_eq!(b3, Ok(ExtrinsicAddress::Bytes(vec![0, 0x12, 0x34, 0x5f]))); - } -} diff --git a/bin/node/inspect/src/command.rs b/bin/node/inspect/src/command.rs new file mode 100644 index 00000000000..71e70e3e44f --- /dev/null +++ b/bin/node/inspect/src/command.rs @@ -0,0 +1,204 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Command ran by the CLI + +use std::{ + fmt::Debug, + str::FromStr, +}; + +use crate::cli::{InspectCmd, InspectSubCmd}; +use crate::{Inspector, PrettyPrinter}; + +impl InspectCmd { + /// Initialize + pub fn init(&self, version: &sc_cli::VersionInfo) -> sc_cli::Result<()> { + self.shared_params.init(version) + } + + /// Parse CLI arguments and initialize given config. + pub fn update_config( + &self, + mut config: &mut sc_service::config::Configuration, + spec_factory: impl FnOnce(&str) -> Result>, String>, + version: &sc_cli::VersionInfo, + ) -> sc_cli::Result<()> where + G: sc_service::RuntimeGenesis, + E: sc_service::ChainSpecExtension, + { + self.shared_params.update_config(config, spec_factory, version)?; + + // make sure to configure keystore + config.use_in_memory_keystore()?; + + // and all import params (especially pruning that has to match db meta) + self.import_params.update_config( + &mut config, + sc_service::Roles::FULL, + self.shared_params.dev, + )?; + + Ok(()) + } + + /// Run the inspect command, passing the inspector. + pub fn run( + self, + inspect: Inspector, + ) -> sc_cli::Result<()> where + B: sp_runtime::traits::Block, + B::Hash: FromStr, + P: PrettyPrinter, + { + match self.command { + InspectSubCmd::Block { input } => { + let input = input.parse()?; + let res = inspect.block(input) + .map_err(|e| format!("{}", e))?; + println!("{}", res); + Ok(()) + }, + InspectSubCmd::Extrinsic { input } => { + let input = input.parse()?; + let res = inspect.extrinsic(input) + .map_err(|e| format!("{}", e))?; + println!("{}", res); + Ok(()) + }, + } + } +} + +/// A block to retrieve. +#[derive(Debug, Clone, PartialEq)] +pub enum BlockAddress { + /// Get block by hash. + Hash(Hash), + /// Get block by number. + Number(Number), + /// Raw SCALE-encoded bytes. + Bytes(Vec), +} + +impl FromStr for BlockAddress { + type Err = String; + + fn from_str(s: &str) -> Result { + // try to parse hash first + if let Ok(hash) = s.parse() { + return Ok(Self::Hash(hash)) + } + + // then number + if let Ok(number) = s.parse() { + return Ok(Self::Number(number)) + } + + // then assume it's bytes (hex-encoded) + sp_core::bytes::from_hex(s) + .map(Self::Bytes) + .map_err(|e| format!( + "Given string does not look like hash or number. It could not be parsed as bytes either: {}", + e + )) + } +} + +/// An extrinsic address to decode and print out. +#[derive(Debug, Clone, PartialEq)] +pub enum ExtrinsicAddress { + /// Extrinsic as part of existing block. + Block(BlockAddress, usize), + /// Raw SCALE-encoded extrinsic bytes. + Bytes(Vec), +} + +impl FromStr for ExtrinsicAddress { + type Err = String; + + fn from_str(s: &str) -> Result { + // first try raw bytes + if let Ok(bytes) = sp_core::bytes::from_hex(s).map(Self::Bytes) { + return Ok(bytes) + } + + // split by a bunch of different characters + let mut it = s.split(|c| c == '.' || c == ':' || c == ' '); + let block = it.next() + .expect("First element of split iterator is never empty; qed") + .parse()?; + + let index = it.next() + .ok_or_else(|| format!("Extrinsic index missing: example \"5:0\""))? + .parse() + .map_err(|e| format!("Invalid index format: {}", e))?; + + Ok(Self::Block(block, index)) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use sp_core::hash::H160 as Hash; + + #[test] + fn should_parse_block_strings() { + type BlockAddress = super::BlockAddress; + + let b0 = BlockAddress::from_str("3BfC20f0B9aFcAcE800D73D2191166FF16540258"); + let b1 = BlockAddress::from_str("1234"); + let b2 = BlockAddress::from_str("0"); + let b3 = BlockAddress::from_str("0x0012345f"); + + + assert_eq!(b0, Ok(BlockAddress::Hash( + "3BfC20f0B9aFcAcE800D73D2191166FF16540258".parse().unwrap() + ))); + assert_eq!(b1, Ok(BlockAddress::Number(1234))); + assert_eq!(b2, Ok(BlockAddress::Number(0))); + assert_eq!(b3, Ok(BlockAddress::Bytes(vec![0, 0x12, 0x34, 0x5f]))); + } + + #[test] + fn should_parse_extrinsic_address() { + type BlockAddress = super::BlockAddress; + type ExtrinsicAddress = super::ExtrinsicAddress; + + let e0 = ExtrinsicAddress::from_str("1234"); + let b0 = ExtrinsicAddress::from_str("3BfC20f0B9aFcAcE800D73D2191166FF16540258:5"); + let b1 = ExtrinsicAddress::from_str("1234:0"); + let b2 = ExtrinsicAddress::from_str("0 0"); + let b3 = ExtrinsicAddress::from_str("0x0012345f"); + + + assert_eq!(e0, Err("Extrinsic index missing: example \"5:0\"".into())); + assert_eq!(b0, Ok(ExtrinsicAddress::Block( + BlockAddress::Hash("3BfC20f0B9aFcAcE800D73D2191166FF16540258".parse().unwrap()), + 5 + ))); + assert_eq!(b1, Ok(ExtrinsicAddress::Block( + BlockAddress::Number(1234), + 0 + ))); + assert_eq!(b2, Ok(ExtrinsicAddress::Block( + BlockAddress::Number(0), + 0 + ))); + assert_eq!(b3, Ok(ExtrinsicAddress::Bytes(vec![0, 0x12, 0x34, 0x5f]))); + } +} diff --git a/bin/node/inspect/src/lib.rs b/bin/node/inspect/src/lib.rs index 5c4e18c0a74..cd32f08e9fe 100644 --- a/bin/node/inspect/src/lib.rs +++ b/bin/node/inspect/src/lib.rs @@ -23,6 +23,7 @@ #![warn(missing_docs)] pub mod cli; +pub mod command; use std::{ fmt, @@ -37,8 +38,10 @@ use sp_runtime::{ traits::{Block, HashFor, NumberFor, Hash} }; +use command::{BlockAddress, ExtrinsicAddress}; + /// A helper type for a generic block input. -pub type BlockAddressFor = cli::BlockAddress< +pub type BlockAddressFor = BlockAddress< as Hash>::Output, NumberFor >; @@ -148,10 +151,10 @@ impl> Inspector fn get_block(&self, input: BlockAddressFor) -> Result { Ok(match input { - cli::BlockAddress::Bytes(bytes) => { + BlockAddress::Bytes(bytes) => { TBlock::decode(&mut &*bytes)? }, - cli::BlockAddress::Number(number) => { + BlockAddress::Number(number) => { let id = BlockId::number(number); let not_found = format!("Could not find block {:?}", id); let body = self.chain.block_body(&id)? @@ -160,7 +163,7 @@ impl> Inspector .ok_or_else(|| Error::NotFound(not_found.clone()))?; TBlock::new(header, body) }, - cli::BlockAddress::Hash(hash) => { + BlockAddress::Hash(hash) => { let id = BlockId::hash(hash); let not_found = format!("Could not find block {:?}", id); let body = self.chain.block_body(&id)? @@ -175,7 +178,7 @@ impl> Inspector /// Get a pretty-printed extrinsic. pub fn extrinsic( &self, - input: cli::ExtrinsicAddress< as Hash>::Output, NumberFor>, + input: ExtrinsicAddress< as Hash>::Output, NumberFor>, ) -> Result { struct ExtrinsicPrinter<'a, A: Block, B>(A::Extrinsic, &'a B); impl<'a, A: Block, B: PrettyPrinter> fmt::Display for ExtrinsicPrinter<'a, A, B> { @@ -185,7 +188,7 @@ impl> Inspector } let ext = match input { - cli::ExtrinsicAddress::Block(block, index) => { + ExtrinsicAddress::Block(block, index) => { let block = self.get_block(block)?; block.extrinsics() .get(index) @@ -194,7 +197,7 @@ impl> Inspector "Could not find extrinsic {} in block {:?}", index, block )))? }, - cli::ExtrinsicAddress::Bytes(bytes) => { + ExtrinsicAddress::Bytes(bytes) => { TBlock::Extrinsic::decode(&mut &*bytes)? } }; diff --git a/bin/node/transaction-factory/src/lib.rs b/bin/node/transaction-factory/src/lib.rs index 7dafeed4061..a4c001145ac 100644 --- a/bin/node/transaction-factory/src/lib.rs +++ b/bin/node/transaction-factory/src/lib.rs @@ -83,7 +83,7 @@ pub fn factory( mut factory_state: RA, client: &Arc>, select_chain: &Sc, -) -> sc_cli::error::Result<()> +) -> sc_cli::Result<()> where Block: BlockT, Exec: sc_client::CallExecutor + Send + Sync + Clone, @@ -97,7 +97,7 @@ where RA: RuntimeAdapter, Block::Hash: From, { - let best_header: Result<::Header, sc_cli::error::Error> = + let best_header: Result<::Header, sc_cli::Error> = select_chain.best_chain().map_err(|e| format!("{:?}", e).into()); let mut best_hash = best_header?.hash(); let mut best_block_id = BlockId::::hash(best_hash); diff --git a/client/cli/src/execution_strategy.rs b/client/cli/src/arg_enums.rs similarity index 51% rename from client/cli/src/execution_strategy.rs rename to client/cli/src/arg_enums.rs index 888d7b6c4a0..384087bec0d 100644 --- a/client/cli/src/execution_strategy.rs +++ b/client/cli/src/arg_enums.rs @@ -14,10 +14,74 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . +// NOTE: we allow missing docs here because arg_enum! creates the function variants without doc #![allow(missing_docs)] use structopt::clap::arg_enum; +arg_enum! { + /// How to execute Wasm runtime code + #[allow(missing_docs)] + #[derive(Debug, Clone, Copy)] + pub enum WasmExecutionMethod { + // Uses an interpreter. + Interpreted, + // Uses a compiled runtime. + Compiled, + } +} + +impl WasmExecutionMethod { + /// Returns list of variants that are not disabled by feature flags. + pub fn enabled_variants() -> Vec<&'static str> { + Self::variants() + .iter() + .cloned() + .filter(|&name| cfg!(feature = "wasmtime") || name != "Compiled") + .collect() + } +} + +impl Into for WasmExecutionMethod { + fn into(self) -> sc_service::config::WasmExecutionMethod { + match self { + WasmExecutionMethod::Interpreted => sc_service::config::WasmExecutionMethod::Interpreted, + #[cfg(feature = "wasmtime")] + WasmExecutionMethod::Compiled => sc_service::config::WasmExecutionMethod::Compiled, + #[cfg(not(feature = "wasmtime"))] + WasmExecutionMethod::Compiled => panic!( + "Substrate must be compiled with \"wasmtime\" feature for compiled Wasm execution" + ), + } + } +} + +arg_enum! { + #[allow(missing_docs)] + #[derive(Debug, Copy, Clone, PartialEq, Eq)] + pub enum TracingReceiver { + Log, + Telemetry, + } +} + +impl Into for TracingReceiver { + fn into(self) -> sc_tracing::TracingReceiver { + match self { + TracingReceiver::Log => sc_tracing::TracingReceiver::Log, + TracingReceiver::Telemetry => sc_tracing::TracingReceiver::Telemetry, + } + } +} + +arg_enum! { + #[allow(missing_docs)] + #[derive(Debug, Copy, Clone, PartialEq, Eq)] + pub enum NodeKeyType { + Ed25519 + } +} + arg_enum! { /// How to execute blocks #[derive(Debug, Clone, Copy, PartialEq, Eq)] @@ -33,6 +97,17 @@ arg_enum! { } } +impl Into for ExecutionStrategy { + fn into(self) -> sc_client_api::ExecutionStrategy { + match self { + ExecutionStrategy::Native => sc_client_api::ExecutionStrategy::NativeWhenPossible, + ExecutionStrategy::Wasm => sc_client_api::ExecutionStrategy::AlwaysWasm, + ExecutionStrategy::Both => sc_client_api::ExecutionStrategy::Both, + ExecutionStrategy::NativeElseWasm => sc_client_api::ExecutionStrategy::NativeElseWasm, + } + } +} + impl ExecutionStrategy { /// Returns the variant as `'&static str`. pub fn as_str(&self) -> &'static str { diff --git a/client/cli/src/commands/build_spec_cmd.rs b/client/cli/src/commands/build_spec_cmd.rs new file mode 100644 index 00000000000..9b71207efab --- /dev/null +++ b/client/cli/src/commands/build_spec_cmd.rs @@ -0,0 +1,104 @@ +// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use structopt::StructOpt; +use log::info; +use sc_network::config::build_multiaddr; +use sc_service::{Configuration, ChainSpecExtension, RuntimeGenesis, ChainSpec}; + +use crate::error; +use crate::VersionInfo; +use crate::params::SharedParams; +use crate::params::NodeKeyParams; + +/// The `build-spec` command used to build a specification. +#[derive(Debug, StructOpt, Clone)] +pub struct BuildSpecCmd { + /// Force raw genesis storage output. + #[structopt(long = "raw")] + pub raw: bool, + + /// Disable adding the default bootnode to the specification. + /// + /// By default the `/ip4/127.0.0.1/tcp/30333/p2p/NODE_PEER_ID` bootnode is added to the + /// specification when no bootnode exists. + #[structopt(long = "disable-default-bootnode")] + pub disable_default_bootnode: bool, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub shared_params: SharedParams, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub node_key_params: NodeKeyParams, +} + +impl BuildSpecCmd { + /// Run the build-spec command + pub fn run( + self, + config: Configuration, + ) -> error::Result<()> + where + G: RuntimeGenesis, + E: ChainSpecExtension, + { + info!("Building chain spec"); + let mut spec = config.expect_chain_spec().clone(); + let raw_output = self.raw; + + if spec.boot_nodes().is_empty() && !self.disable_default_bootnode { + let keys = config.network.node_key.into_keypair()?; + let peer_id = keys.public().into_peer_id(); + let addr = build_multiaddr![ + Ip4([127, 0, 0, 1]), + Tcp(30333u16), + P2p(peer_id) + ]; + spec.add_boot_node(addr) + } + + let json = sc_service::chain_ops::build_spec(spec, raw_output)?; + + print!("{}", json); + + Ok(()) + } + + /// Update and prepare a `Configuration` with command line parameters + pub fn update_config( + &self, + mut config: &mut Configuration, + spec_factory: F, + version: &VersionInfo, + ) -> error::Result<()> where + G: RuntimeGenesis, + E: ChainSpecExtension, + F: FnOnce(&str) -> Result>, String>, + { + self.shared_params.update_config(&mut config, spec_factory, version)?; + + let net_config_path = config + .in_chain_config_dir(crate::commands::DEFAULT_NETWORK_CONFIG_PATH) + .expect("We provided a base_path"); + + self.node_key_params.update_config(&mut config, Some(&net_config_path))?; + + Ok(()) + } +} + diff --git a/client/cli/src/commands/check_block_cmd.rs b/client/cli/src/commands/check_block_cmd.rs new file mode 100644 index 00000000000..1036be16de4 --- /dev/null +++ b/client/cli/src/commands/check_block_cmd.rs @@ -0,0 +1,105 @@ +// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use std::fmt::Debug; +use std::str::FromStr; +use structopt::StructOpt; +use sc_service::{ + Configuration, ChainSpecExtension, RuntimeGenesis, ServiceBuilderCommand, Roles, ChainSpec, +}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; +use sp_runtime::generic::BlockId; + +use crate::error; +use crate::VersionInfo; +use crate::runtime::run_until_exit; +use crate::params::SharedParams; +use crate::params::ImportParams; + +/// The `check-block` command used to validate blocks. +#[derive(Debug, StructOpt, Clone)] +pub struct CheckBlockCmd { + /// Block hash or number + #[structopt(value_name = "HASH or NUMBER")] + pub input: String, + + /// The default number of 64KB pages to ever allocate for Wasm execution. + /// + /// Don't alter this unless you know what you're doing. + #[structopt(long = "default-heap-pages", value_name = "COUNT")] + pub default_heap_pages: Option, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub shared_params: SharedParams, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub import_params: ImportParams, +} + +impl CheckBlockCmd { + /// Run the check-block command + pub fn run( + self, + config: Configuration, + builder: B, + ) -> error::Result<()> + where + B: FnOnce(Configuration) -> Result, + G: RuntimeGenesis, + E: ChainSpecExtension, + BC: ServiceBuilderCommand + Unpin, + BB: sp_runtime::traits::Block + Debug, + <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, + ::Hash: std::str::FromStr, + { + let input = if self.input.starts_with("0x") { &self.input[2..] } else { &self.input[..] }; + let block_id = match FromStr::from_str(input) { + Ok(hash) => BlockId::hash(hash), + Err(_) => match self.input.parse::() { + Ok(n) => BlockId::number((n as u32).into()), + Err(_) => return Err(error::Error::Input("Invalid hash or number specified".into())), + } + }; + + let start = std::time::Instant::now(); + run_until_exit(config, |config| { + Ok(builder(config)?.check_block(block_id)) + })?; + println!("Completed in {} ms.", start.elapsed().as_millis()); + + Ok(()) + } + + /// Update and prepare a `Configuration` with command line parameters + pub fn update_config( + &self, + mut config: &mut Configuration, + spec_factory: F, + version: &VersionInfo, + ) -> error::Result<()> where + G: RuntimeGenesis, + E: ChainSpecExtension, + F: FnOnce(&str) -> Result>, String>, + { + self.shared_params.update_config(&mut config, spec_factory, version)?; + self.import_params.update_config(&mut config, Roles::FULL, self.shared_params.dev)?; + config.use_in_memory_keystore()?; + + Ok(()) + } +} diff --git a/client/cli/src/commands/export_blocks_cmd.rs b/client/cli/src/commands/export_blocks_cmd.rs new file mode 100644 index 00000000000..8db650ae8c8 --- /dev/null +++ b/client/cli/src/commands/export_blocks_cmd.rs @@ -0,0 +1,113 @@ +// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use std::io; +use std::fs; +use std::path::PathBuf; +use std::fmt::Debug; +use log::info; +use structopt::StructOpt; +use sc_service::{ + Configuration, ChainSpecExtension, RuntimeGenesis, ServiceBuilderCommand, ChainSpec, + config::DatabaseConfig, +}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; + +use crate::error; +use crate::VersionInfo; +use crate::runtime::run_until_exit; +use crate::params::SharedParams; +use crate::params::BlockNumber; + +/// The `export-blocks` command used to export blocks. +#[derive(Debug, StructOpt, Clone)] +pub struct ExportBlocksCmd { + /// Output file name or stdout if unspecified. + #[structopt(parse(from_os_str))] + pub output: Option, + + /// Specify starting block number. + /// + /// Default is 1. + #[structopt(long = "from", value_name = "BLOCK")] + pub from: Option, + + /// Specify last block number. + /// + /// Default is best block. + #[structopt(long = "to", value_name = "BLOCK")] + pub to: Option, + + /// Use JSON output rather than binary. + #[structopt(long = "json")] + pub json: bool, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub shared_params: SharedParams, +} + +impl ExportBlocksCmd { + /// Run the export-blocks command + pub fn run( + self, + config: Configuration, + builder: B, + ) -> error::Result<()> + where + B: FnOnce(Configuration) -> Result, + G: RuntimeGenesis, + E: ChainSpecExtension, + BC: ServiceBuilderCommand + Unpin, + BB: sp_runtime::traits::Block + Debug, + <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, + ::Hash: std::str::FromStr, + { + if let DatabaseConfig::Path { ref path, .. } = config.expect_database() { + info!("DB path: {}", path.display()); + } + let from = self.from.as_ref().and_then(|f| f.parse().ok()).unwrap_or(1); + let to = self.to.as_ref().and_then(|t| t.parse().ok()); + + let json = self.json; + + let file: Box = match &self.output { + Some(filename) => Box::new(fs::File::create(filename)?), + None => Box::new(io::stdout()), + }; + + run_until_exit(config, |config| { + Ok(builder(config)?.export_blocks(file, from.into(), to, json)) + }) + } + + /// Update and prepare a `Configuration` with command line parameters + pub fn update_config( + &self, + mut config: &mut Configuration, + spec_factory: F, + version: &VersionInfo, + ) -> error::Result<()> where + G: RuntimeGenesis, + E: ChainSpecExtension, + F: FnOnce(&str) -> Result>, String>, + { + self.shared_params.update_config(&mut config, spec_factory, version)?; + config.use_in_memory_keystore()?; + + Ok(()) + } +} diff --git a/client/cli/src/commands/import_blocks_cmd.rs b/client/cli/src/commands/import_blocks_cmd.rs new file mode 100644 index 00000000000..60a57ab78d1 --- /dev/null +++ b/client/cli/src/commands/import_blocks_cmd.rs @@ -0,0 +1,107 @@ +// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use std::fmt::Debug; +use std::io::{Read, Seek, self}; +use std::fs; +use std::path::PathBuf; +use structopt::StructOpt; +use sc_service::{ + Configuration, ChainSpecExtension, RuntimeGenesis, ServiceBuilderCommand, ChainSpec, Roles, +}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; + +use crate::error; +use crate::VersionInfo; +use crate::runtime::run_until_exit; +use crate::params::SharedParams; +use crate::params::ImportParams; + +/// The `import-blocks` command used to import blocks. +#[derive(Debug, StructOpt, Clone)] +pub struct ImportBlocksCmd { + /// Input file or stdin if unspecified. + #[structopt(parse(from_os_str))] + pub input: Option, + + /// The default number of 64KB pages to ever allocate for Wasm execution. + /// + /// Don't alter this unless you know what you're doing. + #[structopt(long = "default-heap-pages", value_name = "COUNT")] + pub default_heap_pages: Option, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub shared_params: SharedParams, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub import_params: ImportParams, +} + +/// Internal trait used to cast to a dynamic type that implements Read and Seek. +trait ReadPlusSeek: Read + Seek {} + +impl ReadPlusSeek for T {} + +impl ImportBlocksCmd { + /// Run the import-blocks command + pub fn run( + self, + config: Configuration, + builder: B, + ) -> error::Result<()> + where + B: FnOnce(Configuration) -> Result, + G: RuntimeGenesis, + E: ChainSpecExtension, + BC: ServiceBuilderCommand + Unpin, + BB: sp_runtime::traits::Block + Debug, + <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, + ::Hash: std::str::FromStr, + { + let file: Box = match &self.input { + Some(filename) => Box::new(fs::File::open(filename)?), + None => { + let mut buffer = Vec::new(); + io::stdin().read_to_end(&mut buffer)?; + Box::new(io::Cursor::new(buffer)) + }, + }; + + run_until_exit(config, |config| { + Ok(builder(config)?.import_blocks(file, false)) + }) + } + + /// Update and prepare a `Configuration` with command line parameters + pub fn update_config( + &self, + mut config: &mut Configuration, + spec_factory: F, + version: &VersionInfo, + ) -> error::Result<()> where + G: RuntimeGenesis, + E: ChainSpecExtension, + F: FnOnce(&str) -> Result>, String>, + { + self.shared_params.update_config(&mut config, spec_factory, version)?; + self.import_params.update_config(&mut config, Roles::FULL, self.shared_params.dev)?; + config.use_in_memory_keystore()?; + + Ok(()) + } +} diff --git a/client/cli/src/commands/mod.rs b/client/cli/src/commands/mod.rs new file mode 100644 index 00000000000..e9f991c7458 --- /dev/null +++ b/client/cli/src/commands/mod.rs @@ -0,0 +1,145 @@ +// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +mod runcmd; +mod export_blocks_cmd; +mod build_spec_cmd; +mod import_blocks_cmd; +mod check_block_cmd; +mod revert_cmd; +mod purge_chain_cmd; + +use std::fmt::Debug; +use structopt::StructOpt; + +use sc_service::{ + Configuration, ChainSpecExtension, RuntimeGenesis, ServiceBuilderCommand, ChainSpec, +}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; + +use crate::error; +use crate::VersionInfo; +use crate::params::SharedParams; + +pub use crate::commands::runcmd::RunCmd; +pub use crate::commands::export_blocks_cmd::ExportBlocksCmd; +pub use crate::commands::build_spec_cmd::BuildSpecCmd; +pub use crate::commands::import_blocks_cmd::ImportBlocksCmd; +pub use crate::commands::check_block_cmd::CheckBlockCmd; +pub use crate::commands::revert_cmd::RevertCmd; +pub use crate::commands::purge_chain_cmd::PurgeChainCmd; + +/// default sub directory to store network config +const DEFAULT_NETWORK_CONFIG_PATH : &'static str = "network"; + +/// All core commands that are provided by default. +/// +/// The core commands are split into multiple subcommands and `Run` is the default subcommand. From +/// the CLI user perspective, it is not visible that `Run` is a subcommand. So, all parameters of +/// `Run` are exported as main executable parameters. +#[derive(Debug, Clone, StructOpt)] +pub enum Subcommand { + /// Build a spec.json file, outputing to stdout. + BuildSpec(build_spec_cmd::BuildSpecCmd), + + /// Export blocks to a file. + ExportBlocks(export_blocks_cmd::ExportBlocksCmd), + + /// Import blocks from file. + ImportBlocks(import_blocks_cmd::ImportBlocksCmd), + + /// Validate a single block. + CheckBlock(check_block_cmd::CheckBlockCmd), + + /// Revert chain to the previous state. + Revert(revert_cmd::RevertCmd), + + /// Remove the whole chain data. + PurgeChain(purge_chain_cmd::PurgeChainCmd), +} + +impl Subcommand { + /// Get the shared parameters of a `CoreParams` command + pub fn get_shared_params(&self) -> &SharedParams { + use Subcommand::*; + + match self { + BuildSpec(params) => ¶ms.shared_params, + ExportBlocks(params) => ¶ms.shared_params, + ImportBlocks(params) => ¶ms.shared_params, + CheckBlock(params) => ¶ms.shared_params, + Revert(params) => ¶ms.shared_params, + PurgeChain(params) => ¶ms.shared_params, + } + } + + /// Run any `CoreParams` command + pub fn run( + self, + config: Configuration, + builder: B, + ) -> error::Result<()> + where + B: FnOnce(Configuration) -> Result, + G: RuntimeGenesis, + E: ChainSpecExtension, + BC: ServiceBuilderCommand + Unpin, + BB: sp_runtime::traits::Block + Debug, + <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, + ::Hash: std::str::FromStr, + { + match self { + Subcommand::BuildSpec(cmd) => cmd.run(config), + Subcommand::ExportBlocks(cmd) => cmd.run(config, builder), + Subcommand::ImportBlocks(cmd) => cmd.run(config, builder), + Subcommand::CheckBlock(cmd) => cmd.run(config, builder), + Subcommand::PurgeChain(cmd) => cmd.run(config), + Subcommand::Revert(cmd) => cmd.run(config, builder), + } + } + + /// Update and prepare a `Configuration` with command line parameters + pub fn update_config( + &self, + mut config: &mut Configuration, + spec_factory: F, + version: &VersionInfo, + ) -> error::Result<()> where + G: RuntimeGenesis, + E: ChainSpecExtension, + F: FnOnce(&str) -> Result>, String>, + { + match self { + Subcommand::BuildSpec(cmd) => cmd.update_config(&mut config, spec_factory, version), + Subcommand::ExportBlocks(cmd) => cmd.update_config(&mut config, spec_factory, version), + Subcommand::ImportBlocks(cmd) => cmd.update_config(&mut config, spec_factory, version), + Subcommand::CheckBlock(cmd) => cmd.update_config(&mut config, spec_factory, version), + Subcommand::PurgeChain(cmd) => cmd.update_config(&mut config, spec_factory, version), + Subcommand::Revert(cmd) => cmd.update_config(&mut config, spec_factory, version), + } + } + + /// Initialize substrate. This must be done only once. + /// + /// This method: + /// + /// 1. Set the panic handler + /// 2. Raise the FD limit + /// 3. Initialize the logger + pub fn init(&self, version: &VersionInfo) -> error::Result<()> { + self.get_shared_params().init(version) + } +} diff --git a/client/cli/src/commands/purge_chain_cmd.rs b/client/cli/src/commands/purge_chain_cmd.rs new file mode 100644 index 00000000000..b7c559e5cc3 --- /dev/null +++ b/client/cli/src/commands/purge_chain_cmd.rs @@ -0,0 +1,106 @@ +// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use std::fmt::Debug; +use std::io::{Write, self}; +use std::fs; +use structopt::StructOpt; +use sc_service::{ + Configuration, ChainSpecExtension, RuntimeGenesis, ChainSpec, + config::{DatabaseConfig}, +}; + +use crate::error; +use crate::VersionInfo; +use crate::params::SharedParams; + +/// The `purge-chain` command used to remove the whole chain. +#[derive(Debug, StructOpt, Clone)] +pub struct PurgeChainCmd { + /// Skip interactive prompt by answering yes automatically. + #[structopt(short = "y")] + pub yes: bool, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub shared_params: SharedParams, +} + +impl PurgeChainCmd { + /// Run the purge command + pub fn run( + self, + config: Configuration, + ) -> error::Result<()> + where + G: RuntimeGenesis, + E: ChainSpecExtension, + { + let db_path = match config.expect_database() { + DatabaseConfig::Path { path, .. } => path, + _ => { + eprintln!("Cannot purge custom database implementation"); + return Ok(()); + } + }; + + if !self.yes { + print!("Are you sure to remove {:?}? [y/N]: ", &db_path); + io::stdout().flush().expect("failed to flush stdout"); + + let mut input = String::new(); + io::stdin().read_line(&mut input)?; + let input = input.trim(); + + match input.chars().nth(0) { + Some('y') | Some('Y') => {}, + _ => { + println!("Aborted"); + return Ok(()); + }, + } + } + + match fs::remove_dir_all(&db_path) { + Ok(_) => { + println!("{:?} removed.", &db_path); + Ok(()) + }, + Err(ref err) if err.kind() == io::ErrorKind::NotFound => { + eprintln!("{:?} did not exist.", &db_path); + Ok(()) + }, + Err(err) => Result::Err(err.into()) + } + } + + /// Update and prepare a `Configuration` with command line parameters + pub fn update_config( + &self, + mut config: &mut Configuration, + spec_factory: F, + version: &VersionInfo, + ) -> error::Result<()> where + G: RuntimeGenesis, + E: ChainSpecExtension, + F: FnOnce(&str) -> Result>, String>, + { + self.shared_params.update_config(&mut config, spec_factory, version)?; + config.use_in_memory_keystore()?; + + Ok(()) + } +} diff --git a/client/cli/src/commands/revert_cmd.rs b/client/cli/src/commands/revert_cmd.rs new file mode 100644 index 00000000000..9ab86986cdd --- /dev/null +++ b/client/cli/src/commands/revert_cmd.rs @@ -0,0 +1,79 @@ +// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use std::fmt::Debug; +use structopt::StructOpt; +use sc_service::{ + Configuration, ChainSpecExtension, RuntimeGenesis, ServiceBuilderCommand, ChainSpec, +}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; + +use crate::error; +use crate::VersionInfo; +use crate::params::BlockNumber; +use crate::params::SharedParams; + +/// The `revert` command used revert the chain to a previous state. +#[derive(Debug, StructOpt, Clone)] +pub struct RevertCmd { + /// Number of blocks to revert. + #[structopt(default_value = "256")] + pub num: BlockNumber, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub shared_params: SharedParams, +} + +impl RevertCmd { + /// Run the revert command + pub fn run( + self, + config: Configuration, + builder: B, + ) -> error::Result<()> + where + B: FnOnce(Configuration) -> Result, + G: RuntimeGenesis, + E: ChainSpecExtension, + BC: ServiceBuilderCommand + Unpin, + BB: sp_runtime::traits::Block + Debug, + <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, + ::Hash: std::str::FromStr, + { + let blocks = self.num.parse()?; + builder(config)?.revert_chain(blocks)?; + + Ok(()) + } + + /// Update and prepare a `Configuration` with command line parameters + pub fn update_config( + &self, + mut config: &mut Configuration, + spec_factory: F, + version: &VersionInfo, + ) -> error::Result<()> where + G: RuntimeGenesis, + E: ChainSpecExtension, + F: FnOnce(&str) -> Result>, String>, + { + self.shared_params.update_config(&mut config, spec_factory, version)?; + config.use_in_memory_keystore()?; + + Ok(()) + } +} diff --git a/client/cli/src/commands/runcmd.rs b/client/cli/src/commands/runcmd.rs new file mode 100644 index 00000000000..f29bc3c743b --- /dev/null +++ b/client/cli/src/commands/runcmd.rs @@ -0,0 +1,737 @@ +// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use std::path::PathBuf; +use std::net::SocketAddr; +use std::fs; +use log::info; +use structopt::{StructOpt, clap::arg_enum}; +use names::{Generator, Name}; +use regex::Regex; +use chrono::prelude::*; +use sc_service::{ + AbstractService, Configuration, ChainSpecExtension, RuntimeGenesis, ChainSpec, Roles, + config::KeystoreConfig, +}; +use sc_telemetry::TelemetryEndpoints; + +use crate::VersionInfo; +use crate::error; +use crate::params::ImportParams; +use crate::params::SharedParams; +use crate::params::NetworkConfigurationParams; +use crate::params::TransactionPoolParams; +use crate::runtime::run_service_until_exit; + +/// The maximum number of characters for a node name. +const NODE_NAME_MAX_LENGTH: usize = 32; + +/// default sub directory for the key store +const DEFAULT_KEYSTORE_CONFIG_PATH : &'static str = "keystore"; + +arg_enum! { + /// Whether off-chain workers are enabled. + #[allow(missing_docs)] + #[derive(Debug, Clone)] + pub enum OffchainWorkerEnabled { + Always, + Never, + WhenValidating, + } +} + +/// The `run` command used to run a node. +#[derive(Debug, StructOpt, Clone)] +pub struct RunCmd { + /// Enable validator mode. + /// + /// The node will be started with the authority role and actively + /// participate in any consensus task that it can (e.g. depending on + /// availability of local keys). + #[structopt( + long = "validator", + conflicts_with_all = &[ "sentry" ] + )] + pub validator: bool, + + /// Enable sentry mode. + /// + /// The node will be started with the authority role and participate in + /// consensus tasks as an "observer", it will never actively participate + /// regardless of whether it could (e.g. keys are available locally). This + /// mode is useful as a secure proxy for validators (which would run + /// detached from the network), since we want this node to participate in + /// the full consensus protocols in order to have all needed consensus data + /// available to relay to private nodes. + #[structopt( + long = "sentry", + conflicts_with_all = &[ "validator", "light" ] + )] + pub sentry: bool, + + /// Disable GRANDPA voter when running in validator mode, otherwise disables the GRANDPA observer. + #[structopt(long = "no-grandpa")] + pub no_grandpa: bool, + + /// Experimental: Run in light client mode. + #[structopt(long = "light", conflicts_with = "sentry")] + pub light: bool, + + /// Listen to all RPC interfaces. + /// + /// Default is local. Note: not all RPC methods are safe to be exposed publicly. Use a RPC proxy + /// server to filter out dangerous methods. More details: https://github.com/paritytech/substrate/wiki/Public-RPC. + /// Use `--unsafe-rpc-external` to suppress the warning if you understand the risks. + #[structopt(long = "rpc-external")] + pub rpc_external: bool, + + /// Listen to all RPC interfaces. + /// + /// Same as `--rpc-external`. + #[structopt(long = "unsafe-rpc-external")] + pub unsafe_rpc_external: bool, + + /// Listen to all Websocket interfaces. + /// + /// Default is local. Note: not all RPC methods are safe to be exposed publicly. Use a RPC proxy + /// server to filter out dangerous methods. More details: https://github.com/paritytech/substrate/wiki/Public-RPC. + /// Use `--unsafe-ws-external` to suppress the warning if you understand the risks. + #[structopt(long = "ws-external")] + pub ws_external: bool, + + /// Listen to all Websocket interfaces. + /// + /// Same as `--ws-external` but doesn't warn you about it. + #[structopt(long = "unsafe-ws-external")] + pub unsafe_ws_external: bool, + + /// Listen to all Prometheus data source interfaces. + /// + /// Default is local. + #[structopt(long = "prometheus-external")] + pub prometheus_external: bool, + + /// Specify HTTP RPC server TCP port. + #[structopt(long = "rpc-port", value_name = "PORT")] + pub rpc_port: Option, + + /// Specify WebSockets RPC server TCP port. + #[structopt(long = "ws-port", value_name = "PORT")] + pub ws_port: Option, + + /// Maximum number of WS RPC server connections. + #[structopt(long = "ws-max-connections", value_name = "COUNT")] + pub ws_max_connections: Option, + + /// Specify browser Origins allowed to access the HTTP & WS RPC servers. + /// + /// A comma-separated list of origins (protocol://domain or special `null` + /// value). Value of `all` will disable origin validation. Default is to + /// allow localhost, https://polkadot.js.org and + /// https://substrate-ui.parity.io origins. When running in --dev mode the + /// default is to allow all origins. + #[structopt(long = "rpc-cors", value_name = "ORIGINS", parse(try_from_str = parse_cors))] + pub rpc_cors: Option, + + /// Specify Prometheus data source server TCP Port. + #[structopt(long = "prometheus-port", value_name = "PORT")] + pub prometheus_port: Option, + + /// Do not expose a Prometheus metric endpoint. + /// + /// Prometheus metric endpoint is enabled by default. + #[structopt(long = "no-prometheus")] + pub no_prometheus: bool, + + /// The human-readable name for this node. + /// + /// The node name will be reported to the telemetry server, if enabled. + #[structopt(long = "name", value_name = "NAME")] + pub name: Option, + + /// Disable connecting to the Substrate telemetry server. + /// + /// Telemetry is on by default on global chains. + #[structopt(long = "no-telemetry")] + pub no_telemetry: bool, + + /// The URL of the telemetry server to connect to. + /// + /// This flag can be passed multiple times as a mean to specify multiple + /// telemetry endpoints. Verbosity levels range from 0-9, with 0 denoting + /// the least verbosity. If no verbosity level is specified the default is + /// 0. + #[structopt(long = "telemetry-url", value_name = "URL VERBOSITY", parse(try_from_str = parse_telemetry_endpoints))] + pub telemetry_endpoints: Vec<(String, u8)>, + + /// Should execute offchain workers on every block. + /// + /// By default it's only enabled for nodes that are authoring new blocks. + #[structopt( + long = "offchain-worker", + value_name = "ENABLED", + possible_values = &OffchainWorkerEnabled::variants(), + case_insensitive = true, + default_value = "WhenValidating" + )] + pub offchain_worker: OffchainWorkerEnabled, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub shared_params: SharedParams, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub import_params: ImportParams, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub network_config: NetworkConfigurationParams, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub pool_config: TransactionPoolParams, + + /// Shortcut for `--name Alice --validator` with session keys for `Alice` added to keystore. + #[structopt(long, conflicts_with_all = &["bob", "charlie", "dave", "eve", "ferdie", "one", "two"])] + pub alice: bool, + + /// Shortcut for `--name Bob --validator` with session keys for `Bob` added to keystore. + #[structopt(long, conflicts_with_all = &["alice", "charlie", "dave", "eve", "ferdie", "one", "two"])] + pub bob: bool, + + /// Shortcut for `--name Charlie --validator` with session keys for `Charlie` added to keystore. + #[structopt(long, conflicts_with_all = &["alice", "bob", "dave", "eve", "ferdie", "one", "two"])] + pub charlie: bool, + + /// Shortcut for `--name Dave --validator` with session keys for `Dave` added to keystore. + #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "eve", "ferdie", "one", "two"])] + pub dave: bool, + + /// Shortcut for `--name Eve --validator` with session keys for `Eve` added to keystore. + #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "ferdie", "one", "two"])] + pub eve: bool, + + /// Shortcut for `--name Ferdie --validator` with session keys for `Ferdie` added to keystore. + #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "one", "two"])] + pub ferdie: bool, + + /// Shortcut for `--name One --validator` with session keys for `One` added to keystore. + #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "two"])] + pub one: bool, + + /// Shortcut for `--name Two --validator` with session keys for `Two` added to keystore. + #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "one"])] + pub two: bool, + + /// Enable authoring even when offline. + #[structopt(long = "force-authoring")] + pub force_authoring: bool, + + /// Specify custom keystore path. + #[structopt(long = "keystore-path", value_name = "PATH", parse(from_os_str))] + pub keystore_path: Option, + + /// Use interactive shell for entering the password used by the keystore. + #[structopt( + long = "password-interactive", + conflicts_with_all = &[ "password", "password-filename" ] + )] + pub password_interactive: bool, + + /// Password used by the keystore. + #[structopt( + long = "password", + conflicts_with_all = &[ "password-interactive", "password-filename" ] + )] + pub password: Option, + + /// File that contains the password used by the keystore. + #[structopt( + long = "password-filename", + value_name = "PATH", + parse(from_os_str), + conflicts_with_all = &[ "password-interactive", "password" ] + )] + pub password_filename: Option +} + +impl RunCmd { + /// Get the `Sr25519Keyring` matching one of the flag + pub fn get_keyring(&self) -> Option { + use sp_keyring::Sr25519Keyring::*; + + if self.alice { Some(Alice) } + else if self.bob { Some(Bob) } + else if self.charlie { Some(Charlie) } + else if self.dave { Some(Dave) } + else if self.eve { Some(Eve) } + else if self.ferdie { Some(Ferdie) } + else if self.one { Some(One) } + else if self.two { Some(Two) } + else { None } + } + + /// Update and prepare a `Configuration` with command line parameters of `RunCmd` and `VersionInfo` + pub fn update_config( + &self, + mut config: &mut Configuration, + spec_factory: F, + version: &VersionInfo, + ) -> error::Result<()> + where + G: RuntimeGenesis, + E: ChainSpecExtension, + F: FnOnce(&str) -> Result>, String>, + { + self.shared_params.update_config(&mut config, spec_factory, version)?; + + let password = if self.password_interactive { + #[cfg(not(target_os = "unknown"))] + { + Some(input_keystore_password()?.into()) + } + #[cfg(target_os = "unknown")] + None + } else if let Some(ref file) = self.password_filename { + Some(fs::read_to_string(file).map_err(|e| format!("{}", e))?.into()) + } else if let Some(ref password) = self.password { + Some(password.clone().into()) + } else { + None + }; + + let path = self.keystore_path.clone().or( + config.in_chain_config_dir(DEFAULT_KEYSTORE_CONFIG_PATH) + ); + + config.keystore = KeystoreConfig::Path { + path: path.ok_or_else(|| "No `base_path` provided to create keystore path!".to_string())?, + password, + }; + + let keyring = self.get_keyring(); + let is_dev = self.shared_params.dev; + let is_light = self.light; + let is_authority = (self.validator || self.sentry || is_dev || keyring.is_some()) + && !is_light; + let role = + if is_light { + sc_service::Roles::LIGHT + } else if is_authority { + sc_service::Roles::AUTHORITY + } else { + sc_service::Roles::FULL + }; + + self.import_params.update_config(&mut config, role, is_dev)?; + + config.name = match (self.name.as_ref(), keyring) { + (Some(name), _) => name.to_string(), + (_, Some(keyring)) => keyring.to_string(), + (None, None) => generate_node_name(), + }; + if let Err(msg) = is_node_name_valid(&config.name) { + return Err(error::Error::Input( + format!("Invalid node name '{}'. Reason: {}. If unsure, use none.", + config.name, + msg, + ) + )); + } + + // set sentry mode (i.e. act as an authority but **never** actively participate) + config.sentry_mode = self.sentry; + + config.offchain_worker = match (&self.offchain_worker, role) { + (OffchainWorkerEnabled::WhenValidating, sc_service::Roles::AUTHORITY) => true, + (OffchainWorkerEnabled::Always, _) => true, + (OffchainWorkerEnabled::Never, _) => false, + (OffchainWorkerEnabled::WhenValidating, _) => false, + }; + + config.roles = role; + config.disable_grandpa = self.no_grandpa; + + let client_id = config.client_id(); + let network_path = config + .in_chain_config_dir(crate::commands::DEFAULT_NETWORK_CONFIG_PATH) + .expect("We provided a basepath"); + self.network_config.update_config( + &mut config, + network_path, + client_id, + is_dev, + )?; + + self.pool_config.update_config(&mut config)?; + + config.dev_key_seed = keyring + .map(|a| format!("//{}", a)).or_else(|| { + if is_dev && !is_light { + Some("//Alice".into()) + } else { + None + } + }); + + if config.rpc_http.is_none() || self.rpc_port.is_some() { + let rpc_interface: &str = interface_str(self.rpc_external, self.unsafe_rpc_external, self.validator)?; + config.rpc_http = Some(parse_address(&format!("{}:{}", rpc_interface, 9933), self.rpc_port)?); + } + if config.rpc_ws.is_none() || self.ws_port.is_some() { + let ws_interface: &str = interface_str(self.ws_external, self.unsafe_ws_external, self.validator)?; + config.rpc_ws = Some(parse_address(&format!("{}:{}", ws_interface, 9944), self.ws_port)?); + } + + config.rpc_ws_max_connections = self.ws_max_connections; + config.rpc_cors = self.rpc_cors.clone().unwrap_or_else(|| if is_dev { + log::warn!("Running in --dev mode, RPC CORS has been disabled."); + Cors::All + } else { + Cors::List(vec![ + "http://localhost:*".into(), + "http://127.0.0.1:*".into(), + "https://localhost:*".into(), + "https://127.0.0.1:*".into(), + "https://polkadot.js.org".into(), + "https://substrate-ui.parity.io".into(), + ]) + }).into(); + + // Override telemetry + if self.no_telemetry { + config.telemetry_endpoints = None; + } else if !self.telemetry_endpoints.is_empty() { + config.telemetry_endpoints = Some( + TelemetryEndpoints::new(self.telemetry_endpoints.clone()) + ); + } + + // Override prometheus + if self.no_prometheus { + config.prometheus_port = None; + } else if config.prometheus_port.is_none() { + let prometheus_interface: &str = if self.prometheus_external { "0.0.0.0" } else { "127.0.0.1" }; + config.prometheus_port = Some( + parse_address(&format!("{}:{}", prometheus_interface, 9615), self.prometheus_port)?); + } + + config.tracing_targets = self.import_params.tracing_targets.clone().into(); + config.tracing_receiver = self.import_params.tracing_receiver.clone().into(); + + // Imply forced authoring on --dev + config.force_authoring = self.shared_params.dev || self.force_authoring; + + Ok(()) + } + + /// Run the command that runs the node + pub fn run( + self, + config: Configuration, + new_light: FNL, + new_full: FNF, + version: &VersionInfo, + ) -> error::Result<()> + where + G: RuntimeGenesis, + E: ChainSpecExtension, + FNL: FnOnce(Configuration) -> Result, + FNF: FnOnce(Configuration) -> Result, + SL: AbstractService + Unpin, + SF: AbstractService + Unpin, + { + info!("{}", version.name); + info!(" version {}", config.full_version()); + info!(" by {}, {}-{}", version.author, version.copyright_start_year, Local::today().year()); + info!("Chain specification: {}", config.expect_chain_spec().name()); + info!("Node name: {}", config.name); + info!("Roles: {}", config.display_role()); + + match config.roles { + Roles::LIGHT => run_service_until_exit( + config, + new_light, + ), + _ => run_service_until_exit( + config, + new_full, + ), + } + } + + /// Initialize substrate. This must be done only once. + /// + /// This method: + /// + /// 1. Set the panic handler + /// 2. Raise the FD limit + /// 3. Initialize the logger + pub fn init(&self, version: &VersionInfo) -> error::Result<()> { + self.shared_params.init(version) + } +} + +/// Check whether a node name is considered as valid +pub fn is_node_name_valid(_name: &str) -> Result<(), &str> { + let name = _name.to_string(); + if name.chars().count() >= NODE_NAME_MAX_LENGTH { + return Err("Node name too long"); + } + + let invalid_chars = r"[\\.@]"; + let re = Regex::new(invalid_chars).unwrap(); + if re.is_match(&name) { + return Err("Node name should not contain invalid chars such as '.' and '@'"); + } + + let invalid_patterns = r"(https?:\\/+)?(www)+"; + let re = Regex::new(invalid_patterns).unwrap(); + if re.is_match(&name) { + return Err("Node name should not contain urls"); + } + + Ok(()) +} + +#[cfg(not(target_os = "unknown"))] +fn input_keystore_password() -> Result { + rpassword::read_password_from_tty(Some("Keystore password: ")) + .map_err(|e| format!("{:?}", e)) +} + +fn generate_node_name() -> String { + let result = loop { + let node_name = Generator::with_naming(Name::Numbered).next().unwrap(); + let count = node_name.chars().count(); + + if count < NODE_NAME_MAX_LENGTH { + break node_name + } + }; + + result +} + +fn parse_address( + address: &str, + port: Option, +) -> Result { + let mut address: SocketAddr = address.parse().map_err( + |_| format!("Invalid address: {}", address) + )?; + if let Some(port) = port { + address.set_port(port); + } + + Ok(address) +} + +fn interface_str( + is_external: bool, + is_unsafe_external: bool, + is_validator: bool, +) -> Result<&'static str, error::Error> { + if is_external && is_validator { + return Err(error::Error::Input("--rpc-external and --ws-external options shouldn't be \ + used if the node is running as a validator. Use `--unsafe-rpc-external` if you understand \ + the risks. See the options description for more information.".to_owned())); + } + + if is_external || is_unsafe_external { + log::warn!("It isn't safe to expose RPC publicly without a proxy server that filters \ + available set of RPC methods."); + + Ok("0.0.0.0") + } else { + Ok("127.0.0.1") + } +} + +/// Default to verbosity level 0, if none is provided. +fn parse_telemetry_endpoints(s: &str) -> Result<(String, u8), Box> { + let pos = s.find(' '); + match pos { + None => { + Ok((s.to_owned(), 0)) + }, + Some(pos_) => { + let verbosity = s[pos_ + 1..].parse()?; + let url = s[..pos_].parse()?; + Ok((url, verbosity)) + } + } +} + +/// CORS setting +/// +/// The type is introduced to overcome `Option>` +/// handling of `structopt`. +#[derive(Clone, Debug)] +pub enum Cors { + /// All hosts allowed + All, + /// Only hosts on the list are allowed. + List(Vec), +} + +impl From for Option> { + fn from(cors: Cors) -> Self { + match cors { + Cors::All => None, + Cors::List(list) => Some(list), + } + } +} + +/// Parse cors origins +fn parse_cors(s: &str) -> Result> { + let mut is_all = false; + let mut origins = Vec::new(); + for part in s.split(',') { + match part { + "all" | "*" => { + is_all = true; + break; + }, + other => origins.push(other.to_owned()), + } + } + + Ok(if is_all { Cors::All } else { Cors::List(origins) }) +} + +#[cfg(test)] +mod tests { + use super::*; + use sc_service::config::DatabaseConfig; + + const TEST_VERSION_INFO: &'static VersionInfo = &VersionInfo { + name: "node-test", + version: "0.1.0", + commit: "some_commit", + executable_name: "node-test", + description: "description", + author: "author", + support_url: "http://example.org", + copyright_start_year: 2020, + }; + + #[test] + fn tests_node_name_good() { + assert!(is_node_name_valid("short name").is_ok()); + } + + #[test] + fn tests_node_name_bad() { + assert!(is_node_name_valid("long names are not very cool for the ui").is_err()); + assert!(is_node_name_valid("Dots.not.Ok").is_err()); + assert!(is_node_name_valid("http://visit.me").is_err()); + assert!(is_node_name_valid("https://visit.me").is_err()); + assert!(is_node_name_valid("www.visit.me").is_err()); + assert!(is_node_name_valid("email@domain").is_err()); + } + + #[test] + fn keystore_path_is_generated_correctly() { + let chain_spec = ChainSpec::from_genesis( + "test", + "test-id", + || (), + Vec::new(), + None, + None, + None, + None::<()>, + ); + + for keystore_path in vec![None, Some("/keystore/path")] { + let args: Vec<&str> = vec![]; + let mut cli = RunCmd::from_iter(args); + cli.keystore_path = keystore_path.clone().map(PathBuf::from); + + let mut config = Configuration::default(); + config.config_dir = Some(PathBuf::from("/test/path")); + config.chain_spec = Some(chain_spec.clone()); + let chain_spec = chain_spec.clone(); + cli.update_config(&mut config, move |_| Ok(Some(chain_spec)), TEST_VERSION_INFO).unwrap(); + + let expected_path = match keystore_path { + Some(path) => PathBuf::from(path), + None => PathBuf::from("/test/path/chains/test-id/keystore"), + }; + + assert_eq!(expected_path, config.keystore.path().unwrap().to_owned()); + } + } + + #[test] + fn ensure_load_spec_provide_defaults() { + let chain_spec = ChainSpec::from_genesis( + "test", + "test-id", + || (), + vec!["boo".to_string()], + Some(TelemetryEndpoints::new(vec![("foo".to_string(), 42)])), + None, + None, + None::<()>, + ); + + let args: Vec<&str> = vec![]; + let cli = RunCmd::from_iter(args); + + let mut config = Configuration::from_version(TEST_VERSION_INFO); + cli.update_config(&mut config, |_| Ok(Some(chain_spec)), TEST_VERSION_INFO).unwrap(); + + assert!(config.chain_spec.is_some()); + assert!(!config.network.boot_nodes.is_empty()); + assert!(config.telemetry_endpoints.is_some()); + } + + #[test] + fn ensure_update_config_for_running_node_provides_defaults() { + let chain_spec = ChainSpec::from_genesis( + "test", + "test-id", + || (), + vec![], + None, + None, + None, + None::<()>, + ); + + let args: Vec<&str> = vec![]; + let cli = RunCmd::from_iter(args); + + let mut config = Configuration::from_version(TEST_VERSION_INFO); + cli.init(&TEST_VERSION_INFO).unwrap(); + cli.update_config(&mut config, |_| Ok(Some(chain_spec)), TEST_VERSION_INFO).unwrap(); + + assert!(config.config_dir.is_some()); + assert!(config.database.is_some()); + if let Some(DatabaseConfig::Path { ref cache_size, .. }) = config.database { + assert!(cache_size.is_some()); + } else { + panic!("invalid config.database variant"); + } + assert!(!config.name.is_empty()); + assert!(config.network.config_path.is_some()); + assert!(!config.network.listen_addresses.is_empty()); + } +} diff --git a/client/cli/src/error.rs b/client/cli/src/error.rs index 074cb353c3a..edc1adecc76 100644 --- a/client/cli/src/error.rs +++ b/client/cli/src/error.rs @@ -49,6 +49,12 @@ impl std::convert::From for Error { } } +impl std::convert::From<&str> for Error { + fn from(s: &str) -> Error { + Error::Input(s.to_string()) + } +} + impl std::error::Error for Error { fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { match self { diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 3517dca3789..e28edebd60d 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -19,127 +19,33 @@ #![warn(missing_docs)] #![warn(unused_extern_crates)] -#[macro_use] -mod traits; mod params; -mod execution_strategy; -pub mod error; +mod arg_enums; +mod error; mod runtime; -mod node_key; - -use sc_client_api::execution_extensions::ExecutionStrategies; -use sc_service::{ - config::{Configuration, DatabaseConfig, KeystoreConfig}, - ServiceBuilderCommand, - RuntimeGenesis, ChainSpecExtension, PruningMode, ChainSpec, - AbstractService, Roles as ServiceRoles, -}; +mod commands; + pub use sc_service::config::VersionInfo; -use sc_network::{ - self, - multiaddr::Protocol, - config::{ - NetworkConfiguration, TransportConfig, NonReservedPeerMode, - }, -}; - -use std::{ - io::Write, iter, fmt::Debug, fs, - net::{Ipv4Addr, SocketAddr}, path::PathBuf, -}; + +use std::io::Write; use regex::Regex; -use structopt::{StructOpt, clap}; +use structopt::{StructOpt, clap::{self, AppSettings}}; pub use structopt; -use params::{ - NetworkConfigurationParams, TransactionPoolParams, Cors, -}; -pub use params::{ - SharedParams, ImportParams, ExecutionStrategy, Subcommand, RunCmd, BuildSpecCmd, - ExportBlocksCmd, ImportBlocksCmd, CheckBlockCmd, PurgeChainCmd, RevertCmd, - WasmExecutionMethod, -}; -pub use traits::GetSharedParams; -use app_dirs::{AppInfo, AppDataType}; +pub use params::*; +pub use commands::*; +pub use arg_enums::*; +pub use error::*; use log::info; use lazy_static::lazy_static; -use sc_telemetry::TelemetryEndpoints; -use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; pub use crate::runtime::{run_until_exit, run_service_until_exit}; -use execution_strategy::*; -use names::{Generator, Name}; -use chrono::prelude::*; - -/// default sub directory to store network config -const DEFAULT_NETWORK_CONFIG_PATH : &'static str = "network"; -/// default sub directory to store database -const DEFAULT_DB_CONFIG_PATH : &'static str = "db"; -/// default sub directory for the key store -const DEFAULT_KEYSTORE_CONFIG_PATH : &'static str = "keystore"; - -/// The maximum number of characters for a node name. -const NODE_NAME_MAX_LENGTH: usize = 32; - -fn get_chain_key(cli: &SharedParams) -> String { - match cli.chain { - Some(ref chain) => chain.clone(), - None => if cli.dev { "dev".into() } else { "".into() } - } -} - -fn generate_node_name() -> String { - let result = loop { - let node_name = Generator::with_naming(Name::Numbered).next().unwrap(); - let count = node_name.chars().count(); - - if count < NODE_NAME_MAX_LENGTH { - break node_name - } - }; - - result -} - -/// Load spec to `Configuration` from shared params and spec factory. -pub fn load_spec<'a, G, E, F>( - mut config: &'a mut Configuration, - cli: &SharedParams, - factory: F, -) -> error::Result<&'a ChainSpec> where - G: RuntimeGenesis, - E: ChainSpecExtension, - F: FnOnce(&str) -> Result>, String>, -{ - let chain_key = get_chain_key(cli); - let spec = match factory(&chain_key)? { - Some(spec) => spec, - None => ChainSpec::from_json_file(PathBuf::from(chain_key))? - }; - - config.network.boot_nodes = spec.boot_nodes().to_vec(); - config.telemetry_endpoints = spec.telemetry_endpoints().clone(); - - config.chain_spec = Some(spec); - - Ok(config.chain_spec.as_ref().unwrap()) -} - -fn base_path(cli: &SharedParams, version: &VersionInfo) -> PathBuf { - cli.base_path.clone() - .unwrap_or_else(|| - app_dirs::get_app_root( - AppDataType::UserData, - &AppInfo { - name: version.executable_name, - author: version.author - } - ).expect("app directories exist on all supported platforms; qed") - ) -} /// Helper function used to parse the command line arguments. This is the equivalent of -/// `structopt`'s `from_args()` except that it takes a `VersionInfo` argument to provide the name of -/// the application, author, "about" and version. +/// `structopt`'s `from_iter()` except that it takes a `VersionInfo` argument to provide the name of +/// the application, author, "about" and version. It will also set `AppSettings::GlobalVersion`. +/// +/// To allow running the node without subcommand, tt also sets a few more settings: +/// `AppSettings::ArgsNegateSubcommands` and `AppSettings::SubcommandsNegateReqs`. /// /// Gets the struct from the command line arguments. Print the /// error message and quit the program in case of failure. @@ -152,7 +58,10 @@ where /// Helper function used to parse the command line arguments. This is the equivalent of /// `structopt`'s `from_iter()` except that it takes a `VersionInfo` argument to provide the name of -/// the application, author, "about" and version. +/// the application, author, "about" and version. It will also set `AppSettings::GlobalVersion`. +/// +/// To allow running the node without subcommand, tt also sets a few more settings: +/// `AppSettings::ArgsNegateSubcommands` and `AppSettings::SubcommandsNegateReqs`. /// /// Gets the struct from any iterator such as a `Vec` of your making. /// Print the error message and quit the program in case of failure. @@ -174,14 +83,22 @@ where .name(version.executable_name) .author(version.author) .about(version.description) - .version(full_version.as_str()); + .version(full_version.as_str()) + .settings(&[ + AppSettings::GlobalVersion, + AppSettings::ArgsNegateSubcommands, + AppSettings::SubcommandsNegateReqs, + ]); T::from_clap(&app.get_matches_from(iter)) } /// Helper function used to parse the command line arguments. This is the equivalent of -/// `structopt`'s `try_from_iter()` except that it takes a `VersionInfo` argument to provide the -/// name of the application, author, "about" and version. +/// `structopt`'s `from_iter()` except that it takes a `VersionInfo` argument to provide the name of +/// the application, author, "about" and version. It will also set `AppSettings::GlobalVersion`. +/// +/// To allow running the node without subcommand, tt also sets a few more settings: +/// `AppSettings::ArgsNegateSubcommands` and `AppSettings::SubcommandsNegateReqs`. /// /// Gets the struct from any iterator such as a `Vec` of your making. /// Print the error message and quit the program in case of failure. @@ -215,53 +132,6 @@ where Ok(T::from_clap(&matches)) } -/// A helper function that initializes and runs the node -pub fn run( - mut config: Configuration, - run_cmd: RunCmd, - new_light: FNL, - new_full: FNF, - spec_factory: F, - version: &VersionInfo, -) -> error::Result<()> -where - F: FnOnce(&str) -> Result>, String>, - FNL: FnOnce(Configuration) -> Result, - FNF: FnOnce(Configuration) -> Result, - G: RuntimeGenesis, - E: ChainSpecExtension, - SL: AbstractService + Unpin, - SF: AbstractService + Unpin, -{ - init(&run_cmd.shared_params, version)?; - init_config(&mut config, &run_cmd.shared_params, version, spec_factory)?; - run_cmd.run(config, new_light, new_full, version) -} - -/// A helper function that initializes and runs any of the subcommand variants of `CoreParams`. -pub fn run_subcommand( - mut config: Configuration, - subcommand: Subcommand, - spec_factory: F, - builder: B, - version: &VersionInfo, -) -> error::Result<()> -where - F: FnOnce(&str) -> Result>, String>, - B: FnOnce(Configuration) -> Result, - G: RuntimeGenesis, - E: ChainSpecExtension, - BC: ServiceBuilderCommand + Unpin, - BB: sp_runtime::traits::Block + Debug, - <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, - ::Hash: std::str::FromStr, -{ - let shared_params = subcommand.get_shared_params(); - init(shared_params, version)?; - init_config(&mut config, shared_params, version, spec_factory)?; - subcommand.run(config, builder) -} - /// Initialize substrate. This must be done only once. /// /// This method: @@ -269,7 +139,7 @@ where /// 1. Set the panic handler /// 2. Raise the FD limit /// 3. Initialize the logger -pub fn init(shared_params: &SharedParams, version: &VersionInfo) -> error::Result<()> { +pub fn init(logger_pattern: &str, version: &VersionInfo) -> error::Result<()> { let full_version = sc_service::config::full_version_from_strs( version.version, version.commit @@ -277,426 +147,11 @@ pub fn init(shared_params: &SharedParams, version: &VersionInfo) -> error::Resul sp_panic_handler::set(version.support_url, &full_version); fdlimit::raise_fd_limit(); - init_logger(shared_params.log.as_ref().map(|v| v.as_ref()).unwrap_or("")); - - Ok(()) -} - -/// Initialize the given `config`. -/// -/// This will load the chain spec, set the `config_dir` and the `database_dir`. -pub fn init_config( - config: &mut Configuration, - shared_params: &SharedParams, - version: &VersionInfo, - spec_factory: F, -) -> error::Result<()> where - F: FnOnce(&str) -> Result>, String>, - G: RuntimeGenesis, - E: ChainSpecExtension, -{ - load_spec(config, shared_params, spec_factory)?; - - if config.config_dir.is_none() { - config.config_dir = Some(base_path(&shared_params, version)); - } - - if config.database.is_none() { - config.database = Some(DatabaseConfig::Path { - path: config - .in_chain_config_dir(DEFAULT_DB_CONFIG_PATH) - .expect("We provided a base_path/config_dir."), - cache_size: None, - }); - } - - Ok(()) -} - -/// Run the node -/// -/// Builds and runs either a full or a light node, depending on the `role` within the `Configuration`. -pub fn run_node( - config: Configuration, - new_light: FNL, - new_full: FNF, - version: &VersionInfo, -) -> error::Result<()> -where - FNL: FnOnce(Configuration) -> Result, - FNF: FnOnce(Configuration) -> Result, - G: RuntimeGenesis, - E: ChainSpecExtension, - SL: AbstractService + Unpin, - SF: AbstractService + Unpin, -{ - info!("{}", version.name); - info!(" version {}", config.full_version()); - info!(" by {}, {}-{}", version.author, version.copyright_start_year, Local::today().year()); - info!("Chain specification: {}", config.expect_chain_spec().name()); - info!("Node name: {}", config.name); - info!("Roles: {}", display_role(&config)); - - match config.roles { - ServiceRoles::LIGHT => run_service_until_exit( - config, - new_light, - ), - _ => run_service_until_exit( - config, - new_full, - ), - } -} - -/// Returns a string displaying the node role, special casing the sentry mode -/// (returning `SENTRY`), since the node technically has an `AUTHORITY` role but -/// doesn't participate. -pub fn display_role(config: &Configuration) -> String { - if config.sentry_mode { - "SENTRY".to_string() - } else { - format!("{:?}", config.roles) - } -} - -/// Fill the given `PoolConfiguration` by looking at the cli parameters. -fn fill_transaction_pool_configuration( - options: &mut Configuration, - params: TransactionPoolParams, -) -> error::Result<()> { - // ready queue - options.transaction_pool.ready.count = params.pool_limit; - options.transaction_pool.ready.total_bytes = params.pool_kbytes * 1024; - - // future queue - let factor = 10; - options.transaction_pool.future.count = params.pool_limit / factor; - options.transaction_pool.future.total_bytes = params.pool_kbytes * 1024 / factor; - - Ok(()) -} - -/// Fill the given `NetworkConfiguration` by looking at the cli parameters. -fn fill_network_configuration( - cli: NetworkConfigurationParams, - config_path: PathBuf, - config: &mut NetworkConfiguration, - client_id: String, - is_dev: bool, -) -> error::Result<()> { - config.boot_nodes.extend(cli.bootnodes.into_iter()); - config.config_path = Some(config_path.to_string_lossy().into()); - config.net_config_path = config.config_path.clone(); - - config.reserved_nodes.extend(cli.reserved_nodes.into_iter()); - if cli.reserved_only { - config.non_reserved_mode = NonReservedPeerMode::Deny; - } - - config.sentry_nodes.extend(cli.sentry_nodes.into_iter()); - - for addr in cli.listen_addr.iter() { - let addr = addr.parse().ok().ok_or(error::Error::InvalidListenMultiaddress)?; - config.listen_addresses.push(addr); - } - - if config.listen_addresses.is_empty() { - let port = match cli.port { - Some(port) => port, - None => 30333, - }; - - config.listen_addresses = vec![ - iter::once(Protocol::Ip4(Ipv4Addr::new(0, 0, 0, 0))) - .chain(iter::once(Protocol::Tcp(port))) - .collect() - ]; - } - - config.client_version = client_id; - config.node_key = node_key::node_key_config(cli.node_key_params, &config.net_config_path)?; - - config.in_peers = cli.in_peers; - config.out_peers = cli.out_peers; - - config.transport = TransportConfig::Normal { - enable_mdns: !is_dev && !cli.no_mdns, - allow_private_ipv4: !cli.no_private_ipv4, - wasm_external_transport: None, - use_yamux_flow_control: cli.use_yamux_flow_control - }; - - config.max_parallel_downloads = cli.max_parallel_downloads; - - Ok(()) -} - -#[cfg(not(target_os = "unknown"))] -fn input_keystore_password() -> Result { - rpassword::read_password_from_tty(Some("Keystore password: ")) - .map_err(|e| format!("{:?}", e)) -} - -/// Use in memory keystore config when it is not required at all. -pub fn fill_config_keystore_in_memory(config: &mut sc_service::Configuration) - -> Result<(), String> -{ - match &mut config.keystore { - cfg @ KeystoreConfig::None => { *cfg = KeystoreConfig::InMemory; Ok(()) }, - _ => Err("Keystore config specified when it should not be!".into()), - } -} - -/// Fill the password field of the given config instance. -fn fill_config_keystore_password_and_path( - config: &mut sc_service::Configuration, - cli: &RunCmd, -) -> Result<(), String> { - let password = if cli.password_interactive { - #[cfg(not(target_os = "unknown"))] - { - Some(input_keystore_password()?.into()) - } - #[cfg(target_os = "unknown")] - None - } else if let Some(ref file) = cli.password_filename { - Some(fs::read_to_string(file).map_err(|e| format!("{}", e))?.into()) - } else if let Some(ref password) = cli.password { - Some(password.clone().into()) - } else { - None - }; - - let path = cli.keystore_path.clone().or( - config.in_chain_config_dir(DEFAULT_KEYSTORE_CONFIG_PATH) - ); - - config.keystore = KeystoreConfig::Path { - path: path.ok_or_else(|| "No `base_path` provided to create keystore path!")?, - password, - }; + init_logger(logger_pattern); Ok(()) } -/// Put block import CLI params into `config` object. -pub fn fill_import_params( - config: &mut Configuration, - cli: &ImportParams, - role: sc_service::Roles, - is_dev: bool, -) -> error::Result<()> -where - G: RuntimeGenesis, -{ - if let Some(DatabaseConfig::Path { ref mut cache_size, .. }) = config.database { - *cache_size = Some(cli.database_cache_size); - } - - config.state_cache_size = cli.state_cache_size; - - // by default we disable pruning if the node is an authority (i.e. - // `ArchiveAll`), otherwise we keep state for the last 256 blocks. if the - // node is an authority and pruning is enabled explicitly, then we error - // unless `unsafe_pruning` is set. - config.pruning = match &cli.pruning { - Some(ref s) if s == "archive" => PruningMode::ArchiveAll, - None if role == sc_service::Roles::AUTHORITY => PruningMode::ArchiveAll, - None => PruningMode::default(), - Some(s) => { - if role == sc_service::Roles::AUTHORITY && !cli.unsafe_pruning { - return Err(error::Error::Input( - "Validators should run with state pruning disabled (i.e. archive). \ - You can ignore this check with `--unsafe-pruning`.".to_string() - )); - } - - PruningMode::keep_blocks(s.parse() - .map_err(|_| error::Error::Input("Invalid pruning mode specified".to_string()))? - ) - }, - }; - - config.wasm_method = cli.wasm_method.into(); - - let exec = &cli.execution_strategies; - let exec_all_or = |strat: ExecutionStrategy, default: ExecutionStrategy| { - exec.execution.unwrap_or(if strat == default && is_dev { - ExecutionStrategy::Native - } else { - strat - }).into() - }; - - config.execution_strategies = ExecutionStrategies { - syncing: exec_all_or(exec.execution_syncing, DEFAULT_EXECUTION_SYNCING), - importing: exec_all_or(exec.execution_import_block, DEFAULT_EXECUTION_IMPORT_BLOCK), - block_construction: - exec_all_or(exec.execution_block_construction, DEFAULT_EXECUTION_BLOCK_CONSTRUCTION), - offchain_worker: - exec_all_or(exec.execution_offchain_worker, DEFAULT_EXECUTION_OFFCHAIN_WORKER), - other: exec_all_or(exec.execution_other, DEFAULT_EXECUTION_OTHER), - }; - Ok(()) -} - -/// Update and prepare a `Configuration` with command line parameters of `RunCmd` and `VersionInfo` -pub fn update_config_for_running_node( - mut config: &mut Configuration, - cli: RunCmd, -) -> error::Result<()> -where - G: RuntimeGenesis, -{ - fill_config_keystore_password_and_path(&mut config, &cli)?; - - let keyring = cli.get_keyring(); - let is_dev = cli.shared_params.dev; - let is_light = cli.light; - let is_authority = (cli.validator || cli.sentry || is_dev || keyring.is_some()) - && !is_light; - let role = - if is_light { - sc_service::Roles::LIGHT - } else if is_authority { - sc_service::Roles::AUTHORITY - } else { - sc_service::Roles::FULL - }; - - fill_import_params(&mut config, &cli.import_params, role, is_dev)?; - - config.name = match (cli.name.as_ref(), keyring) { - (Some(name), _) => name.to_string(), - (_, Some(keyring)) => keyring.to_string(), - (None, None) => generate_node_name(), - }; - if let Err(msg) = node_key::is_node_name_valid(&config.name) { - return Err(error::Error::Input( - format!("Invalid node name '{}'. Reason: {}. If unsure, use none.", - config.name, - msg, - ) - )); - } - - // set sentry mode (i.e. act as an authority but **never** actively participate) - config.sentry_mode = cli.sentry; - - config.offchain_worker = match (cli.offchain_worker, role) { - (params::OffchainWorkerEnabled::WhenValidating, sc_service::Roles::AUTHORITY) => true, - (params::OffchainWorkerEnabled::Always, _) => true, - (params::OffchainWorkerEnabled::Never, _) => false, - (params::OffchainWorkerEnabled::WhenValidating, _) => false, - }; - - config.roles = role; - config.disable_grandpa = cli.no_grandpa; - - let client_id = config.client_id(); - fill_network_configuration( - cli.network_config, - config.in_chain_config_dir(DEFAULT_NETWORK_CONFIG_PATH).expect("We provided a basepath"), - &mut config.network, - client_id, - is_dev, - )?; - - fill_transaction_pool_configuration(&mut config, cli.pool_config)?; - - config.dev_key_seed = keyring - .map(|a| format!("//{}", a)).or_else(|| { - if is_dev && !is_light { - Some("//Alice".into()) - } else { - None - } - }); - - if config.rpc_http.is_none() || cli.rpc_port.is_some() { - let rpc_interface: &str = interface_str(cli.rpc_external, cli.unsafe_rpc_external, cli.validator)?; - config.rpc_http = Some(parse_address(&format!("{}:{}", rpc_interface, 9933), cli.rpc_port)?); - } - if config.rpc_ws.is_none() || cli.ws_port.is_some() { - let ws_interface: &str = interface_str(cli.ws_external, cli.unsafe_ws_external, cli.validator)?; - config.rpc_ws = Some(parse_address(&format!("{}:{}", ws_interface, 9944), cli.ws_port)?); - } - - config.rpc_ws_max_connections = cli.ws_max_connections; - config.rpc_cors = cli.rpc_cors.unwrap_or_else(|| if is_dev { - log::warn!("Running in --dev mode, RPC CORS has been disabled."); - Cors::All - } else { - Cors::List(vec![ - "http://localhost:*".into(), - "http://127.0.0.1:*".into(), - "https://localhost:*".into(), - "https://127.0.0.1:*".into(), - "https://polkadot.js.org".into(), - "https://substrate-ui.parity.io".into(), - ]) - }).into(); - - // Override telemetry - if cli.no_telemetry { - config.telemetry_endpoints = None; - } else if !cli.telemetry_endpoints.is_empty() { - config.telemetry_endpoints = Some(TelemetryEndpoints::new(cli.telemetry_endpoints)); - } - // Override prometheus - if cli.no_prometheus { - config.prometheus_port = None; - } else { - let prometheus_interface: &str = if cli.prometheus_external { "0.0.0.0" } else { "127.0.0.1" }; - config.prometheus_port = Some( - parse_address(&format!("{}:{}", prometheus_interface, 9615), cli.prometheus_port)?); - } - - config.tracing_targets = cli.import_params.tracing_targets.into(); - config.tracing_receiver = cli.import_params.tracing_receiver.into(); - - // Imply forced authoring on --dev - config.force_authoring = cli.shared_params.dev || cli.force_authoring; - - Ok(()) -} - -fn interface_str( - is_external: bool, - is_unsafe_external: bool, - is_validator: bool, -) -> Result<&'static str, error::Error> { - if is_external && is_validator { - return Err(error::Error::Input("--rpc-external and --ws-external options shouldn't be \ - used if the node is running as a validator. Use `--unsafe-rpc-external` if you understand \ - the risks. See the options description for more information.".to_owned())); - } - - if is_external || is_unsafe_external { - log::warn!("It isn't safe to expose RPC publicly without a proxy server that filters \ - available set of RPC methods."); - - Ok("0.0.0.0") - } else { - Ok("127.0.0.1") - } -} - -fn parse_address( - address: &str, - port: Option, -) -> Result { - let mut address: SocketAddr = address.parse().map_err( - |_| format!("Invalid address: {}", address) - )?; - if let Some(port) = port { - address.set_port(port); - } - - Ok(address) -} - /// Initialize the logger pub fn init_logger(pattern: &str) { use ansi_term::Colour; @@ -766,116 +221,3 @@ fn kill_color(s: &str) -> String { } RE.replace_all(s, "").to_string() } - -#[cfg(test)] -mod tests { - use super::*; - - const TEST_VERSION_INFO: &'static VersionInfo = &VersionInfo { - name: "node-test", - version: "0.1.0", - commit: "some_commit", - executable_name: "node-test", - description: "description", - author: "author", - support_url: "http://example.org", - copyright_start_year: 2020, - }; - - #[test] - fn keystore_path_is_generated_correctly() { - let chain_spec = ChainSpec::from_genesis( - "test", - "test-id", - || (), - Vec::new(), - None, - None, - None, - None::<()>, - ); - - for keystore_path in vec![None, Some("/keystore/path")] { - let args: Vec<&str> = vec![]; - let mut run_cmds = RunCmd::from_iter(args); - run_cmds.keystore_path = keystore_path.clone().map(PathBuf::from); - - let mut node_config = Configuration::default(); - node_config.config_dir = Some(PathBuf::from("/test/path")); - node_config.chain_spec = Some(chain_spec.clone()); - update_config_for_running_node( - &mut node_config, - run_cmds.clone(), - ).unwrap(); - - let expected_path = match keystore_path { - Some(path) => PathBuf::from(path), - None => PathBuf::from("/test/path/chains/test-id/keystore"), - }; - - assert_eq!(expected_path, node_config.keystore.path().unwrap().to_owned()); - } - } - - #[test] - fn ensure_load_spec_provide_defaults() { - let chain_spec = ChainSpec::from_genesis( - "test", - "test-id", - || (), - vec!["boo".to_string()], - Some(TelemetryEndpoints::new(vec![("foo".to_string(), 42)])), - None, - None, - None::<()>, - ); - - let args: Vec<&str> = vec![]; - let cli = RunCmd::from_iter(args); - - let mut config = Configuration::new(TEST_VERSION_INFO); - load_spec(&mut config, &cli.shared_params, |_| Ok(Some(chain_spec))).unwrap(); - - assert!(config.chain_spec.is_some()); - assert!(!config.network.boot_nodes.is_empty()); - assert!(config.telemetry_endpoints.is_some()); - } - - #[test] - fn ensure_update_config_for_running_node_provides_defaults() { - let chain_spec = ChainSpec::from_genesis( - "test", - "test-id", - || (), - vec![], - None, - None, - None, - None::<()>, - ); - - let args: Vec<&str> = vec![]; - let cli = RunCmd::from_iter(args); - - let mut config = Configuration::new(TEST_VERSION_INFO); - init(&cli.shared_params, &TEST_VERSION_INFO).unwrap(); - init_config( - &mut config, - &cli.shared_params, - &TEST_VERSION_INFO, - |_| Ok(Some(chain_spec)), - ).unwrap(); - update_config_for_running_node(&mut config, cli).unwrap(); - - assert!(config.config_dir.is_some()); - assert!(config.database.is_some()); - if let Some(DatabaseConfig::Path { ref cache_size, .. }) = config.database { - assert!(cache_size.is_some()); - } else { - panic!("invalid config.database variant"); - } - assert!(!config.name.is_empty()); - assert!(config.network.config_path.is_some()); - assert!(!config.network.listen_addresses.is_empty()); - } -} diff --git a/client/cli/src/node_key.rs b/client/cli/src/node_key.rs deleted file mode 100644 index 4401481ca56..00000000000 --- a/client/cli/src/node_key.rs +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright 2017-2020 Parity Technologies (UK) Ltd. -// This file is part of Substrate. - -// Substrate is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Substrate is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Substrate. If not, see . - -use sc_network::{ - self, - config::{ - NodeKeyConfig, - }, -}; -use sp_core::H256; -use regex::Regex; -use std::{path::{Path, PathBuf}, str::FromStr}; -use crate::error; -use crate::params::{NodeKeyParams, NodeKeyType}; - -/// The file name of the node's Ed25519 secret key inside the chain-specific -/// network config directory, if neither `--node-key` nor `--node-key-file` -/// is specified in combination with `--node-key-type=ed25519`. -const NODE_KEY_ED25519_FILE: &str = "secret_ed25519"; - -/// Check whether a node name is considered as valid -pub fn is_node_name_valid(_name: &str) -> Result<(), &str> { - let name = _name.to_string(); - if name.chars().count() >= crate::NODE_NAME_MAX_LENGTH { - return Err("Node name too long"); - } - - let invalid_chars = r"[\\.@]"; - let re = Regex::new(invalid_chars).unwrap(); - if re.is_match(&name) { - return Err("Node name should not contain invalid chars such as '.' and '@'"); - } - - let invalid_patterns = r"(https?:\\/+)?(www)+"; - let re = Regex::new(invalid_patterns).unwrap(); - if re.is_match(&name) { - return Err("Node name should not contain urls"); - } - - Ok(()) -} - -/// Create a `NodeKeyConfig` from the given `NodeKeyParams` in the context -/// of an optional network config storage directory. -pub fn node_key_config

(params: NodeKeyParams, net_config_dir: &Option

) - -> error::Result -where - P: AsRef -{ - match params.node_key_type { - NodeKeyType::Ed25519 => - params.node_key.as_ref().map(parse_ed25519_secret).unwrap_or_else(|| - Ok(params.node_key_file - .or_else(|| net_config_file(net_config_dir, NODE_KEY_ED25519_FILE)) - .map(sc_network::config::Secret::File) - .unwrap_or(sc_network::config::Secret::New))) - .map(NodeKeyConfig::Ed25519) - } -} - -/// Create an error caused by an invalid node key argument. -fn invalid_node_key(e: impl std::fmt::Display) -> error::Error { - error::Error::Input(format!("Invalid node key: {}", e)) -} - -/// Parse a Ed25519 secret key from a hex string into a `sc_network::Secret`. -fn parse_ed25519_secret(hex: &String) -> error::Result { - H256::from_str(&hex).map_err(invalid_node_key).and_then(|bytes| - sc_network::config::identity::ed25519::SecretKey::from_bytes(bytes) - .map(sc_network::config::Secret::Input) - .map_err(invalid_node_key)) -} - -fn net_config_file

(net_config_dir: &Option

, name: &str) -> Option -where - P: AsRef -{ - net_config_dir.as_ref().map(|d| d.as_ref().join(name)) -} - -#[cfg(test)] -mod tests { - use sc_network::config::identity::ed25519; - use super::*; - - #[test] - fn tests_node_name_good() { - assert!(is_node_name_valid("short name").is_ok()); - } - - #[test] - fn tests_node_name_bad() { - assert!(is_node_name_valid("long names are not very cool for the ui").is_err()); - assert!(is_node_name_valid("Dots.not.Ok").is_err()); - assert!(is_node_name_valid("http://visit.me").is_err()); - assert!(is_node_name_valid("https://visit.me").is_err()); - assert!(is_node_name_valid("www.visit.me").is_err()); - assert!(is_node_name_valid("email@domain").is_err()); - } - - #[test] - fn test_node_key_config_input() { - fn secret_input(net_config_dir: Option) -> error::Result<()> { - NodeKeyType::variants().iter().try_for_each(|t| { - let node_key_type = NodeKeyType::from_str(t).unwrap(); - let sk = match node_key_type { - NodeKeyType::Ed25519 => ed25519::SecretKey::generate().as_ref().to_vec() - }; - let params = NodeKeyParams { - node_key_type, - node_key: Some(format!("{:x}", H256::from_slice(sk.as_ref()))), - node_key_file: None - }; - node_key_config(params, &net_config_dir).and_then(|c| match c { - NodeKeyConfig::Ed25519(sc_network::config::Secret::Input(ref ski)) - if node_key_type == NodeKeyType::Ed25519 && - &sk[..] == ski.as_ref() => Ok(()), - _ => Err(error::Error::Input("Unexpected node key config".into())) - }) - }) - } - - assert!(secret_input(None).is_ok()); - assert!(secret_input(Some("x".to_string())).is_ok()); - } - - #[test] - fn test_node_key_config_file() { - fn secret_file(net_config_dir: Option) -> error::Result<()> { - NodeKeyType::variants().iter().try_for_each(|t| { - let node_key_type = NodeKeyType::from_str(t).unwrap(); - let tmp = tempfile::Builder::new().prefix("alice").tempdir()?; - let file = tmp.path().join(format!("{}_mysecret", t)).to_path_buf(); - let params = NodeKeyParams { - node_key_type, - node_key: None, - node_key_file: Some(file.clone()) - }; - node_key_config(params, &net_config_dir).and_then(|c| match c { - NodeKeyConfig::Ed25519(sc_network::config::Secret::File(ref f)) - if node_key_type == NodeKeyType::Ed25519 && f == &file => Ok(()), - _ => Err(error::Error::Input("Unexpected node key config".into())) - }) - }) - } - - assert!(secret_file(None).is_ok()); - assert!(secret_file(Some("x".to_string())).is_ok()); - } - - #[test] - fn test_node_key_config_default() { - fn with_def_params(f: F) -> error::Result<()> - where - F: Fn(NodeKeyParams) -> error::Result<()> - { - NodeKeyType::variants().iter().try_for_each(|t| { - let node_key_type = NodeKeyType::from_str(t).unwrap(); - f(NodeKeyParams { - node_key_type, - node_key: None, - node_key_file: None - }) - }) - } - - fn no_config_dir() -> error::Result<()> { - with_def_params(|params| { - let typ = params.node_key_type; - node_key_config::(params, &None) - .and_then(|c| match c { - NodeKeyConfig::Ed25519(sc_network::config::Secret::New) - if typ == NodeKeyType::Ed25519 => Ok(()), - _ => Err(error::Error::Input("Unexpected node key config".into())) - }) - }) - } - - fn some_config_dir(net_config_dir: String) -> error::Result<()> { - with_def_params(|params| { - let dir = PathBuf::from(net_config_dir.clone()); - let typ = params.node_key_type; - node_key_config(params, &Some(net_config_dir.clone())) - .and_then(move |c| match c { - NodeKeyConfig::Ed25519(sc_network::config::Secret::File(ref f)) - if typ == NodeKeyType::Ed25519 && - f == &dir.join(NODE_KEY_ED25519_FILE) => Ok(()), - _ => Err(error::Error::Input("Unexpected node key config".into())) - }) - }) - } - - assert!(no_config_dir().is_ok()); - assert!(some_config_dir("x".to_string()).is_ok()); - } -} diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs deleted file mode 100644 index a1a8b9c5b4f..00000000000 --- a/client/cli/src/params.rs +++ /dev/null @@ -1,1202 +0,0 @@ -// Copyright 2018-2020 Parity Technologies (UK) Ltd. -// This file is part of Substrate. - -// Substrate is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Substrate is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Substrate. If not, see . - -use std::{str::FromStr, path::PathBuf}; -use structopt::{StructOpt, clap::arg_enum}; -use sc_service::{ - AbstractService, Configuration, ChainSpecExtension, RuntimeGenesis, ServiceBuilderCommand, - config::DatabaseConfig, -}; -use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; -use crate::VersionInfo; -use crate::error; -use std::fmt::Debug; -use log::info; -use sc_network::config::build_multiaddr; -use std::io; -use std::fs; -use std::io::{Read, Write, Seek}; -use sp_runtime::generic::BlockId; -use crate::runtime::run_until_exit; -use crate::node_key::node_key_config; -use crate::execution_strategy::*; - -pub use crate::execution_strategy::ExecutionStrategy; - -impl Into for ExecutionStrategy { - fn into(self) -> sc_client_api::ExecutionStrategy { - match self { - ExecutionStrategy::Native => sc_client_api::ExecutionStrategy::NativeWhenPossible, - ExecutionStrategy::Wasm => sc_client_api::ExecutionStrategy::AlwaysWasm, - ExecutionStrategy::Both => sc_client_api::ExecutionStrategy::Both, - ExecutionStrategy::NativeElseWasm => sc_client_api::ExecutionStrategy::NativeElseWasm, - } - } -} - -#[allow(missing_docs)] -mod wasm_execution_method { - use super::*; - - arg_enum! { - /// How to execute Wasm runtime code - #[derive(Debug, Clone, Copy)] - pub enum WasmExecutionMethod { - // Uses an interpreter. - Interpreted, - // Uses a compiled runtime. - Compiled, - } - } - - impl WasmExecutionMethod { - /// Returns list of variants that are not disabled by feature flags. - pub fn enabled_variants() -> Vec<&'static str> { - Self::variants() - .iter() - .cloned() - .filter(|&name| cfg!(feature = "wasmtime") || name != "Compiled") - .collect() - } - } -} - -pub use wasm_execution_method::WasmExecutionMethod; - -impl Into for WasmExecutionMethod { - fn into(self) -> sc_service::config::WasmExecutionMethod { - match self { - WasmExecutionMethod::Interpreted => sc_service::config::WasmExecutionMethod::Interpreted, - #[cfg(feature = "wasmtime")] - WasmExecutionMethod::Compiled => sc_service::config::WasmExecutionMethod::Compiled, - #[cfg(not(feature = "wasmtime"))] - WasmExecutionMethod::Compiled => panic!( - "Substrate must be compiled with \"wasmtime\" feature for compiled Wasm execution" - ), - } - } -} - -arg_enum! { - /// Whether off-chain workers are enabled. - #[allow(missing_docs)] - #[derive(Debug, Clone)] - pub enum OffchainWorkerEnabled { - Always, - Never, - WhenValidating, - } -} - -/// Shared parameters used by all `CoreParams`. -#[derive(Debug, StructOpt, Clone)] -pub struct SharedParams { - /// Specify the chain specification (one of dev, local or staging). - #[structopt(long = "chain", value_name = "CHAIN_SPEC")] - pub chain: Option, - - /// Specify the development chain. - #[structopt(long = "dev")] - pub dev: bool, - - /// Specify custom base path. - #[structopt(long = "base-path", short = "d", value_name = "PATH", parse(from_os_str))] - pub base_path: Option, - - /// Sets a custom logging filter. - #[structopt(short = "l", long = "log", value_name = "LOG_PATTERN")] - pub log: Option, -} - -/// Parameters for block import. -#[derive(Debug, StructOpt, Clone)] -pub struct ImportParams { - /// Specify the state pruning mode, a number of blocks to keep or 'archive'. - /// - /// Default is to keep all block states if the node is running as a - /// validator (i.e. 'archive'), otherwise state is only kept for the last - /// 256 blocks. - #[structopt(long = "pruning", value_name = "PRUNING_MODE")] - pub pruning: Option, - - /// Force start with unsafe pruning settings. - /// - /// When running as a validator it is highly recommended to disable state - /// pruning (i.e. 'archive') which is the default. The node will refuse to - /// start as a validator if pruning is enabled unless this option is set. - #[structopt(long = "unsafe-pruning")] - pub unsafe_pruning: bool, - - /// Method for executing Wasm runtime code. - #[structopt( - long = "wasm-execution", - value_name = "METHOD", - possible_values = &WasmExecutionMethod::enabled_variants(), - case_insensitive = true, - default_value = "Interpreted" - )] - pub wasm_method: WasmExecutionMethod, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub execution_strategies: ExecutionStrategies, - - /// Limit the memory the database cache can use. - #[structopt(long = "db-cache", value_name = "MiB", default_value = "1024")] - pub database_cache_size: u32, - - /// Specify the state cache size. - #[structopt(long = "state-cache-size", value_name = "Bytes", default_value = "67108864")] - pub state_cache_size: usize, - - /// Comma separated list of targets for tracing - #[structopt(long = "tracing-targets", value_name = "TARGETS")] - pub tracing_targets: Option, - - /// Receiver to process tracing messages - #[structopt( - long = "tracing-receiver", - value_name = "RECEIVER", - possible_values = &TracingReceiver::variants(), - case_insensitive = true, - default_value = "Log" - )] - pub tracing_receiver: TracingReceiver, -} - -/// Parameters used to create the network configuration. -#[derive(Debug, StructOpt, Clone)] -pub struct NetworkConfigurationParams { - /// Specify a list of bootnodes. - #[structopt(long = "bootnodes", value_name = "URL")] - pub bootnodes: Vec, - - /// Specify a list of reserved node addresses. - #[structopt(long = "reserved-nodes", value_name = "URL")] - pub reserved_nodes: Vec, - - /// Whether to only allow connections to/from reserved nodes. - /// - /// If you are a validator your node might still connect to other validator - /// nodes regardless of whether they are defined as reserved nodes. - #[structopt(long = "reserved-only")] - pub reserved_only: bool, - - /// Specify a list of sentry node public addresses. - #[structopt( - long = "sentry-nodes", - value_name = "URL", - conflicts_with_all = &[ "sentry" ] - )] - pub sentry_nodes: Vec, - - /// Listen on this multiaddress. - #[structopt(long = "listen-addr", value_name = "LISTEN_ADDR")] - pub listen_addr: Vec, - - /// Specify p2p protocol TCP port. - /// - /// Only used if --listen-addr is not specified. - #[structopt(long = "port", value_name = "PORT")] - pub port: Option, - - /// Forbid connecting to private IPv4 addresses (as specified in - /// [RFC1918](https://tools.ietf.org/html/rfc1918)), unless the address was passed with - /// `--reserved-nodes` or `--bootnodes`. - #[structopt(long = "no-private-ipv4")] - pub no_private_ipv4: bool, - - /// Specify the number of outgoing connections we're trying to maintain. - #[structopt(long = "out-peers", value_name = "COUNT", default_value = "25")] - pub out_peers: u32, - - /// Specify the maximum number of incoming connections we're accepting. - #[structopt(long = "in-peers", value_name = "COUNT", default_value = "25")] - pub in_peers: u32, - - /// Disable mDNS discovery. - /// - /// By default, the network will use mDNS to discover other nodes on the - /// local network. This disables it. Automatically implied when using --dev. - #[structopt(long = "no-mdns")] - pub no_mdns: bool, - - /// Maximum number of peers to ask the same blocks in parallel. - /// - /// This allows downlading announced blocks from multiple peers. Decrease to save - /// traffic and risk increased latency. - #[structopt(long = "max-parallel-downloads", value_name = "COUNT", default_value = "5")] - pub max_parallel_downloads: u32, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub node_key_params: NodeKeyParams, - - /// Experimental feature flag. - #[structopt(long = "use-yamux-flow-control")] - pub use_yamux_flow_control: bool, -} - -arg_enum! { - #[allow(missing_docs)] - #[derive(Debug, Copy, Clone, PartialEq, Eq)] - pub enum NodeKeyType { - Ed25519 - } -} - -/// Parameters used to create the `NodeKeyConfig`, which determines the keypair -/// used for libp2p networking. -#[derive(Debug, StructOpt, Clone)] -pub struct NodeKeyParams { - /// The secret key to use for libp2p networking. - /// - /// The value is a string that is parsed according to the choice of - /// `--node-key-type` as follows: - /// - /// `ed25519`: - /// The value is parsed as a hex-encoded Ed25519 32 bytes secret key, - /// i.e. 64 hex characters. - /// - /// The value of this option takes precedence over `--node-key-file`. - /// - /// WARNING: Secrets provided as command-line arguments are easily exposed. - /// Use of this option should be limited to development and testing. To use - /// an externally managed secret key, use `--node-key-file` instead. - #[structopt(long = "node-key", value_name = "KEY")] - pub node_key: Option, - - /// The type of secret key to use for libp2p networking. - /// - /// The secret key of the node is obtained as follows: - /// - /// * If the `--node-key` option is given, the value is parsed as a secret key - /// according to the type. See the documentation for `--node-key`. - /// - /// * If the `--node-key-file` option is given, the secret key is read from the - /// specified file. See the documentation for `--node-key-file`. - /// - /// * Otherwise, the secret key is read from a file with a predetermined, - /// type-specific name from the chain-specific network config directory - /// inside the base directory specified by `--base-dir`. If this file does - /// not exist, it is created with a newly generated secret key of the - /// chosen type. - /// - /// The node's secret key determines the corresponding public key and hence the - /// node's peer ID in the context of libp2p. - #[structopt( - long = "node-key-type", - value_name = "TYPE", - possible_values = &NodeKeyType::variants(), - case_insensitive = true, - default_value = "Ed25519" - )] - pub node_key_type: NodeKeyType, - - /// The file from which to read the node's secret key to use for libp2p networking. - /// - /// The contents of the file are parsed according to the choice of `--node-key-type` - /// as follows: - /// - /// `ed25519`: - /// The file must contain an unencoded 32 bytes Ed25519 secret key. - /// - /// If the file does not exist, it is created with a newly generated secret key of - /// the chosen type. - #[structopt(long = "node-key-file", value_name = "FILE")] - pub node_key_file: Option, -} - -/// Parameters used to create the pool configuration. -#[derive(Debug, StructOpt, Clone)] -pub struct TransactionPoolParams { - /// Maximum number of transactions in the transaction pool. - #[structopt(long = "pool-limit", value_name = "COUNT", default_value = "8192")] - pub pool_limit: usize, - /// Maximum number of kilobytes of all transactions stored in the pool. - #[structopt(long = "pool-kbytes", value_name = "COUNT", default_value = "20480")] - pub pool_kbytes: usize, -} - -arg_enum! { - #[allow(missing_docs)] - #[derive(Debug, Copy, Clone, PartialEq, Eq)] - pub enum TracingReceiver { - Log, - Telemetry, - } -} - -impl Into for TracingReceiver { - fn into(self) -> sc_tracing::TracingReceiver { - match self { - TracingReceiver::Log => sc_tracing::TracingReceiver::Log, - TracingReceiver::Telemetry => sc_tracing::TracingReceiver::Telemetry, - } - } -} - -/// Execution strategies parameters. -#[derive(Debug, StructOpt, Clone)] -pub struct ExecutionStrategies { - /// The means of execution used when calling into the runtime while syncing blocks. - #[structopt( - long = "execution-syncing", - value_name = "STRATEGY", - possible_values = &ExecutionStrategy::variants(), - case_insensitive = true, - default_value = DEFAULT_EXECUTION_SYNCING.as_str(), - )] - pub execution_syncing: ExecutionStrategy, - - /// The means of execution used when calling into the runtime while importing blocks. - #[structopt( - long = "execution-import-block", - value_name = "STRATEGY", - possible_values = &ExecutionStrategy::variants(), - case_insensitive = true, - default_value = DEFAULT_EXECUTION_IMPORT_BLOCK.as_str(), - )] - pub execution_import_block: ExecutionStrategy, - - /// The means of execution used when calling into the runtime while constructing blocks. - #[structopt( - long = "execution-block-construction", - value_name = "STRATEGY", - possible_values = &ExecutionStrategy::variants(), - case_insensitive = true, - default_value = DEFAULT_EXECUTION_BLOCK_CONSTRUCTION.as_str(), - )] - pub execution_block_construction: ExecutionStrategy, - - /// The means of execution used when calling into the runtime while using an off-chain worker. - #[structopt( - long = "execution-offchain-worker", - value_name = "STRATEGY", - possible_values = &ExecutionStrategy::variants(), - case_insensitive = true, - default_value = DEFAULT_EXECUTION_OFFCHAIN_WORKER.as_str(), - )] - pub execution_offchain_worker: ExecutionStrategy, - - /// The means of execution used when calling into the runtime while not syncing, importing or constructing blocks. - #[structopt( - long = "execution-other", - value_name = "STRATEGY", - possible_values = &ExecutionStrategy::variants(), - case_insensitive = true, - default_value = DEFAULT_EXECUTION_OTHER.as_str(), - )] - pub execution_other: ExecutionStrategy, - - /// The execution strategy that should be used by all execution contexts. - #[structopt( - long = "execution", - value_name = "STRATEGY", - possible_values = &ExecutionStrategy::variants(), - case_insensitive = true, - conflicts_with_all = &[ - "execution-other", - "execution-offchain-worker", - "execution-block-construction", - "execution-import-block", - "execution-syncing", - ] - )] - pub execution: Option, -} - -/// The `run` command used to run a node. -#[derive(Debug, StructOpt, Clone)] -pub struct RunCmd { - /// Enable validator mode. - /// - /// The node will be started with the authority role and actively - /// participate in any consensus task that it can (e.g. depending on - /// availability of local keys). - #[structopt( - long = "validator", - conflicts_with_all = &[ "sentry" ] - )] - pub validator: bool, - - /// Enable sentry mode. - /// - /// The node will be started with the authority role and participate in - /// consensus tasks as an "observer", it will never actively participate - /// regardless of whether it could (e.g. keys are available locally). This - /// mode is useful as a secure proxy for validators (which would run - /// detached from the network), since we want this node to participate in - /// the full consensus protocols in order to have all needed consensus data - /// available to relay to private nodes. - #[structopt( - long = "sentry", - conflicts_with_all = &[ "validator", "light" ] - )] - pub sentry: bool, - - /// Disable GRANDPA voter when running in validator mode, otherwise disables the GRANDPA observer. - #[structopt(long = "no-grandpa")] - pub no_grandpa: bool, - - /// Experimental: Run in light client mode. - #[structopt(long = "light", conflicts_with = "sentry")] - pub light: bool, - - /// Listen to all RPC interfaces. - /// - /// Default is local. Note: not all RPC methods are safe to be exposed publicly. Use a RPC proxy - /// server to filter out dangerous methods. More details: https://github.com/paritytech/substrate/wiki/Public-RPC. - /// Use `--unsafe-rpc-external` to suppress the warning if you understand the risks. - #[structopt(long = "rpc-external")] - pub rpc_external: bool, - - /// Listen to all RPC interfaces. - /// - /// Same as `--rpc-external`. - #[structopt(long = "unsafe-rpc-external")] - pub unsafe_rpc_external: bool, - - /// Listen to all Websocket interfaces. - /// - /// Default is local. Note: not all RPC methods are safe to be exposed publicly. Use a RPC proxy - /// server to filter out dangerous methods. More details: https://github.com/paritytech/substrate/wiki/Public-RPC. - /// Use `--unsafe-ws-external` to suppress the warning if you understand the risks. - #[structopt(long = "ws-external")] - pub ws_external: bool, - - /// Listen to all Websocket interfaces. - /// - /// Same as `--ws-external`. - #[structopt(long = "unsafe-ws-external")] - pub unsafe_ws_external: bool, - - /// Listen to all Prometheus endpoint interfaces. - /// - /// Default is local. - #[structopt(long = "prometheus-external")] - pub prometheus_external: bool, - - /// Specify HTTP RPC server TCP port. - #[structopt(long = "rpc-port", value_name = "PORT")] - pub rpc_port: Option, - - /// Specify WebSockets RPC server TCP port. - #[structopt(long = "ws-port", value_name = "PORT")] - pub ws_port: Option, - - /// Maximum number of WS RPC server connections. - #[structopt(long = "ws-max-connections", value_name = "COUNT")] - pub ws_max_connections: Option, - - /// Specify browser Origins allowed to access the HTTP & WS RPC servers. - /// - /// A comma-separated list of origins (protocol://domain or special `null` - /// value). Value of `all` will disable origin validation. Default is to - /// allow localhost, https://polkadot.js.org and - /// https://substrate-ui.parity.io origins. When running in --dev mode the - /// default is to allow all origins. - #[structopt(long = "rpc-cors", value_name = "ORIGINS", parse(try_from_str = parse_cors))] - pub rpc_cors: Option, - - /// Specify Prometheus endpoint TCP Port. - #[structopt(long = "prometheus-port", value_name = "PORT")] - pub prometheus_port: Option, - - /// Do not expose a Prometheus metric endpoint. - /// - /// Prometheus metric endpoint is enabled by default. - #[structopt(long = "no-prometheus")] - pub no_prometheus: bool, - - /// The human-readable name for this node. - /// - /// The node name will be reported to the telemetry server, if enabled. - #[structopt(long = "name", value_name = "NAME")] - pub name: Option, - - /// Disable connecting to the Substrate telemetry server. - /// - /// Telemetry is on by default on global chains. - #[structopt(long = "no-telemetry")] - pub no_telemetry: bool, - - /// The URL of the telemetry server to connect to. - /// - /// This flag can be passed multiple times as a mean to specify multiple - /// telemetry endpoints. Verbosity levels range from 0-9, with 0 denoting - /// the least verbosity. If no verbosity level is specified the default is - /// 0. - #[structopt(long = "telemetry-url", value_name = "URL VERBOSITY", parse(try_from_str = parse_telemetry_endpoints))] - pub telemetry_endpoints: Vec<(String, u8)>, - - /// Should execute offchain workers on every block. - /// - /// By default it's only enabled for nodes that are authoring new blocks. - #[structopt( - long = "offchain-worker", - value_name = "ENABLED", - possible_values = &OffchainWorkerEnabled::variants(), - case_insensitive = true, - default_value = "WhenValidating" - )] - pub offchain_worker: OffchainWorkerEnabled, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub shared_params: SharedParams, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub import_params: ImportParams, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub network_config: NetworkConfigurationParams, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub pool_config: TransactionPoolParams, - - /// Shortcut for `--name Alice --validator` with session keys for `Alice` added to keystore. - #[structopt(long, conflicts_with_all = &["bob", "charlie", "dave", "eve", "ferdie", "one", "two"])] - pub alice: bool, - - /// Shortcut for `--name Bob --validator` with session keys for `Bob` added to keystore. - #[structopt(long, conflicts_with_all = &["alice", "charlie", "dave", "eve", "ferdie", "one", "two"])] - pub bob: bool, - - /// Shortcut for `--name Charlie --validator` with session keys for `Charlie` added to keystore. - #[structopt(long, conflicts_with_all = &["alice", "bob", "dave", "eve", "ferdie", "one", "two"])] - pub charlie: bool, - - /// Shortcut for `--name Dave --validator` with session keys for `Dave` added to keystore. - #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "eve", "ferdie", "one", "two"])] - pub dave: bool, - - /// Shortcut for `--name Eve --validator` with session keys for `Eve` added to keystore. - #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "ferdie", "one", "two"])] - pub eve: bool, - - /// Shortcut for `--name Ferdie --validator` with session keys for `Ferdie` added to keystore. - #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "one", "two"])] - pub ferdie: bool, - - /// Shortcut for `--name One --validator` with session keys for `One` added to keystore. - #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "two"])] - pub one: bool, - - /// Shortcut for `--name Two --validator` with session keys for `Two` added to keystore. - #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "one"])] - pub two: bool, - - /// Enable authoring even when offline. - #[structopt(long = "force-authoring")] - pub force_authoring: bool, - - /// Specify custom keystore path. - #[structopt(long = "keystore-path", value_name = "PATH", parse(from_os_str))] - pub keystore_path: Option, - - /// Use interactive shell for entering the password used by the keystore. - #[structopt( - long = "password-interactive", - conflicts_with_all = &[ "password", "password-filename" ] - )] - pub password_interactive: bool, - - /// Password used by the keystore. - #[structopt( - long = "password", - conflicts_with_all = &[ "password-interactive", "password-filename" ] - )] - pub password: Option, - - /// File that contains the password used by the keystore. - #[structopt( - long = "password-filename", - value_name = "PATH", - parse(from_os_str), - conflicts_with_all = &[ "password-interactive", "password" ] - )] - pub password_filename: Option -} - -impl RunCmd { - /// Get the `Sr25519Keyring` matching one of the flag - pub fn get_keyring(&self) -> Option { - use sp_keyring::Sr25519Keyring::*; - - if self.alice { Some(Alice) } - else if self.bob { Some(Bob) } - else if self.charlie { Some(Charlie) } - else if self.dave { Some(Dave) } - else if self.eve { Some(Eve) } - else if self.ferdie { Some(Ferdie) } - else if self.one { Some(One) } - else if self.two { Some(Two) } - else { None } - } -} - -/// Default to verbosity level 0, if none is provided. -fn parse_telemetry_endpoints(s: &str) -> Result<(String, u8), Box> { - let pos = s.find(' '); - match pos { - None => { - Ok((s.to_owned(), 0)) - }, - Some(pos_) => { - let verbosity = s[pos_ + 1..].parse()?; - let url = s[..pos_].parse()?; - Ok((url, verbosity)) - } - } -} - -/// CORS setting -/// -/// The type is introduced to overcome `Option>` -/// handling of `structopt`. -#[derive(Clone, Debug)] -pub enum Cors { - /// All hosts allowed - All, - /// Only hosts on the list are allowed. - List(Vec), -} - -impl From for Option> { - fn from(cors: Cors) -> Self { - match cors { - Cors::All => None, - Cors::List(list) => Some(list), - } - } -} - -/// Parse cors origins -fn parse_cors(s: &str) -> Result> { - let mut is_all = false; - let mut origins = Vec::new(); - for part in s.split(',') { - match part { - "all" | "*" => { - is_all = true; - break; - }, - other => origins.push(other.to_owned()), - } - } - - Ok(if is_all { Cors::All } else { Cors::List(origins) }) -} - -/// The `build-spec` command used to build a specification. -#[derive(Debug, StructOpt, Clone)] -pub struct BuildSpecCmd { - /// Force raw genesis storage output. - #[structopt(long = "raw")] - pub raw: bool, - - /// Disable adding the default bootnode to the specification. - /// - /// By default the `/ip4/127.0.0.1/tcp/30333/p2p/NODE_PEER_ID` bootnode is added to the - /// specification when no bootnode exists. - #[structopt(long = "disable-default-bootnode")] - pub disable_default_bootnode: bool, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub shared_params: SharedParams, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub node_key_params: NodeKeyParams, -} - -/// Wrapper type of `String` that holds an unsigned integer of arbitrary size, formatted as a decimal. -#[derive(Debug, Clone)] -pub struct BlockNumber(String); - -impl FromStr for BlockNumber { - type Err = String; - - fn from_str(block_number: &str) -> Result { - if block_number.chars().any(|d| !d.is_digit(10)) { - Err(format!( - "Invalid block number: {}, expected decimal formatted unsigned integer", - block_number - )) - } else { - Ok(Self(block_number.to_owned())) - } - } -} - -impl BlockNumber { - /// Wrapper on top of `std::str::parse` but with `Error` as a `String` - /// - /// See `https://doc.rust-lang.org/std/primitive.str.html#method.parse` for more elaborate - /// documentation. - pub fn parse(&self) -> Result - where - N: FromStr, - N::Err: std::fmt::Debug, - { - self.0 - .parse() - .map_err(|e| format!("BlockNumber: {} parsing failed because of {:?}", self.0, e)) - } -} - -/// The `export-blocks` command used to export blocks. -#[derive(Debug, StructOpt, Clone)] -pub struct ExportBlocksCmd { - /// Output file name or stdout if unspecified. - #[structopt(parse(from_os_str))] - pub output: Option, - - /// Specify starting block number. - /// - /// Default is 1. - #[structopt(long = "from", value_name = "BLOCK")] - pub from: Option, - - /// Specify last block number. - /// - /// Default is best block. - #[structopt(long = "to", value_name = "BLOCK")] - pub to: Option, - - /// Use JSON output rather than binary. - #[structopt(long = "json")] - pub json: bool, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub shared_params: SharedParams, -} - -/// The `import-blocks` command used to import blocks. -#[derive(Debug, StructOpt, Clone)] -pub struct ImportBlocksCmd { - /// Input file or stdin if unspecified. - #[structopt(parse(from_os_str))] - pub input: Option, - - /// The default number of 64KB pages to ever allocate for Wasm execution. - /// - /// Don't alter this unless you know what you're doing. - #[structopt(long = "default-heap-pages", value_name = "COUNT")] - pub default_heap_pages: Option, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub shared_params: SharedParams, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub import_params: ImportParams, -} - -/// The `check-block` command used to validate blocks. -#[derive(Debug, StructOpt, Clone)] -pub struct CheckBlockCmd { - /// Block hash or number - #[structopt(value_name = "HASH or NUMBER")] - pub input: String, - - /// The default number of 64KB pages to ever allocate for Wasm execution. - /// - /// Don't alter this unless you know what you're doing. - #[structopt(long = "default-heap-pages", value_name = "COUNT")] - pub default_heap_pages: Option, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub shared_params: SharedParams, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub import_params: ImportParams, -} - -/// The `revert` command used revert the chain to a previous state. -#[derive(Debug, StructOpt, Clone)] -pub struct RevertCmd { - /// Number of blocks to revert. - #[structopt(default_value = "256")] - pub num: BlockNumber, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub shared_params: SharedParams, -} - -/// The `purge-chain` command used to remove the whole chain. -#[derive(Debug, StructOpt, Clone)] -pub struct PurgeChainCmd { - /// Skip interactive prompt by answering yes automatically. - #[structopt(short = "y")] - pub yes: bool, - - #[allow(missing_docs)] - #[structopt(flatten)] - pub shared_params: SharedParams, -} - -/// All core commands that are provided by default. -/// -/// The core commands are split into multiple subcommands and `Run` is the default subcommand. From -/// the CLI user perspective, it is not visible that `Run` is a subcommand. So, all parameters of -/// `Run` are exported as main executable parameters. -#[derive(Debug, Clone, StructOpt)] -pub enum Subcommand { - /// Build a spec.json file, outputing to stdout. - BuildSpec(BuildSpecCmd), - - /// Export blocks to a file. - ExportBlocks(ExportBlocksCmd), - - /// Import blocks from file. - ImportBlocks(ImportBlocksCmd), - - /// Validate a single block. - CheckBlock(CheckBlockCmd), - - /// Revert chain to the previous state. - Revert(RevertCmd), - - /// Remove the whole chain data. - PurgeChain(PurgeChainCmd), -} - -impl Subcommand { - /// Get the shared parameters of a `CoreParams` command - pub fn get_shared_params(&self) -> &SharedParams { - use Subcommand::*; - - match self { - BuildSpec(params) => ¶ms.shared_params, - ExportBlocks(params) => ¶ms.shared_params, - ImportBlocks(params) => ¶ms.shared_params, - CheckBlock(params) => ¶ms.shared_params, - Revert(params) => ¶ms.shared_params, - PurgeChain(params) => ¶ms.shared_params, - } - } - - /// Run any `CoreParams` command - pub fn run( - self, - config: Configuration, - builder: B, - ) -> error::Result<()> - where - B: FnOnce(Configuration) -> Result, - G: RuntimeGenesis, - E: ChainSpecExtension, - BC: ServiceBuilderCommand + Unpin, - BB: sp_runtime::traits::Block + Debug, - <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, - ::Hash: std::str::FromStr, - { - assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); - - match self { - Subcommand::BuildSpec(cmd) => cmd.run(config), - Subcommand::ExportBlocks(cmd) => cmd.run(config, builder), - Subcommand::ImportBlocks(cmd) => cmd.run(config, builder), - Subcommand::CheckBlock(cmd) => cmd.run(config, builder), - Subcommand::PurgeChain(cmd) => cmd.run(config), - Subcommand::Revert(cmd) => cmd.run(config, builder), - } - } -} - -impl RunCmd { - /// Run the command that runs the node - pub fn run( - self, - mut config: Configuration, - new_light: FNL, - new_full: FNF, - version: &VersionInfo, - ) -> error::Result<()> - where - G: RuntimeGenesis, - E: ChainSpecExtension, - FNL: FnOnce(Configuration) -> Result, - FNF: FnOnce(Configuration) -> Result, - SL: AbstractService + Unpin, - SF: AbstractService + Unpin, - { - assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); - - crate::update_config_for_running_node(&mut config, self)?; - - crate::run_node(config, new_light, new_full, &version) - } -} - -impl BuildSpecCmd { - /// Run the build-spec command - pub fn run( - self, - config: Configuration, - ) -> error::Result<()> - where - G: RuntimeGenesis, - E: ChainSpecExtension, - { - assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); - - info!("Building chain spec"); - let mut spec = config.expect_chain_spec().clone(); - let raw_output = self.raw; - - if spec.boot_nodes().is_empty() && !self.disable_default_bootnode { - let node_key = node_key_config( - self.node_key_params.clone(), - &Some(config - .in_chain_config_dir(crate::DEFAULT_NETWORK_CONFIG_PATH) - .expect("We provided a base_path")), - )?; - let keys = node_key.into_keypair()?; - let peer_id = keys.public().into_peer_id(); - let addr = build_multiaddr![ - Ip4([127, 0, 0, 1]), - Tcp(30333u16), - P2p(peer_id) - ]; - spec.add_boot_node(addr) - } - - let json = sc_service::chain_ops::build_spec(spec, raw_output)?; - - print!("{}", json); - - Ok(()) - } -} - -impl ExportBlocksCmd { - /// Run the export-blocks command - pub fn run( - self, - mut config: Configuration, - builder: B, - ) -> error::Result<()> - where - B: FnOnce(Configuration) -> Result, - G: RuntimeGenesis, - E: ChainSpecExtension, - BC: ServiceBuilderCommand + Unpin, - BB: sp_runtime::traits::Block + Debug, - <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, - ::Hash: std::str::FromStr, - { - assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); - - crate::fill_config_keystore_in_memory(&mut config)?; - - if let DatabaseConfig::Path { ref path, .. } = config.expect_database() { - info!("DB path: {}", path.display()); - } - let from = self.from.as_ref().and_then(|f| f.parse().ok()).unwrap_or(1); - let to = self.to.as_ref().and_then(|t| t.parse().ok()); - - let json = self.json; - - let file: Box = match &self.output { - Some(filename) => Box::new(fs::File::create(filename)?), - None => Box::new(io::stdout()), - }; - - run_until_exit(config, |config| { - Ok(builder(config)?.export_blocks(file, from.into(), to, json)) - }) - } -} - -/// Internal trait used to cast to a dynamic type that implements Read and Seek. -trait ReadPlusSeek: Read + Seek {} - -impl ReadPlusSeek for T {} - -impl ImportBlocksCmd { - /// Run the import-blocks command - pub fn run( - self, - mut config: Configuration, - builder: B, - ) -> error::Result<()> - where - B: FnOnce(Configuration) -> Result, - G: RuntimeGenesis, - E: ChainSpecExtension, - BC: ServiceBuilderCommand + Unpin, - BB: sp_runtime::traits::Block + Debug, - <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, - ::Hash: std::str::FromStr, - { - crate::fill_import_params( - &mut config, - &self.import_params, - sc_service::Roles::FULL, - self.shared_params.dev, - )?; - - let file: Box = match &self.input { - Some(filename) => Box::new(fs::File::open(filename)?), - None => { - let mut buffer = Vec::new(); - io::stdin().read_to_end(&mut buffer)?; - Box::new(io::Cursor::new(buffer)) - }, - }; - - run_until_exit(config, |config| { - Ok(builder(config)?.import_blocks(file, false)) - }) - } -} - -impl CheckBlockCmd { - /// Run the check-block command - pub fn run( - self, - mut config: Configuration, - builder: B, - ) -> error::Result<()> - where - B: FnOnce(Configuration) -> Result, - G: RuntimeGenesis, - E: ChainSpecExtension, - BC: ServiceBuilderCommand + Unpin, - BB: sp_runtime::traits::Block + Debug, - <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, - ::Hash: std::str::FromStr, - { - assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); - - crate::fill_import_params( - &mut config, - &self.import_params, - sc_service::Roles::FULL, - self.shared_params.dev, - )?; - crate::fill_config_keystore_in_memory(&mut config)?; - - let input = if self.input.starts_with("0x") { &self.input[2..] } else { &self.input[..] }; - let block_id = match FromStr::from_str(input) { - Ok(hash) => BlockId::hash(hash), - Err(_) => match self.input.parse::() { - Ok(n) => BlockId::number((n as u32).into()), - Err(_) => return Err(error::Error::Input("Invalid hash or number specified".into())), - } - }; - - let start = std::time::Instant::now(); - run_until_exit(config, |config| { - Ok(builder(config)?.check_block(block_id)) - })?; - println!("Completed in {} ms.", start.elapsed().as_millis()); - - Ok(()) - } -} - -impl PurgeChainCmd { - /// Run the purge command - pub fn run( - self, - mut config: Configuration, - ) -> error::Result<()> - where - G: RuntimeGenesis, - E: ChainSpecExtension, - { - assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); - - crate::fill_config_keystore_in_memory(&mut config)?; - - let db_path = match config.expect_database() { - DatabaseConfig::Path { path, .. } => path, - _ => { - eprintln!("Cannot purge custom database implementation"); - return Ok(()); - } - }; - - if !self.yes { - print!("Are you sure to remove {:?}? [y/N]: ", &db_path); - io::stdout().flush().expect("failed to flush stdout"); - - let mut input = String::new(); - io::stdin().read_line(&mut input)?; - let input = input.trim(); - - match input.chars().nth(0) { - Some('y') | Some('Y') => {}, - _ => { - println!("Aborted"); - return Ok(()); - }, - } - } - - match fs::remove_dir_all(&db_path) { - Ok(_) => { - println!("{:?} removed.", &db_path); - Ok(()) - }, - Err(ref err) if err.kind() == io::ErrorKind::NotFound => { - eprintln!("{:?} did not exist.", &db_path); - Ok(()) - }, - Err(err) => Result::Err(err.into()) - } - } -} - -impl RevertCmd { - /// Run the revert command - pub fn run( - self, - mut config: Configuration, - builder: B, - ) -> error::Result<()> - where - B: FnOnce(Configuration) -> Result, - G: RuntimeGenesis, - E: ChainSpecExtension, - BC: ServiceBuilderCommand + Unpin, - BB: sp_runtime::traits::Block + Debug, - <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, - ::Hash: std::str::FromStr, - { - assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); - - crate::fill_config_keystore_in_memory(&mut config)?; - - let blocks = self.num.parse()?; - builder(config)?.revert_chain(blocks)?; - - Ok(()) - } -} diff --git a/client/cli/src/params/import_params.rs b/client/cli/src/params/import_params.rs new file mode 100644 index 00000000000..98809a38ae4 --- /dev/null +++ b/client/cli/src/params/import_params.rs @@ -0,0 +1,219 @@ +// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use structopt::StructOpt; +use sc_service::{ + Configuration, RuntimeGenesis, + config::DatabaseConfig, PruningMode, +}; + +use crate::error; +use crate::arg_enums::{ + WasmExecutionMethod, TracingReceiver, ExecutionStrategy, DEFAULT_EXECUTION_BLOCK_CONSTRUCTION, + DEFAULT_EXECUTION_IMPORT_BLOCK, DEFAULT_EXECUTION_OFFCHAIN_WORKER, DEFAULT_EXECUTION_OTHER, + DEFAULT_EXECUTION_SYNCING +}; + +/// Parameters for block import. +#[derive(Debug, StructOpt, Clone)] +pub struct ImportParams { + /// Specify the state pruning mode, a number of blocks to keep or 'archive'. + /// + /// Default is to keep all block states if the node is running as a + /// validator (i.e. 'archive'), otherwise state is only kept for the last + /// 256 blocks. + #[structopt(long = "pruning", value_name = "PRUNING_MODE")] + pub pruning: Option, + + /// Force start with unsafe pruning settings. + /// + /// When running as a validator it is highly recommended to disable state + /// pruning (i.e. 'archive') which is the default. The node will refuse to + /// start as a validator if pruning is enabled unless this option is set. + #[structopt(long = "unsafe-pruning")] + pub unsafe_pruning: bool, + + /// Method for executing Wasm runtime code. + #[structopt( + long = "wasm-execution", + value_name = "METHOD", + possible_values = &WasmExecutionMethod::enabled_variants(), + case_insensitive = true, + default_value = "Interpreted" + )] + pub wasm_method: WasmExecutionMethod, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub execution_strategies: ExecutionStrategies, + + /// Limit the memory the database cache can use. + #[structopt(long = "db-cache", value_name = "MiB", default_value = "1024")] + pub database_cache_size: u32, + + /// Specify the state cache size. + #[structopt(long = "state-cache-size", value_name = "Bytes", default_value = "67108864")] + pub state_cache_size: usize, + + /// Comma separated list of targets for tracing + #[structopt(long = "tracing-targets", value_name = "TARGETS")] + pub tracing_targets: Option, + + /// Receiver to process tracing messages + #[structopt( + long = "tracing-receiver", + value_name = "RECEIVER", + possible_values = &TracingReceiver::variants(), + case_insensitive = true, + default_value = "Log" + )] + pub tracing_receiver: TracingReceiver, +} + +impl ImportParams { + /// Put block import CLI params into `config` object. + pub fn update_config( + &self, + config: &mut Configuration, + role: sc_service::Roles, + is_dev: bool, + ) -> error::Result<()> + where + G: RuntimeGenesis, + { + use sc_client_api::execution_extensions::ExecutionStrategies; + + if let Some(DatabaseConfig::Path { ref mut cache_size, .. }) = config.database { + *cache_size = Some(self.database_cache_size); + } + + config.state_cache_size = self.state_cache_size; + + // by default we disable pruning if the node is an authority (i.e. + // `ArchiveAll`), otherwise we keep state for the last 256 blocks. if the + // node is an authority and pruning is enabled explicitly, then we error + // unless `unsafe_pruning` is set. + config.pruning = match &self.pruning { + Some(ref s) if s == "archive" => PruningMode::ArchiveAll, + None if role == sc_service::Roles::AUTHORITY => PruningMode::ArchiveAll, + None => PruningMode::default(), + Some(s) => { + if role == sc_service::Roles::AUTHORITY && !self.unsafe_pruning { + return Err(error::Error::Input( + "Validators should run with state pruning disabled (i.e. archive). \ + You can ignore this check with `--unsafe-pruning`.".to_string() + )); + } + + PruningMode::keep_blocks(s.parse() + .map_err(|_| error::Error::Input("Invalid pruning mode specified".to_string()))? + ) + }, + }; + + config.wasm_method = self.wasm_method.into(); + + let exec = &self.execution_strategies; + let exec_all_or = |strat: ExecutionStrategy, default: ExecutionStrategy| { + exec.execution.unwrap_or(if strat == default && is_dev { + ExecutionStrategy::Native + } else { + strat + }).into() + }; + + config.execution_strategies = ExecutionStrategies { + syncing: exec_all_or(exec.execution_syncing, DEFAULT_EXECUTION_SYNCING), + importing: exec_all_or(exec.execution_import_block, DEFAULT_EXECUTION_IMPORT_BLOCK), + block_construction: + exec_all_or(exec.execution_block_construction, DEFAULT_EXECUTION_BLOCK_CONSTRUCTION), + offchain_worker: + exec_all_or(exec.execution_offchain_worker, DEFAULT_EXECUTION_OFFCHAIN_WORKER), + other: exec_all_or(exec.execution_other, DEFAULT_EXECUTION_OTHER), + }; + Ok(()) + } +} + +/// Execution strategies parameters. +#[derive(Debug, StructOpt, Clone)] +pub struct ExecutionStrategies { + /// The means of execution used when calling into the runtime while syncing blocks. + #[structopt( + long = "execution-syncing", + value_name = "STRATEGY", + possible_values = &ExecutionStrategy::variants(), + case_insensitive = true, + default_value = DEFAULT_EXECUTION_SYNCING.as_str(), + )] + pub execution_syncing: ExecutionStrategy, + + /// The means of execution used when calling into the runtime while importing blocks. + #[structopt( + long = "execution-import-block", + value_name = "STRATEGY", + possible_values = &ExecutionStrategy::variants(), + case_insensitive = true, + default_value = DEFAULT_EXECUTION_IMPORT_BLOCK.as_str(), + )] + pub execution_import_block: ExecutionStrategy, + + /// The means of execution used when calling into the runtime while constructing blocks. + #[structopt( + long = "execution-block-construction", + value_name = "STRATEGY", + possible_values = &ExecutionStrategy::variants(), + case_insensitive = true, + default_value = DEFAULT_EXECUTION_BLOCK_CONSTRUCTION.as_str(), + )] + pub execution_block_construction: ExecutionStrategy, + + /// The means of execution used when calling into the runtime while using an off-chain worker. + #[structopt( + long = "execution-offchain-worker", + value_name = "STRATEGY", + possible_values = &ExecutionStrategy::variants(), + case_insensitive = true, + default_value = DEFAULT_EXECUTION_OFFCHAIN_WORKER.as_str(), + )] + pub execution_offchain_worker: ExecutionStrategy, + + /// The means of execution used when calling into the runtime while not syncing, importing or constructing blocks. + #[structopt( + long = "execution-other", + value_name = "STRATEGY", + possible_values = &ExecutionStrategy::variants(), + case_insensitive = true, + default_value = DEFAULT_EXECUTION_OTHER.as_str(), + )] + pub execution_other: ExecutionStrategy, + + /// The execution strategy that should be used by all execution contexts. + #[structopt( + long = "execution", + value_name = "STRATEGY", + possible_values = &ExecutionStrategy::variants(), + case_insensitive = true, + conflicts_with_all = &[ + "execution-other", + "execution-offchain-worker", + "execution-block-construction", + "execution-import-block", + "execution-syncing", + ] + )] + pub execution: Option, +} diff --git a/client/cli/src/params/mod.rs b/client/cli/src/params/mod.rs new file mode 100644 index 00000000000..75509afa425 --- /dev/null +++ b/client/cli/src/params/mod.rs @@ -0,0 +1,65 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +mod import_params; +mod transaction_pool_params; +mod shared_params; +mod node_key_params; +mod network_configuration_params; + +use std::str::FromStr; +use std::fmt::Debug; + +pub use crate::params::import_params::*; +pub use crate::params::transaction_pool_params::*; +pub use crate::params::shared_params::*; +pub use crate::params::node_key_params::*; +pub use crate::params::network_configuration_params::*; + +/// Wrapper type of `String` that holds an unsigned integer of arbitrary size, formatted as a decimal. +#[derive(Debug, Clone)] +pub struct BlockNumber(String); + +impl FromStr for BlockNumber { + type Err = String; + + fn from_str(block_number: &str) -> Result { + if block_number.chars().any(|d| !d.is_digit(10)) { + Err(format!( + "Invalid block number: {}, expected decimal formatted unsigned integer", + block_number, + )) + } else { + Ok(Self(block_number.to_owned())) + } + } +} + +impl BlockNumber { + /// Wrapper on top of `std::str::parse` but with `Error` as a `String` + /// + /// See `https://doc.rust-lang.org/std/primitive.str.html#method.parse` for more elaborate + /// documentation. + pub fn parse(&self) -> Result + where + N: FromStr, + N::Err: std::fmt::Debug, + { + self.0 + .parse() + .map_err(|e| format!("BlockNumber: {} parsing failed because of {:?}", self.0, e)) + } +} diff --git a/client/cli/src/params/network_configuration_params.rs b/client/cli/src/params/network_configuration_params.rs new file mode 100644 index 00000000000..eef679d6a61 --- /dev/null +++ b/client/cli/src/params/network_configuration_params.rs @@ -0,0 +1,160 @@ +// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use std::path::PathBuf; +use std::iter; +use std::net::Ipv4Addr; +use structopt::StructOpt; +use sc_network::{ + config::{NonReservedPeerMode, TransportConfig}, multiaddr::Protocol, +}; +use sc_service::{Configuration, RuntimeGenesis}; + +use crate::error; +use crate::params::node_key_params::NodeKeyParams; + +/// Parameters used to create the network configuration. +#[derive(Debug, StructOpt, Clone)] +pub struct NetworkConfigurationParams { + /// Specify a list of bootnodes. + #[structopt(long = "bootnodes", value_name = "URL")] + pub bootnodes: Vec, + + /// Specify a list of reserved node addresses. + #[structopt(long = "reserved-nodes", value_name = "URL")] + pub reserved_nodes: Vec, + + /// Whether to only allow connections to/from reserved nodes. + /// + /// If you are a validator your node might still connect to other validator + /// nodes regardless of whether they are defined as reserved nodes. + #[structopt(long = "reserved-only")] + pub reserved_only: bool, + + /// Specify a list of sentry node public addresses. + #[structopt( + long = "sentry-nodes", + value_name = "URL", + conflicts_with_all = &[ "sentry" ] + )] + pub sentry_nodes: Vec, + + /// Listen on this multiaddress. + #[structopt(long = "listen-addr", value_name = "LISTEN_ADDR")] + pub listen_addr: Vec, + + /// Specify p2p protocol TCP port. + /// + /// Only used if --listen-addr is not specified. + #[structopt(long = "port", value_name = "PORT")] + pub port: Option, + + /// Forbid connecting to private IPv4 addresses (as specified in + /// [RFC1918](https://tools.ietf.org/html/rfc1918)), unless the address was passed with + /// `--reserved-nodes` or `--bootnodes`. + #[structopt(long = "no-private-ipv4")] + pub no_private_ipv4: bool, + + /// Specify the number of outgoing connections we're trying to maintain. + #[structopt(long = "out-peers", value_name = "COUNT", default_value = "25")] + pub out_peers: u32, + + /// Specify the maximum number of incoming connections we're accepting. + #[structopt(long = "in-peers", value_name = "COUNT", default_value = "25")] + pub in_peers: u32, + + /// Disable mDNS discovery. + /// + /// By default, the network will use mDNS to discover other nodes on the + /// local network. This disables it. Automatically implied when using --dev. + #[structopt(long = "no-mdns")] + pub no_mdns: bool, + + /// Maximum number of peers to ask the same blocks in parallel. + /// + /// This allows downlading announced blocks from multiple peers. Decrease to save + /// traffic and risk increased latency. + #[structopt(long = "max-parallel-downloads", value_name = "COUNT", default_value = "5")] + pub max_parallel_downloads: u32, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub node_key_params: NodeKeyParams, + + /// Experimental feature flag. + #[structopt(long = "use-yamux-flow-control")] + pub use_yamux_flow_control: bool, +} + +impl NetworkConfigurationParams { + /// Fill the given `NetworkConfiguration` by looking at the cli parameters. + pub fn update_config( + &self, + mut config: &mut Configuration, + config_path: PathBuf, + client_id: String, + is_dev: bool, + ) -> error::Result<()> + where + G: RuntimeGenesis, + { + config.network.boot_nodes.extend(self.bootnodes.clone()); + config.network.config_path = Some(config_path.clone()); + config.network.net_config_path = Some(config_path.clone()); + + config.network.reserved_nodes.extend(self.reserved_nodes.clone()); + if self.reserved_only { + config.network.non_reserved_mode = NonReservedPeerMode::Deny; + } + + config.network.sentry_nodes.extend(self.sentry_nodes.clone()); + + for addr in self.listen_addr.iter() { + let addr = addr.parse().ok().ok_or(error::Error::InvalidListenMultiaddress)?; + config.network.listen_addresses.push(addr); + } + + if config.network.listen_addresses.is_empty() { + let port = match self.port { + Some(port) => port, + None => 30333, + }; + + config.network.listen_addresses = vec![ + iter::once(Protocol::Ip4(Ipv4Addr::new(0, 0, 0, 0))) + .chain(iter::once(Protocol::Tcp(port))) + .collect() + ]; + } + + config.network.client_version = client_id; + self.node_key_params.update_config(&mut config, Some(&config_path))?; + + config.network.in_peers = self.in_peers; + config.network.out_peers = self.out_peers; + + config.network.transport = TransportConfig::Normal { + enable_mdns: !is_dev && !self.no_mdns, + allow_private_ipv4: !self.no_private_ipv4, + wasm_external_transport: None, + use_yamux_flow_control: self.use_yamux_flow_control, + }; + + config.network.max_parallel_downloads = self.max_parallel_downloads; + + Ok(()) + } +} diff --git a/client/cli/src/params/node_key_params.rs b/client/cli/src/params/node_key_params.rs new file mode 100644 index 00000000000..ddc1d6cc21a --- /dev/null +++ b/client/cli/src/params/node_key_params.rs @@ -0,0 +1,244 @@ +// Copyright 2017-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use std::{path::PathBuf, str::FromStr}; +use structopt::StructOpt; +use sc_service::{Configuration, RuntimeGenesis}; +use sc_network::config::NodeKeyConfig; +use sp_core::H256; + +use crate::error; +use crate::arg_enums::NodeKeyType; + +/// The file name of the node's Ed25519 secret key inside the chain-specific +/// network config directory, if neither `--node-key` nor `--node-key-file` +/// is specified in combination with `--node-key-type=ed25519`. +const NODE_KEY_ED25519_FILE: &str = "secret_ed25519"; + +/// Parameters used to create the `NodeKeyConfig`, which determines the keypair +/// used for libp2p networking. +#[derive(Debug, StructOpt, Clone)] +pub struct NodeKeyParams { + /// The secret key to use for libp2p networking. + /// + /// The value is a string that is parsed according to the choice of + /// `--node-key-type` as follows: + /// + /// `ed25519`: + /// The value is parsed as a hex-encoded Ed25519 32 bytes secret key, + /// i.e. 64 hex characters. + /// + /// The value of this option takes precedence over `--node-key-file`. + /// + /// WARNING: Secrets provided as command-line arguments are easily exposed. + /// Use of this option should be limited to development and testing. To use + /// an externally managed secret key, use `--node-key-file` instead. + #[structopt(long = "node-key", value_name = "KEY")] + pub node_key: Option, + + /// The type of secret key to use for libp2p networking. + /// + /// The secret key of the node is obtained as follows: + /// + /// * If the `--node-key` option is given, the value is parsed as a secret key + /// according to the type. See the documentation for `--node-key`. + /// + /// * If the `--node-key-file` option is given, the secret key is read from the + /// specified file. See the documentation for `--node-key-file`. + /// + /// * Otherwise, the secret key is read from a file with a predetermined, + /// type-specific name from the chain-specific network config directory + /// inside the base directory specified by `--base-dir`. If this file does + /// not exist, it is created with a newly generated secret key of the + /// chosen type. + /// + /// The node's secret key determines the corresponding public key and hence the + /// node's peer ID in the context of libp2p. + #[structopt( + long = "node-key-type", + value_name = "TYPE", + possible_values = &NodeKeyType::variants(), + case_insensitive = true, + default_value = "Ed25519" + )] + pub node_key_type: NodeKeyType, + + /// The file from which to read the node's secret key to use for libp2p networking. + /// + /// The contents of the file are parsed according to the choice of `--node-key-type` + /// as follows: + /// + /// `ed25519`: + /// The file must contain an unencoded 32 bytes Ed25519 secret key. + /// + /// If the file does not exist, it is created with a newly generated secret key of + /// the chosen type. + #[structopt(long = "node-key-file", value_name = "FILE")] + pub node_key_file: Option, +} + +impl NodeKeyParams { + /// Create a `NodeKeyConfig` from the given `NodeKeyParams` in the context + /// of an optional network config storage directory. + pub fn update_config<'a, G, E>( + &self, + mut config: &'a mut Configuration, + net_config_path: Option<&PathBuf>, + ) -> error::Result<&'a NodeKeyConfig> + where + G: RuntimeGenesis, + { + config.network.node_key = match self.node_key_type { + NodeKeyType::Ed25519 => { + let secret = if let Some(node_key) = self.node_key.as_ref() { + parse_ed25519_secret(node_key)? + } else { + let path = self.node_key_file.clone() + .or_else(|| net_config_path.map(|d| d.join(NODE_KEY_ED25519_FILE))); + + if let Some(path) = path { + sc_network::config::Secret::File(path) + } else { + sc_network::config::Secret::New + } + }; + + NodeKeyConfig::Ed25519(secret) + } + }; + + Ok(&config.network.node_key) + } +} + +/// Create an error caused by an invalid node key argument. +fn invalid_node_key(e: impl std::fmt::Display) -> error::Error { + error::Error::Input(format!("Invalid node key: {}", e)) +} + +/// Parse a Ed25519 secret key from a hex string into a `sc_network::Secret`. +fn parse_ed25519_secret(hex: &str) -> error::Result { + H256::from_str(&hex).map_err(invalid_node_key).and_then(|bytes| + sc_network::config::identity::ed25519::SecretKey::from_bytes(bytes) + .map(sc_network::config::Secret::Input) + .map_err(invalid_node_key)) +} + +#[cfg(test)] +mod tests { + use sc_network::config::identity::ed25519; + use super::*; + + #[test] + fn test_node_key_config_input() { + fn secret_input(net_config_dir: Option<&PathBuf>) -> error::Result<()> { + NodeKeyType::variants().iter().try_for_each(|t| { + let mut config = Configuration::<(), ()>::default(); + let node_key_type = NodeKeyType::from_str(t).unwrap(); + let sk = match node_key_type { + NodeKeyType::Ed25519 => ed25519::SecretKey::generate().as_ref().to_vec() + }; + let params = NodeKeyParams { + node_key_type, + node_key: Some(format!("{:x}", H256::from_slice(sk.as_ref()))), + node_key_file: None + }; + params.update_config(&mut config, net_config_dir).and_then(|c| match c { + NodeKeyConfig::Ed25519(sc_network::config::Secret::Input(ref ski)) + if node_key_type == NodeKeyType::Ed25519 && + &sk[..] == ski.as_ref() => Ok(()), + _ => Err(error::Error::Input("Unexpected node key config".into())) + }) + }) + } + + assert!(secret_input(None).is_ok()); + assert!(secret_input(Some(&PathBuf::from_str("x").unwrap())).is_ok()); + } + + #[test] + fn test_node_key_config_file() { + fn secret_file(net_config_dir: Option<&PathBuf>) -> error::Result<()> { + NodeKeyType::variants().iter().try_for_each(|t| { + let mut config = Configuration::<(), ()>::default(); + let node_key_type = NodeKeyType::from_str(t).unwrap(); + let tmp = tempfile::Builder::new().prefix("alice").tempdir()?; + let file = tmp.path().join(format!("{}_mysecret", t)).to_path_buf(); + let params = NodeKeyParams { + node_key_type, + node_key: None, + node_key_file: Some(file.clone()) + }; + params.update_config(&mut config, net_config_dir).and_then(|c| match c { + NodeKeyConfig::Ed25519(sc_network::config::Secret::File(ref f)) + if node_key_type == NodeKeyType::Ed25519 && f == &file => Ok(()), + _ => Err(error::Error::Input("Unexpected node key config".into())) + }) + }) + } + + assert!(secret_file(None).is_ok()); + assert!(secret_file(Some(&PathBuf::from_str("x").unwrap())).is_ok()); + } + + #[test] + fn test_node_key_config_default() { + fn with_def_params(f: F) -> error::Result<()> + where + F: Fn(NodeKeyParams) -> error::Result<()> + { + NodeKeyType::variants().iter().try_for_each(|t| { + let node_key_type = NodeKeyType::from_str(t).unwrap(); + f(NodeKeyParams { + node_key_type, + node_key: None, + node_key_file: None + }) + }) + } + + fn no_config_dir() -> error::Result<()> { + with_def_params(|params| { + let mut config = Configuration::<(), ()>::default(); + let typ = params.node_key_type; + params.update_config(&mut config, None) + .and_then(|c| match c { + NodeKeyConfig::Ed25519(sc_network::config::Secret::New) + if typ == NodeKeyType::Ed25519 => Ok(()), + _ => Err(error::Error::Input("Unexpected node key config".into())) + }) + }) + } + + fn some_config_dir(net_config_dir: &PathBuf) -> error::Result<()> { + with_def_params(|params| { + let mut config = Configuration::<(), ()>::default(); + let dir = PathBuf::from(net_config_dir.clone()); + let typ = params.node_key_type; + params.update_config(&mut config, Some(net_config_dir)) + .and_then(move |c| match c { + NodeKeyConfig::Ed25519(sc_network::config::Secret::File(ref f)) + if typ == NodeKeyType::Ed25519 && + f == &dir.join(NODE_KEY_ED25519_FILE) => Ok(()), + _ => Err(error::Error::Input("Unexpected node key config".into())) + }) + }) + } + + assert!(no_config_dir().is_ok()); + assert!(some_config_dir(&PathBuf::from_str("x").unwrap()).is_ok()); + } +} diff --git a/client/cli/src/params/shared_params.rs b/client/cli/src/params/shared_params.rs new file mode 100644 index 00000000000..03f44796460 --- /dev/null +++ b/client/cli/src/params/shared_params.rs @@ -0,0 +1,116 @@ +// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use std::path::PathBuf; +use structopt::StructOpt; +use app_dirs::{AppInfo, AppDataType}; +use sc_service::{ + Configuration, ChainSpecExtension, RuntimeGenesis, + config::DatabaseConfig, ChainSpec, +}; + +use crate::VersionInfo; +use crate::error; + +/// default sub directory to store database +const DEFAULT_DB_CONFIG_PATH : &'static str = "db"; + +/// Shared parameters used by all `CoreParams`. +#[derive(Debug, StructOpt, Clone)] +pub struct SharedParams { + /// Specify the chain specification (one of dev, local or staging). + #[structopt(long = "chain", value_name = "CHAIN_SPEC")] + pub chain: Option, + + /// Specify the development chain. + #[structopt(long = "dev")] + pub dev: bool, + + /// Specify custom base path. + #[structopt(long = "base-path", short = "d", value_name = "PATH", parse(from_os_str))] + pub base_path: Option, + + /// Sets a custom logging filter. + #[structopt(short = "l", long = "log", value_name = "LOG_PATTERN")] + pub log: Option, +} + +impl SharedParams { + /// Load spec to `Configuration` from `SharedParams` and spec factory. + pub fn update_config<'a, G, E, F>( + &self, + mut config: &'a mut Configuration, + spec_factory: F, + version: &VersionInfo, + ) -> error::Result<&'a ChainSpec> where + G: RuntimeGenesis, + E: ChainSpecExtension, + F: FnOnce(&str) -> Result>, String>, + { + let chain_key = match self.chain { + Some(ref chain) => chain.clone(), + None => if self.dev { "dev".into() } else { "".into() } + }; + let spec = match spec_factory(&chain_key)? { + Some(spec) => spec, + None => ChainSpec::from_json_file(PathBuf::from(chain_key))? + }; + + config.network.boot_nodes = spec.boot_nodes().to_vec(); + config.telemetry_endpoints = spec.telemetry_endpoints().clone(); + + config.chain_spec = Some(spec); + + if config.config_dir.is_none() { + config.config_dir = Some(base_path(self, version)); + } + + if config.database.is_none() { + config.database = Some(DatabaseConfig::Path { + path: config + .in_chain_config_dir(DEFAULT_DB_CONFIG_PATH) + .expect("We provided a base_path/config_dir."), + cache_size: None, + }); + } + + Ok(config.chain_spec.as_ref().unwrap()) + } + + /// Initialize substrate. This must be done only once. + /// + /// This method: + /// + /// 1. Set the panic handler + /// 2. Raise the FD limit + /// 3. Initialize the logger + pub fn init(&self, version: &VersionInfo) -> error::Result<()> { + crate::init(self.log.as_ref().map(|v| v.as_ref()).unwrap_or(""), version) + } +} + +fn base_path(cli: &SharedParams, version: &VersionInfo) -> PathBuf { + cli.base_path.clone() + .unwrap_or_else(|| + app_dirs::get_app_root( + AppDataType::UserData, + &AppInfo { + name: version.executable_name, + author: version.author + } + ).expect("app directories exist on all supported platforms; qed") + ) +} diff --git a/client/cli/src/params/transaction_pool_params.rs b/client/cli/src/params/transaction_pool_params.rs new file mode 100644 index 00000000000..80c591d1d2d --- /dev/null +++ b/client/cli/src/params/transaction_pool_params.rs @@ -0,0 +1,49 @@ +// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use structopt::StructOpt; +use sc_service::Configuration; +use crate::error; + +/// Parameters used to create the pool configuration. +#[derive(Debug, StructOpt, Clone)] +pub struct TransactionPoolParams { + /// Maximum number of transactions in the transaction pool. + #[structopt(long = "pool-limit", value_name = "COUNT", default_value = "8192")] + pub pool_limit: usize, + /// Maximum number of kilobytes of all transactions stored in the pool. + #[structopt(long = "pool-kbytes", value_name = "COUNT", default_value = "20480")] + pub pool_kbytes: usize, +} + +impl TransactionPoolParams { + /// Fill the given `PoolConfiguration` by looking at the cli parameters. + pub fn update_config( + &self, + config: &mut Configuration, + ) -> error::Result<()> { + // ready queue + config.transaction_pool.ready.count = self.pool_limit; + config.transaction_pool.ready.total_bytes = self.pool_kbytes * 1024; + + // future queue + let factor = 10; + config.transaction_pool.future.count = self.pool_limit / factor; + config.transaction_pool.future.total_bytes = self.pool_kbytes * 1024 / factor; + + Ok(()) + } +} diff --git a/client/db/src/utils.rs b/client/db/src/utils.rs index 534cbb2197e..f26714eb5a7 100644 --- a/client/db/src/utils.rs +++ b/client/db/src/utils.rs @@ -36,6 +36,7 @@ use crate::{DatabaseSettings, DatabaseSettingsSrc}; /// Number of columns in the db. Must be the same for both full && light dbs. /// Otherwise RocksDb will fail to open database && check its type. +#[cfg(any(feature = "kvdb-rocksdb", feature = "test-helpers", test))] pub const NUM_COLUMNS: u32 = 11; /// Meta column. The set of keys in the column is shared by full && light storages. pub const COLUMN_META: u32 = 0; diff --git a/client/network/src/config.rs b/client/network/src/config.rs index 8c97cbb8729..f6a3db4afe8 100644 --- a/client/network/src/config.rs +++ b/client/network/src/config.rs @@ -126,6 +126,12 @@ impl Roles { } } +impl fmt::Display for Roles { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{:?}", self) + } +} + impl codec::Encode for Roles { fn encode_to(&self, dest: &mut T) { dest.push_byte(self.bits()) @@ -247,9 +253,9 @@ impl From for ParseErr { #[derive(Clone, Debug)] pub struct NetworkConfiguration { /// Directory path to store general network configuration. None means nothing will be saved. - pub config_path: Option, + pub config_path: Option, /// Directory path to store network-specific configuration. None means nothing will be saved. - pub net_config_path: Option, + pub net_config_path: Option, /// Multiaddresses to listen for incoming connections. pub listen_addresses: Vec, /// Multiaddresses to advertise. Detected automatically if empty. diff --git a/client/service/src/config.rs b/client/service/src/config.rs index f5b187e8b35..002754f11ce 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -207,7 +207,7 @@ impl Default for Configuration { impl Configuration { /// Create a default config using `VersionInfo` - pub fn new(version: &VersionInfo) -> Self { + pub fn from_version(version: &VersionInfo) -> Self { let mut config = Configuration::default(); config.impl_name = version.name; config.impl_version = version.version; @@ -254,6 +254,28 @@ impl Configuration { pub fn expect_database(&self) -> &DatabaseConfig { self.database.as_ref().expect("database must be specified") } + + /// Returns a string displaying the node role, special casing the sentry mode + /// (returning `SENTRY`), since the node technically has an `AUTHORITY` role but + /// doesn't participate. + pub fn display_role(&self) -> String { + if self.sentry_mode { + "SENTRY".to_string() + } else { + self.roles.to_string() + } + } + + /// Use in memory keystore config when it is not required at all. + /// + /// This function returns an error if the keystore is already set to something different than + /// `KeystoreConfig::None`. + pub fn use_in_memory_keystore(&mut self) -> Result<(), String> { + match &mut self.keystore { + cfg @ KeystoreConfig::None => { *cfg = KeystoreConfig::InMemory; Ok(()) }, + _ => Err("Keystore config specified when it should not be!".into()), + } + } } /// Returns platform info diff --git a/client/service/test/src/lib.rs b/client/service/test/src/lib.rs index 414b943594c..5f679b82b39 100644 --- a/client/service/test/src/lib.rs +++ b/client/service/test/src/lib.rs @@ -141,7 +141,7 @@ fn node_config ( { let root = root.path().join(format!("node-{}", index)); - let config_path = Some(String::from(root.join("network").to_str().unwrap())); + let config_path = Some(root.join("network")); let net_config_path = config_path.clone(); let network_config = NetworkConfiguration { diff --git a/utils/frame/benchmarking-cli/src/lib.rs b/utils/frame/benchmarking-cli/src/lib.rs index a8303beb0fe..b515e490131 100644 --- a/utils/frame/benchmarking-cli/src/lib.rs +++ b/utils/frame/benchmarking-cli/src/lib.rs @@ -16,9 +16,9 @@ use sp_runtime::{BuildStorage, traits::{Block as BlockT, Header as HeaderT, NumberFor}}; use sc_client::StateMachine; -use sc_cli::{ExecutionStrategy, WasmExecutionMethod}; +use sc_cli::{ExecutionStrategy, WasmExecutionMethod, VersionInfo}; use sc_client_db::BenchmarkingState; -use sc_service::{RuntimeGenesis, ChainSpecExtension}; +use sc_service::{RuntimeGenesis, ChainSpecExtension, Configuration, ChainSpec}; use sc_executor::{NativeExecutor, NativeExecutionDispatch}; use std::fmt::Debug; use codec::{Encode, Decode}; @@ -68,26 +68,16 @@ pub struct BenchmarkCmd { } impl BenchmarkCmd { - /// Parse CLI arguments and initialize given config. - pub fn init( - &self, - config: &mut sc_service::config::Configuration, - spec_factory: impl FnOnce(&str) -> Result>, String>, - version: &sc_cli::VersionInfo, - ) -> sc_cli::error::Result<()> where - G: sc_service::RuntimeGenesis, - E: sc_service::ChainSpecExtension, - { - sc_cli::init_config(config, &self.shared_params, version, spec_factory)?; - // make sure to configure keystore - sc_cli::fill_config_keystore_in_memory(config).map_err(Into::into) + /// Initialize + pub fn init(&self, version: &sc_cli::VersionInfo) -> sc_cli::Result<()> { + self.shared_params.init(version) } /// Runs the command and benchmarks the chain. pub fn run( self, - config: sc_service::Configuration, - ) -> sc_cli::error::Result<()> + config: Configuration, + ) -> sc_cli::Result<()> where G: RuntimeGenesis, E: ChainSpecExtension, @@ -149,4 +139,22 @@ impl BenchmarkCmd { Ok(()) } + + /// Update and prepare a `Configuration` with command line parameters + pub fn update_config( + &self, + mut config: &mut Configuration, + spec_factory: impl FnOnce(&str) -> Result>, String>, + version: &VersionInfo, + ) -> sc_cli::Result<()> where + G: RuntimeGenesis, + E: ChainSpecExtension, + { + self.shared_params.update_config(&mut config, spec_factory, version)?; + + // make sure to configure keystore + config.use_in_memory_keystore()?; + + Ok(()) + } } -- GitLab From 3cc0973aff3f5b507c8ed1a13934bd35697b251f Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Fri, 21 Feb 2020 05:02:12 -0800 Subject: [PATCH 028/106] Remove `NetworkSpecialization` (#4665) * remove networkspecialization * Fix most of the fallout * get all tests compiling Co-authored-by: Pierre Krieger --- bin/node-template/node/src/service.rs | 9 +- bin/node/cli/src/service.rs | 11 +- client/authority-discovery/src/lib.rs | 4 +- client/consensus/aura/src/lib.rs | 9 +- client/consensus/babe/src/tests.rs | 9 +- .../finality-grandpa/src/communication/mod.rs | 3 +- client/finality-grandpa/src/tests.rs | 5 +- client/network-gossip/src/lib.rs | 4 +- client/network/src/behaviour.rs | 33 ++-- client/network/src/config.rs | 5 +- client/network/src/lib.rs | 10 +- client/network/src/protocol.rs | 97 +--------- .../src/protocol/generic_proto/tests.rs | 28 ++- client/network/src/protocol/message.rs | 4 - client/network/src/protocol/specialization.rs | 171 ------------------ client/network/src/service.rs | 84 ++++----- client/network/test/src/lib.rs | 52 ++---- client/service/src/builder.rs | 75 ++------ client/service/src/chain_ops.rs | 4 +- client/service/src/lib.rs | 22 +-- 20 files changed, 136 insertions(+), 503 deletions(-) delete mode 100644 client/network/src/protocol/specialization.rs diff --git a/bin/node-template/node/src/service.rs b/bin/node-template/node/src/service.rs index c5b9bf336ee..5b64984c47c 100644 --- a/bin/node-template/node/src/service.rs +++ b/bin/node-template/node/src/service.rs @@ -6,7 +6,6 @@ use sc_client::LongestChain; use node_template_runtime::{self, GenesisConfig, opaque::Block, RuntimeApi}; use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration, ServiceBuilder}; use sp_inherents::InherentDataProviders; -use sc_network::{construct_simple_protocol}; use sc_executor::native_executor_instance; pub use sc_executor::NativeExecutor; use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair}; @@ -19,11 +18,6 @@ native_executor_instance!( node_template_runtime::native_version, ); -construct_simple_protocol! { - /// Demo protocol attachment for substrate. - pub struct NodeProtocol where Block = Block { } -} - /// 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 @@ -95,7 +89,7 @@ pub fn new_full(config: Configuration) import_setup.take() .expect("Link Half and Block Import are present for Full Services or setup failed before. qed"); - let service = builder.with_network_protocol(|_| Ok(NodeProtocol::new()))? + let service = builder .with_finality_proof_provider(|client, backend| Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, client)) as _) )? @@ -228,7 +222,6 @@ pub fn new_light(config: Configuration) Ok((import_queue, finality_proof_request_builder)) })? - .with_network_protocol(|_| Ok(NodeProtocol::new()))? .with_finality_proof_provider(|client, backend| Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, client)) as _) )? diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs index 1dc5a061a37..70dd0521dec 100644 --- a/bin/node/cli/src/service.rs +++ b/bin/node/cli/src/service.rs @@ -30,7 +30,6 @@ use sc_service::{ AbstractService, ServiceBuilder, config::Configuration, error::{Error as ServiceError}, }; use sp_inherents::InherentDataProviders; -use sc_network::construct_simple_protocol; use sc_service::{Service, NetworkStatus}; use sc_client::{Client, LocalCallExecutor}; @@ -40,11 +39,6 @@ use node_executor::NativeExecutor; use sc_network::NetworkService; use sc_offchain::OffchainWorkers; -construct_simple_protocol! { - /// Demo protocol attachment for substrate. - pub struct NodeProtocol where Block = Block { } -} - /// 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 @@ -144,7 +138,7 @@ macro_rules! new_full { let (builder, mut import_setup, inherent_data_providers) = new_full_start!($config); - let service = builder.with_network_protocol(|_| Ok(crate::service::NodeProtocol::new()))? + let service = builder .with_finality_proof_provider(|client, backend| Ok(Arc::new(grandpa::FinalityProofProvider::new(backend, client)) as _) )? @@ -283,7 +277,7 @@ pub fn new_full(config: NodeConfiguration) ConcreteClient, LongestChain, NetworkStatus, - NetworkService::Hash>, + NetworkService::Hash>, ConcreteTransactionPool, OffchainWorkers< ConcreteClient, @@ -348,7 +342,6 @@ pub fn new_light(config: NodeConfiguration) Ok((import_queue, finality_proof_request_builder)) })? - .with_network_protocol(|_| Ok(NodeProtocol::new()))? .with_finality_proof_provider(|client, backend| Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, client)) as _) )? diff --git a/client/authority-discovery/src/lib.rs b/client/authority-discovery/src/lib.rs index 6260ac9a85b..92dcc264502 100644 --- a/client/authority-discovery/src/lib.rs +++ b/client/authority-discovery/src/lib.rs @@ -60,7 +60,6 @@ use libp2p::Multiaddr; use log::{debug, error, log_enabled, warn}; use prost::Message; use sc_client_api::blockchain::HeaderBackend; -use sc_network::specialization::NetworkSpecialization; use sc_network::{DhtEvent, ExHashT, NetworkStateInfo}; use sp_authority_discovery::{AuthorityDiscoveryApi, AuthorityId, AuthoritySignature, AuthorityPair}; use sp_core::crypto::{key_types, Pair}; @@ -477,10 +476,9 @@ pub trait NetworkProvider: NetworkStateInfo { fn get_value(&self, key: &libp2p::kad::record::Key); } -impl NetworkProvider for sc_network::NetworkService +impl NetworkProvider for sc_network::NetworkService where B: BlockT + 'static, - S: NetworkSpecialization, H: ExHashT, { fn set_priority_group( diff --git a/client/consensus/aura/src/lib.rs b/client/consensus/aura/src/lib.rs index 9be52e02467..13dd81c1989 100644 --- a/client/consensus/aura/src/lib.rs +++ b/client/consensus/aura/src/lib.rs @@ -896,11 +896,10 @@ mod tests { const SLOT_DURATION: u64 = 1000; pub struct AuraTestNet { - peers: Vec>, + peers: Vec>, } impl TestNetFactory for AuraTestNet { - type Specialization = DummySpecialization; type Verifier = AuraVerifier; type PeerData = (); @@ -935,15 +934,15 @@ mod tests { } } - fn peer(&mut self, i: usize) -> &mut Peer { + fn peer(&mut self, i: usize) -> &mut Peer { &mut self.peers[i] } - fn peers(&self) -> &Vec> { + fn peers(&self) -> &Vec> { &self.peers } - fn mut_peers>)>(&mut self, closure: F) { + fn mut_peers>)>(&mut self, closure: F) { closure(&mut self.peers); } } diff --git a/client/consensus/babe/src/tests.rs b/client/consensus/babe/src/tests.rs index d8696d59442..4045e18b5c3 100644 --- a/client/consensus/babe/src/tests.rs +++ b/client/consensus/babe/src/tests.rs @@ -199,7 +199,7 @@ impl> BlockImport for PanickingBlockImport< } pub struct BabeTestNet { - peers: Vec, DummySpecialization>>, + peers: Vec>>, } type TestHeader = ::Header; @@ -236,7 +236,6 @@ pub struct PeerData { } impl TestNetFactory for BabeTestNet { - type Specialization = DummySpecialization; type Verifier = TestVerifier; type PeerData = Option; @@ -307,17 +306,17 @@ impl TestNetFactory for BabeTestNet { } } - fn peer(&mut self, i: usize) -> &mut Peer { + fn peer(&mut self, i: usize) -> &mut Peer { trace!(target: "babe", "Retrieving a peer"); &mut self.peers[i] } - fn peers(&self) -> &Vec> { + fn peers(&self) -> &Vec> { trace!(target: "babe", "Retrieving peers"); &self.peers } - fn mut_peers>)>( + fn mut_peers>)>( &mut self, closure: F, ) { diff --git a/client/finality-grandpa/src/communication/mod.rs b/client/finality-grandpa/src/communication/mod.rs index b5600c1c0d8..1f4e2235971 100644 --- a/client/finality-grandpa/src/communication/mod.rs +++ b/client/finality-grandpa/src/communication/mod.rs @@ -120,9 +120,8 @@ pub trait Network: GossipNetwork + Clone + Send + 'static fn set_sync_fork_request(&self, peers: Vec, hash: Block::Hash, number: NumberFor); } -impl Network for Arc> where +impl Network for Arc> where B: BlockT, - S: sc_network::specialization::NetworkSpecialization, H: sc_network::ExHashT, { fn set_sync_fork_request(&self, peers: Vec, hash: B::Hash, number: NumberFor) { diff --git a/client/finality-grandpa/src/tests.rs b/client/finality-grandpa/src/tests.rs index 5d01b257b6d..16b50ccb9f2 100644 --- a/client/finality-grandpa/src/tests.rs +++ b/client/finality-grandpa/src/tests.rs @@ -19,7 +19,7 @@ use super::*; use environment::HasVoted; use sc_network_test::{ - Block, DummySpecialization, Hash, TestNetFactory, BlockImportAdapter, Peer, + Block, Hash, TestNetFactory, BlockImportAdapter, Peer, PeersClient, PassThroughVerifier, }; use sc_network::config::{ProtocolConfig, Roles, BoxFinalityProofRequestBuilder}; @@ -68,7 +68,7 @@ type PeerData = > > >; -type GrandpaPeer = Peer; +type GrandpaPeer = Peer; struct GrandpaTestNet { peers: Vec, @@ -90,7 +90,6 @@ impl GrandpaTestNet { } impl TestNetFactory for GrandpaTestNet { - type Specialization = DummySpecialization; type Verifier = PassThroughVerifier; type PeerData = PeerData; diff --git a/client/network-gossip/src/lib.rs b/client/network-gossip/src/lib.rs index abb3f32972b..4e4d32366f2 100644 --- a/client/network-gossip/src/lib.rs +++ b/client/network-gossip/src/lib.rs @@ -59,7 +59,7 @@ pub use self::state_machine::TopicNotification; pub use self::validator::{DiscardAll, MessageIntent, Validator, ValidatorContext, ValidationResult}; use futures::prelude::*; -use sc_network::{specialization::NetworkSpecialization, Event, ExHashT, NetworkService, PeerId, ReputationChange}; +use sc_network::{Event, ExHashT, NetworkService, PeerId, ReputationChange}; use sp_runtime::{traits::Block as BlockT, ConsensusEngineId}; use std::{borrow::Cow, pin::Pin, sync::Arc}; @@ -97,7 +97,7 @@ pub trait Network { fn announce(&self, block: B::Hash, associated_data: Vec); } -impl, H: ExHashT> Network for Arc> { +impl Network for Arc> { fn event_stream(&self) -> Pin + Send>> { Box::pin(NetworkService::event_stream(self)) } diff --git a/client/network/src/behaviour.rs b/client/network/src/behaviour.rs index c8c5e59fe62..a03a6caa2f5 100644 --- a/client/network/src/behaviour.rs +++ b/client/network/src/behaviour.rs @@ -16,9 +16,8 @@ use crate::{ debug_info, discovery::DiscoveryBehaviour, discovery::DiscoveryOut, DiscoveryNetBehaviour, - Event, protocol::event::DhtEvent + Event, protocol::event::DhtEvent, ExHashT, }; -use crate::{ExHashT, specialization::NetworkSpecialization}; use crate::protocol::{self, light_client_handler, CustomMessageOutcome, Protocol}; use libp2p::NetworkBehaviour; use libp2p::core::{Multiaddr, PeerId, PublicKey}; @@ -33,9 +32,9 @@ use void; /// General behaviour of the network. Combines all protocols together. #[derive(NetworkBehaviour)] #[behaviour(out_event = "BehaviourOut", poll_method = "poll")] -pub struct Behaviour, H: ExHashT> { +pub struct Behaviour { /// All the substrate-specific protocols. - substrate: Protocol, + substrate: Protocol, /// Periodically pings and identifies the nodes we are connected to, and store information in a /// cache. debug_info: debug_info::DebugInfoBehaviour, @@ -58,10 +57,10 @@ pub enum BehaviourOut { Event(Event), } -impl, H: ExHashT> Behaviour { +impl Behaviour { /// Builds a new `Behaviour`. pub async fn new( - substrate: Protocol, + substrate: Protocol, user_agent: String, local_public_key: PublicKey, known_addresses: Vec<(PeerId, Multiaddr)>, @@ -107,12 +106,12 @@ impl, H: ExHashT> Behaviour { } /// Returns a shared reference to the user protocol. - pub fn user_protocol(&self) -> &Protocol { + pub fn user_protocol(&self) -> &Protocol { &self.substrate } /// Returns a mutable reference to the user protocol. - pub fn user_protocol_mut(&mut self) -> &mut Protocol { + pub fn user_protocol_mut(&mut self) -> &mut Protocol { &mut self.substrate } @@ -133,15 +132,15 @@ impl, H: ExHashT> Behaviour { } } -impl, H: ExHashT> NetworkBehaviourEventProcess for -Behaviour { +impl NetworkBehaviourEventProcess for +Behaviour { fn inject_event(&mut self, event: void::Void) { void::unreachable(event) } } -impl, H: ExHashT> NetworkBehaviourEventProcess> for -Behaviour { +impl NetworkBehaviourEventProcess> for +Behaviour { fn inject_event(&mut self, event: CustomMessageOutcome) { match event { CustomMessageOutcome::BlockImport(origin, blocks) => @@ -174,8 +173,8 @@ Behaviour { } } -impl, H: ExHashT> NetworkBehaviourEventProcess - for Behaviour { +impl NetworkBehaviourEventProcess + for Behaviour { fn inject_event(&mut self, event: debug_info::DebugInfoEvent) { let debug_info::DebugInfoEvent::Identified { peer_id, mut info } = event; if info.listen_addrs.len() > 30 { @@ -192,8 +191,8 @@ impl, H: ExHashT> NetworkBehaviourEventPr } } -impl, H: ExHashT> NetworkBehaviourEventProcess - for Behaviour { +impl NetworkBehaviourEventProcess + for Behaviour { fn inject_event(&mut self, out: DiscoveryOut) { match out { DiscoveryOut::UnroutablePeer(_peer_id) => { @@ -221,7 +220,7 @@ impl, H: ExHashT> NetworkBehaviourEventPr } } -impl, H: ExHashT> Behaviour { +impl Behaviour { fn poll(&mut self, _: &mut Context, _: &mut impl PollParameters) -> Poll>> { if !self.events.is_empty() { return Poll::Ready(NetworkBehaviourAction::GenerateEvent(self.events.remove(0))) diff --git a/client/network/src/config.rs b/client/network/src/config.rs index f6a3db4afe8..f5cad5977fc 100644 --- a/client/network/src/config.rs +++ b/client/network/src/config.rs @@ -43,7 +43,7 @@ use std::{error::Error, fs, io::{self, Write}, net::Ipv4Addr, path::{Path, PathB use zeroize::Zeroize; /// Network initialization parameters. -pub struct Params { +pub struct Params { /// Assigned roles for our node (full, light, ...). pub roles: Roles, @@ -88,9 +88,6 @@ pub struct Params { /// valid. pub import_queue: Box>, - /// Customization of the network. Use this to plug additional networking capabilities. - pub specialization: S, - /// Type to check incoming block announcements. pub block_announce_validator: Box + Send>, } diff --git a/client/network/src/lib.rs b/client/network/src/lib.rs index 5da26b3346c..a5397a4e3e6 100644 --- a/client/network/src/lib.rs +++ b/client/network/src/lib.rs @@ -136,10 +136,6 @@ //! - Light-client requests. When a light client requires information, a random node we have a //! substream open with is chosen, and the information is requested from it. //! - Gossiping. Used for example by grandpa. -//! - Network specialization. The network protocol can be specialized through a template parameter -//! of the network service. This specialization is free to send and receive messages with the -//! remote. This is meant to be used by the chain that is being built on top of Substrate -//! (eg. Polkadot). //! //! It is intended that in the future each of these components gets more isolated, so that they //! are free to open and close their own substreams, and so that syncing and light client requests @@ -180,7 +176,7 @@ pub mod error; pub mod network_state; pub use service::{NetworkService, NetworkStateInfo, NetworkWorker, ExHashT, ReportHandle}; -pub use protocol::{PeerInfo, Context, specialization}; +pub use protocol::PeerInfo; pub use protocol::event::{Event, DhtEvent}; pub use protocol::sync::SyncState; pub use libp2p::{Multiaddr, PeerId}; @@ -196,10 +192,6 @@ pub use protocol::message::Status as StatusMessage; pub use sc_peerset::ReputationChange; -// Used by the `construct_simple_protocol!` macro. -#[doc(hidden)] -pub use sp_runtime::traits::Block as BlockT; - /// Extension trait for `NetworkBehaviour` that also accepts discovering nodes. trait DiscoveryNetBehaviour { /// Notify the protocol that we have learned about the existence of nodes. diff --git a/client/network/src/protocol.rs b/client/network/src/protocol.rs index fe75649baca..dd8b5e6c28e 100644 --- a/client/network/src/protocol.rs +++ b/client/network/src/protocol.rs @@ -38,7 +38,6 @@ use sp_arithmetic::traits::SaturatedConversion; use message::{BlockAnnounce, BlockAttributes, Direction, FromBlock, Message, RequestId}; use message::generic::Message as GenericMessage; use light_dispatch::{LightDispatch, LightDispatchNetwork, RequestData}; -use specialization::NetworkSpecialization; use sync::{ChainSync, SyncState}; use crate::service::{TransactionPool, ExHashT}; use crate::config::{BoxFinalityProofRequestBuilder, Roles}; @@ -73,7 +72,6 @@ pub mod message; pub mod event; pub mod light_client_handler; pub mod light_dispatch; -pub mod specialization; pub mod sync; pub use block_requests::BlockRequests; @@ -136,7 +134,7 @@ mod rep { } // Lock must always be taken in order declared here. -pub struct Protocol, H: ExHashT> { +pub struct Protocol { /// Interval at which we call `tick`. tick_timeout: Pin + Send>>, /// Interval at which we call `propagate_extrinsics`. @@ -146,7 +144,6 @@ pub struct Protocol, H: ExHashT> { light_dispatch: LightDispatch, genesis_hash: B::Hash, sync: ChainSync, - specialization: S, context_data: ContextData, /// List of nodes for which we perform additional logging because they are important for the /// user. @@ -335,55 +332,6 @@ impl<'a, B: BlockT> LightDispatchNetwork for LightDispatchIn<'a> { } } -/// Context for a network-specific handler. -pub trait Context { - /// Adjusts the reputation of the peer. Use this to point out that a peer has been malign or - /// irresponsible or appeared lazy. - fn report_peer(&mut self, who: PeerId, reputation: sc_peerset::ReputationChange); - - /// Force disconnecting from a peer. Use this when a peer misbehaved. - fn disconnect_peer(&mut self, who: PeerId); - - /// Send a chain-specific message to a peer. - fn send_chain_specific(&mut self, who: PeerId, message: Vec); -} - -/// Protocol context. -struct ProtocolContext<'a, B: 'a + BlockT, H: 'a + ExHashT> { - behaviour: &'a mut GenericProto, - context_data: &'a mut ContextData, - peerset_handle: &'a sc_peerset::PeersetHandle, -} - -impl<'a, B: BlockT + 'a, H: 'a + ExHashT> ProtocolContext<'a, B, H> { - fn new( - context_data: &'a mut ContextData, - behaviour: &'a mut GenericProto, - peerset_handle: &'a sc_peerset::PeersetHandle, - ) -> Self { - ProtocolContext { context_data, peerset_handle, behaviour } - } -} - -impl<'a, B: BlockT + 'a, H: ExHashT + 'a> Context for ProtocolContext<'a, B, H> { - fn report_peer(&mut self, who: PeerId, reputation: sc_peerset::ReputationChange) { - self.peerset_handle.report_peer(who, reputation) - } - - fn disconnect_peer(&mut self, who: PeerId) { - self.behaviour.disconnect_peer(&who) - } - - fn send_chain_specific(&mut self, who: PeerId, message: Vec) { - send_message:: ( - self.behaviour, - &mut self.context_data.stats, - &who, - GenericMessage::ChainSpecific(message) - ) - } -} - /// Data necessary to create a context. struct ContextData { // All connected peers @@ -410,20 +358,19 @@ impl Default for ProtocolConfig { } } -impl, H: ExHashT> Protocol { +impl Protocol { /// Create a new instance. pub fn new( config: ProtocolConfig, chain: Arc>, checker: Arc>, - specialization: S, transaction_pool: Arc>, finality_proof_provider: Option>>, finality_proof_request_builder: Option>, protocol_id: ProtocolId, peerset_config: sc_peerset::PeersetConfig, block_announce_validator: Box + Send> - ) -> error::Result<(Protocol, sc_peerset::PeersetHandle)> { + ) -> error::Result<(Protocol, sc_peerset::PeersetHandle)> { let info = chain.info(); let sync = ChainSync::new( config.roles, @@ -459,7 +406,6 @@ impl, H: ExHashT> Protocol { light_dispatch: LightDispatch::new(checker), genesis_hash: info.genesis_hash, sync, - specialization, handshaking_peers: HashMap::new(), important_peers, transaction_pool, @@ -681,11 +627,6 @@ impl, H: ExHashT> Protocol { CustomMessageOutcome::None }; }, - GenericMessage::ChainSpecific(msg) => self.specialization.on_message( - &mut ProtocolContext::new(&mut self.context_data, &mut self.behaviour, &self.peerset_handle), - who, - msg, - ), } CustomMessageOutcome::None @@ -710,14 +651,6 @@ impl, H: ExHashT> Protocol { ); } - /// Locks `self` and returns a context plus the network specialization. - pub fn specialization_lock<'a>( - &'a mut self, - ) -> (impl Context + 'a, &'a mut S) { - let context = ProtocolContext::new(&mut self.context_data, &mut self.behaviour, &self.peerset_handle); - (context, &mut self.specialization) - } - /// Called when a new peer is connected pub fn on_peer_connected(&mut self, who: PeerId) { trace!(target: "sync", "Connecting {}", who); @@ -739,9 +672,7 @@ impl, H: ExHashT> Protocol { self.context_data.peers.remove(&peer) }; if let Some(_peer_data) = removed { - let mut context = ProtocolContext::new(&mut self.context_data, &mut self.behaviour, &self.peerset_handle); self.sync.peer_disconnected(peer.clone()); - self.specialization.on_disconnect(&mut context, peer.clone()); self.light_dispatch.on_disconnect(LightDispatchIn { behaviour: &mut self.behaviour, peerset: self.peerset_handle.clone(), @@ -940,9 +871,6 @@ impl, H: ExHashT> Protocol { } } - self.specialization.maintain_peers( - &mut ProtocolContext::new(&mut self.context_data, &mut self.behaviour, &self.peerset_handle) - ); for p in aborting { self.behaviour.disconnect_peer(&p); self.peerset_handle.report_peer(p, rep::TIMEOUT); @@ -1058,9 +986,6 @@ impl, H: ExHashT> Protocol { } } - let mut context = ProtocolContext::new(&mut self.context_data, &mut self.behaviour, &self.peerset_handle); - self.specialization.on_connect(&mut context, who.clone(), status); - // Notify all the notification protocols as open. CustomMessageOutcome::NotificationStreamOpened { remote: who, @@ -1292,7 +1217,7 @@ impl, H: ExHashT> Protocol { roles: self.config.roles.into(), best_number: info.best_number, best_hash: info.best_hash, - chain_status: self.specialization.status(), + chain_status: Vec::new(), // TODO: find a way to make this backwards-compatible }; self.send_message(&who, GenericMessage::Status(status)) @@ -1361,15 +1286,10 @@ impl, H: ExHashT> Protocol { /// Call this when a block has been imported in the import queue and we should announce it on /// the network. - pub fn on_block_imported(&mut self, hash: B::Hash, header: &B::Header, data: Vec, is_best: bool) { + pub fn on_block_imported(&mut self, header: &B::Header, data: Vec, is_best: bool) { if is_best { self.sync.update_chain_info(header); } - self.specialization.on_block_imported( - &mut ProtocolContext::new(&mut self.context_data, &mut self.behaviour, &self.peerset_handle), - hash.clone(), - header, - ); // blocks are not announced by light clients if self.config.roles.is_light() { @@ -1872,8 +1792,7 @@ fn send_message( behaviour.send_packet(who, encoded); } -impl, H: ExHashT> NetworkBehaviour for -Protocol { +impl NetworkBehaviour for Protocol { type ProtocolsHandler = ::ProtocolsHandler; type OutEvent = CustomMessageOutcome; @@ -2030,13 +1949,13 @@ Protocol { } } -impl, H: ExHashT> DiscoveryNetBehaviour for Protocol { +impl DiscoveryNetBehaviour for Protocol { fn add_discovered_nodes(&mut self, peer_ids: impl Iterator) { self.behaviour.add_discovered_nodes(peer_ids) } } -impl, H: ExHashT> Drop for Protocol { +impl Drop for Protocol { fn drop(&mut self) { debug!(target: "sync", "Network stats:\n{}", self.format_stats()); } diff --git a/client/network/src/protocol/generic_proto/tests.rs b/client/network/src/protocol/generic_proto/tests.rs index b331b3c2378..b8436e2c7f7 100644 --- a/client/network/src/protocol/generic_proto/tests.rs +++ b/client/network/src/protocol/generic_proto/tests.rs @@ -25,7 +25,8 @@ use libp2p::swarm::{PollParameters, NetworkBehaviour, NetworkBehaviourAction}; use libp2p::{PeerId, Multiaddr, Transport}; use rand::seq::SliceRandom; use std::{error, io, task::Context, task::Poll, time::Duration}; -use crate::message::Message; +use std::collections::HashSet; +use crate::message::{generic::BlockResponse, Message}; use crate::protocol::generic_proto::{GenericProto, GenericProtoOut}; use sp_test_primitives::Block; @@ -227,7 +228,10 @@ fn two_nodes_transfer_lots_of_packets() { for n in 0 .. NUM_PACKETS { service1.send_packet( &peer_id, - Message::::ChainSpecific(vec![(n % 256) as u8]).encode() + Message::::BlockResponse(BlockResponse { + id: n as _, + blocks: Vec::new(), + }).encode() ); } }, @@ -243,8 +247,8 @@ fn two_nodes_transfer_lots_of_packets() { Some(GenericProtoOut::CustomProtocolOpen { .. }) => {}, Some(GenericProtoOut::CustomMessage { message, .. }) => { match Message::::decode(&mut &message[..]).unwrap() { - Message::::ChainSpecific(message) => { - assert_eq!(message.len(), 1); + Message::::BlockResponse(BlockResponse { id: _, blocks }) => { + assert!(blocks.is_empty()); packet_counter += 1; if packet_counter == NUM_PACKETS { return Poll::Ready(()) @@ -270,9 +274,21 @@ fn basic_two_nodes_requests_in_parallel() { // Generate random messages with or without a request id. let mut to_send = { let mut to_send = Vec::new(); + let mut existing_ids = HashSet::new(); for _ in 0..200 { // Note: don't make that number too high or the CPU usage will explode. - let msg = (0..10).map(|_| rand::random::()).collect::>(); - to_send.push(Message::::ChainSpecific(msg)); + let req_id = loop { + let req_id = rand::random::(); + + // ensure uniqueness - odds of randomly sampling collisions + // is unlikely, but possible to cause spurious test failures. + if existing_ids.insert(req_id) { + break req_id; + } + }; + + to_send.push(Message::::BlockResponse( + BlockResponse { id: req_id, blocks: Vec::new() } + )); } to_send }; diff --git a/client/network/src/protocol/message.rs b/client/network/src/protocol/message.rs index a2261b20591..a12c26da2e4 100644 --- a/client/network/src/protocol/message.rs +++ b/client/network/src/protocol/message.rs @@ -219,9 +219,6 @@ pub mod generic { FinalityProofResponse(FinalityProofResponse), /// Batch of consensus protocol messages. ConsensusBatch(Vec), - /// Chain-specific message. - #[codec(index = "255")] - ChainSpecific(Vec), } impl Message { @@ -246,7 +243,6 @@ pub mod generic { Message::FinalityProofRequest(_) => "FinalityProofRequest", Message::FinalityProofResponse(_) => "FinalityProofResponse", Message::ConsensusBatch(_) => "ConsensusBatch", - Message::ChainSpecific(_) => "ChainSpecific", } } } diff --git a/client/network/src/protocol/specialization.rs b/client/network/src/protocol/specialization.rs deleted file mode 100644 index b410959509d..00000000000 --- a/client/network/src/protocol/specialization.rs +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright 2017-2020 Parity Technologies (UK) Ltd. -// This file is part of Substrate. - -// Substrate is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Substrate is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Substrate. If not, see . - -//! Specializations of the substrate network protocol to allow more complex forms of communication. - -pub use crate::protocol::event::{DhtEvent, Event}; - -use crate::protocol::Context; -use libp2p::PeerId; -use sp_runtime::traits::Block as BlockT; - -/// A specialization of the substrate network protocol. Handles events and sends messages. -pub trait NetworkSpecialization: Send + Sync + 'static { - /// Get the current specialization-status. - fn status(&self) -> Vec; - - /// Called when a peer successfully handshakes. - fn on_connect(&mut self, ctx: &mut dyn Context, who: PeerId, status: crate::protocol::message::Status); - - /// Called when a peer is disconnected. If the peer ID is unknown, it should be ignored. - fn on_disconnect(&mut self, ctx: &mut dyn Context, who: PeerId); - - /// Called when a network-specific message arrives. - fn on_message( - &mut self, - ctx: &mut dyn Context, - who: PeerId, - message: Vec - ); - - /// Called periodically to maintain peers and handle timeouts. - fn maintain_peers(&mut self, _ctx: &mut dyn Context) { } - - /// Called when a block is _imported_ at the head of the chain (not during major sync). - /// Not guaranteed to be called for every block, but will be most of the after major sync. - fn on_block_imported(&mut self, _ctx: &mut dyn Context, _hash: B::Hash, _header: &B::Header) { } -} - -/// A specialization that does nothing. -#[derive(Clone)] -pub struct DummySpecialization; - -impl NetworkSpecialization for DummySpecialization { - fn status(&self) -> Vec { - vec![] - } - - fn on_connect( - &mut self, - _ctx: &mut dyn Context, - _peer_id: PeerId, - _status: crate::protocol::message::Status - ) {} - - fn on_disconnect(&mut self, _ctx: &mut dyn Context, _peer_id: PeerId) {} - - fn on_message( - &mut self, - _ctx: &mut dyn Context, - _peer_id: PeerId, - _message: Vec, - ) {} -} - -/// Construct a simple protocol that is composed of several sub protocols. -/// Each "sub protocol" needs to implement `Specialization` and needs to provide a `new()` function. -/// For more fine grained implementations, this macro is not usable. -/// -/// # Example -/// -/// ```nocompile -/// construct_simple_protocol! { -/// pub struct MyProtocol where Block = MyBlock { -/// consensus_gossip: ConsensusGossip, -/// other_protocol: MyCoolStuff, -/// } -/// } -/// ``` -/// -/// You can also provide an optional parameter after `where Block = MyBlock`, so it looks like -/// `where Block = MyBlock, Status = consensus_gossip`. This will instruct the implementation to -/// use the `status()` function from the `ConsensusGossip` protocol. By default, `status()` returns -/// an empty vector. -#[macro_export] -macro_rules! construct_simple_protocol { - ( - $( #[ $attr:meta ] )* - pub struct $protocol:ident where - Block = $block:ident - $( , Status = $status_protocol_name:ident )* - { - $( $sub_protocol_name:ident : $sub_protocol:ident $( <$protocol_block:ty> )*, )* - } - ) => { - $( #[$attr] )* - pub struct $protocol { - $( $sub_protocol_name: $sub_protocol $( <$protocol_block> )*, )* - } - - impl $protocol { - /// Instantiate a node protocol handler. - pub fn new() -> Self { - Self { - $( $sub_protocol_name: $sub_protocol::new(), )* - } - } - } - - impl $crate::specialization::NetworkSpecialization<$block> for $protocol { - fn status(&self) -> Vec { - $( - let status = self.$status_protocol_name.status(); - - if !status.is_empty() { - return status; - } - )* - - Vec::new() - } - - fn on_connect( - &mut self, - _ctx: &mut $crate::Context<$block>, - _who: $crate::PeerId, - _status: $crate::StatusMessage<$block> - ) { - $( self.$sub_protocol_name.on_connect(_ctx, _who, _status); )* - } - - fn on_disconnect(&mut self, _ctx: &mut $crate::Context<$block>, _who: $crate::PeerId) { - $( self.$sub_protocol_name.on_disconnect(_ctx, _who); )* - } - - fn on_message( - &mut self, - _ctx: &mut $crate::Context<$block>, - _who: $crate::PeerId, - _message: Vec, - ) { - $( self.$sub_protocol_name.on_message(_ctx, _who, _message); )* - } - - fn maintain_peers(&mut self, _ctx: &mut $crate::Context<$block>) { - $( self.$sub_protocol_name.maintain_peers(_ctx); )* - } - - fn on_block_imported( - &mut self, - _ctx: &mut $crate::Context<$block>, - _hash: <$block as $crate::BlockT>::Hash, - _header: &<$block as $crate::BlockT>::Header - ) { - $( self.$sub_protocol_name.on_block_imported(_ctx, _hash, _header); )* - } - } - } -} diff --git a/client/network/src/service.rs b/client/network/src/service.rs index 26facd98af9..288289d95c8 100644 --- a/client/network/src/service.rs +++ b/client/network/src/service.rs @@ -45,9 +45,8 @@ use crate::{transport, config::NonReservedPeerMode, ReputationChange}; use crate::config::{Params, TransportConfig}; use crate::error::Error; use crate::network_state::{NetworkState, NotConnectedPeer as NetworkStateNotConnectedPeer, Peer as NetworkStatePeer}; -use crate::protocol::{self, Protocol, Context, PeerInfo}; +use crate::protocol::{self, Protocol, PeerInfo}; use crate::protocol::{event::Event, light_dispatch::{AlwaysBadChecker, RequestData}}; -use crate::protocol::specialization::NetworkSpecialization; use crate::protocol::sync::SyncState; /// Minimum Requirements for a Hash within Networking @@ -101,7 +100,7 @@ impl ReportHandle { } /// Substrate network service. Handles network IO and manages connectivity. -pub struct NetworkService, H: ExHashT> { +pub struct NetworkService { /// Number of peers we're connected to. num_connected: Arc, /// The local external addresses. @@ -116,19 +115,19 @@ pub struct NetworkService, H: E /// nodes it should be connected to or not. peerset: PeersetHandle, /// Channel that sends messages to the actual worker. - to_worker: mpsc::UnboundedSender>, + to_worker: mpsc::UnboundedSender>, /// Marker to pin the `H` generic. Serves no purpose except to not break backwards /// compatibility. _marker: PhantomData, } -impl, H: ExHashT> NetworkWorker { +impl NetworkWorker { /// Creates the network service. /// /// Returns a `NetworkWorker` that implements `Future` and must be regularly polled in order /// for the network processing to advance. From it, you can extract a `NetworkService` using /// `worker.service()`. The `NetworkService` can be shared through the codebase. - pub fn new(params: Params) -> Result, Error> { + pub fn new(params: Params) -> Result, Error> { let (to_worker, from_worker) = mpsc::unbounded(); if let Some(ref path) = params.network_config.net_config_path { @@ -205,7 +204,6 @@ impl, H: ExHashT> NetworkWorker }, params.chain.clone(), checker.clone(), - params.specialization, params.transaction_pool, params.finality_proof_provider.clone(), params.finality_proof_request_builder, @@ -215,7 +213,7 @@ impl, H: ExHashT> NetworkWorker )?; // Build the swarm. - let (mut swarm, bandwidth): (Swarm::, _) = { + let (mut swarm, bandwidth): (Swarm::, _) = { let user_agent = format!( "{} ({})", params.network_config.client_version, @@ -263,14 +261,14 @@ impl, H: ExHashT> NetworkWorker // Listen on multiaddresses. for addr in ¶ms.network_config.listen_addresses { - if let Err(err) = Swarm::::listen_on(&mut swarm, addr.clone()) { + if let Err(err) = Swarm::::listen_on(&mut swarm, addr.clone()) { warn!(target: "sub-libp2p", "Can't listen on {} because: {:?}", addr, err) } } // Add external addresses. for addr in ¶ms.network_config.public_addresses { - Swarm::::add_external_address(&mut swarm, addr.clone()); + Swarm::::add_external_address(&mut swarm, addr.clone()); } let external_addresses = Arc::new(Mutex::new(Vec::new())); @@ -351,13 +349,13 @@ impl, H: ExHashT> NetworkWorker /// Return a `NetworkService` that can be shared through the code base and can be used to /// manipulate the worker. - pub fn service(&self) -> &Arc> { + pub fn service(&self) -> &Arc> { &self.service } /// You must call this when a new block is imported by the client. - pub fn on_block_imported(&mut self, hash: B::Hash, header: B::Header, data: Vec, is_best: bool) { - self.network_service.user_protocol_mut().on_block_imported(hash, &header, data, is_best); + pub fn on_block_imported(&mut self, header: B::Header, data: Vec, is_best: bool) { + self.network_service.user_protocol_mut().on_block_imported(&header, data, is_best); } /// You must call this when a new block is finalized by the client. @@ -415,9 +413,9 @@ impl, H: ExHashT> NetworkWorker }; NetworkState { - peer_id: Swarm::::local_peer_id(&swarm).to_base58(), - listened_addresses: Swarm::::listeners(&swarm).cloned().collect(), - external_addresses: Swarm::::external_addresses(&swarm).cloned().collect(), + peer_id: Swarm::::local_peer_id(&swarm).to_base58(), + listened_addresses: Swarm::::listeners(&swarm).cloned().collect(), + external_addresses: Swarm::::external_addresses(&swarm).cloned().collect(), average_download_per_sec: self.service.bandwidth.average_download_per_sec(), average_upload_per_sec: self.service.bandwidth.average_upload_per_sec(), connected_peers, @@ -446,7 +444,7 @@ impl, H: ExHashT> NetworkWorker } } -impl, H: ExHashT> NetworkService { +impl NetworkService { /// Writes a message on an open notifications channel. Has no effect if the notifications /// channel with this protocol name is closed. /// @@ -545,15 +543,6 @@ impl, H: ExHashT> NetworkServic .unbounded_send(ServiceToWorkerMsg::RequestJustification(hash.clone(), number)); } - /// Execute a closure with the chain-specific network specialization. - pub fn with_spec(&self, f: F) - where F: FnOnce(&mut S, &mut dyn Context) + Send + 'static - { - let _ = self - .to_worker - .unbounded_send(ServiceToWorkerMsg::ExecuteWithSpec(Box::new(f))); - } - /// Are we in the process of downloading the chain? pub fn is_major_syncing(&self) -> bool { self.is_major_syncing.load(Ordering::Relaxed) @@ -641,8 +630,8 @@ impl, H: ExHashT> NetworkServic } } -impl, H: ExHashT> sp_consensus::SyncOracle - for NetworkService +impl sp_consensus::SyncOracle + for NetworkService { fn is_major_syncing(&mut self) -> bool { NetworkService::is_major_syncing(self) @@ -653,8 +642,8 @@ impl, H: ExHashT> sp_consensus: } } -impl<'a, B: BlockT + 'static, S: NetworkSpecialization, H: ExHashT> sp_consensus::SyncOracle - for &'a NetworkService +impl<'a, B: BlockT + 'static, H: ExHashT> sp_consensus::SyncOracle + for &'a NetworkService { fn is_major_syncing(&mut self) -> bool { NetworkService::is_major_syncing(self) @@ -674,10 +663,9 @@ pub trait NetworkStateInfo { fn local_peer_id(&self) -> PeerId; } -impl NetworkStateInfo for NetworkService +impl NetworkStateInfo for NetworkService where B: sp_runtime::traits::Block, - S: NetworkSpecialization, H: ExHashT, { /// Returns the local external addresses. @@ -694,12 +682,11 @@ impl NetworkStateInfo for NetworkService /// Messages sent from the `NetworkService` to the `NetworkWorker`. /// /// Each entry corresponds to a method of `NetworkService`. -enum ServiceToWorkerMsg> { +enum ServiceToWorkerMsg { PropagateExtrinsic(H), PropagateExtrinsics, RequestJustification(B::Hash, NumberFor), AnnounceBlock(B::Hash, Vec), - ExecuteWithSpec(Box) + Send>), GetValue(record::Key), PutValue(record::Key, Vec), AddKnownAddress(PeerId, Multiaddr), @@ -721,7 +708,7 @@ enum ServiceToWorkerMsg> { /// /// You are encouraged to poll this in a separate background thread or task. #[must_use = "The NetworkWorker must be polled in order for the network to work"] -pub struct NetworkWorker, H: ExHashT> { +pub struct NetworkWorker { /// Updated by the `NetworkWorker` and loaded by the `NetworkService`. external_addresses: Arc>>, /// Updated by the `NetworkWorker` and loaded by the `NetworkService`. @@ -729,20 +716,20 @@ pub struct NetworkWorker, H: Ex /// Updated by the `NetworkWorker` and loaded by the `NetworkService`. is_major_syncing: Arc, /// The network service that can be extracted and shared through the codebase. - service: Arc>, + service: Arc>, /// The *actual* network. - network_service: Swarm, + network_service: Swarm, /// The import queue that was passed as initialization. import_queue: Box>, /// Messages from the `NetworkService` and that must be processed. - from_worker: mpsc::UnboundedReceiver>, + from_worker: mpsc::UnboundedReceiver>, /// Receiver for queries from the light client that must be processed. light_client_rqs: Option>>, /// Senders for events that happen on the network. event_streams: Vec>, } -impl, H: ExHashT> Future for NetworkWorker { +impl Future for NetworkWorker { type Output = Result<(), io::Error>; fn poll(mut self: Pin<&mut Self>, cx: &mut std::task::Context) -> Poll { @@ -769,11 +756,6 @@ impl, H: ExHashT> Future for Ne }; match msg { - ServiceToWorkerMsg::ExecuteWithSpec(task) => { - let protocol = this.network_service.user_protocol_mut(); - let (mut context, spec) = protocol.specialization_lock(); - task(spec, &mut context); - }, ServiceToWorkerMsg::AnnounceBlock(hash, data) => this.network_service.user_protocol_mut().announce_block(hash, data), ServiceToWorkerMsg::RequestJustification(hash, number) => @@ -839,7 +821,7 @@ impl, H: ExHashT> Future for Ne // Update the variables shared with the `NetworkService`. this.num_connected.store(this.network_service.user_protocol_mut().num_connected_peers(), Ordering::Relaxed); { - let external_addresses = Swarm::::external_addresses(&this.network_service).cloned().collect(); + let external_addresses = Swarm::::external_addresses(&this.network_service).cloned().collect(); *this.external_addresses.lock() = external_addresses; } this.is_major_syncing.store(match this.network_service.user_protocol_mut().sync_state() { @@ -851,20 +833,18 @@ impl, H: ExHashT> Future for Ne } } -impl, H: ExHashT> Unpin for NetworkWorker { +impl Unpin for NetworkWorker { } /// The libp2p swarm, customized for our needs. -type Swarm = libp2p::swarm::Swarm< - Behaviour ->; +type Swarm = libp2p::swarm::Swarm>; // Implementation of `import_queue::Link` trait using the available local variables. -struct NetworkLink<'a, B: BlockT, S: NetworkSpecialization, H: ExHashT> { - protocol: &'a mut Swarm, +struct NetworkLink<'a, B: BlockT, H: ExHashT> { + protocol: &'a mut Swarm, } -impl<'a, B: BlockT, S: NetworkSpecialization, H: ExHashT> Link for NetworkLink<'a, B, S, H> { +impl<'a, B: BlockT, H: ExHashT> Link for NetworkLink<'a, B, H> { fn blocks_processed( &mut self, imported: usize, diff --git a/client/network/test/src/lib.rs b/client/network/test/src/lib.rs index ea641e58b68..982e2ff5123 100644 --- a/client/network/test/src/lib.rs +++ b/client/network/test/src/lib.rs @@ -52,17 +52,14 @@ use sc_network::config::{NetworkConfiguration, TransportConfig, BoxFinalityProof use libp2p::PeerId; use parking_lot::Mutex; use sp_core::H256; -use sc_network::config::ProtocolConfig; +use sc_network::config::{ProtocolConfig, TransactionPool}; use sp_runtime::generic::{BlockId, OpaqueDigestItemId}; use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor}; use sp_runtime::Justification; -use sc_network::config::TransactionPool; -use sc_network::specialization::NetworkSpecialization; use substrate_test_runtime_client::{self, AccountKeyring}; pub use substrate_test_runtime_client::runtime::{Block, Extrinsic, Hash, Transfer}; pub use substrate_test_runtime_client::{TestClient, TestClientBuilder, TestClientBuilderExt}; -pub use sc_network::specialization::DummySpecialization; type AuthorityId = sp_consensus_babe::AuthorityId; @@ -178,7 +175,7 @@ impl PeersClient { } } -pub struct Peer> { +pub struct Peer { pub data: D, client: PeersClient, /// We keep a copy of the verifier so that we can invoke it for locally-generated blocks, @@ -189,12 +186,12 @@ pub struct Peer> { block_import: BlockImportAdapter<()>, select_chain: Option>, backend: Option>, - network: NetworkWorker::Hash>, + network: NetworkWorker::Hash>, imported_blocks_stream: Box, Error = ()> + Send>, finality_notification_stream: Box, Error = ()> + Send>, } -impl> Peer { +impl Peer { /// Get this peer ID. pub fn id(&self) -> PeerId { self.network.service().local_peer_id() @@ -283,7 +280,7 @@ impl> Peer { Default::default() }; self.block_import.import_block(import_block, cache).expect("block_import failed"); - self.network.on_block_imported(hash, header, Vec::new(), true); + self.network.on_block_imported(header, Vec::new(), true); at = hash; } @@ -336,7 +333,7 @@ impl> Peer { } /// Get a reference to the network service. - pub fn network_service(&self) -> &Arc::Hash>> { + pub fn network_service(&self) -> &Arc::Hash>> { &self.network.service() } @@ -392,16 +389,6 @@ impl TransactionPool for EmptyTransactionPool { fn transaction(&self, _h: &Hash) -> Option { None } } -pub trait SpecializationFactory { - fn create() -> Self; -} - -impl SpecializationFactory for DummySpecialization { - fn create() -> DummySpecialization { - DummySpecialization - } -} - /// Implements `BlockImport` for any `Transaction`. Internally the transaction is /// "converted", aka the field is set to `None`. /// @@ -522,7 +509,6 @@ impl VerifierAdapter { } pub trait TestNetFactory: Sized { - type Specialization: NetworkSpecialization + SpecializationFactory; type Verifier: 'static + Verifier; type PeerData: Default; @@ -536,9 +522,9 @@ pub trait TestNetFactory: Sized { ) -> Self::Verifier; /// Get reference to peer. - fn peer(&mut self, i: usize) -> &mut Peer; - fn peers(&self) -> &Vec>; - fn mut_peers>)>( + fn peer(&mut self, i: usize) -> &mut Peer; + fn peers(&self) -> &Vec>; + fn mut_peers>)>( &mut self, closure: F, ); @@ -636,7 +622,6 @@ pub trait TestNetFactory: Sized { transaction_pool: Arc::new(EmptyTransactionPool), protocol_id: ProtocolId::from(&b"test-protocol-name"[..]), import_queue, - specialization: self::SpecializationFactory::create(), block_announce_validator: Box::new(DefaultBlockAnnounceValidator::new(client.clone())) }).unwrap(); @@ -712,7 +697,6 @@ pub trait TestNetFactory: Sized { transaction_pool: Arc::new(EmptyTransactionPool), protocol_id: ProtocolId::from(&b"test-protocol-name"[..]), import_queue, - specialization: self::SpecializationFactory::create(), block_announce_validator: Box::new(DefaultBlockAnnounceValidator::new(client.clone())) }).unwrap(); @@ -784,7 +768,6 @@ pub trait TestNetFactory: Sized { // We poll `imported_blocks_stream`. while let Ok(Async::Ready(Some(notification))) = peer.imported_blocks_stream.poll() { peer.network.on_block_imported( - notification.hash, notification.header, Vec::new(), true, @@ -805,11 +788,10 @@ pub trait TestNetFactory: Sized { } pub struct TestNet { - peers: Vec>, + peers: Vec>, } impl TestNetFactory for TestNet { - type Specialization = DummySpecialization; type Verifier = PassThroughVerifier; type PeerData = (); @@ -826,15 +808,15 @@ impl TestNetFactory for TestNet { PassThroughVerifier(false) } - fn peer(&mut self, i: usize) -> &mut Peer<(), Self::Specialization> { + fn peer(&mut self, i: usize) -> &mut Peer<()> { &mut self.peers[i] } - fn peers(&self) -> &Vec> { + fn peers(&self) -> &Vec> { &self.peers } - fn mut_peers>)>(&mut self, closure: F) { + fn mut_peers>)>(&mut self, closure: F) { closure(&mut self.peers); } } @@ -858,7 +840,6 @@ impl JustificationImport for ForceFinalized { pub struct JustificationTestNet(TestNet); impl TestNetFactory for JustificationTestNet { - type Specialization = DummySpecialization; type Verifier = PassThroughVerifier; type PeerData = (); @@ -870,17 +851,16 @@ impl TestNetFactory for JustificationTestNet { self.0.make_verifier(client, config, peer_data) } - fn peer(&mut self, i: usize) -> &mut Peer { + fn peer(&mut self, i: usize) -> &mut Peer { self.0.peer(i) } - fn peers(&self) -> &Vec> { + fn peers(&self) -> &Vec> { self.0.peers() } fn mut_peers>, + &mut Vec>, )>(&mut self, closure: F) { self.0.mut_peers(closure) } diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index 20078f2d4ff..7159e532c42 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -35,7 +35,7 @@ use futures::{ use sc_keystore::{Store as Keystore}; use log::{info, warn, error}; use sc_network::config::{FinalityProofProvider, OnDemand, BoxFinalityProofRequestBuilder}; -use sc_network::{NetworkService, NetworkStateInfo, specialization::NetworkSpecialization}; +use sc_network::{NetworkService, NetworkStateInfo}; use parking_lot::{Mutex, RwLock}; use sp_runtime::generic::BlockId; use sp_runtime::traits::{ @@ -102,7 +102,6 @@ pub type BackgroundTask = Pin + Send>>; /// /// - [`with_select_chain`](ServiceBuilder::with_select_chain) /// - [`with_import_queue`](ServiceBuilder::with_import_queue) -/// - [`with_network_protocol`](ServiceBuilder::with_network_protocol) /// - [`with_finality_proof_provider`](ServiceBuilder::with_finality_proof_provider) /// - [`with_transaction_pool`](ServiceBuilder::with_transaction_pool) /// @@ -112,7 +111,7 @@ pub type BackgroundTask = Pin + Send>>; /// generics is done when you call `build`. /// pub struct ServiceBuilder + TExPool, TRpc, Backend> { config: Configuration, pub (crate) client: Arc, @@ -123,7 +122,6 @@ pub struct ServiceBuilder, finality_proof_provider: Option, - network_protocol: TNetP, transaction_pool: Arc, rpc_extensions: TRpc, remote_backend: Option>>, @@ -266,7 +264,7 @@ fn new_full_parts( Ok((client, backend, keystore)) } -impl ServiceBuilder<(), (), TGen, TCSExt, (), (), (), (), (), (), (), (), (), ()> +impl ServiceBuilder<(), (), TGen, TCSExt, (), (), (), (), (), (), (), (), ()> where TGen: RuntimeGenesis, TCSExt: Extension { /// Start the service builder with a configuration. pub fn new_full( @@ -284,7 +282,6 @@ where TGen: RuntimeGenesis, TCSExt: Extension { Arc>, (), (), - (), TFullBackend, >, Error> { let (client, backend, keystore) = new_full_parts(&config)?; @@ -301,7 +298,6 @@ where TGen: RuntimeGenesis, TCSExt: Extension { import_queue: (), finality_proof_request_builder: None, finality_proof_provider: None, - network_protocol: (), transaction_pool: Arc::new(()), rpc_extensions: Default::default(), remote_backend: None, @@ -327,7 +323,6 @@ where TGen: RuntimeGenesis, TCSExt: Extension { Arc>, (), (), - (), TLightBackend, >, Error> { let keystore = match &config.keystore { @@ -388,7 +383,6 @@ where TGen: RuntimeGenesis, TCSExt: Extension { import_queue: (), finality_proof_request_builder: None, finality_proof_provider: None, - network_protocol: (), transaction_pool: Arc::new(()), rpc_extensions: Default::default(), remote_backend: Some(remote_blockchain), @@ -399,9 +393,9 @@ where TGen: RuntimeGenesis, TCSExt: Extension { } } -impl +impl ServiceBuilder { + TExPool, TRpc, Backend> { /// Returns a reference to the client that was stored in this builder. pub fn client(&self) -> &Arc { @@ -449,7 +443,7 @@ impl, &Arc ) -> Result, Error> ) -> Result, Error> { + TExPool, TRpc, Backend>, Error> { let select_chain = select_chain_builder(&self.config, &self.backend)?; Ok(ServiceBuilder { @@ -462,7 +456,6 @@ impl, &Arc) -> Result ) -> Result, Error> { + TExPool, TRpc, Backend>, Error> { self.with_opt_select_chain(|cfg, b| builder(cfg, b).map(Option::Some)) } @@ -487,7 +480,7 @@ impl, Arc, Option, Arc) -> Result ) -> Result, Error> + TExPool, TRpc, Backend>, Error> where TSc: Clone { let import_queue = builder( &self.config, @@ -506,35 +499,6 @@ impl( - self, - network_protocol_builder: impl FnOnce(&Configuration) -> Result - ) -> Result, Error> { - let network_protocol = network_protocol_builder(&self.config)?; - - Ok(ServiceBuilder { - config: self.config, - client: self.client, - backend: self.backend, - keystore: self.keystore, - fetcher: self.fetcher, - select_chain: self.select_chain, - import_queue: self.import_queue, - finality_proof_request_builder: self.finality_proof_request_builder, - finality_proof_provider: self.finality_proof_provider, - network_protocol, transaction_pool: self.transaction_pool, rpc_extensions: self.rpc_extensions, remote_backend: self.remote_backend, @@ -559,7 +523,6 @@ impl>, - TNetP, TExPool, TRpc, Backend, @@ -576,7 +539,6 @@ impl>, - TNetP, TExPool, TRpc, Backend, @@ -621,7 +582,7 @@ impl, ) -> Result<(UImpQu, Option), Error> ) -> Result, Error> + TExPool, TRpc, Backend>, Error> where TSc: Clone, TFchr: Clone { let (import_queue, fprb) = builder( &self.config, @@ -642,7 +603,6 @@ impl, ) -> Result<(UImpQu, UFprb), Error> ) -> Result, Error> + TExPool, TRpc, Backend>, Error> where TSc: Clone, TFchr: Clone { self.with_import_queue_and_opt_fprb(|cfg, cl, b, f, sc, tx| builder(cfg, cl, b, f, sc, tx) @@ -681,7 +641,7 @@ impl, ) -> Result<(UExPool, Option), Error> ) -> Result, Error> + UExPool, TRpc, Backend>, Error> where TSc: Clone, TFchr: Clone { let (transaction_pool, background_task) = transaction_pool_builder( self.config.transaction_pool.clone(), @@ -703,7 +663,6 @@ impl Result, ) -> Result, Error> + TExPool, URpc, Backend>, Error> where TSc: Clone, TFchr: Clone { let rpc_extensions = rpc_ext_builder(&self)?; @@ -732,7 +691,6 @@ impl Pin> + Send>>; } -impl +impl ServiceBuilder< TBl, TRtApi, @@ -813,7 +770,6 @@ ServiceBuilder< TImpQu, BoxFinalityProofRequestBuilder, Arc>, - TNetP, TExPool, TRpc, TBackend, @@ -834,7 +790,6 @@ ServiceBuilder< TExec: 'static + sc_client::CallExecutor + Send + Sync + Clone, TSc: Clone, TImpQu: 'static + ImportQueue, - TNetP: NetworkSpecialization, TExPool: MaintainedTransactionPool::Hash> + MallocSizeOfWasm + 'static, TRpc: sc_rpc::RpcExtension + Clone, { @@ -851,7 +806,7 @@ ServiceBuilder< Client, TSc, NetworkStatus, - NetworkService::Hash>, + NetworkService::Hash>, TExPool, sc_offchain::OffchainWorkers< Client, @@ -870,7 +825,6 @@ ServiceBuilder< import_queue, finality_proof_request_builder, finality_proof_provider, - network_protocol, transaction_pool, rpc_extensions, remote_backend, @@ -951,7 +905,6 @@ ServiceBuilder< transaction_pool: transaction_pool_adapter.clone() as _, import_queue, protocol_id, - specialization: network_protocol, block_announce_validator, }; diff --git a/client/service/src/chain_ops.rs b/client/service/src/chain_ops.rs index f415ea213a4..a0724f3e1de 100644 --- a/client/service/src/chain_ops.rs +++ b/client/service/src/chain_ops.rs @@ -46,12 +46,12 @@ pub fn build_spec(spec: ChainSpec, raw: bool) -> error::Result ServiceBuilderCommand for ServiceBuilder< TBl, TRtApi, TGen, TCSExt, Client>, TBl, TRtApi>, - TFchr, TSc, TImpQu, TFprb, TFpp, TNetP, TExPool, TRpc, Backend + TFchr, TSc, TImpQu, TFprb, TFpp, TExPool, TRpc, Backend > where TBl: BlockT, TBackend: 'static + sc_client_api::backend::Backend + Send, diff --git a/client/service/src/lib.rs b/client/service/src/lib.rs index 8c5d5deccac..99b45453411 100644 --- a/client/service/src/lib.rs +++ b/client/service/src/lib.rs @@ -45,10 +45,7 @@ use futures::{ sink::SinkExt, task::{Spawn, FutureObj, SpawnError}, }; -use sc_network::{ - NetworkService, network_state::NetworkState, specialization::NetworkSpecialization, - PeerId, ReportHandle, -}; +use sc_network::{NetworkService, network_state::NetworkState, PeerId, ReportHandle}; use log::{log, warn, debug, error, Level}; use codec::{Encode, Decode}; use sp_runtime::generic::BlockId; @@ -176,8 +173,6 @@ pub trait AbstractService: 'static + Future> + type SelectChain: sp_consensus::SelectChain; /// Transaction pool. type TransactionPool: TransactionPool + MallocSizeOfWasm; - /// Network specialization. - type NetworkSpecialization: NetworkSpecialization; /// Get event stream for telemetry connection established events. fn telemetry_on_connect_stream(&self) -> futures::channel::mpsc::UnboundedReceiver<()>; @@ -218,7 +213,7 @@ pub trait AbstractService: 'static + Future> + /// Get shared network instance. fn network(&self) - -> Arc::Hash>>; + -> Arc::Hash>>; /// Returns a receiver that periodically receives a status of the network. fn network_status(&self, interval: Duration) -> mpsc::UnboundedReceiver<(NetworkStatus, NetworkState)>; @@ -230,9 +225,9 @@ pub trait AbstractService: 'static + Future> + fn on_exit(&self) -> ::exit_future::Exit; } -impl AbstractService for +impl AbstractService for Service, TSc, NetworkStatus, - NetworkService, TExPool, TOc> + NetworkService, TExPool, TOc> where TBl: BlockT + Unpin, TBackend: 'static + sc_client_api::backend::Backend, @@ -241,7 +236,6 @@ where TSc: sp_consensus::SelectChain + 'static + Clone + Send + Unpin, TExPool: 'static + TransactionPool + MallocSizeOfWasm, TOc: 'static + Send + Sync, - TNetSpec: NetworkSpecialization, { type Block = TBl; type Backend = TBackend; @@ -249,7 +243,6 @@ where type RuntimeApi = TRtApi; type SelectChain = TSc; type TransactionPool = TExPool; - type NetworkSpecialization = TNetSpec; fn telemetry_on_connect_stream(&self) -> futures::channel::mpsc::UnboundedReceiver<()> { let (sink, stream) = futures::channel::mpsc::unbounded(); @@ -315,7 +308,7 @@ where } fn network(&self) - -> Arc::Hash>> + -> Arc::Hash>> { self.network.clone() } @@ -379,11 +372,10 @@ impl Spawn for fn build_network_future< B: BlockT, C: sc_client::BlockchainEvents, - S: sc_network::specialization::NetworkSpecialization, H: sc_network::ExHashT > ( roles: Roles, - mut network: sc_network::NetworkWorker, + mut network: sc_network::NetworkWorker, client: Arc, status_sinks: Arc, NetworkState)>>>, mut rpc_rx: mpsc::UnboundedReceiver>, @@ -397,7 +389,7 @@ fn build_network_future< // We poll `imported_blocks_stream`. while let Poll::Ready(Some(notification)) = Pin::new(&mut imported_blocks_stream).poll_next(cx) { - network.on_block_imported(notification.hash, notification.header, Vec::new(), notification.is_new_best); + network.on_block_imported(notification.header, Vec::new(), notification.is_new_best); } // We poll `finality_notification_stream`, but we only take the last event. -- GitLab From 9d90cf8c364a33b5154e2b01704c79dab3360034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Fri, 21 Feb 2020 14:14:02 +0100 Subject: [PATCH 029/106] Update the documentation for `secp256k1_ecdsa_recover*` (#5019) --- primitives/io/src/lib.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/primitives/io/src/lib.rs b/primitives/io/src/lib.rs index 5d29fe5c949..4b520a240a9 100644 --- a/primitives/io/src/lib.rs +++ b/primitives/io/src/lib.rs @@ -474,7 +474,10 @@ pub trait Crypto { } /// Verify and recover a SECP256k1 ECDSA signature. - /// - `sig` is passed in RSV format. V should be either 0/1 or 27/28. + /// + /// - `sig` is passed in RSV format. V should be either `0/1` or `27/28`. + /// - `msg` is the blake2-256 hash of the message. + /// /// Returns `Err` if the signature is bad, otherwise the 64-byte pubkey /// (doesn't include the 0x04 prefix). fn secp256k1_ecdsa_recover( @@ -493,8 +496,11 @@ pub trait Crypto { } /// Verify and recover a SECP256k1 ECDSA signature. - /// - `sig` is passed in RSV format. V should be either 0/1 or 27/28. - /// - returns `Err` if the signature is bad, otherwise the 33-byte compressed pubkey. + /// + /// - `sig` is passed in RSV format. V should be either `0/1` or `27/28`. + /// - `msg` is the blake2-256 hash of the message. + /// + /// Returns `Err` if the signature is bad, otherwise the 33-byte compressed pubkey. fn secp256k1_ecdsa_recover_compressed( sig: &[u8; 65], msg: &[u8; 32], -- GitLab From 2406f796dc61d425f1a725db11390891d84865c6 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Fri, 21 Feb 2020 17:07:00 +0100 Subject: [PATCH 030/106] Cargo.toml fixups for the release (#4975) * setting versions to development pre-release fixing version in dependencies * unset already released wasm-builder * do not publish test crates * adding licenses * setting homepage metadata * set repository url --- Cargo.lock | 324 +++++++++--------- bin/node-template/node/Cargo.toml | 40 ++- bin/node-template/pallets/template/Cargo.toml | 14 +- bin/node-template/runtime/Cargo.toml | 54 +-- bin/node/cli/Cargo.toml | 112 +++--- bin/node/executor/Cargo.toml | 50 +-- bin/node/inspect/Cargo.toml | 17 +- bin/node/primitives/Cargo.toml | 10 +- bin/node/rpc-client/Cargo.toml | 8 +- bin/node/rpc/Cargo.toml | 36 +- bin/node/runtime/Cargo.toml | 108 +++--- bin/node/testing/Cargo.toml | 70 ++-- bin/node/transaction-factory/Cargo.toml | 24 +- bin/utils/chain-spec-builder/Cargo.toml | 10 +- bin/utils/subkey/Cargo.toml | 20 +- client/Cargo.toml | 40 ++- client/api/Cargo.toml | 36 +- client/authority-discovery/Cargo.toml | 24 +- client/basic-authorship/Cargo.toml | 30 +- client/block-builder/Cargo.toml | 20 +- client/chain-spec/Cargo.toml | 14 +- client/chain-spec/derive/Cargo.toml | 4 +- client/cli/Cargo.toml | 30 +- client/consensus/aura/Cargo.toml | 50 +-- client/consensus/babe/Cargo.toml | 58 ++-- client/consensus/babe/rpc/Cargo.toml | 28 +- client/consensus/epochs/Cargo.toml | 13 +- client/consensus/manual-seal/Cargo.toml | 26 +- client/consensus/pow/Cargo.toml | 24 +- client/consensus/slots/Cargo.toml | 24 +- client/consensus/uncles/Cargo.toml | 16 +- client/db/Cargo.toml | 28 +- client/executor/Cargo.toml | 34 +- client/executor/common/Cargo.toml | 14 +- client/executor/runtime-test/Cargo.toml | 19 +- client/executor/wasmi/Cargo.toml | 14 +- client/executor/wasmtime/Cargo.toml | 14 +- client/finality-grandpa/Cargo.toml | 48 +-- client/informant/Cargo.toml | 14 +- client/keystore/Cargo.toml | 8 +- client/network-gossip/Cargo.toml | 8 +- client/network/Cargo.toml | 40 ++- client/network/test/Cargo.toml | 27 +- client/offchain/Cargo.toml | 26 +- client/peerset/Cargo.toml | 3 +- client/rpc-api/Cargo.toml | 14 +- client/rpc-servers/Cargo.toml | 6 +- client/rpc/Cargo.toml | 42 +-- client/service/Cargo.toml | 58 ++-- client/service/test/Cargo.toml | 19 +- client/state-db/Cargo.toml | 6 +- client/telemetry/Cargo.toml | 4 +- client/tracing/Cargo.toml | 6 +- client/transaction-pool/Cargo.toml | 24 +- client/transaction-pool/graph/Cargo.toml | 14 +- frame/assets/Cargo.toml | 16 +- frame/aura/Cargo.toml | 28 +- frame/authority-discovery/Cargo.toml | 24 +- frame/authorship/Cargo.toml | 20 +- frame/babe/Cargo.toml | 32 +- frame/balances/Cargo.toml | 22 +- frame/benchmarking/Cargo.toml | 12 +- frame/collective/Cargo.toml | 18 +- frame/contracts/Cargo.toml | 26 +- frame/contracts/common/Cargo.toml | 9 +- frame/contracts/rpc/Cargo.toml | 18 +- frame/contracts/rpc/runtime-api/Cargo.toml | 12 +- frame/democracy/Cargo.toml | 20 +- frame/elections-phragmen/Cargo.toml | 22 +- frame/elections/Cargo.toml | 18 +- frame/evm/Cargo.toml | 20 +- frame/example-offchain-worker/Cargo.toml | 17 +- frame/example/Cargo.toml | 20 +- frame/executive/Cargo.toml | 22 +- frame/finality-tracker/Cargo.toml | 20 +- frame/generic-asset/Cargo.toml | 16 +- frame/grandpa/Cargo.toml | 24 +- frame/identity/Cargo.toml | 20 +- frame/im-online/Cargo.toml | 24 +- frame/indices/Cargo.toml | 20 +- frame/membership/Cargo.toml | 16 +- frame/metadata/Cargo.toml | 8 +- frame/nicks/Cargo.toml | 18 +- frame/offences/Cargo.toml | 20 +- frame/randomness-collective-flip/Cargo.toml | 16 +- frame/recovery/Cargo.toml | 18 +- frame/scored-pool/Cargo.toml | 18 +- frame/session/Cargo.toml | 24 +- frame/society/Cargo.toml | 18 +- frame/staking/Cargo.toml | 34 +- frame/staking/reward-curve/Cargo.toml | 6 +- frame/sudo/Cargo.toml | 16 +- frame/support/Cargo.toml | 24 +- frame/support/procedural/Cargo.toml | 6 +- frame/support/procedural/tools/Cargo.toml | 6 +- .../procedural/tools/derive/Cargo.toml | 4 +- frame/support/test/Cargo.toml | 17 +- frame/system/Cargo.toml | 20 +- frame/system/rpc/runtime-api/Cargo.toml | 6 +- frame/timestamp/Cargo.toml | 24 +- frame/transaction-payment/Cargo.toml | 20 +- frame/transaction-payment/rpc/Cargo.toml | 16 +- .../rpc/runtime-api/Cargo.toml | 12 +- frame/treasury/Cargo.toml | 18 +- frame/utility/Cargo.toml | 20 +- frame/vesting/Cargo.toml | 21 +- primitives/allocator/Cargo.toml | 10 +- primitives/api/Cargo.toml | 18 +- primitives/api/proc-macro/Cargo.toml | 4 +- primitives/api/test/Cargo.toml | 21 +- primitives/application-crypto/Cargo.toml | 10 +- primitives/application-crypto/test/Cargo.toml | 14 +- primitives/arithmetic/Cargo.toml | 8 +- primitives/authority-discovery/Cargo.toml | 12 +- primitives/authorship/Cargo.toml | 10 +- primitives/block-builder/Cargo.toml | 12 +- primitives/blockchain/Cargo.toml | 12 +- primitives/consensus/aura/Cargo.toml | 16 +- primitives/consensus/babe/Cargo.toml | 18 +- primitives/consensus/common/Cargo.toml | 18 +- primitives/consensus/pow/Cargo.toml | 12 +- primitives/core/Cargo.toml | 16 +- primitives/debug-derive/Cargo.toml | 4 +- primitives/externalities/Cargo.toml | 8 +- primitives/finality-grandpa/Cargo.toml | 12 +- primitives/finality-tracker/Cargo.toml | 8 +- primitives/inherents/Cargo.toml | 8 +- primitives/io/Cargo.toml | 18 +- primitives/keyring/Cargo.toml | 8 +- primitives/offchain/Cargo.toml | 8 +- primitives/panic-handler/Cargo.toml | 4 +- primitives/phragmen/Cargo.toml | 12 +- primitives/rpc/Cargo.toml | 6 +- primitives/runtime-interface/Cargo.toml | 20 +- .../runtime-interface/proc-macro/Cargo.toml | 4 +- .../runtime-interface/test-wasm/Cargo.toml | 14 +- primitives/runtime-interface/test/Cargo.toml | 16 +- primitives/runtime/Cargo.toml | 16 +- primitives/sandbox/Cargo.toml | 12 +- primitives/serializer/Cargo.toml | 4 +- primitives/session/Cargo.toml | 12 +- primitives/staking/Cargo.toml | 8 +- primitives/state-machine/Cargo.toml | 12 +- primitives/std/Cargo.toml | 4 +- primitives/storage/Cargo.toml | 8 +- primitives/test-primitives/Cargo.toml | 10 +- primitives/timestamp/Cargo.toml | 12 +- primitives/transaction-pool/Cargo.toml | 8 +- primitives/trie/Cargo.toml | 9 +- primitives/version/Cargo.toml | 8 +- primitives/wasm-interface/Cargo.toml | 6 +- test-utils/Cargo.toml | 4 +- test-utils/client/Cargo.toml | 24 +- test-utils/runtime/Cargo.toml | 60 ++-- test-utils/runtime/client/Cargo.toml | 22 +- .../runtime/transaction-pool/Cargo.toml | 14 +- utils/browser/Cargo.toml | 12 +- utils/build-script-utils/Cargo.toml | 4 +- utils/fork-tree/Cargo.toml | 4 +- utils/frame/benchmarking-cli/Cargo.toml | 18 +- utils/frame/rpc/support/Cargo.toml | 12 +- utils/frame/rpc/system/Cargo.toml | 22 +- utils/prometheus/Cargo.toml | 4 +- utils/wasm-builder-runner/Cargo.toml | 3 +- utils/wasm-builder/Cargo.toml | 3 +- 165 files changed, 1890 insertions(+), 1556 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4174b5bbc2f..48b14599b1c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -423,7 +423,7 @@ dependencies = [ [[package]] name = "browser-utils" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "chrono", "clear_on_drop", @@ -597,7 +597,7 @@ dependencies = [ [[package]] name = "chain-spec-builder" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "ansi_term 0.12.1", "node-cli", @@ -1441,14 +1441,14 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "parity-scale-codec", ] [[package]] name = "frame-benchmarking" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "parity-scale-codec", "sp-api", @@ -1459,7 +1459,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-benchmarking", "parity-scale-codec", @@ -1474,7 +1474,7 @@ dependencies = [ [[package]] name = "frame-executive" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -1492,7 +1492,7 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "11.0.0" +version = "11.0.0-dev" dependencies = [ "parity-scale-codec", "serde", @@ -1502,7 +1502,7 @@ dependencies = [ [[package]] name = "frame-support" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "bitmask", "frame-metadata", @@ -1527,7 +1527,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support-procedural-tools", "proc-macro2 1.0.8", @@ -1537,7 +1537,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -1548,7 +1548,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "proc-macro2 1.0.8", "quote 1.0.2", @@ -1557,7 +1557,7 @@ dependencies = [ [[package]] name = "frame-support-test" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "parity-scale-codec", @@ -1573,7 +1573,7 @@ dependencies = [ [[package]] name = "frame-system" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "criterion 0.2.11", "frame-support", @@ -1591,7 +1591,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "parity-scale-codec", "sp-api", @@ -3365,7 +3365,7 @@ dependencies = [ [[package]] name = "node-cli" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "assert_cmd", "browser-utils", @@ -3436,7 +3436,7 @@ dependencies = [ [[package]] name = "node-executor" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "criterion 0.3.1", "frame-benchmarking", @@ -3469,7 +3469,7 @@ dependencies = [ [[package]] name = "node-inspect" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "derive_more", "log 0.4.8", @@ -3485,7 +3485,7 @@ dependencies = [ [[package]] name = "node-primitives" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "pretty_assertions", "sp-core", @@ -3495,7 +3495,7 @@ dependencies = [ [[package]] name = "node-rpc" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "jsonrpc-core", "node-primitives", @@ -3518,7 +3518,7 @@ dependencies = [ [[package]] name = "node-rpc-client" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "env_logger 0.7.1", "futures 0.1.29", @@ -3531,7 +3531,7 @@ dependencies = [ [[package]] name = "node-runtime" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-benchmarking", "frame-executive", @@ -3593,7 +3593,7 @@ dependencies = [ [[package]] name = "node-template" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "futures 0.3.4", "log 0.4.8", @@ -3621,7 +3621,7 @@ dependencies = [ [[package]] name = "node-template-runtime" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-executive", "frame-support", @@ -3654,7 +3654,7 @@ dependencies = [ [[package]] name = "node-testing" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "criterion 0.3.1", "frame-support", @@ -3699,7 +3699,7 @@ dependencies = [ [[package]] name = "node-transaction-factory" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "log 0.4.8", "parity-scale-codec", @@ -3873,7 +3873,7 @@ dependencies = [ [[package]] name = "pallet-assets" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -3887,7 +3887,7 @@ dependencies = [ [[package]] name = "pallet-aura" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -3909,7 +3909,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -3927,7 +3927,7 @@ dependencies = [ [[package]] name = "pallet-authorship" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -3943,7 +3943,7 @@ dependencies = [ [[package]] name = "pallet-babe" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -3968,7 +3968,7 @@ dependencies = [ [[package]] name = "pallet-balances" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -3984,7 +3984,7 @@ dependencies = [ [[package]] name = "pallet-collective" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4000,7 +4000,7 @@ dependencies = [ [[package]] name = "pallet-contracts" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "assert_matches", "frame-support", @@ -4025,7 +4025,7 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -4034,7 +4034,7 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4053,7 +4053,7 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc-runtime-api" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "pallet-contracts-primitives", "parity-scale-codec", @@ -4064,7 +4064,7 @@ dependencies = [ [[package]] name = "pallet-democracy" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4081,7 +4081,7 @@ dependencies = [ [[package]] name = "pallet-elections" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4097,7 +4097,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4115,7 +4115,7 @@ dependencies = [ [[package]] name = "pallet-evm" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "evm", "frame-support", @@ -4135,7 +4135,7 @@ dependencies = [ [[package]] name = "pallet-example" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4150,7 +4150,7 @@ dependencies = [ [[package]] name = "pallet-example-offchain-worker" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4165,7 +4165,7 @@ dependencies = [ [[package]] name = "pallet-finality-tracker" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4182,7 +4182,7 @@ dependencies = [ [[package]] name = "pallet-generic-asset" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4196,7 +4196,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4214,7 +4214,7 @@ dependencies = [ [[package]] name = "pallet-identity" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4231,7 +4231,7 @@ dependencies = [ [[package]] name = "pallet-im-online" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4249,7 +4249,7 @@ dependencies = [ [[package]] name = "pallet-indices" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4265,7 +4265,7 @@ dependencies = [ [[package]] name = "pallet-membership" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4279,7 +4279,7 @@ dependencies = [ [[package]] name = "pallet-nicks" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4294,7 +4294,7 @@ dependencies = [ [[package]] name = "pallet-offences" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4310,7 +4310,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4324,7 +4324,7 @@ dependencies = [ [[package]] name = "pallet-recovery" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "enumflags2", "frame-support", @@ -4340,7 +4340,7 @@ dependencies = [ [[package]] name = "pallet-scored-pool" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4355,7 +4355,7 @@ dependencies = [ [[package]] name = "pallet-session" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4375,7 +4375,7 @@ dependencies = [ [[package]] name = "pallet-society" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4391,7 +4391,7 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4414,7 +4414,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.8", @@ -4425,7 +4425,7 @@ dependencies = [ [[package]] name = "pallet-sudo" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4439,7 +4439,7 @@ dependencies = [ [[package]] name = "pallet-template" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4452,7 +4452,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -4470,7 +4470,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4485,7 +4485,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4502,7 +4502,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "parity-scale-codec", @@ -4515,7 +4515,7 @@ dependencies = [ [[package]] name = "pallet-treasury" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4530,7 +4530,7 @@ dependencies = [ [[package]] name = "pallet-utility" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -4545,7 +4545,7 @@ dependencies = [ [[package]] name = "pallet-vesting" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "enumflags2", "frame-support", @@ -5020,7 +5020,7 @@ dependencies = [ [[package]] name = "prometheus-exporter" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "async-std", "derive_more", @@ -5618,7 +5618,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "bytes 0.4.12", "derive_more", @@ -5647,7 +5647,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "futures 0.3.4", "log 0.4.8", @@ -5671,7 +5671,7 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -5686,7 +5686,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "impl-trait-for-tuples", "sc-chain-spec-derive", @@ -5700,7 +5700,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.8", @@ -5710,7 +5710,7 @@ dependencies = [ [[package]] name = "sc-cli" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "ansi_term 0.12.1", "app_dirs", @@ -5749,7 +5749,7 @@ dependencies = [ [[package]] name = "sc-client" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "derive_more", "env_logger 0.7.1", @@ -5786,7 +5786,7 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "derive_more", "fnv", @@ -5817,7 +5817,7 @@ dependencies = [ [[package]] name = "sc-client-db" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "env_logger 0.7.1", "hash-db", @@ -5848,7 +5848,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "derive_more", "env_logger 0.7.1", @@ -5887,7 +5887,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "derive_more", "env_logger 0.7.1", @@ -5938,7 +5938,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "derive_more", "futures 0.3.4", @@ -5963,7 +5963,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "fork-tree", "parity-scale-codec", @@ -5975,7 +5975,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "derive_more", "env_logger 0.7.1", @@ -6003,7 +6003,7 @@ dependencies = [ [[package]] name = "sc-consensus-pow" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "derive_more", "futures 0.3.4", @@ -6023,7 +6023,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "futures 0.3.4", "futures-timer 3.0.2", @@ -6044,7 +6044,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "log 0.4.8", "sc-client-api", @@ -6057,7 +6057,7 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "assert_matches", "derive_more", @@ -6090,7 +6090,7 @@ dependencies = [ [[package]] name = "sc-executor-common" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "derive_more", "log 0.4.8", @@ -6105,7 +6105,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "log 0.4.8", "parity-scale-codec", @@ -6120,7 +6120,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "assert_matches", "log 0.4.8", @@ -6137,7 +6137,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "assert_matches", "env_logger 0.7.1", @@ -6178,7 +6178,7 @@ dependencies = [ [[package]] name = "sc-informant" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "ansi_term 0.12.1", "futures 0.3.4", @@ -6194,7 +6194,7 @@ dependencies = [ [[package]] name = "sc-keystore" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "derive_more", "hex", @@ -6209,7 +6209,7 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "assert_matches", "async-std", @@ -6268,7 +6268,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "futures 0.3.4", "futures-timer 3.0.2", @@ -6283,7 +6283,7 @@ dependencies = [ [[package]] name = "sc-network-test" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "env_logger 0.7.1", "futures 0.1.29", @@ -6310,7 +6310,7 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "bytes 0.5.4", "env_logger 0.7.1", @@ -6341,7 +6341,7 @@ dependencies = [ [[package]] name = "sc-peerset" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "futures 0.3.4", "libp2p", @@ -6353,7 +6353,7 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "assert_matches", "futures 0.1.29", @@ -6390,7 +6390,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "derive_more", "futures 0.3.4", @@ -6412,7 +6412,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "jsonrpc-core", "jsonrpc-http-server", @@ -6426,7 +6426,7 @@ dependencies = [ [[package]] name = "sc-runtime-test" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "sp-allocator", "sp-core", @@ -6439,7 +6439,7 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "derive_more", "exit-future", @@ -6492,7 +6492,7 @@ dependencies = [ [[package]] name = "sc-service-test" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "env_logger 0.7.1", "fdlimit", @@ -6512,7 +6512,7 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "env_logger 0.7.1", "log 0.4.8", @@ -6523,7 +6523,7 @@ dependencies = [ [[package]] name = "sc-telemetry" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "bytes 0.5.4", "futures 0.3.4", @@ -6544,7 +6544,7 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "erased-serde", "log 0.4.8", @@ -6559,7 +6559,7 @@ dependencies = [ [[package]] name = "sc-transaction-graph" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "assert_matches", "criterion 0.3.1", @@ -6581,7 +6581,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "derive_more", "futures 0.3.4", @@ -6942,7 +6942,7 @@ checksum = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" [[package]] name = "sp-allocator" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "derive_more", "log 0.4.8", @@ -6953,7 +6953,7 @@ dependencies = [ [[package]] name = "sp-api" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "hash-db", "parity-scale-codec", @@ -6968,7 +6968,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "blake2-rfc", "proc-macro-crate", @@ -6979,7 +6979,7 @@ dependencies = [ [[package]] name = "sp-api-test" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "criterion 0.3.1", "parity-scale-codec", @@ -6996,7 +6996,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "parity-scale-codec", "serde", @@ -7007,7 +7007,7 @@ dependencies = [ [[package]] name = "sp-application-crypto-test" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "sp-api", "sp-application-crypto", @@ -7018,7 +7018,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "criterion 0.3.1", "integer-sqrt", @@ -7033,7 +7033,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "parity-scale-codec", "sp-api", @@ -7044,7 +7044,7 @@ dependencies = [ [[package]] name = "sp-authorship" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -7054,7 +7054,7 @@ dependencies = [ [[package]] name = "sp-block-builder" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "parity-scale-codec", "sp-api", @@ -7065,7 +7065,7 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "derive_more", "log 0.4.8", @@ -7080,7 +7080,7 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "derive_more", "futures 0.3.4", @@ -7102,7 +7102,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "parity-scale-codec", "sp-api", @@ -7115,7 +7115,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -7130,7 +7130,7 @@ dependencies = [ [[package]] name = "sp-consensus-pow" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "parity-scale-codec", "sp-api", @@ -7141,7 +7141,7 @@ dependencies = [ [[package]] name = "sp-core" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "base58", "blake2-rfc", @@ -7185,7 +7185,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "proc-macro2 1.0.8", "quote 1.0.2", @@ -7194,7 +7194,7 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "environmental", "sp-std", @@ -7203,7 +7203,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "parity-scale-codec", "serde", @@ -7215,7 +7215,7 @@ dependencies = [ [[package]] name = "sp-finality-tracker" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -7224,7 +7224,7 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "derive_more", "parity-scale-codec", @@ -7235,7 +7235,7 @@ dependencies = [ [[package]] name = "sp-io" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "hash-db", "libsecp256k1", @@ -7252,7 +7252,7 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "lazy_static", "sp-core", @@ -7262,7 +7262,7 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "sp-api", "sp-runtime", @@ -7270,7 +7270,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "backtrace", "log 0.4.8", @@ -7278,7 +7278,7 @@ dependencies = [ [[package]] name = "sp-phragmen" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "rand 0.7.3", "serde", @@ -7290,7 +7290,7 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "serde", "serde_json", @@ -7299,7 +7299,7 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "impl-trait-for-tuples", "log 0.4.8", @@ -7319,7 +7319,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "parity-scale-codec", "primitive-types", @@ -7338,7 +7338,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "Inflector", "proc-macro-crate", @@ -7349,7 +7349,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-test" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "sc-executor", "sp-core", @@ -7361,7 +7361,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-test-wasm" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "sp-core", "sp-io", @@ -7372,7 +7372,7 @@ dependencies = [ [[package]] name = "sp-sandbox" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "assert_matches", "parity-scale-codec", @@ -7386,7 +7386,7 @@ dependencies = [ [[package]] name = "sp-serializer" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "serde", "serde_json", @@ -7394,7 +7394,7 @@ dependencies = [ [[package]] name = "sp-session" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "sp-api", "sp-core", @@ -7404,7 +7404,7 @@ dependencies = [ [[package]] name = "sp-staking" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -7413,7 +7413,7 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.8.0" +version = "0.8.0-dev" dependencies = [ "hash-db", "hex-literal", @@ -7432,11 +7432,11 @@ dependencies = [ [[package]] name = "sp-std" -version = "2.0.0" +version = "2.0.0-dev" [[package]] name = "sp-storage" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "impl-serde 0.2.3", "serde", @@ -7446,7 +7446,7 @@ dependencies = [ [[package]] name = "sp-test-primitives" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "parity-scale-codec", "parity-util-mem", @@ -7458,7 +7458,7 @@ dependencies = [ [[package]] name = "sp-timestamp" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7471,7 +7471,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "derive_more", "futures 0.3.4", @@ -7484,7 +7484,7 @@ dependencies = [ [[package]] name = "sp-trie" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "criterion 0.2.11", "hash-db", @@ -7501,7 +7501,7 @@ dependencies = [ [[package]] name = "sp-version" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "impl-serde 0.2.3", "parity-scale-codec", @@ -7512,7 +7512,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7618,7 +7618,7 @@ dependencies = [ [[package]] name = "subkey" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "clap", "derive_more", @@ -7660,11 +7660,11 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" -version = "2.0.0" +version = "2.0.0-dev" [[package]] name = "substrate-frame-rpc-support" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -7680,7 +7680,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "env_logger 0.7.1", "frame-system-rpc-runtime-api", @@ -7703,7 +7703,7 @@ dependencies = [ [[package]] name = "substrate-test-client" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "futures 0.3.4", "hash-db", @@ -7722,7 +7722,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "cfg-if", "frame-executive", @@ -7763,7 +7763,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "futures 0.3.4", "parity-scale-codec", @@ -7780,7 +7780,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-transaction-pool" -version = "2.0.0" +version = "2.0.0-dev" dependencies = [ "derive_more", "futures 0.3.4", @@ -7795,7 +7795,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" -version = "2.0.0" +version = "2.0.0-dev" [[package]] name = "substrate-wasm-builder" diff --git a/bin/node-template/node/Cargo.toml b/bin/node-template/node/Cargo.toml index 9ad4a0e8a55..c21d380d4b7 100644 --- a/bin/node-template/node/Cargo.toml +++ b/bin/node-template/node/Cargo.toml @@ -1,10 +1,12 @@ [package] name = "node-template" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Anonymous"] edition = "2018" license = "Unlicense" build = "build.rs" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [[bin]] name = "node-template" @@ -14,25 +16,25 @@ futures = "0.3.1" log = "0.4.8" structopt = "0.3.8" -sc-cli = { version = "0.8.0", path = "../../../client/cli" } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sc-executor = { version = "0.8", path = "../../../client/executor" } -sc-service = { version = "0.8", path = "../../../client/service" } -sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" } -sc-transaction-pool = { version = "2.0.0", path = "../../../client/transaction-pool" } -sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" } -sc-network = { version = "0.8", path = "../../../client/network" } -sc-consensus-aura = { version = "0.8", path = "../../../client/consensus/aura" } -sp-consensus-aura = { version = "0.8", path = "../../../primitives/consensus/aura" } -sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" } -grandpa = { version = "0.8", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" } -grandpa-primitives = { version = "2.0.0", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" } -sc-client = { version = "0.8", path = "../../../client/" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -sc-basic-authorship = { path = "../../../client/basic-authorship" } +sc-cli = { version = "0.8.0-dev", path = "../../../client/cli" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sc-executor = { version = "0.8.0-dev", path = "../../../client/executor" } +sc-service = { version = "0.8.0-dev", path = "../../../client/service" } +sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } +sc-transaction-pool = { version = "2.0.0-dev", path = "../../../client/transaction-pool" } +sp-transaction-pool = { version = "2.0.0-dev", path = "../../../primitives/transaction-pool" } +sc-network = { version = "0.8.0-dev", path = "../../../client/network" } +sc-consensus-aura = { version = "0.8.0-dev", path = "../../../client/consensus/aura" } +sp-consensus-aura = { version = "0.8.0-dev", path = "../../../primitives/consensus/aura" } +sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } +grandpa = { version = "0.8.0-dev", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" } +grandpa-primitives = { version = "2.0.0-dev", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" } +sc-client = { version = "0.8.0-dev", path = "../../../client/" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sc-basic-authorship = { path = "../../../client/basic-authorship" , version = "0.8.0-dev"} -node-template-runtime = { version = "2.0.0", path = "../runtime" } +node-template-runtime = { version = "2.0.0-dev", path = "../runtime" } [build-dependencies] vergen = "3.0.4" -build-script-utils = { version = "2.0.0", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } +build-script-utils = { version = "2.0.0-dev", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } diff --git a/bin/node-template/pallets/template/Cargo.toml b/bin/node-template/pallets/template/Cargo.toml index 8ea3f3adabc..a2abe4c6e2c 100644 --- a/bin/node-template/pallets/template/Cargo.toml +++ b/bin/node-template/pallets/template/Cargo.toml @@ -2,7 +2,9 @@ authors = ['Anonymous'] edition = '2018' name = 'pallet-template' -version = '2.0.0' +version = "2.0.0-dev" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } @@ -10,28 +12,28 @@ safe-mix = { default-features = false, version = '1.0.0' } [dependencies.frame-support] default-features = false -version = '2.0.0' +version = "2.0.0-dev" path = "../../../../frame/support" [dependencies.system] default-features = false package = 'frame-system' -version = '2.0.0' +version = "2.0.0-dev" path = "../../../../frame/system" [dev-dependencies.sp-core] default-features = false -version = '2.0.0' +version = "2.0.0-dev" path = "../../../../primitives/core" [dev-dependencies.sp-io] default-features = false -version = '2.0.0' +version = "2.0.0-dev" path = "../../../../primitives/io" [dev-dependencies.sp-runtime] default-features = false -version = '2.0.0' +version = "2.0.0-dev" path = "../../../../primitives/runtime" [features] diff --git a/bin/node-template/runtime/Cargo.toml b/bin/node-template/runtime/Cargo.toml index ddecb0e4cff..b5a89febce0 100644 --- a/bin/node-template/runtime/Cargo.toml +++ b/bin/node-template/runtime/Cargo.toml @@ -1,42 +1,44 @@ [package] name = "node-template-runtime" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Anonymous"] edition = "2018" license = "Unlicense" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -aura = { version = "2.0.0", default-features = false, package = "pallet-aura", path = "../../../frame/aura" } -balances = { version = "2.0.0", default-features = false, package = "pallet-balances", path = "../../../frame/balances" } -frame-support = { version = "2.0.0", default-features = false, path = "../../../frame/support" } -grandpa = { version = "2.0.0", default-features = false, package = "pallet-grandpa", path = "../../../frame/grandpa" } -indices = { version = "2.0.0", default-features = false, package = "pallet-indices", path = "../../../frame/indices" } -randomness-collective-flip = { version = "2.0.0", default-features = false, package = "pallet-randomness-collective-flip", path = "../../../frame/randomness-collective-flip" } -sudo = { version = "2.0.0", default-features = false, package = "pallet-sudo", path = "../../../frame/sudo" } -system = { version = "2.0.0", default-features = false, package = "frame-system", path = "../../../frame/system" } -timestamp = { version = "2.0.0", default-features = false, package = "pallet-timestamp", path = "../../../frame/timestamp" } -transaction-payment = { version = "2.0.0", default-features = false, package = "pallet-transaction-payment", path = "../../../frame/transaction-payment" } -frame-executive = { version = "2.0.0", default-features = false, path = "../../../frame/executive" } +aura = { version = "2.0.0-dev", default-features = false, package = "pallet-aura", path = "../../../frame/aura" } +balances = { version = "2.0.0-dev", default-features = false, package = "pallet-balances", path = "../../../frame/balances" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../../../frame/support" } +grandpa = { version = "2.0.0-dev", default-features = false, package = "pallet-grandpa", path = "../../../frame/grandpa" } +indices = { version = "2.0.0-dev", default-features = false, package = "pallet-indices", path = "../../../frame/indices" } +randomness-collective-flip = { version = "2.0.0-dev", default-features = false, package = "pallet-randomness-collective-flip", path = "../../../frame/randomness-collective-flip" } +sudo = { version = "2.0.0-dev", default-features = false, package = "pallet-sudo", path = "../../../frame/sudo" } +system = { version = "2.0.0-dev", default-features = false, package = "frame-system", path = "../../../frame/system" } +timestamp = { version = "2.0.0-dev", default-features = false, package = "pallet-timestamp", path = "../../../frame/timestamp" } +transaction-payment = { version = "2.0.0-dev", default-features = false, package = "pallet-transaction-payment", path = "../../../frame/transaction-payment" } +frame-executive = { version = "2.0.0-dev", default-features = false, path = "../../../frame/executive" } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-api = { version = "2.0.0", default-features = false, path = "../../../primitives/api" } -sp-block-builder = { path = "../../../primitives/block-builder", default-features = false} -sp-consensus-aura = { version = "0.8", default-features = false, path = "../../../primitives/consensus/aura" } -sp-core = { version = "2.0.0", default-features = false, path = "../../../primitives/core" } -sp-inherents = { path = "../../../primitives/inherents", default-features = false} -sp-io = { version = "2.0.0", default-features = false, path = "../../../primitives/io" } -sp-offchain = { version = "2.0.0", default-features = false, path = "../../../primitives/offchain" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../../primitives/runtime" } -sp-session = { version = "2.0.0", default-features = false, path = "../../../primitives/session" } -sp-std = { version = "2.0.0", default-features = false, path = "../../../primitives/std" } -sp-transaction-pool = { version = "2.0.0", default-features = false, path = "../../../primitives/transaction-pool" } -sp-version = { version = "2.0.0", default-features = false, path = "../../../primitives/version" } +sp-api = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/api" } +sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0-dev"} +sp-consensus-aura = { version = "0.8.0-dev", default-features = false, path = "../../../primitives/consensus/aura" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/core" } +sp-inherents = { path = "../../../primitives/inherents", default-features = false, version = "2.0.0-dev"} +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/io" } +sp-offchain = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/offchain" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/runtime" } +sp-session = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/session" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/std" } +sp-transaction-pool = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/transaction-pool" } +sp-version = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/version" } -template = { version = "2.0.0", default-features = false, path = "../pallets/template", package = "pallet-template" } +template = { version = "2.0.0-dev", default-features = false, path = "../pallets/template", package = "pallet-template" } [build-dependencies] -wasm-builder-runner = { version = "1.0.4", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" } +wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" } [features] default = ["std"] diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml index 52be9e1d95f..7f17f1eaa6f 100644 --- a/bin/node/cli/Cargo.toml +++ b/bin/node/cli/Cargo.toml @@ -1,12 +1,14 @@ [package] name = "node-cli" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] description = "Substrate node implementation in Rust." build = "build.rs" edition = "2018" license = "GPL-3.0" default-run = "substrate" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [package.metadata.wasm-pack.profile.release] # `wasm-opt` has some problems on linux, see @@ -40,69 +42,69 @@ structopt = { version = "0.3.8", optional = true } tracing = "0.1.10" # primitives -sp-authority-discovery = { version = "2.0.0", path = "../../../primitives/authority-discovery" } -sp-consensus-babe = { version = "0.8", path = "../../../primitives/consensus/babe" } -grandpa-primitives = { version = "2.0.0", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -sp-timestamp = { version = "2.0.0", default-features = false, path = "../../../primitives/timestamp" } -sp-finality-tracker = { version = "2.0.0", default-features = false, path = "../../../primitives/finality-tracker" } -sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" } -sp-keyring = { version = "2.0.0", path = "../../../primitives/keyring" } -sp-io = { version = "2.0.0", path = "../../../primitives/io" } -sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" } +sp-authority-discovery = { version = "2.0.0-dev", path = "../../../primitives/authority-discovery" } +sp-consensus-babe = { version = "0.8.0-dev", path = "../../../primitives/consensus/babe" } +grandpa-primitives = { version = "2.0.0-dev", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sp-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/timestamp" } +sp-finality-tracker = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/finality-tracker" } +sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } +sp-keyring = { version = "2.0.0-dev", path = "../../../primitives/keyring" } +sp-io = { version = "2.0.0-dev", path = "../../../primitives/io" } +sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } # client dependencies -sc-client-api = { version = "2.0.0", path = "../../../client/api" } -sc-client = { version = "0.8", path = "../../../client/" } -sc-chain-spec = { version = "2.0.0", path = "../../../client/chain-spec" } -sc-transaction-pool = { version = "2.0.0", path = "../../../client/transaction-pool" } -sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" } -sc-network = { version = "0.8", path = "../../../client/network" } -sc-consensus-babe = { version = "0.8", path = "../../../client/consensus/babe" } -grandpa = { version = "0.8", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" } -sc-client-db = { version = "0.8", default-features = false, path = "../../../client/db" } -sc-offchain = { version = "2.0.0", path = "../../../client/offchain" } -sc-rpc = { version = "2.0.0", path = "../../../client/rpc" } -sc-basic-authorship = { version = "0.8", path = "../../../client/basic-authorship" } -sc-service = { version = "0.8", default-features = false, path = "../../../client/service" } -sc-tracing = { version = "2.0.0", path = "../../../client/tracing" } -sc-telemetry = { version = "2.0.0", path = "../../../client/telemetry" } -sc-authority-discovery = { version = "0.8", path = "../../../client/authority-discovery" } +sc-client-api = { version = "2.0.0-dev", path = "../../../client/api" } +sc-client = { version = "0.8.0-dev", path = "../../../client/" } +sc-chain-spec = { version = "2.0.0-dev", path = "../../../client/chain-spec" } +sc-transaction-pool = { version = "2.0.0-dev", path = "../../../client/transaction-pool" } +sp-transaction-pool = { version = "2.0.0-dev", path = "../../../primitives/transaction-pool" } +sc-network = { version = "0.8.0-dev", path = "../../../client/network" } +sc-consensus-babe = { version = "0.8.0-dev", path = "../../../client/consensus/babe" } +grandpa = { version = "0.8.0-dev", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" } +sc-client-db = { version = "0.8.0-dev", default-features = false, path = "../../../client/db" } +sc-offchain = { version = "2.0.0-dev", path = "../../../client/offchain" } +sc-rpc = { version = "2.0.0-dev", path = "../../../client/rpc" } +sc-basic-authorship = { version = "0.8.0-dev", path = "../../../client/basic-authorship" } +sc-service = { version = "0.8.0-dev", default-features = false, path = "../../../client/service" } +sc-tracing = { version = "2.0.0-dev", path = "../../../client/tracing" } +sc-telemetry = { version = "2.0.0-dev", path = "../../../client/telemetry" } +sc-authority-discovery = { version = "0.8.0-dev", path = "../../../client/authority-discovery" } # frame dependencies -pallet-indices = { version = "2.0.0", path = "../../../frame/indices" } -pallet-timestamp = { version = "2.0.0", default-features = false, path = "../../../frame/timestamp" } -pallet-contracts = { version = "2.0.0", path = "../../../frame/contracts" } -frame-system = { version = "2.0.0", path = "../../../frame/system" } -pallet-balances = { version = "2.0.0", path = "../../../frame/balances" } -pallet-transaction-payment = { version = "2.0.0", path = "../../../frame/transaction-payment" } -frame-support = { version = "2.0.0", default-features = false, path = "../../../frame/support" } -pallet-im-online = { version = "2.0.0", default-features = false, path = "../../../frame/im-online" } -pallet-authority-discovery = { version = "2.0.0", path = "../../../frame/authority-discovery" } +pallet-indices = { version = "2.0.0-dev", path = "../../../frame/indices" } +pallet-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../../frame/timestamp" } +pallet-contracts = { version = "2.0.0-dev", path = "../../../frame/contracts" } +frame-system = { version = "2.0.0-dev", path = "../../../frame/system" } +pallet-balances = { version = "2.0.0-dev", path = "../../../frame/balances" } +pallet-transaction-payment = { version = "2.0.0-dev", path = "../../../frame/transaction-payment" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../../../frame/support" } +pallet-im-online = { version = "2.0.0-dev", default-features = false, path = "../../../frame/im-online" } +pallet-authority-discovery = { version = "2.0.0-dev", path = "../../../frame/authority-discovery" } # node-specific dependencies -node-runtime = { version = "2.0.0", path = "../runtime" } -node-rpc = { version = "2.0.0", path = "../rpc" } -node-primitives = { version = "2.0.0", path = "../primitives" } -node-executor = { version = "2.0.0", path = "../executor" } +node-runtime = { version = "2.0.0-dev", path = "../runtime" } +node-rpc = { version = "2.0.0-dev", path = "../rpc" } +node-primitives = { version = "2.0.0-dev", path = "../primitives" } +node-executor = { version = "2.0.0-dev", path = "../executor" } # CLI-specific dependencies -sc-cli = { version = "0.8.0", optional = true, path = "../../../client/cli" } -frame-benchmarking-cli = { version = "2.0.0", optional = true, path = "../../../utils/frame/benchmarking-cli" } -node-transaction-factory = { version = "0.8.0", optional = true, path = "../transaction-factory" } -node-inspect = { version = "0.8.0", optional = true, path = "../inspect" } +sc-cli = { version = "0.8.0-dev", optional = true, path = "../../../client/cli" } +frame-benchmarking-cli = { version = "2.0.0-dev", optional = true, path = "../../../utils/frame/benchmarking-cli" } +node-transaction-factory = { version = "0.8.0-dev", optional = true, path = "../transaction-factory" } +node-inspect = { version = "0.8.0-dev", optional = true, path = "../inspect" } # WASM-specific dependencies wasm-bindgen = { version = "0.2.57", optional = true } wasm-bindgen-futures = { version = "0.4.7", optional = true } -browser-utils = { path = "../../../utils/browser", optional = true } +browser-utils = { path = "../../../utils/browser", optional = true , version = "0.8.0-dev"} [dev-dependencies] -sc-keystore = { version = "2.0.0", path = "../../../client/keystore" } -sc-consensus-babe = { version = "0.8", features = ["test-helpers"], path = "../../../client/consensus/babe" } -sc-consensus-epochs = { version = "0.8", path = "../../../client/consensus/epochs" } -sc-service-test = { version = "2.0.0", path = "../../../client/service/test" } +sc-keystore = { version = "2.0.0-dev", path = "../../../client/keystore" } +sc-consensus-babe = { version = "0.8.0-dev", features = ["test-helpers"], path = "../../../client/consensus/babe" } +sc-consensus-epochs = { version = "0.8.0-dev", path = "../../../client/consensus/epochs" } +sc-service-test = { version = "2.0.0-dev", path = "../../../client/service/test" } futures = "0.3.1" tempfile = "3.1.0" assert_cmd = "0.12" @@ -110,14 +112,14 @@ nix = "0.17" serde_json = "1.0" [build-dependencies] -build-script-utils = { version = "2.0.0", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } +build-script-utils = { version = "2.0.0-dev", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } structopt = { version = "0.3.8", optional = true } -node-transaction-factory = { version = "0.8.0", optional = true, path = "../transaction-factory" } -node-inspect = { version = "0.8.0", optional = true, path = "../inspect" } -frame-benchmarking-cli = { version = "2.0.0", optional = true, path = "../../../utils/frame/benchmarking-cli" } +node-transaction-factory = { version = "0.8.0-dev", optional = true, path = "../transaction-factory" } +node-inspect = { version = "0.8.0-dev", optional = true, path = "../inspect" } +frame-benchmarking-cli = { version = "2.0.0-dev", optional = true, path = "../../../utils/frame/benchmarking-cli" } [build-dependencies.sc-cli] -version = "0.8.0" +version = "0.8.0-dev" package = "sc-cli" path = "../../../client/cli" optional = true diff --git a/bin/node/executor/Cargo.toml b/bin/node/executor/Cargo.toml index f55e1dae58e..321ef3bec0b 100644 --- a/bin/node/executor/Cargo.toml +++ b/bin/node/executor/Cargo.toml @@ -1,40 +1,42 @@ [package] name = "node-executor" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] description = "Substrate node implementation in Rust." edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0" } -node-primitives = { version = "2.0.0", path = "../primitives" } -node-runtime = { version = "2.0.0", path = "../runtime" } -sc-executor = { version = "0.8", path = "../../../client/executor" } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-io = { version = "2.0.0", path = "../../../primitives/io" } -sp-state-machine = { version = "0.8", path = "../../../primitives/state-machine" } -sp-trie = { version = "2.0.0", path = "../../../primitives/trie" } +node-primitives = { version = "2.0.0-dev", path = "../primitives" } +node-runtime = { version = "2.0.0-dev", path = "../runtime" } +sc-executor = { version = "0.8.0-dev", path = "../../../client/executor" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-io = { version = "2.0.0-dev", path = "../../../primitives/io" } +sp-state-machine = { version = "0.8.0-dev", path = "../../../primitives/state-machine" } +sp-trie = { version = "2.0.0-dev", path = "../../../primitives/trie" } trie-root = "0.16.0" -frame-benchmarking = { version = "2.0.0", path = "../../../frame/benchmarking" } +frame-benchmarking = { version = "2.0.0-dev", path = "../../../frame/benchmarking" } [dev-dependencies] criterion = "0.3.0" -frame-support = { version = "2.0.0", path = "../../../frame/support" } -frame-system = { version = "2.0.0", path = "../../../frame/system" } -node-testing = { version = "2.0.0", path = "../testing" } -pallet-balances = { version = "2.0.0", path = "../../../frame/balances" } -pallet-contracts = { version = "2.0.0", path = "../../../frame/contracts" } -pallet-grandpa = { version = "2.0.0", path = "../../../frame/grandpa" } -pallet-im-online = { version = "2.0.0", path = "../../../frame/im-online" } -pallet-indices = { version = "2.0.0", path = "../../../frame/indices" } -pallet-session = { version = "2.0.0", path = "../../../frame/session" } -pallet-timestamp = { version = "2.0.0", path = "../../../frame/timestamp" } -pallet-transaction-payment = { version = "2.0.0", path = "../../../frame/transaction-payment" } -pallet-treasury = { version = "2.0.0", path = "../../../frame/treasury" } -sp-application-crypto = { version = "2.0.0", path = "../../../primitives/application-crypto" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -substrate-test-client = { version = "2.0.0", path = "../../../test-utils/client" } +frame-support = { version = "2.0.0-dev", path = "../../../frame/support" } +frame-system = { version = "2.0.0-dev", path = "../../../frame/system" } +node-testing = { version = "2.0.0-dev", path = "../testing" } +pallet-balances = { version = "2.0.0-dev", path = "../../../frame/balances" } +pallet-contracts = { version = "2.0.0-dev", path = "../../../frame/contracts" } +pallet-grandpa = { version = "2.0.0-dev", path = "../../../frame/grandpa" } +pallet-im-online = { version = "2.0.0-dev", path = "../../../frame/im-online" } +pallet-indices = { version = "2.0.0-dev", path = "../../../frame/indices" } +pallet-session = { version = "2.0.0-dev", path = "../../../frame/session" } +pallet-timestamp = { version = "2.0.0-dev", path = "../../../frame/timestamp" } +pallet-transaction-payment = { version = "2.0.0-dev", path = "../../../frame/transaction-payment" } +pallet-treasury = { version = "2.0.0-dev", path = "../../../frame/treasury" } +sp-application-crypto = { version = "2.0.0-dev", path = "../../../primitives/application-crypto" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +substrate-test-client = { version = "2.0.0-dev", path = "../../../test-utils/client" } wabt = "0.9.2" [features] diff --git a/bin/node/inspect/Cargo.toml b/bin/node/inspect/Cargo.toml index cbce7e45896..b512c458d80 100644 --- a/bin/node/inspect/Cargo.toml +++ b/bin/node/inspect/Cargo.toml @@ -1,17 +1,20 @@ [package] name = "node-inspect" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" +license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0" } derive_more = "0.99" log = "0.4.8" -sc-cli = { version = "0.8.0", path = "../../../client/cli" } -sc-client-api = { version = "2.0.0", path = "../../../client/api" } -sc-service = { version = "0.8", default-features = false, path = "../../../client/service" } -sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } +sc-cli = { version = "0.8.0-dev", path = "../../../client/cli" } +sc-client-api = { version = "2.0.0-dev", path = "../../../client/api" } +sc-service = { version = "0.8.0-dev", default-features = false, path = "../../../client/service" } +sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } structopt = "0.3.8" diff --git a/bin/node/primitives/Cargo.toml b/bin/node/primitives/Cargo.toml index 5fc6ce8f101..79819614b3f 100644 --- a/bin/node/primitives/Cargo.toml +++ b/bin/node/primitives/Cargo.toml @@ -1,16 +1,18 @@ [package] name = "node-primitives" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-core = { version = "2.0.0", default-features = false, path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../../primitives/runtime" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/runtime" } [dev-dependencies] -sp-serializer = { version = "2.0.0", path = "../../../primitives/serializer" } +sp-serializer = { version = "2.0.0-dev", path = "../../../primitives/serializer" } pretty_assertions = "0.6.1" [features] diff --git a/bin/node/rpc-client/Cargo.toml b/bin/node/rpc-client/Cargo.toml index 0d8106dceed..d9f35829a12 100644 --- a/bin/node/rpc-client/Cargo.toml +++ b/bin/node/rpc-client/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "node-rpc-client" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] env_logger = "0.7.0" @@ -11,5 +13,5 @@ futures = "0.1.29" hyper = "0.12.35" jsonrpc-core-client = { version = "14.0.3", features = ["http", "ws"] } log = "0.4.8" -node-primitives = { version = "2.0.0", path = "../primitives" } -sc-rpc = { version = "2.0.0", path = "../../../client/rpc" } +node-primitives = { version = "2.0.0-dev", path = "../primitives" } +sc-rpc = { version = "2.0.0-dev", path = "../../../client/rpc" } diff --git a/bin/node/rpc/Cargo.toml b/bin/node/rpc/Cargo.toml index aefc9222f78..a714c8a1725 100644 --- a/bin/node/rpc/Cargo.toml +++ b/bin/node/rpc/Cargo.toml @@ -1,25 +1,27 @@ [package] name = "node-rpc" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-client = { version = "0.8", path = "../../../client/" } +sc-client = { version = "0.8.0-dev", path = "../../../client/" } jsonrpc-core = "14.0.3" -node-primitives = { version = "2.0.0", path = "../primitives" } -node-runtime = { version = "2.0.0", path = "../runtime" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -sp-api = { version = "2.0.0", path = "../../../primitives/api" } -pallet-contracts-rpc = { version = "0.8", path = "../../../frame/contracts/rpc/" } -pallet-transaction-payment-rpc = { version = "2.0.0", path = "../../../frame/transaction-payment/rpc/" } -substrate-frame-rpc-system = { version = "2.0.0", path = "../../../utils/frame/rpc/system" } -sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" } -sc-consensus-babe = { version = "0.8", path = "../../../client/consensus/babe" } -sc-consensus-babe-rpc = { version = "0.8", path = "../../../client/consensus/babe/rpc" } -sp-consensus-babe = { version = "0.8", path = "../../../primitives/consensus/babe" } -sc-keystore = { version = "2.0.0", path = "../../../client/keystore" } -sc-consensus-epochs = { version = "0.8", path = "../../../client/consensus/epochs" } -sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" } -sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } +node-primitives = { version = "2.0.0-dev", path = "../primitives" } +node-runtime = { version = "2.0.0-dev", path = "../runtime" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } +pallet-contracts-rpc = { version = "0.8.0-dev", path = "../../../frame/contracts/rpc/" } +pallet-transaction-payment-rpc = { version = "2.0.0-dev", path = "../../../frame/transaction-payment/rpc/" } +substrate-frame-rpc-system = { version = "2.0.0-dev", path = "../../../utils/frame/rpc/system" } +sp-transaction-pool = { version = "2.0.0-dev", path = "../../../primitives/transaction-pool" } +sc-consensus-babe = { version = "0.8.0-dev", path = "../../../client/consensus/babe" } +sc-consensus-babe-rpc = { version = "0.8.0-dev", path = "../../../client/consensus/babe/rpc" } +sp-consensus-babe = { version = "0.8.0-dev", path = "../../../primitives/consensus/babe" } +sc-keystore = { version = "2.0.0-dev", path = "../../../client/keystore" } +sc-consensus-epochs = { version = "0.8.0-dev", path = "../../../client/consensus/epochs" } +sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } +sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } diff --git a/bin/node/runtime/Cargo.toml b/bin/node/runtime/Cargo.toml index 8156e4d4440..ddb1f168985 100644 --- a/bin/node/runtime/Cargo.toml +++ b/bin/node/runtime/Cargo.toml @@ -1,10 +1,12 @@ [package] name = "node-runtime" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] @@ -15,64 +17,64 @@ rustc-hex = { version = "2.0", optional = true } serde = { version = "1.0.102", optional = true } # primitives -sp-authority-discovery = { version = "2.0.0", default-features = false, path = "../../../primitives/authority-discovery" } -sp-consensus-babe = { version = "0.8", default-features = false, path = "../../../primitives/consensus/babe" } -sp-block-builder = { path = "../../../primitives/block-builder", default-features = false} -sp-inherents = { version = "2.0.0", default-features = false, path = "../../../primitives/inherents" } -node-primitives = { version = "2.0.0", default-features = false, path = "../primitives" } -sp-offchain = { version = "2.0.0", default-features = false, path = "../../../primitives/offchain" } -sp-core = { version = "2.0.0", default-features = false, path = "../../../primitives/core" } -sp-std = { version = "2.0.0", default-features = false, path = "../../../primitives/std" } -sp-api = { version = "2.0.0", default-features = false, path = "../../../primitives/api" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../../primitives/runtime" } -sp-staking = { version = "2.0.0", default-features = false, path = "../../../primitives/staking" } -sp-keyring = { version = "2.0.0", optional = true, path = "../../../primitives/keyring" } -sp-session = { version = "2.0.0", default-features = false, path = "../../../primitives/session" } -sp-transaction-pool = { version = "2.0.0", default-features = false, path = "../../../primitives/transaction-pool" } -sp-version = { version = "2.0.0", default-features = false, path = "../../../primitives/version" } +sp-authority-discovery = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/authority-discovery" } +sp-consensus-babe = { version = "0.8.0-dev", default-features = false, path = "../../../primitives/consensus/babe" } +sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0-dev"} +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/inherents" } +node-primitives = { version = "2.0.0-dev", default-features = false, path = "../primitives" } +sp-offchain = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/offchain" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/core" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/std" } +sp-api = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/api" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/runtime" } +sp-staking = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/staking" } +sp-keyring = { version = "2.0.0-dev", optional = true, path = "../../../primitives/keyring" } +sp-session = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/session" } +sp-transaction-pool = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/transaction-pool" } +sp-version = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/version" } # frame dependencies -frame-executive = { version = "2.0.0", default-features = false, path = "../../../frame/executive" } -frame-benchmarking = { version = "2.0.0", default-features = false, path = "../../../frame/benchmarking" } -frame-support = { version = "2.0.0", default-features = false, path = "../../../frame/support" } -frame-system = { version = "2.0.0", default-features = false, path = "../../../frame/system" } -frame-system-rpc-runtime-api = { version = "2.0.0", default-features = false, path = "../../../frame/system/rpc/runtime-api/" } -pallet-authority-discovery = { version = "2.0.0", default-features = false, path = "../../../frame/authority-discovery" } -pallet-authorship = { version = "2.0.0", default-features = false, path = "../../../frame/authorship" } -pallet-babe = { version = "2.0.0", default-features = false, path = "../../../frame/babe" } -pallet-balances = { version = "2.0.0", default-features = false, path = "../../../frame/balances" } -pallet-collective = { version = "2.0.0", default-features = false, path = "../../../frame/collective" } -pallet-contracts = { version = "2.0.0", default-features = false, path = "../../../frame/contracts" } -pallet-contracts-primitives = { version = "2.0.0", default-features = false, path = "../../../frame/contracts/common/" } -pallet-contracts-rpc-runtime-api = { version = "0.8.0", default-features = false, path = "../../../frame/contracts/rpc/runtime-api/" } -pallet-democracy = { version = "2.0.0", default-features = false, path = "../../../frame/democracy" } -pallet-elections-phragmen = { version = "2.0.0", default-features = false, path = "../../../frame/elections-phragmen" } -pallet-finality-tracker = { version = "2.0.0", default-features = false, path = "../../../frame/finality-tracker" } -pallet-grandpa = { version = "2.0.0", default-features = false, path = "../../../frame/grandpa" } -pallet-im-online = { version = "2.0.0", default-features = false, path = "../../../frame/im-online" } -pallet-indices = { version = "2.0.0", default-features = false, path = "../../../frame/indices" } -pallet-identity = { version = "2.0.0", default-features = false, path = "../../../frame/identity" } -pallet-membership = { version = "2.0.0", default-features = false, path = "../../../frame/membership" } -pallet-offences = { version = "2.0.0", default-features = false, path = "../../../frame/offences" } -pallet-randomness-collective-flip = { version = "2.0.0", default-features = false, path = "../../../frame/randomness-collective-flip" } -pallet-recovery = { version = "2.0.0", default-features = false, path = "../../../frame/recovery" } -pallet-session = { version = "2.0.0", features = ["historical"], path = "../../../frame/session", default-features = false } -pallet-staking = { version = "2.0.0", features = ["migrate"], path = "../../../frame/staking", default-features = false } -pallet-staking-reward-curve = { version = "2.0.0", path = "../../../frame/staking/reward-curve" } -pallet-sudo = { version = "2.0.0", default-features = false, path = "../../../frame/sudo" } -pallet-society = { version = "2.0.0", default-features = false, path = "../../../frame/society" } -pallet-timestamp = { version = "2.0.0", default-features = false, path = "../../../frame/timestamp" } -pallet-treasury = { version = "2.0.0", default-features = false, path = "../../../frame/treasury" } -pallet-utility = { version = "2.0.0", default-features = false, path = "../../../frame/utility" } -pallet-transaction-payment = { version = "2.0.0", default-features = false, path = "../../../frame/transaction-payment" } -pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0", default-features = false, path = "../../../frame/transaction-payment/rpc/runtime-api/" } -pallet-vesting = { version = "2.0.0", default-features = false, path = "../../../frame/vesting" } +frame-executive = { version = "2.0.0-dev", default-features = false, path = "../../../frame/executive" } +frame-benchmarking = { version = "2.0.0-dev", default-features = false, path = "../../../frame/benchmarking" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../../../frame/support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../../../frame/system" } +frame-system-rpc-runtime-api = { version = "2.0.0-dev", default-features = false, path = "../../../frame/system/rpc/runtime-api/" } +pallet-authority-discovery = { version = "2.0.0-dev", default-features = false, path = "../../../frame/authority-discovery" } +pallet-authorship = { version = "2.0.0-dev", default-features = false, path = "../../../frame/authorship" } +pallet-babe = { version = "2.0.0-dev", default-features = false, path = "../../../frame/babe" } +pallet-balances = { version = "2.0.0-dev", default-features = false, path = "../../../frame/balances" } +pallet-collective = { version = "2.0.0-dev", default-features = false, path = "../../../frame/collective" } +pallet-contracts = { version = "2.0.0-dev", default-features = false, path = "../../../frame/contracts" } +pallet-contracts-primitives = { version = "2.0.0-dev", default-features = false, path = "../../../frame/contracts/common/" } +pallet-contracts-rpc-runtime-api = { version = "0.8.0-dev", default-features = false, path = "../../../frame/contracts/rpc/runtime-api/" } +pallet-democracy = { version = "2.0.0-dev", default-features = false, path = "../../../frame/democracy" } +pallet-elections-phragmen = { version = "2.0.0-dev", default-features = false, path = "../../../frame/elections-phragmen" } +pallet-finality-tracker = { version = "2.0.0-dev", default-features = false, path = "../../../frame/finality-tracker" } +pallet-grandpa = { version = "2.0.0-dev", default-features = false, path = "../../../frame/grandpa" } +pallet-im-online = { version = "2.0.0-dev", default-features = false, path = "../../../frame/im-online" } +pallet-indices = { version = "2.0.0-dev", default-features = false, path = "../../../frame/indices" } +pallet-identity = { version = "2.0.0-dev", default-features = false, path = "../../../frame/identity" } +pallet-membership = { version = "2.0.0-dev", default-features = false, path = "../../../frame/membership" } +pallet-offences = { version = "2.0.0-dev", default-features = false, path = "../../../frame/offences" } +pallet-randomness-collective-flip = { version = "2.0.0-dev", default-features = false, path = "../../../frame/randomness-collective-flip" } +pallet-recovery = { version = "2.0.0-dev", default-features = false, path = "../../../frame/recovery" } +pallet-session = { version = "2.0.0-dev", features = ["historical"], path = "../../../frame/session", default-features = false } +pallet-staking = { version = "2.0.0-dev", features = ["migrate"], path = "../../../frame/staking", default-features = false } +pallet-staking-reward-curve = { version = "2.0.0-dev", path = "../../../frame/staking/reward-curve" } +pallet-sudo = { version = "2.0.0-dev", default-features = false, path = "../../../frame/sudo" } +pallet-society = { version = "2.0.0-dev", default-features = false, path = "../../../frame/society" } +pallet-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../../frame/timestamp" } +pallet-treasury = { version = "2.0.0-dev", default-features = false, path = "../../../frame/treasury" } +pallet-utility = { version = "2.0.0-dev", default-features = false, path = "../../../frame/utility" } +pallet-transaction-payment = { version = "2.0.0-dev", default-features = false, path = "../../../frame/transaction-payment" } +pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-dev", default-features = false, path = "../../../frame/transaction-payment/rpc/runtime-api/" } +pallet-vesting = { version = "2.0.0-dev", default-features = false, path = "../../../frame/vesting" } [build-dependencies] -wasm-builder-runner = { version = "1.0.4", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" } +wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" } [dev-dependencies] -sp-io = { version = "2.0.0", path = "../../../primitives/io" } +sp-io = { version = "2.0.0-dev", path = "../../../primitives/io" } [features] default = ["std"] diff --git a/bin/node/testing/Cargo.toml b/bin/node/testing/Cargo.toml index 840b2d0fefc..4530c957608 100644 --- a/bin/node/testing/Cargo.toml +++ b/bin/node/testing/Cargo.toml @@ -1,53 +1,55 @@ [package] name = "node-testing" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] description = "Test utilities for Substrate node." edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -pallet-balances = { version = "2.0.0", path = "../../../frame/balances" } -sc-client = { version = "0.8", path = "../../../client/" } -sc-client-db = { version = "0.8", path = "../../../client/db/", features = ["kvdb-rocksdb"] } -sc-client-api = { version = "2.0", path = "../../../client/api/" } +pallet-balances = { version = "2.0.0-dev", path = "../../../frame/balances" } +sc-client = { version = "0.8.0-dev", path = "../../../client/" } +sc-client-db = { version = "0.8.0-dev", path = "../../../client/db/", features = ["kvdb-rocksdb"] } +sc-client-api = { version = "2.0.0-dev", path = "../../../client/api/" } codec = { package = "parity-scale-codec", version = "1.0.0" } -pallet-contracts = { version = "2.0.0", path = "../../../frame/contracts" } -pallet-grandpa = { version = "2.0.0", path = "../../../frame/grandpa" } -pallet-indices = { version = "2.0.0", path = "../../../frame/indices" } -sp-keyring = { version = "2.0.0", path = "../../../primitives/keyring" } -node-executor = { version = "2.0.0", path = "../executor" } -node-primitives = { version = "2.0.0", path = "../primitives" } -node-runtime = { version = "2.0.0", path = "../runtime" } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-io = { version = "2.0.0", path = "../../../primitives/io" } -frame-support = { version = "2.0.0", path = "../../../frame/support" } -pallet-session = { version = "2.0.0", path = "../../../frame/session" } -pallet-society = { version = "2.0.0", path = "../../../frame/society" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -pallet-staking = { version = "2.0.0", path = "../../../frame/staking" } -sc-executor = { version = "0.8", path = "../../../client/executor", features = ["wasmtime"] } -sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" } -frame-system = { version = "2.0.0", path = "../../../frame/system" } -substrate-test-client = { version = "2.0.0", path = "../../../test-utils/client" } -pallet-timestamp = { version = "2.0.0", path = "../../../frame/timestamp" } -pallet-transaction-payment = { version = "2.0.0", path = "../../../frame/transaction-payment" } -pallet-treasury = { version = "2.0.0", path = "../../../frame/treasury" } +pallet-contracts = { version = "2.0.0-dev", path = "../../../frame/contracts" } +pallet-grandpa = { version = "2.0.0-dev", path = "../../../frame/grandpa" } +pallet-indices = { version = "2.0.0-dev", path = "../../../frame/indices" } +sp-keyring = { version = "2.0.0-dev", path = "../../../primitives/keyring" } +node-executor = { version = "2.0.0-dev", path = "../executor" } +node-primitives = { version = "2.0.0-dev", path = "../primitives" } +node-runtime = { version = "2.0.0-dev", path = "../runtime" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-io = { version = "2.0.0-dev", path = "../../../primitives/io" } +frame-support = { version = "2.0.0-dev", path = "../../../frame/support" } +pallet-session = { version = "2.0.0-dev", path = "../../../frame/session" } +pallet-society = { version = "2.0.0-dev", path = "../../../frame/society" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +pallet-staking = { version = "2.0.0-dev", path = "../../../frame/staking" } +sc-executor = { version = "0.8.0-dev", path = "../../../client/executor", features = ["wasmtime"] } +sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } +frame-system = { version = "2.0.0-dev", path = "../../../frame/system" } +substrate-test-client = { version = "2.0.0-dev", path = "../../../test-utils/client" } +pallet-timestamp = { version = "2.0.0-dev", path = "../../../frame/timestamp" } +pallet-transaction-payment = { version = "2.0.0-dev", path = "../../../frame/transaction-payment" } +pallet-treasury = { version = "2.0.0-dev", path = "../../../frame/treasury" } wabt = "0.9.2" -sp-api = { version = "2.0.0", path = "../../../primitives/api" } -sp-finality-tracker = { version = "2.0.0", default-features = false, path = "../../../primitives/finality-tracker" } -sp-timestamp = { version = "2.0.0", default-features = false, path = "../../../primitives/timestamp" } -sp-block-builder = { version = "2.0.0", path = "../../../primitives/block-builder" } -sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" } -sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } +sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } +sp-finality-tracker = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/finality-tracker" } +sp-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/timestamp" } +sp-block-builder = { version = "2.0.0-dev", path = "../../../primitives/block-builder" } +sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } +sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } log = "0.4.8" tempdir = "0.3" fs_extra = "1" [dev-dependencies] criterion = "0.3.0" -sc-cli = { version = "0.8.0", path = "../../../client/cli" } -sc-service = { version = "0.8.0", path = "../../../client/service", features = ["rocksdb"] } +sc-cli = { version = "0.8.0-dev", path = "../../../client/cli" } +sc-service = { version = "0.8.0-dev", path = "../../../client/service", features = ["rocksdb"] } [[bench]] name = "import" diff --git a/bin/node/transaction-factory/Cargo.toml b/bin/node/transaction-factory/Cargo.toml index cd40e2f0d93..5d44c3a86a7 100644 --- a/bin/node/transaction-factory/Cargo.toml +++ b/bin/node/transaction-factory/Cargo.toml @@ -1,20 +1,22 @@ [package] name = "node-transaction-factory" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-block-builder = { version = "2.0.0", path = "../../../primitives/block-builder" } -sc-cli = { version = "0.8.0", path = "../../../client/cli" } -sc-client-api = { version = "2.0.0", path = "../../../client/api" } -sc-client = { version = "0.8", path = "../../../client" } +sp-block-builder = { version = "2.0.0-dev", path = "../../../primitives/block-builder" } +sc-cli = { version = "0.8.0-dev", path = "../../../client/cli" } +sc-client-api = { version = "2.0.0-dev", path = "../../../client/api" } +sc-client = { version = "0.8.0-dev", path = "../../../client" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" } +sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } log = "0.4.8" -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-api = { version = "2.0.0", path = "../../../primitives/api" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -sc-service = { version = "0.8", path = "../../../client/service" } -sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sc-service = { version = "0.8.0-dev", path = "../../../client/service" } +sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } diff --git a/bin/utils/chain-spec-builder/Cargo.toml b/bin/utils/chain-spec-builder/Cargo.toml index 8f122a35a02..b211b308e18 100644 --- a/bin/utils/chain-spec-builder/Cargo.toml +++ b/bin/utils/chain-spec-builder/Cargo.toml @@ -1,15 +1,17 @@ [package] name = "chain-spec-builder" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] ansi_term = "0.12.1" -sc-keystore = { version = "2.0.0", path = "../../../client/keystore" } -node-cli = { version = "2.0.0", path = "../../node/cli" } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } +sc-keystore = { version = "2.0.0-dev", path = "../../../client/keystore" } +node-cli = { version = "2.0.0-dev", path = "../../node/cli" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } rand = "0.7.2" structopt = "0.3.8" diff --git a/bin/utils/subkey/Cargo.toml b/bin/utils/subkey/Cargo.toml index 9c96c7ffa87..14e5cb4be0b 100644 --- a/bin/utils/subkey/Cargo.toml +++ b/bin/utils/subkey/Cargo.toml @@ -1,16 +1,18 @@ [package] name = "subkey" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] futures = "0.1.29" -sp-core = { version = "*", path = "../../../primitives/core" } -node-runtime = { version = "*", path = "../../node/runtime" } -node-primitives = { version = "*", path = "../../node/primitives" } -sp-runtime = { version = "*", path = "../../../primitives/runtime" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +node-runtime = { version = "2.0.0-dev", path = "../../node/runtime" } +node-primitives = { version = "2.0.0-dev", path = "../../node/primitives" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } rand = "0.7.2" clap = "2.33.0" tiny-bip39 = "0.7" @@ -19,13 +21,13 @@ substrate-bip39 = "0.3.1" hex = "0.4.0" hex-literal = "0.2.1" codec = { package = "parity-scale-codec", version = "1.0.0" } -frame-system = { version = "2.0.0", path = "../../../frame/system" } -pallet-balances = { version = "2.0.0", path = "../../../frame/balances" } -pallet-transaction-payment = { version = "2.0.0", path = "../../../frame/transaction-payment" } +frame-system = { version = "2.0.0-dev", path = "../../../frame/system" } +pallet-balances = { version = "2.0.0-dev", path = "../../../frame/balances" } +pallet-transaction-payment = { version = "2.0.0-dev", path = "../../../frame/transaction-payment" } rpassword = "4.0.1" itertools = "0.8.2" derive_more = { version = "0.99.2" } -sc-rpc = { version = "2.0.0", path = "../../../client/rpc" } +sc-rpc = { version = "2.0.0-dev", path = "../../../client/rpc" } jsonrpc-core-client = { version = "14.0.3", features = ["http"] } hyper = "0.12.35" libp2p = "0.16.1" diff --git a/client/Cargo.toml b/client/Cargo.toml index c89fe88145d..b8a6efd05d8 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -1,41 +1,43 @@ [package] name = "sc-client" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-block-builder = { version = "0.8", path = "block-builder" } -sc-client-api = { version = "2.0.0", path = "api" } +sc-block-builder = { version = "0.8.0-dev", path = "block-builder" } +sc-client-api = { version = "2.0.0-dev", path = "api" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -sp-consensus = { version = "0.8", path = "../primitives/consensus/common" } +sp-consensus = { version = "0.8.0-dev", path = "../primitives/consensus/common" } derive_more = { version = "0.99.2" } -sc-executor = { version = "0.8", path = "executor" } -sp-externalities = { version = "0.8.0", path = "../primitives/externalities" } +sc-executor = { version = "0.8.0-dev", path = "executor" } +sp-externalities = { version = "0.8.0-dev", path = "../primitives/externalities" } fnv = { version = "1.0.6" } futures = { version = "0.3.1", features = ["compat"] } hash-db = { version = "0.15.2" } hex-literal = { version = "0.2.1" } -sp-inherents = { version = "2.0.0", path = "../primitives/inherents" } -sp-keyring = { version = "2.0.0", path = "../primitives/keyring" } +sp-inherents = { version = "2.0.0-dev", path = "../primitives/inherents" } +sp-keyring = { version = "2.0.0-dev", path = "../primitives/keyring" } kvdb = "0.4.0" log = { version = "0.4.8" } parking_lot = "0.10.0" -sp-core = { version = "2.0.0", path = "../primitives/core" } -sp-std = { version = "2.0.0", path = "../primitives/std" } -sp-version = { version = "2.0.0", path = "../primitives/version" } -sp-api = { version = "2.0.0", path = "../primitives/api" } -sp-runtime = { version = "2.0.0", path = "../primitives/runtime" } -sp-blockchain = { version = "2.0.0", path = "../primitives/blockchain" } -sp-state-machine = { version = "0.8", path = "../primitives/state-machine" } -sc-telemetry = { version = "2.0.0", path = "telemetry" } -sp-trie = { version = "2.0.0", path = "../primitives/trie" } +sp-core = { version = "2.0.0-dev", path = "../primitives/core" } +sp-std = { version = "2.0.0-dev", path = "../primitives/std" } +sp-version = { version = "2.0.0-dev", path = "../primitives/version" } +sp-api = { version = "2.0.0-dev", path = "../primitives/api" } +sp-runtime = { version = "2.0.0-dev", path = "../primitives/runtime" } +sp-blockchain = { version = "2.0.0-dev", path = "../primitives/blockchain" } +sp-state-machine = { version = "0.8.0-dev", path = "../primitives/state-machine" } +sc-telemetry = { version = "2.0.0-dev", path = "telemetry" } +sp-trie = { version = "2.0.0-dev", path = "../primitives/trie" } tracing = "0.1.10" [dev-dependencies] env_logger = "0.7.0" tempfile = "3.1.0" -substrate-test-runtime-client = { version = "2.0.0", path = "../test-utils/runtime/client" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../test-utils/runtime/client" } kvdb-memorydb = "0.4.0" -sp-panic-handler = { version = "2.0.0", path = "../primitives/panic-handler" } +sp-panic-handler = { version = "2.0.0-dev", path = "../primitives/panic-handler" } diff --git a/client/api/Cargo.toml b/client/api/Cargo.toml index 27a40c4d94c..a848875029f 100644 --- a/client/api/Cargo.toml +++ b/client/api/Cargo.toml @@ -1,35 +1,37 @@ [package] name = "sc-client-api" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-consensus = { version = "0.8", path = "../../primitives/consensus/common" } +sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } derive_more = { version = "0.99.2" } -sc-executor = { version = "0.8", path = "../executor" } -sp-externalities = { version = "0.8.0", path = "../../primitives/externalities" } +sc-executor = { version = "0.8.0-dev", path = "../executor" } +sp-externalities = { version = "0.8.0-dev", path = "../../primitives/externalities" } fnv = { version = "1.0.6" } futures = { version = "0.3.1" } hash-db = { version = "0.15.2", default-features = false } -sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" } +sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } hex-literal = { version = "0.2.1" } -sp-inherents = { version = "2.0.0", default-features = false, path = "../../primitives/inherents" } -sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" } +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } +sp-keyring = { version = "2.0.0-dev", path = "../../primitives/keyring" } kvdb = "0.4.0" log = { version = "0.4.8" } parking_lot = "0.10.0" -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-version = { version = "2.0.0", default-features = false, path = "../../primitives/version" } -sp-api = { version = "2.0.0", path = "../../primitives/api" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-state-machine = { version = "0.8", path = "../../primitives/state-machine" } -sc-telemetry = { version = "2.0.0", path = "../telemetry" } -sp-trie = { version = "2.0.0", path = "../../primitives/trie" } -sp-transaction-pool = { version = "2.0.0", path = "../../primitives/transaction-pool" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-version = { version = "2.0.0-dev", default-features = false, path = "../../primitives/version" } +sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } +sc-telemetry = { version = "2.0.0-dev", path = "../telemetry" } +sp-trie = { version = "2.0.0-dev", path = "../../primitives/trie" } +sp-transaction-pool = { version = "2.0.0-dev", path = "../../primitives/transaction-pool" } [dev-dependencies] -sp-test-primitives = { version = "2.0.0", path = "../../primitives/test-primitives" } +sp-test-primitives = { version = "2.0.0-dev", path = "../../primitives/test-primitives" } diff --git a/client/authority-discovery/Cargo.toml b/client/authority-discovery/Cargo.toml index 59ed5bc89da..a87a0fee979 100644 --- a/client/authority-discovery/Cargo.toml +++ b/client/authority-discovery/Cargo.toml @@ -1,10 +1,12 @@ [package] name = "sc-authority-discovery" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [build-dependencies] prost-build = "0.6.1" @@ -19,18 +21,18 @@ libp2p = { version = "0.16.1", default-features = false, features = ["secp256k1" log = "0.4.8" prost = "0.6.1" rand = "0.7.2" -sc-client-api = { version = "2.0.0", path = "../api" } -sc-keystore = { version = "2.0.0", path = "../keystore" } -sc-network = { version = "0.8", path = "../network" } +sc-client-api = { version = "2.0.0-dev", path = "../api" } +sc-keystore = { version = "2.0.0-dev", path = "../keystore" } +sc-network = { version = "0.8.0-dev", path = "../network" } serde_json = "1.0.41" -sp-authority-discovery = { version = "2.0.0", path = "../../primitives/authority-discovery" } -sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } -sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } -sp-api = { version = "2.0.0", path = "../../primitives/api" } +sp-authority-discovery = { version = "2.0.0-dev", path = "../../primitives/authority-discovery" } +sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } [dev-dependencies] env_logger = "0.7.0" quickcheck = "0.9.0" -sc-peerset = { version = "2.0.0", path = "../peerset" } -substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client"} +sc-peerset = { version = "2.0.0-dev", path = "../peerset" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client"} diff --git a/client/basic-authorship/Cargo.toml b/client/basic-authorship/Cargo.toml index 6a013f7a74f..15a94def5f3 100644 --- a/client/basic-authorship/Cargo.toml +++ b/client/basic-authorship/Cargo.toml @@ -1,28 +1,30 @@ [package] name = "sc-basic-authorship" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] log = "0.4.8" futures = "0.3.1" codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-api = { version = "2.0.0", path = "../../primitives/api" } -sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } -sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" } -sc-client = { version = "0.8", path = "../" } -sc-client-api = { version = "2.0.0", path = "../api" } -sp-consensus = { version = "0.8", path = "../../primitives/consensus/common" } -sp-inherents = { version = "2.0.0", path = "../../primitives/inherents" } -sc-telemetry = { version = "2.0.0", path = "../telemetry" } -sp-transaction-pool = { version = "2.0.0", path = "../../primitives/transaction-pool" } -sc-block-builder = { version = "0.8", path = "../block-builder" } +sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } +sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } +sc-client = { version = "0.8.0-dev", path = "../" } +sc-client-api = { version = "2.0.0-dev", path = "../api" } +sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } +sp-inherents = { version = "2.0.0-dev", path = "../../primitives/inherents" } +sc-telemetry = { version = "2.0.0-dev", path = "../telemetry" } +sp-transaction-pool = { version = "2.0.0-dev", path = "../../primitives/transaction-pool" } +sc-block-builder = { version = "0.8.0-dev", path = "../block-builder" } tokio-executor = { version = "0.2.0-alpha.6", features = ["blocking"] } [dev-dependencies] -sc-transaction-pool = { version = "2.0.0", path = "../../client/transaction-pool" } -substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" } +sc-transaction-pool = { version = "2.0.0-dev", path = "../../client/transaction-pool" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } parking_lot = "0.10.0" diff --git a/client/block-builder/Cargo.toml b/client/block-builder/Cargo.toml index 383a931b2f8..f706265cabf 100644 --- a/client/block-builder/Cargo.toml +++ b/client/block-builder/Cargo.toml @@ -1,17 +1,19 @@ [package] name = "sc-block-builder" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-state-machine = { version = "0.8", path = "../../primitives/state-machine" } -sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } -sp-api = { version = "2.0.0", path = "../../primitives/api" } -sp-consensus = { version = "0.8.0", path = "../../primitives/consensus/common" } -sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } -sp-block-builder = { version = "2.0.0", path = "../../primitives/block-builder" } -sc-client-api = { version = "2.0.0", path = "../api" } +sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } +sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } +sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } +sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-block-builder = { version = "2.0.0-dev", path = "../../primitives/block-builder" } +sc-client-api = { version = "2.0.0-dev", path = "../api" } codec = { package = "parity-scale-codec", version = "1.0.6", features = ["derive"] } diff --git a/client/chain-spec/Cargo.toml b/client/chain-spec/Cargo.toml index 222914145e1..b2dee23ac5e 100644 --- a/client/chain-spec/Cargo.toml +++ b/client/chain-spec/Cargo.toml @@ -1,16 +1,18 @@ [package] name = "sc-chain-spec" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-chain-spec-derive = { version = "2.0.0", path = "./derive" } +sc-chain-spec-derive = { version = "2.0.0-dev", path = "./derive" } impl-trait-for-tuples = "0.1.3" -sc-network = { version = "0.8", path = "../network" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } +sc-network = { version = "0.8.0-dev", path = "../network" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } serde = { version = "1.0.101", features = ["derive"] } serde_json = "1.0.41" -sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } -sc-telemetry = { version = "2.0.0", path = "../telemetry" } +sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +sc-telemetry = { version = "2.0.0-dev", path = "../telemetry" } diff --git a/client/chain-spec/derive/Cargo.toml b/client/chain-spec/derive/Cargo.toml index 566948883bc..9b23b71ab52 100644 --- a/client/chain-spec/derive/Cargo.toml +++ b/client/chain-spec/derive/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "sc-chain-spec-derive" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [lib] proc-macro = true diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index 66b0a9a9b88..30c749ff85e 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -1,10 +1,12 @@ [package] name = "sc-cli" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] description = "Substrate CLI interface." edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] clap = "2.33.0" @@ -21,21 +23,21 @@ tokio = { version = "0.2.9", features = [ "signal", "rt-core", "rt-threaded" ] } futures = "0.3.1" fdlimit = "0.1.1" serde_json = "1.0.41" -sc-informant = { version = "0.8", path = "../informant" } -sp-panic-handler = { version = "2.0.0", path = "../../primitives/panic-handler" } -sc-client-api = { version = "2.0.0", path = "../api" } -sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" } -sc-network = { version = "0.8", path = "../network" } -sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } -sc-service = { version = "0.8", default-features = false, path = "../service" } -sp-state-machine = { version = "0.8", path = "../../primitives/state-machine" } -sc-telemetry = { version = "2.0.0", path = "../telemetry" } -prometheus-exporter = { path = "../../utils/prometheus" } -sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" } +sc-informant = { version = "0.8.0-dev", path = "../informant" } +sp-panic-handler = { version = "2.0.0-dev", path = "../../primitives/panic-handler" } +sc-client-api = { version = "2.0.0-dev", path = "../api" } +sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } +sc-network = { version = "0.8.0-dev", path = "../network" } +sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sc-service = { version = "0.8.0-dev", default-features = false, path = "../service" } +sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } +sc-telemetry = { version = "2.0.0-dev", path = "../telemetry" } +prometheus-exporter = { path = "../../utils/prometheus" , version = "0.8.0-dev"} +sp-keyring = { version = "2.0.0-dev", path = "../../primitives/keyring" } names = "0.11.0" structopt = "0.3.8" -sc-tracing = { version = "2.0.0", path = "../tracing" } +sc-tracing = { version = "2.0.0-dev", path = "../tracing" } chrono = "0.4.10" parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } diff --git a/client/consensus/aura/Cargo.toml b/client/consensus/aura/Cargo.toml index e67f1e15a3e..24c42fe0fc1 100644 --- a/client/consensus/aura/Cargo.toml +++ b/client/consensus/aura/Cargo.toml @@ -1,43 +1,45 @@ [package] name = "sc-consensus-aura" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] description = "Aura consensus algorithm for substrate" edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0", path = "../../../primitives/application-crypto" } -sp-consensus-aura = { version = "0.8", path = "../../../primitives/consensus/aura" } -sp-block-builder = { version = "2.0.0", path = "../../../primitives/block-builder" } -sc-client = { version = "0.8", path = "../../" } -sc-client-api = { version = "2.0.0", path = "../../api" } +sp-application-crypto = { version = "2.0.0-dev", path = "../../../primitives/application-crypto" } +sp-consensus-aura = { version = "0.8.0-dev", path = "../../../primitives/consensus/aura" } +sp-block-builder = { version = "2.0.0-dev", path = "../../../primitives/block-builder" } +sc-client = { version = "0.8.0-dev", path = "../../" } +sc-client-api = { version = "2.0.0-dev", path = "../../api" } codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" } +sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } derive_more = "0.99.2" futures = "0.3.1" futures-timer = "3.0.1" -sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" } -sc-keystore = { version = "2.0.0", path = "../../keystore" } +sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } +sc-keystore = { version = "2.0.0-dev", path = "../../keystore" } log = "0.4.8" parking_lot = "0.10.0" -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } -sp-io = { version = "2.0.0", path = "../../../primitives/io" } -sp-version = { version = "2.0.0", path = "../../../primitives/version" } -sc-consensus-slots = { version = "0.8", path = "../slots" } -sp-api = { version = "2.0.0", path = "../../../primitives/api" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -sp-timestamp = { version = "2.0.0", path = "../../../primitives/timestamp" } -sc-telemetry = { version = "2.0.0", path = "../../telemetry" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } +sp-io = { version = "2.0.0-dev", path = "../../../primitives/io" } +sp-version = { version = "2.0.0-dev", path = "../../../primitives/version" } +sc-consensus-slots = { version = "0.8.0-dev", path = "../slots" } +sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sp-timestamp = { version = "2.0.0-dev", path = "../../../primitives/timestamp" } +sc-telemetry = { version = "2.0.0-dev", path = "../../telemetry" } [dev-dependencies] -sp-keyring = { version = "2.0.0", path = "../../../primitives/keyring" } -sc-executor = { version = "0.8", path = "../../executor" } -sc-network = { version = "0.8", path = "../../network" } -sc-network-test = { version = "0.8.0", path = "../../network/test" } -sc-service = { version = "0.8", path = "../../service" } -substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" } +sp-keyring = { version = "2.0.0-dev", path = "../../../primitives/keyring" } +sc-executor = { version = "0.8.0-dev", path = "../../executor" } +sc-network = { version = "0.8.0-dev", path = "../../network" } +sc-network-test = { version = "0.8.0-dev", path = "../../network/test" } +sc-service = { version = "0.8.0-dev", path = "../../service" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } tokio = "0.1.22" env_logger = "0.7.0" tempfile = "3.1.0" diff --git a/client/consensus/babe/Cargo.toml b/client/consensus/babe/Cargo.toml index 3f5487885fe..2e11d741dcb 100644 --- a/client/consensus/babe/Cargo.toml +++ b/client/consensus/babe/Cargo.toml @@ -1,37 +1,39 @@ [package] name = "sc-consensus-babe" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] description = "BABE consensus algorithm for substrate" edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -sp-consensus-babe = { version = "0.8", path = "../../../primitives/consensus/babe" } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-application-crypto = { version = "2.0.0", path = "../../../primitives/application-crypto" } +sp-consensus-babe = { version = "0.8.0-dev", path = "../../../primitives/consensus/babe" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-application-crypto = { version = "2.0.0-dev", path = "../../../primitives/application-crypto" } num-bigint = "0.2.3" num-rational = "0.2.2" num-traits = "0.2.8" serde = { version = "1.0.104", features = ["derive"] } -sp-version = { version = "2.0.0", path = "../../../primitives/version" } -sp-io = { version = "2.0.0", path = "../../../primitives/io" } -sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" } -sp-timestamp = { version = "2.0.0", path = "../../../primitives/timestamp" } -sc-telemetry = { version = "2.0.0", path = "../../telemetry" } -sc-keystore = { version = "2.0.0", path = "../../keystore" } -sc-client-api = { version = "2.0.0", path = "../../api" } -sc-client = { version = "0.8", path = "../../" } -sc-consensus-epochs = { version = "0.8", path = "../epochs" } -sp-api = { version = "2.0.0", path = "../../../primitives/api" } -sp-block-builder = { version = "2.0.0", path = "../../../primitives/block-builder" } -sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } -sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" } -sc-consensus-uncles = { version = "0.8", path = "../uncles" } -sc-consensus-slots = { version = "0.8", path = "../slots" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -fork-tree = { version = "2.0.0", path = "../../../utils/fork-tree" } +sp-version = { version = "2.0.0-dev", path = "../../../primitives/version" } +sp-io = { version = "2.0.0-dev", path = "../../../primitives/io" } +sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } +sp-timestamp = { version = "2.0.0-dev", path = "../../../primitives/timestamp" } +sc-telemetry = { version = "2.0.0-dev", path = "../../telemetry" } +sc-keystore = { version = "2.0.0-dev", path = "../../keystore" } +sc-client-api = { version = "2.0.0-dev", path = "../../api" } +sc-client = { version = "0.8.0-dev", path = "../../" } +sc-consensus-epochs = { version = "0.8.0-dev", path = "../epochs" } +sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } +sp-block-builder = { version = "2.0.0-dev", path = "../../../primitives/block-builder" } +sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } +sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } +sc-consensus-uncles = { version = "0.8.0-dev", path = "../uncles" } +sc-consensus-slots = { version = "0.8.0-dev", path = "../slots" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +fork-tree = { version = "2.0.0-dev", path = "../../../utils/fork-tree" } futures = "0.3.1" futures-timer = "3.0.1" parking_lot = "0.10.0" @@ -43,13 +45,13 @@ pdqselect = "0.1.0" derive_more = "0.99.2" [dev-dependencies] -sp-keyring = { version = "2.0.0", path = "../../../primitives/keyring" } -sc-executor = { version = "0.8", path = "../../executor" } -sc-network = { version = "0.8", path = "../../network" } -sc-network-test = { version = "0.8.0", path = "../../network/test" } -sc-service = { version = "0.8", path = "../../service" } -substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" } -sc-block-builder = { version = "0.8", path = "../../block-builder" } +sp-keyring = { version = "2.0.0-dev", path = "../../../primitives/keyring" } +sc-executor = { version = "0.8.0-dev", path = "../../executor" } +sc-network = { version = "0.8.0-dev", path = "../../network" } +sc-network-test = { version = "0.8.0-dev", path = "../../network/test" } +sc-service = { version = "0.8.0-dev", path = "../../service" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } +sc-block-builder = { version = "0.8.0-dev", path = "../../block-builder" } tokio = "0.1.22" env_logger = "0.7.0" tempfile = "3.1.0" diff --git a/client/consensus/babe/rpc/Cargo.toml b/client/consensus/babe/rpc/Cargo.toml index 3fd0e924af0..524b90046d6 100644 --- a/client/consensus/babe/rpc/Cargo.toml +++ b/client/consensus/babe/rpc/Cargo.toml @@ -1,30 +1,32 @@ [package] name = "sc-consensus-babe-rpc" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] description = "RPC extensions for the BABE consensus algorithm" edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-consensus-babe = { version = "0.8.0", path = "../" } +sc-consensus-babe = { version = "0.8.0-dev", path = "../" } jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" -sp-consensus-babe = { version = "0.8", path = "../../../../primitives/consensus/babe" } +sp-consensus-babe = { version = "0.8.0-dev", path = "../../../../primitives/consensus/babe" } serde = { version = "1.0.104", features=["derive"] } -sp-blockchain = { version = "2.0.0", path = "../../../../primitives/blockchain" } -sp-runtime = { version = "2.0.0", path = "../../../../primitives/runtime" } -sc-consensus-epochs = { version = "0.8", path = "../../epochs" } +sp-blockchain = { version = "2.0.0-dev", path = "../../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-dev", path = "../../../../primitives/runtime" } +sc-consensus-epochs = { version = "0.8.0-dev", path = "../../epochs" } futures = "0.3.1" derive_more = "0.99.2" -sp-api = { version = "2.0.0", path = "../../../../primitives/api" } -sp-consensus = { version = "0.8", path = "../../../../primitives/consensus/common" } -sp-core = { version = "2.0.0", path = "../../../../primitives/core" } -sc-keystore = { version = "2.0.0", path = "../../../keystore" } +sp-api = { version = "2.0.0-dev", path = "../../../../primitives/api" } +sp-consensus = { version = "0.8.0-dev", path = "../../../../primitives/consensus/common" } +sp-core = { version = "2.0.0-dev", path = "../../../../primitives/core" } +sc-keystore = { version = "2.0.0-dev", path = "../../../keystore" } [dev-dependencies] -substrate-test-runtime-client = { version = "2.0.0", path = "../../../../test-utils/runtime/client" } -sp-application-crypto = { version = "2.0.0", path = "../../../../primitives/application-crypto" } -sp-keyring = { version = "2.0.0", path = "../../../../primitives/keyring" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../../test-utils/runtime/client" } +sp-application-crypto = { version = "2.0.0-dev", path = "../../../../primitives/application-crypto" } +sp-keyring = { version = "2.0.0-dev", path = "../../../../primitives/keyring" } tempfile = "3.1.0" diff --git a/client/consensus/epochs/Cargo.toml b/client/consensus/epochs/Cargo.toml index e08553a241d..26dc2062b87 100644 --- a/client/consensus/epochs/Cargo.toml +++ b/client/consensus/epochs/Cargo.toml @@ -1,14 +1,17 @@ [package] name = "sc-consensus-epochs" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] description = "Generic epochs-based utilities for consensus" edition = "2018" +license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } parking_lot = "0.10.0" -fork-tree = { version = "2.0.0", path = "../../../utils/fork-tree" } -sp-runtime = { path = "../../../primitives/runtime" } -sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } -sc-client-api = { path = "../../api" } +fork-tree = { version = "2.0.0-dev", path = "../../../utils/fork-tree" } +sp-runtime = { path = "../../../primitives/runtime" , version = "2.0.0-dev"} +sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } +sc-client-api = { path = "../../api" , version = "2.0.0-dev"} diff --git a/client/consensus/manual-seal/Cargo.toml b/client/consensus/manual-seal/Cargo.toml index 71c1f6e5583..25650f3300d 100644 --- a/client/consensus/manual-seal/Cargo.toml +++ b/client/consensus/manual-seal/Cargo.toml @@ -1,10 +1,12 @@ [package] name = "sc-consensus-manual-seal" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] description = "Manual sealing engine for Substrate" edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] derive_more = "0.99.2" @@ -16,19 +18,19 @@ log = "0.4.8" parking_lot = "0.10.0" serde = { version = "1.0", features=["derive"] } -sc-client = { path = "../../../client" } -sc-client-api = { path = "../../../client/api" } -sc-transaction-pool = { path = "../../transaction-pool" } -sp-blockchain = { path = "../../../primitives/blockchain" } -sp-consensus = { package = "sp-consensus", path = "../../../primitives/consensus/common" } -sp-inherents = { path = "../../../primitives/inherents" } -sp-runtime = { path = "../../../primitives/runtime" } -sp-transaction-pool = { path = "../../../primitives/transaction-pool" } +sc-client = { path = "../../../client" , version = "0.8.0-dev"} +sc-client-api = { path = "../../../client/api" , version = "2.0.0-dev"} +sc-transaction-pool = { path = "../../transaction-pool" , version = "2.0.0-dev"} +sp-blockchain = { path = "../../../primitives/blockchain" , version = "2.0.0-dev"} +sp-consensus = { package = "sp-consensus", path = "../../../primitives/consensus/common" , version = "0.8.0-dev"} +sp-inherents = { path = "../../../primitives/inherents" , version = "2.0.0-dev"} +sp-runtime = { path = "../../../primitives/runtime" , version = "2.0.0-dev"} +sp-transaction-pool = { path = "../../../primitives/transaction-pool" , version = "2.0.0-dev"} [dev-dependencies] -sc-basic-authorship = { path = "../../basic-authorship" } -substrate-test-runtime-client = { path = "../../../test-utils/runtime/client" } -substrate-test-runtime-transaction-pool = { path = "../../../test-utils/runtime/transaction-pool" } +sc-basic-authorship = { path = "../../basic-authorship" , version = "0.8.0-dev"} +substrate-test-runtime-client = { path = "../../../test-utils/runtime/client" , version = "2.0.0-dev"} +substrate-test-runtime-transaction-pool = { path = "../../../test-utils/runtime/transaction-pool" , version = "2.0.0-dev"} tokio = { version = "0.2", features = ["rt-core", "macros"] } env_logger = "0.7.0" tempfile = "3.1.0" diff --git a/client/consensus/pow/Cargo.toml b/client/consensus/pow/Cargo.toml index b31d9406e1e..b700b52ab09 100644 --- a/client/consensus/pow/Cargo.toml +++ b/client/consensus/pow/Cargo.toml @@ -1,23 +1,25 @@ [package] name = "sc-consensus-pow" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] description = "PoW consensus algorithm for substrate" edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -sp-api = { version = "2.0.0", path = "../../../primitives/api" } -sc-client-api = { version = "2.0.0", path = "../../api" } -sp-block-builder = { version = "2.0.0", path = "../../../primitives/block-builder" } -sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" } -sp-consensus-pow = { version = "0.8", path = "../../../primitives/consensus/pow" } -sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } +sc-client-api = { version = "2.0.0-dev", path = "../../api" } +sp-block-builder = { version = "2.0.0-dev", path = "../../../primitives/block-builder" } +sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } +sp-consensus-pow = { version = "0.8.0-dev", path = "../../../primitives/consensus/pow" } +sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } log = "0.4.8" futures = { version = "0.3.1", features = ["compat"] } -sp-timestamp = { version = "2.0.0", path = "../../../primitives/timestamp" } +sp-timestamp = { version = "2.0.0-dev", path = "../../../primitives/timestamp" } derive_more = "0.99.2" diff --git a/client/consensus/slots/Cargo.toml b/client/consensus/slots/Cargo.toml index 67de0a54ed7..9a75972f588 100644 --- a/client/consensus/slots/Cargo.toml +++ b/client/consensus/slots/Cargo.toml @@ -1,27 +1,29 @@ [package] name = "sc-consensus-slots" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] description = "Generic slots-based utilities for consensus" edition = "2018" build = "build.rs" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0" } -sc-client-api = { version = "2.0.0", path = "../../api" } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -sp-state-machine = { version = "0.8.0", path = "../../../primitives/state-machine" } -sp-api = { version = "2.0.0", path = "../../../primitives/api" } -sc-telemetry = { version = "2.0.0", path = "../../telemetry" } -sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" } -sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" } +sc-client-api = { version = "2.0.0-dev", path = "../../api" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sp-state-machine = { version = "0.8.0-dev", path = "../../../primitives/state-machine" } +sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } +sc-telemetry = { version = "2.0.0-dev", path = "../../telemetry" } +sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } +sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } futures = "0.3.1" futures-timer = "3.0.1" parking_lot = "0.10.0" log = "0.4.8" [dev-dependencies] -substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } diff --git a/client/consensus/uncles/Cargo.toml b/client/consensus/uncles/Cargo.toml index f336564c4ec..ad9ac538425 100644 --- a/client/consensus/uncles/Cargo.toml +++ b/client/consensus/uncles/Cargo.toml @@ -1,16 +1,18 @@ [package] name = "sc-consensus-uncles" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] description = "Generic uncle inclusion utilities for consensus" edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-client-api = { version = "2.0.0", path = "../../api" } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -sp-authorship = { version = "2.0.0", path = "../../../primitives/authorship" } -sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" } -sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" } +sc-client-api = { version = "2.0.0-dev", path = "../../api" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sp-authorship = { version = "2.0.0-dev", path = "../../../primitives/authorship" } +sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } +sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } log = "0.4.8" diff --git a/client/db/Cargo.toml b/client/db/Cargo.toml index ef418d43efc..c2e27ae7e63 100644 --- a/client/db/Cargo.toml +++ b/client/db/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "sc-client-db" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] parking_lot = "0.10.0" @@ -17,20 +19,20 @@ hash-db = "0.15.2" parity-util-mem = { version = "0.5.1", default-features = false, features = ["std"] } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -sc-client-api = { version = "2.0.0", path = "../api" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } -sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } -sc-client = { version = "0.8", path = "../" } -sp-state-machine = { version = "0.8", path = "../../primitives/state-machine" } -sc-executor = { version = "0.8", path = "../executor" } -sc-state-db = { version = "0.8", path = "../state-db" } -sp-trie = { version = "2.0.0", path = "../../primitives/trie" } -sp-consensus = { version = "0.8", path = "../../primitives/consensus/common" } -sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" } +sc-client-api = { version = "2.0.0-dev", path = "../api" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +sc-client = { version = "0.8.0-dev", path = "../" } +sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } +sc-executor = { version = "0.8.0-dev", path = "../executor" } +sc-state-db = { version = "0.8.0-dev", path = "../state-db" } +sp-trie = { version = "2.0.0-dev", path = "../../primitives/trie" } +sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } +sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } [dev-dependencies] -sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" } -substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" } +sp-keyring = { version = "2.0.0-dev", path = "../../primitives/keyring" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } env_logger = "0.7.0" quickcheck = "0.9" kvdb-rocksdb = "0.5" diff --git a/client/executor/Cargo.toml b/client/executor/Cargo.toml index c8774470feb..f98cbf97e05 100644 --- a/client/executor/Cargo.toml +++ b/client/executor/Cargo.toml @@ -1,28 +1,30 @@ [package] name = "sc-executor" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] derive_more = "0.99.2" codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-io = { version = "2.0.0", path = "../../primitives/io" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } -sp-trie = { version = "2.0.0", path = "../../primitives/trie" } -sp-serializer = { version = "2.0.0", path = "../../primitives/serializer" } -sp-version = { version = "2.0.0", path = "../../primitives/version" } -sp-panic-handler = { version = "2.0.0", path = "../../primitives/panic-handler" } +sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-trie = { version = "2.0.0-dev", path = "../../primitives/trie" } +sp-serializer = { version = "2.0.0-dev", path = "../../primitives/serializer" } +sp-version = { version = "2.0.0-dev", path = "../../primitives/version" } +sp-panic-handler = { version = "2.0.0-dev", path = "../../primitives/panic-handler" } wasmi = "0.6.2" parity-wasm = "0.41.0" lazy_static = "1.4.0" -sp-wasm-interface = { version = "2.0.0", path = "../../primitives/wasm-interface" } -sp-runtime-interface = { version = "2.0.0", path = "../../primitives/runtime-interface" } -sp-externalities = { version = "0.8.0", path = "../../primitives/externalities" } -sc-executor-common = { version = "0.8", path = "common" } -sc-executor-wasmi = { version = "0.8", path = "wasmi" } -sc-executor-wasmtime = { version = "0.8", path = "wasmtime", optional = true } +sp-wasm-interface = { version = "2.0.0-dev", path = "../../primitives/wasm-interface" } +sp-runtime-interface = { version = "2.0.0-dev", path = "../../primitives/runtime-interface" } +sp-externalities = { version = "0.8.0-dev", path = "../../primitives/externalities" } +sc-executor-common = { version = "0.8.0-dev", path = "common" } +sc-executor-wasmi = { version = "0.8.0-dev", path = "wasmi" } +sc-executor-wasmtime = { version = "0.8.0-dev", path = "wasmtime", optional = true } parking_lot = "0.10.0" log = "0.4.8" libsecp256k1 = "0.3.4" @@ -31,9 +33,9 @@ libsecp256k1 = "0.3.4" assert_matches = "1.3.0" wabt = "0.9.2" hex-literal = "0.2.1" -sc-runtime-test = { version = "2.0.0", path = "runtime-test" } -substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime" } -sp-state-machine = { version = "0.8", path = "../../primitives/state-machine" } +sc-runtime-test = { version = "2.0.0-dev", path = "runtime-test" } +substrate-test-runtime = { version = "2.0.0-dev", path = "../../test-utils/runtime" } +sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } test-case = "0.3.3" [features] diff --git a/client/executor/common/Cargo.toml b/client/executor/common/Cargo.toml index e10afe3448b..fd3645719c2 100644 --- a/client/executor/common/Cargo.toml +++ b/client/executor/common/Cargo.toml @@ -1,20 +1,22 @@ [package] name = "sc-executor-common" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] log = "0.4.8" derive_more = "0.99.2" codec = { package = "parity-scale-codec", version = "1.0.0" } wasmi = "0.6.2" -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-allocator = { version = "2.0.0", path = "../../../primitives/allocator" } -sp-wasm-interface = { version = "2.0.0", path = "../../../primitives/wasm-interface" } -sp-runtime-interface = { version = "2.0.0", path = "../../../primitives/runtime-interface" } -sp-serializer = { version = "2.0.0", path = "../../../primitives/serializer" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-allocator = { version = "2.0.0-dev", path = "../../../primitives/allocator" } +sp-wasm-interface = { version = "2.0.0-dev", path = "../../../primitives/wasm-interface" } +sp-runtime-interface = { version = "2.0.0-dev", path = "../../../primitives/runtime-interface" } +sp-serializer = { version = "2.0.0-dev", path = "../../../primitives/serializer" } [features] default = [] diff --git a/client/executor/runtime-test/Cargo.toml b/client/executor/runtime-test/Cargo.toml index 3cb0c03a87c..b677dcd07d6 100644 --- a/client/executor/runtime-test/Cargo.toml +++ b/client/executor/runtime-test/Cargo.toml @@ -1,21 +1,24 @@ [package] name = "sc-runtime-test" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" license = "GPL-3.0" +publish = false +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-std = { version = "2.0.0", default-features = false, path = "../../../primitives/std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../../primitives/io" } -sp-sandbox = { version = "0.8.0", default-features = false, path = "../../../primitives/sandbox" } -sp-core = { version = "2.0.0", default-features = false, path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../../primitives/runtime" } -sp-allocator = { version = "2.0.0", default-features = false, path = "../../../primitives/allocator" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/io" } +sp-sandbox = { version = "0.8.0-dev", default-features = false, path = "../../../primitives/sandbox" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/runtime" } +sp-allocator = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/allocator" } [build-dependencies] -wasm-builder-runner = { version = "1.0.4", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" } +wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" } [features] default = [ "std" ] diff --git a/client/executor/wasmi/Cargo.toml b/client/executor/wasmi/Cargo.toml index 9e968fdc685..6c8ba4c747d 100644 --- a/client/executor/wasmi/Cargo.toml +++ b/client/executor/wasmi/Cargo.toml @@ -1,17 +1,19 @@ [package] name = "sc-executor-wasmi" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] log = "0.4.8" wasmi = "0.6.2" parity-wasm = "0.41.0" codec = { package = "parity-scale-codec", version = "1.0.0" } -sc-executor-common = { version = "0.8", path = "../common" } -sp-wasm-interface = { version = "2.0.0", path = "../../../primitives/wasm-interface" } -sp-runtime-interface = { version = "2.0.0", path = "../../../primitives/runtime-interface" } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-allocator = { version = "2.0.0", path = "../../../primitives/allocator" } +sc-executor-common = { version = "0.8.0-dev", path = "../common" } +sp-wasm-interface = { version = "2.0.0-dev", path = "../../../primitives/wasm-interface" } +sp-runtime-interface = { version = "2.0.0-dev", path = "../../../primitives/runtime-interface" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-allocator = { version = "2.0.0-dev", path = "../../../primitives/allocator" } diff --git a/client/executor/wasmtime/Cargo.toml b/client/executor/wasmtime/Cargo.toml index eb41adb2714..cd7e5dead9f 100644 --- a/client/executor/wasmtime/Cargo.toml +++ b/client/executor/wasmtime/Cargo.toml @@ -1,20 +1,22 @@ [package] name = "sc-executor-wasmtime" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] log = "0.4.8" wasmi = "0.6.2" parity-wasm = "0.41.0" codec = { package = "parity-scale-codec", version = "1.0.0" } -sc-executor-common = { version = "0.8", path = "../common" } -sp-wasm-interface = { version = "2.0.0", path = "../../../primitives/wasm-interface" } -sp-runtime-interface = { version = "2.0.0", path = "../../../primitives/runtime-interface" } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-allocator = { version = "2.0.0", path = "../../../primitives/allocator" } +sc-executor-common = { version = "0.8.0-dev", path = "../common" } +sp-wasm-interface = { version = "2.0.0-dev", path = "../../../primitives/wasm-interface" } +sp-runtime-interface = { version = "2.0.0-dev", path = "../../../primitives/runtime-interface" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-allocator = { version = "2.0.0-dev", path = "../../../primitives/allocator" } wasmtime = "0.11" diff --git a/client/finality-grandpa/Cargo.toml b/client/finality-grandpa/Cargo.toml index e96792258a2..46dd444cdfc 100644 --- a/client/finality-grandpa/Cargo.toml +++ b/client/finality-grandpa/Cargo.toml @@ -1,12 +1,14 @@ [package] name = "sc-finality-grandpa" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -fork-tree = { version = "2.0.0", path = "../../utils/fork-tree" } +fork-tree = { version = "2.0.0-dev", path = "../../utils/fork-tree" } futures = "0.3.1" futures-timer = "3.0.1" log = "0.4.8" @@ -14,34 +16,34 @@ parking_lot = "0.10.0" rand = "0.7.2" assert_matches = "1.3.0" parity-scale-codec = { version = "1.0.0", features = ["derive"] } -sp-arithmetic = { version = "2.0.0", path = "../../primitives/arithmetic" } -sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } -sp-consensus = { version = "0.8", path = "../../primitives/consensus/common" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } -sc-telemetry = { version = "2.0.0", path = "../telemetry" } -sc-keystore = { version = "2.0.0", path = "../keystore" } +sp-arithmetic = { version = "2.0.0-dev", path = "../../primitives/arithmetic" } +sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sc-telemetry = { version = "2.0.0-dev", path = "../telemetry" } +sc-keystore = { version = "2.0.0-dev", path = "../keystore" } serde_json = "1.0.41" -sc-client-api = { version = "2.0.0", path = "../api" } -sc-client = { version = "0.8", path = "../" } -sp-inherents = { version = "2.0.0", path = "../../primitives/inherents" } -sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" } -sc-network = { version = "0.8", path = "../network" } -sc-network-gossip = { version = "0.8", path = "../network-gossip" } -sp-finality-tracker = { version = "2.0.0", path = "../../primitives/finality-tracker" } -sp-finality-grandpa = { version = "2.0.0", path = "../../primitives/finality-grandpa" } +sc-client-api = { version = "2.0.0-dev", path = "../api" } +sc-client = { version = "0.8.0-dev", path = "../" } +sp-inherents = { version = "2.0.0-dev", path = "../../primitives/inherents" } +sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } +sc-network = { version = "0.8.0-dev", path = "../network" } +sc-network-gossip = { version = "0.8.0-dev", path = "../network-gossip" } +sp-finality-tracker = { version = "2.0.0-dev", path = "../../primitives/finality-tracker" } +sp-finality-grandpa = { version = "2.0.0-dev", path = "../../primitives/finality-grandpa" } finality-grandpa = { version = "0.11.1", features = ["derive-codec"] } pin-project = "0.4.6" [dev-dependencies] finality-grandpa = { version = "0.11.1", features = ["derive-codec", "test-helpers"] } -sc-network = { version = "0.8", path = "../network" } -sc-network-test = { version = "0.8.0", path = "../network/test" } -sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" } -substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" } -sp-consensus-babe = { version = "0.8", path = "../../primitives/consensus/babe" } -sp-state-machine = { version = "0.8", path = "../../primitives/state-machine" } +sc-network = { version = "0.8.0-dev", path = "../network" } +sc-network-test = { version = "0.8.0-dev", path = "../network/test" } +sp-keyring = { version = "2.0.0-dev", path = "../../primitives/keyring" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } +sp-consensus-babe = { version = "0.8.0-dev", path = "../../primitives/consensus/babe" } +sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } env_logger = "0.7.0" tokio = "0.1.22" tempfile = "3.1.0" -sp-api = { version = "2.0.0", path = "../../primitives/api" } +sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } futures01 = { package = "futures", version = "0.1.29" } diff --git a/client/informant/Cargo.toml b/client/informant/Cargo.toml index 197f320889c..f60abeee349 100644 --- a/client/informant/Cargo.toml +++ b/client/informant/Cargo.toml @@ -1,10 +1,12 @@ [package] name = "sc-informant" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] description = "Substrate informant." edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] ansi_term = "0.12.1" @@ -12,8 +14,8 @@ futures = "0.3.1" log = "0.4.8" parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } wasm-timer = "0.2" -sc-client-api = { version = "2.0.0", path = "../api" } -sc-network = { version = "0.8", path = "../network" } -sc-service = { version = "0.8", default-features = false, path = "../service" } -sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" } -sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } +sc-client-api = { version = "2.0.0-dev", path = "../api" } +sc-network = { version = "0.8.0-dev", path = "../network" } +sc-service = { version = "0.8.0-dev", default-features = false, path = "../service" } +sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } diff --git a/client/keystore/Cargo.toml b/client/keystore/Cargo.toml index 89ab787cb4b..221449d34ef 100644 --- a/client/keystore/Cargo.toml +++ b/client/keystore/Cargo.toml @@ -1,14 +1,16 @@ [package] name = "sc-keystore" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] derive_more = "0.99.2" -sp-core = { version = "2.0.0", path = "../../primitives/core" } -sp-application-crypto = { version = "2.0.0", path = "../../primitives/application-crypto" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-application-crypto = { version = "2.0.0-dev", path = "../../primitives/application-crypto" } hex = "0.4.0" rand = "0.7.2" serde_json = "1.0.41" diff --git a/client/network-gossip/Cargo.toml b/client/network-gossip/Cargo.toml index 08b63151db2..25b0548c840 100644 --- a/client/network-gossip/Cargo.toml +++ b/client/network-gossip/Cargo.toml @@ -1,10 +1,12 @@ [package] description = "Gossiping for the Substrate network protocol" name = "sc-network-gossip" -version = "0.8.0" +version = "0.8.0-dev" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] futures = "0.3.1" @@ -13,6 +15,6 @@ libp2p = { version = "0.16.1", default-features = false, features = ["libp2p-web log = "0.4.8" lru = "0.1.2" parking_lot = "0.10.0" -sc-network = { version = "0.8", path = "../network" } -sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } +sc-network = { version = "0.8.0-dev", path = "../network" } +sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } wasm-timer = "0.2" diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index 4c2f2d0c314..48a6fee638a 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -1,10 +1,12 @@ [package] description = "Substrate network protocol" name = "sc-network" -version = "0.8.0" +version = "0.8.0-dev" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [build-dependencies] prost-build = "0.6.1" @@ -17,7 +19,7 @@ derive_more = "0.99.2" either = "1.5.3" erased-serde = "0.3.9" fnv = "1.0.6" -fork-tree = { version = "2.0.0", path = "../../utils/fork-tree" } +fork-tree = { version = "2.0.0-dev", path = "../../utils/fork-tree" } futures = "0.3.1" futures_codec = "0.3.3" futures-timer = "3.0.1" @@ -32,25 +34,25 @@ parking_lot = "0.10.0" prost = "0.6.1" rand = "0.7.2" rustc-hex = "2.0.1" -sc-block-builder = { version = "0.8", path = "../block-builder" } -sc-client = { version = "0.8", path = "../" } -sc-client-api = { version = "2.0.0", path = "../api" } -sc-peerset = { version = "2.0.0", path = "../peerset" } +sc-block-builder = { version = "0.8.0-dev", path = "../block-builder" } +sc-client = { version = "0.8.0-dev", path = "../" } +sc-client-api = { version = "2.0.0-dev", path = "../api" } +sc-peerset = { version = "2.0.0-dev", path = "../peerset" } pin-project = "0.4.6" serde = { version = "1.0.101", features = ["derive"] } serde_json = "1.0.41" slog = { version = "2.5.2", features = ["nested-values"] } slog_derive = "0.2.0" smallvec = "0.6.10" -sp-arithmetic = { version = "2.0.0", path = "../../primitives/arithmetic" } -sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" } -sp-consensus = { version = "0.8", path = "../../primitives/consensus/common" } -sp-consensus-babe = { version = "0.8", path = "../../primitives/consensus/babe" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } -sp-keyring = { version = "2.0.0", optional = true, path = "../../primitives/keyring" } -sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } -substrate-test-client = { version = "2.0.0", optional = true, path = "../../test-utils/client" } -substrate-test-runtime-client = { version = "2.0.0", optional = true, path = "../../test-utils/runtime/client" } +sp-arithmetic = { version = "2.0.0-dev", path = "../../primitives/arithmetic" } +sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } +sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } +sp-consensus-babe = { version = "0.8.0-dev", path = "../../primitives/consensus/babe" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-keyring = { version = "2.0.0-dev", optional = true, path = "../../primitives/keyring" } +sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +substrate-test-client = { version = "2.0.0-dev", optional = true, path = "../../test-utils/client" } +substrate-test-runtime-client = { version = "2.0.0-dev", optional = true, path = "../../test-utils/runtime/client" } thiserror = "1" unsigned-varint = { version = "0.3.1", features = ["futures", "futures-codec"] } void = "1.0.2" @@ -62,10 +64,10 @@ assert_matches = "1.3" env_logger = "0.7.0" quickcheck = "0.9.0" rand = "0.7.2" -sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" } -sp-test-primitives = { version = "2.0.0", path = "../../primitives/test-primitives" } -substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime" } -substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" } +sp-keyring = { version = "2.0.0-dev", path = "../../primitives/keyring" } +sp-test-primitives = { version = "2.0.0-dev", path = "../../primitives/test-primitives" } +substrate-test-runtime = { version = "2.0.0-dev", path = "../../test-utils/runtime" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } tempfile = "3.1.0" [features] diff --git a/client/network/test/Cargo.toml b/client/network/test/Cargo.toml index 54685bc00c8..5f8a1b6d5e9 100644 --- a/client/network/test/Cargo.toml +++ b/client/network/test/Cargo.toml @@ -1,13 +1,16 @@ [package] description = "Integration tests for Substrate network protocol" name = "sc-network-test" -version = "0.8.0" +version = "0.8.0-dev" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" +publish = false +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-network = { version = "0.8", path = "../" } +sc-network = { version = "0.8.0-dev", path = "../" } log = "0.4.8" parking_lot = "0.10.0" futures = "0.1.29" @@ -15,16 +18,16 @@ futures03 = { package = "futures", version = "0.3.1", features = ["compat"] } futures-timer = "3.0.1" rand = "0.7.2" libp2p = { version = "0.16.1", default-features = false, features = ["libp2p-websocket"] } -sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" } -sc-client = { version = "0.8", path = "../../" } -sc-client-api = { version = "2.0.0", path = "../../api" } -sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sc-block-builder = { version = "0.8", path = "../../block-builder" } -sp-consensus-babe = { version = "0.8", path = "../../../primitives/consensus/babe" } +sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } +sc-client = { version = "0.8.0-dev", path = "../../" } +sc-client-api = { version = "2.0.0-dev", path = "../../api" } +sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sc-block-builder = { version = "0.8.0-dev", path = "../../block-builder" } +sp-consensus-babe = { version = "0.8.0-dev", path = "../../../primitives/consensus/babe" } env_logger = "0.7.0" -substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" } -substrate-test-runtime = { version = "2.0.0", path = "../../../test-utils/runtime" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } +substrate-test-runtime = { version = "2.0.0-dev", path = "../../../test-utils/runtime" } tempfile = "3.1.0" tokio = "0.1.22" diff --git a/client/offchain/Cargo.toml b/client/offchain/Cargo.toml index 29e6dca2a7f..062f6cab564 100644 --- a/client/offchain/Cargo.toml +++ b/client/offchain/Cargo.toml @@ -1,41 +1,43 @@ [package] description = "Substrate offchain workers" name = "sc-offchain" -version = "2.0.0" +version = "2.0.0-dev" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] bytes = "0.5" -sc-client-api = { version = "2.0.0", path = "../api" } -sp-api = { version = "2.0.0", path = "../../primitives/api" } +sc-client-api = { version = "2.0.0-dev", path = "../api" } +sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } fnv = "1.0.6" futures = "0.3.1" futures-timer = "3.0.1" log = "0.4.8" threadpool = "1.7" num_cpus = "1.10" -sp-offchain = { version = "2.0.0", path = "../../primitives/offchain" } +sp-offchain = { version = "2.0.0-dev", path = "../../primitives/offchain" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } parking_lot = "0.10.0" -sp-core = { version = "2.0.0", path = "../../primitives/core" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } rand = "0.7.2" -sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } -sc-network = { version = "0.8", path = "../network" } -sc-keystore = { version = "2.0.0", path = "../keystore" } +sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +sc-network = { version = "0.8.0-dev", path = "../network" } +sc-keystore = { version = "2.0.0-dev", path = "../keystore" } [target.'cfg(not(target_os = "unknown"))'.dependencies] hyper = "0.13.2" hyper-rustls = "0.19" [dev-dependencies] -sc-client-db = { version = "0.8", default-features = true, path = "../db/" } +sc-client-db = { version = "0.8.0-dev", default-features = true, path = "../db/" } env_logger = "0.7.0" -substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } tokio = "0.2" -sc-transaction-pool = { version = "2.0.0", path = "../../client/transaction-pool" } -sp-transaction-pool = { version = "2.0.0", path = "../../primitives/transaction-pool" } +sc-transaction-pool = { version = "2.0.0-dev", path = "../../client/transaction-pool" } +sp-transaction-pool = { version = "2.0.0-dev", path = "../../primitives/transaction-pool" } [features] default = [] diff --git a/client/peerset/Cargo.toml b/client/peerset/Cargo.toml index b39aa404904..5a01d9d03ba 100644 --- a/client/peerset/Cargo.toml +++ b/client/peerset/Cargo.toml @@ -3,9 +3,10 @@ description = "Connectivity manager based on reputation" homepage = "http://parity.io" license = "GPL-3.0" name = "sc-peerset" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" +repository = "https://github.com/paritytech/substrate/" [dependencies] futures = "0.3.1" diff --git a/client/rpc-api/Cargo.toml b/client/rpc-api/Cargo.toml index b9f4cbb0159..bf97f072219 100644 --- a/client/rpc-api/Cargo.toml +++ b/client/rpc-api/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "sc-rpc-api" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0" } @@ -15,10 +17,10 @@ jsonrpc-derive = "14.0.3" jsonrpc-pubsub = "14.0.3" log = "0.4.8" parking_lot = "0.10.0" -sp-core = { version = "2.0.0", path = "../../primitives/core" } -sp-version = { version = "2.0.0", path = "../../primitives/version" } -sp-runtime = { path = "../../primitives/runtime" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-version = { version = "2.0.0-dev", path = "../../primitives/version" } +sp-runtime = { path = "../../primitives/runtime" , version = "2.0.0-dev"} serde = { version = "1.0.101", features = ["derive"] } serde_json = "1.0.41" -sp-transaction-pool = { version = "2.0.0", path = "../../primitives/transaction-pool" } -sp-rpc = { version = "2.0.0", path = "../../primitives/rpc" } +sp-transaction-pool = { version = "2.0.0-dev", path = "../../primitives/transaction-pool" } +sp-rpc = { version = "2.0.0-dev", path = "../../primitives/rpc" } diff --git a/client/rpc-servers/Cargo.toml b/client/rpc-servers/Cargo.toml index 6b0d3f4adac..d32aaf3e686 100644 --- a/client/rpc-servers/Cargo.toml +++ b/client/rpc-servers/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "sc-rpc-server" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] jsonrpc-core = "14.0.3" @@ -11,7 +13,7 @@ pubsub = { package = "jsonrpc-pubsub", version = "14.0.3" } log = "0.4.8" serde = "1.0.101" serde_json = "1.0.41" -sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } +sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } [target.'cfg(not(target_os = "unknown"))'.dependencies] http = { package = "jsonrpc-http-server", version = "14.0.3" } diff --git a/client/rpc/Cargo.toml b/client/rpc/Cargo.toml index d09617ebc16..2c0feeb8a95 100644 --- a/client/rpc/Cargo.toml +++ b/client/rpc/Cargo.toml @@ -1,41 +1,43 @@ [package] name = "sc-rpc" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-rpc-api = { version = "0.8", path = "../rpc-api" } -sc-client-api = { version = "2.0.0", path = "../api" } -sc-client = { version = "0.8", path = "../" } -sp-api = { version = "2.0.0", path = "../../primitives/api" } +sc-rpc-api = { version = "0.8.0-dev", path = "../rpc-api" } +sc-client-api = { version = "2.0.0-dev", path = "../api" } +sc-client = { version = "0.8.0-dev", path = "../" } +sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } codec = { package = "parity-scale-codec", version = "1.0.0" } futures = { version = "0.3.1", features = ["compat"] } jsonrpc-pubsub = "14.0.3" log = "0.4.8" -sp-core = { version = "2.0.0", path = "../../primitives/core" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } rpc = { package = "jsonrpc-core", version = "14.0.3" } -sp-version = { version = "2.0.0", path = "../../primitives/version" } +sp-version = { version = "2.0.0-dev", path = "../../primitives/version" } serde_json = "1.0.41" -sp-session = { version = "2.0.0", path = "../../primitives/session" } -sp-offchain = { version = "2.0.0", path = "../../primitives/offchain" } -sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } -sp-rpc = { version = "2.0.0", path = "../../primitives/rpc" } -sp-state-machine = { version = "0.8", path = "../../primitives/state-machine" } -sc-executor = { version = "0.8", path = "../executor" } -sc-keystore = { version = "2.0.0", path = "../keystore" } -sp-transaction-pool = { version = "2.0.0", path = "../../primitives/transaction-pool" } -sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" } +sp-session = { version = "2.0.0-dev", path = "../../primitives/session" } +sp-offchain = { version = "2.0.0-dev", path = "../../primitives/offchain" } +sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +sp-rpc = { version = "2.0.0-dev", path = "../../primitives/rpc" } +sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } +sc-executor = { version = "0.8.0-dev", path = "../executor" } +sc-keystore = { version = "2.0.0-dev", path = "../keystore" } +sp-transaction-pool = { version = "2.0.0-dev", path = "../../primitives/transaction-pool" } +sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } hash-db = { version = "0.15.2", default-features = false } parking_lot = "0.10.0" [dev-dependencies] assert_matches = "1.3.0" futures01 = { package = "futures", version = "0.1.29" } -sc-network = { version = "0.8", path = "../network" } +sc-network = { version = "0.8.0-dev", path = "../network" } rustc-hex = "2.0.1" -sp-io = { version = "2.0.0", path = "../../primitives/io" } -substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" } +sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } tokio = "0.1.22" -sc-transaction-pool = { version = "2.0.0", path = "../transaction-pool" } +sc-transaction-pool = { version = "2.0.0-dev", path = "../transaction-pool" } diff --git a/client/service/Cargo.toml b/client/service/Cargo.toml index feaa4e3e685..024f61aba59 100644 --- a/client/service/Cargo.toml +++ b/client/service/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "sc-service" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [features] default = ["rocksdb"] @@ -30,37 +32,37 @@ serde = "1.0.101" serde_json = "1.0.41" sysinfo = "0.9.5" target_info = "0.1.0" -sc-keystore = { version = "2.0.0", path = "../keystore" } -sp-io = { version = "2.0.0", path = "../../primitives/io" } -sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } -sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } -sp-session = { version = "2.0.0", path = "../../primitives/session" } -sp-application-crypto = { version = "2.0.0", path = "../../primitives/application-crypto" } -sp-consensus = { version = "0.8", path = "../../primitives/consensus/common" } -sc-network = { version = "0.8", path = "../network" } -sc-chain-spec = { version = "2.0.0", path = "../chain-spec" } -sc-client-api = { version = "2.0.0", path = "../api" } -sc-client = { version = "0.8", path = "../" } -sp-api = { version = "2.0.0", path = "../../primitives/api" } -sc-client-db = { version = "0.8", path = "../db" } +sc-keystore = { version = "2.0.0-dev", path = "../keystore" } +sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-session = { version = "2.0.0-dev", path = "../../primitives/session" } +sp-application-crypto = { version = "2.0.0-dev", path = "../../primitives/application-crypto" } +sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } +sc-network = { version = "0.8.0-dev", path = "../network" } +sc-chain-spec = { version = "2.0.0-dev", path = "../chain-spec" } +sc-client-api = { version = "2.0.0-dev", path = "../api" } +sc-client = { version = "0.8.0-dev", path = "../" } +sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } +sc-client-db = { version = "0.8.0-dev", path = "../db" } codec = { package = "parity-scale-codec", version = "1.0.0" } -sc-executor = { version = "0.8", path = "../executor" } -sc-transaction-pool = { version = "2.0.0", path = "../transaction-pool" } -sp-transaction-pool = { version = "2.0.0", path = "../../primitives/transaction-pool" } -sc-rpc-server = { version = "2.0.0", path = "../rpc-servers" } -sc-rpc = { version = "2.0.0", path = "../rpc" } -sc-telemetry = { version = "2.0.0", path = "../telemetry" } -sc-offchain = { version = "2.0.0", path = "../offchain" } +sc-executor = { version = "0.8.0-dev", path = "../executor" } +sc-transaction-pool = { version = "2.0.0-dev", path = "../transaction-pool" } +sp-transaction-pool = { version = "2.0.0-dev", path = "../../primitives/transaction-pool" } +sc-rpc-server = { version = "2.0.0-dev", path = "../rpc-servers" } +sc-rpc = { version = "2.0.0-dev", path = "../rpc" } +sc-telemetry = { version = "2.0.0-dev", path = "../telemetry" } +sc-offchain = { version = "2.0.0-dev", path = "../offchain" } parity-multiaddr = { package = "parity-multiaddr", version = "0.5.0" } -prometheus-exporter = { path = "../../utils/prometheus" } -sc-tracing = { version = "2.0.0", path = "../tracing" } +prometheus-exporter = { path = "../../utils/prometheus" , version = "0.8.0-dev"} +sc-tracing = { version = "2.0.0-dev", path = "../tracing" } tracing = "0.1.10" parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } [dev-dependencies] -substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" } -sp-consensus-babe = { version = "0.8", path = "../../primitives/consensus/babe" } -grandpa = { version = "0.8", package = "sc-finality-grandpa", path = "../finality-grandpa" } -grandpa-primitives = { version = "2.0.0", package = "sp-finality-grandpa", path = "../../primitives/finality-grandpa" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } +sp-consensus-babe = { version = "0.8.0-dev", path = "../../primitives/consensus/babe" } +grandpa = { version = "0.8.0-dev", package = "sc-finality-grandpa", path = "../finality-grandpa" } +grandpa-primitives = { version = "2.0.0-dev", package = "sp-finality-grandpa", path = "../../primitives/finality-grandpa" } tokio = { version = "0.2", features = ["rt-core"] } diff --git a/client/service/test/Cargo.toml b/client/service/test/Cargo.toml index c9dbe97464a..d733d9a7bdd 100644 --- a/client/service/test/Cargo.toml +++ b/client/service/test/Cargo.toml @@ -1,9 +1,12 @@ [package] name = "sc-service-test" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +publish = false +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] tempfile = "3.1.0" @@ -13,10 +16,10 @@ log = "0.4.8" env_logger = "0.7.0" fdlimit = "0.1.1" futures = { version = "0.3.1", features = ["compat"] } -sc-service = { version = "0.8.0", default-features = false, path = "../../service" } -sc-network = { version = "0.8", path = "../../network" } -sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" } -sc-client = { version = "0.8", path = "../../" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" } +sc-service = { version = "0.8.0-dev", default-features = false, path = "../../service" } +sc-network = { version = "0.8.0-dev", path = "../../network" } +sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } +sc-client = { version = "0.8.0-dev", path = "../../" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-transaction-pool = { version = "2.0.0-dev", path = "../../../primitives/transaction-pool" } diff --git a/client/state-db/Cargo.toml b/client/state-db/Cargo.toml index 1bfa1369378..93a12cdf082 100644 --- a/client/state-db/Cargo.toml +++ b/client/state-db/Cargo.toml @@ -1,14 +1,16 @@ [package] name = "sc-state-db" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] parking_lot = "0.10.0" log = "0.4.8" -sp-core = { version = "2.0.0", path = "../../primitives/core" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } [dev-dependencies] diff --git a/client/telemetry/Cargo.toml b/client/telemetry/Cargo.toml index 66d08e1b145..89ef2868048 100644 --- a/client/telemetry/Cargo.toml +++ b/client/telemetry/Cargo.toml @@ -1,10 +1,12 @@ [package] name = "sc-telemetry" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] description = "Telemetry utils" edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] bytes = "0.5" diff --git a/client/tracing/Cargo.toml b/client/tracing/Cargo.toml index 0b6b02acd52..b85c0371f3a 100644 --- a/client/tracing/Cargo.toml +++ b/client/tracing/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "sc-tracing" -version = "2.0.0" +version = "2.0.0-dev" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] erased-serde = "0.3.9" @@ -14,7 +16,7 @@ serde_json = "1.0.41" slog = { version = "2.5.2", features = ["nested-values"] } tracing-core = "0.1.7" -sc-telemetry = { version = "2.0.0", path = "../telemetry" } +sc-telemetry = { version = "2.0.0-dev", path = "../telemetry" } [dev-dependencies] tracing = "0.1.10" diff --git a/client/transaction-pool/Cargo.toml b/client/transaction-pool/Cargo.toml index 7ccc98a9c09..6f863550bc1 100644 --- a/client/transaction-pool/Cargo.toml +++ b/client/transaction-pool/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "sc-transaction-pool" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0" } @@ -13,17 +15,17 @@ futures-diagnose = "1.0" log = "0.4.8" parking_lot = "0.10.0" wasm-timer = "0.2" -sp-core = { version = "2.0.0", path = "../../primitives/core" } -sp-api = { version = "2.0.0", path = "../../primitives/api" } -sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } -sc-transaction-graph = { version = "2.0.0", path = "./graph" } -sp-transaction-pool = { version = "2.0.0", path = "../../primitives/transaction-pool" } -sc-client-api = { version = "2.0.0", path = "../api" } -sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } +sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +sc-transaction-graph = { version = "2.0.0-dev", path = "./graph" } +sp-transaction-pool = { version = "2.0.0-dev", path = "../../primitives/transaction-pool" } +sc-client-api = { version = "2.0.0-dev", path = "../api" } +sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } futures-timer = "2.0" parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } [dev-dependencies] -sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" } -substrate-test-runtime-transaction-pool = { version = "2.0.0", path = "../../test-utils/runtime/transaction-pool" } -substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" } +sp-keyring = { version = "2.0.0-dev", path = "../../primitives/keyring" } +substrate-test-runtime-transaction-pool = { version = "2.0.0-dev", path = "../../test-utils/runtime/transaction-pool" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } diff --git a/client/transaction-pool/graph/Cargo.toml b/client/transaction-pool/graph/Cargo.toml index daec970a694..6335cdecb37 100644 --- a/client/transaction-pool/graph/Cargo.toml +++ b/client/transaction-pool/graph/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "sc-transaction-graph" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] derive_more = "0.99.2" @@ -12,17 +14,17 @@ log = "0.4.8" parking_lot = "0.10.0" serde = { version = "1.0.101", features = ["derive"] } wasm-timer = "0.2" -sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" } +sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sp-transaction-pool = { version = "2.0.0-dev", path = "../../../primitives/transaction-pool" } parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } linked-hash-map = "0.5.2" [dev-dependencies] assert_matches = "1.3.0" codec = { package = "parity-scale-codec", version = "1.0.0" } -substrate-test-runtime = { version = "2.0.0", path = "../../../test-utils/runtime" } +substrate-test-runtime = { version = "2.0.0-dev", path = "../../../test-utils/runtime" } criterion = "0.3" [[bench]] diff --git a/frame/assets/Cargo.toml b/frame/assets/Cargo.toml index cd6b41c4c7a..9b2b01e91ed 100644 --- a/frame/assets/Cargo.toml +++ b/frame/assets/Cargo.toml @@ -1,24 +1,26 @@ [package] name = "pallet-assets" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } # Needed for various traits. In our case, `OnFinalize`. -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } # Needed for type-safe access to storage DB. -frame-support = { version = "2.0.0", default-features = false, path = "../support" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } # `system` module provides us with all sorts of useful stuff and macros depend on it being around. -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0", path = "../../primitives/core" } -sp-std = { version = "2.0.0", path = "../../primitives/std" } -sp-io = { version = "2.0.0", path = "../../primitives/io" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-std = { version = "2.0.0-dev", path = "../../primitives/std" } +sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } [features] default = ["std"] diff --git a/frame/aura/Cargo.toml b/frame/aura/Cargo.toml index e982a02b47c..516ee883c44 100644 --- a/frame/aura/Cargo.toml +++ b/frame/aura/Cargo.toml @@ -1,25 +1,27 @@ [package] name = "pallet-aura" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0", default-features = false, path = "../../primitives/application-crypto" } +sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../../primitives/application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-inherents = { version = "2.0.0", default-features = false, path = "../../primitives/inherents" } -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } -pallet-session = { version = "2.0.0", default-features = false, path = "../session" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-io ={ path = "../../primitives/io", default-features = false } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -sp-consensus-aura = { path = "../../primitives/consensus/aura", default-features = false} -frame-system = { version = "2.0.0", default-features = false, path = "../system" } -sp-timestamp = { version = "2.0.0", default-features = false, path = "../../primitives/timestamp" } -pallet-timestamp = { version = "2.0.0", default-features = false, path = "../timestamp" } +pallet-session = { version = "2.0.0-dev", default-features = false, path = "../session" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +sp-consensus-aura = { path = "../../primitives/consensus/aura", default-features = false, version = "0.8.0-dev"} +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../primitives/timestamp" } +pallet-timestamp = { version = "2.0.0-dev", default-features = false, path = "../timestamp" } [dev-dependencies] diff --git a/frame/authority-discovery/Cargo.toml b/frame/authority-discovery/Cargo.toml index d8c72683cac..77dbd9de4ab 100644 --- a/frame/authority-discovery/Cargo.toml +++ b/frame/authority-discovery/Cargo.toml @@ -1,25 +1,27 @@ [package] name = "pallet-authority-discovery" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-authority-discovery = { version = "2.0.0", default-features = false, path = "../../primitives/authority-discovery" } -sp-application-crypto = { version = "2.0.0", default-features = false, path = "../../primitives/application-crypto" } +sp-authority-discovery = { version = "2.0.0-dev", default-features = false, path = "../../primitives/authority-discovery" } +sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../../primitives/application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -pallet-session = { version = "2.0.0", features = ["historical" ], path = "../session", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +pallet-session = { version = "2.0.0-dev", features = ["historical" ], path = "../session", default-features = false } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [dev-dependencies] -sp-staking = { version = "2.0.0", default-features = false, path = "../../primitives/staking" } +sp-staking = { version = "2.0.0-dev", default-features = false, path = "../../primitives/staking" } [features] default = ["std"] diff --git a/frame/authorship/Cargo.toml b/frame/authorship/Cargo.toml index 61056820f43..afbea4ceecd 100644 --- a/frame/authorship/Cargo.toml +++ b/frame/authorship/Cargo.toml @@ -1,21 +1,23 @@ [package] name = "pallet-authorship" -version = "2.0.0" +version = "2.0.0-dev" description = "Block and Uncle Author tracking for the FRAME" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-inherents = { version = "2.0.0", default-features = false, path = "../../primitives/inherents" } -sp-authorship = { version = "2.0.0", default-features = false, path = "../../primitives/authorship" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } -sp-io ={ path = "../../primitives/io", default-features = false } +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } +sp-authorship = { version = "2.0.0-dev", default-features = false, path = "../../primitives/authorship" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} impl-trait-for-tuples = "0.1.3" [features] diff --git a/frame/babe/Cargo.toml b/frame/babe/Cargo.toml index 5e7764862a6..1748481295d 100644 --- a/frame/babe/Cargo.toml +++ b/frame/babe/Cargo.toml @@ -1,32 +1,34 @@ [package] name = "pallet-babe" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] hex-literal = "0.2.1" codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true } -sp-inherents = { version = "2.0.0", default-features = false, path = "../../primitives/inherents" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } -pallet-timestamp = { version = "2.0.0", default-features = false, path = "../timestamp" } -sp-timestamp = { version = "2.0.0", default-features = false, path = "../../primitives/timestamp" } -pallet-session = { version = "2.0.0", default-features = false, path = "../session" } -sp-consensus-babe = { version = "0.8", default-features = false, path = "../../primitives/consensus/babe" } -sp-io ={ path = "../../primitives/io", default-features = false } +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-dev", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +pallet-timestamp = { version = "2.0.0-dev", default-features = false, path = "../timestamp" } +sp-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../primitives/timestamp" } +pallet-session = { version = "2.0.0-dev", default-features = false, path = "../session" } +sp-consensus-babe = { version = "0.8.0-dev", default-features = false, path = "../../primitives/consensus/babe" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} [dev-dependencies] lazy_static = "1.4.0" parking_lot = "0.10.0" -sp-version = { version = "2.0.0", default-features = false, path = "../../primitives/version" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } -substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime" } +sp-version = { version = "2.0.0-dev", default-features = false, path = "../../primitives/version" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +substrate-test-runtime = { version = "2.0.0-dev", path = "../../test-utils/runtime" } [features] default = ["std"] diff --git a/frame/balances/Cargo.toml b/frame/balances/Cargo.toml index f2bf1069afb..728adf9de76 100644 --- a/frame/balances/Cargo.toml +++ b/frame/balances/Cargo.toml @@ -1,24 +1,26 @@ [package] name = "pallet-balances" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -frame-benchmarking = { version = "2.0.0", default-features = false, path = "../benchmarking" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +frame-benchmarking = { version = "2.0.0-dev", default-features = false, path = "../benchmarking" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [dev-dependencies] -sp-io = { version = "2.0.0", path = "../../primitives/io" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } -pallet-transaction-payment = { version = "2.0.0", path = "../transaction-payment" } +sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +pallet-transaction-payment = { version = "2.0.0-dev", path = "../transaction-payment" } [features] default = ["std"] diff --git a/frame/benchmarking/Cargo.toml b/frame/benchmarking/Cargo.toml index 87c51c70e88..63db66fb204 100644 --- a/frame/benchmarking/Cargo.toml +++ b/frame/benchmarking/Cargo.toml @@ -1,16 +1,18 @@ [package] name = "frame-benchmarking" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false } -sp-api = { version = "2.0.0", path = "../../primitives/api", default-features = false } -sp-runtime-interface = { version = "2.0.0", path = "../../primitives/runtime-interface", default-features = false } -sp-std = { version = "2.0.0", path = "../../primitives/std", default-features = false } -sp-io ={ path = "../../primitives/io", default-features = false } +sp-api = { version = "2.0.0-dev", path = "../../primitives/api", default-features = false } +sp-runtime-interface = { version = "2.0.0-dev", path = "../../primitives/runtime-interface", default-features = false } +sp-std = { version = "2.0.0-dev", path = "../../primitives/std", default-features = false } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} [features] default = [ "std" ] diff --git a/frame/collective/Cargo.toml b/frame/collective/Cargo.toml index 8f7ffa76534..1e906e95850 100644 --- a/frame/collective/Cargo.toml +++ b/frame/collective/Cargo.toml @@ -1,23 +1,25 @@ [package] name = "pallet-collective" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [dev-dependencies] hex-literal = "0.2.1" -pallet-balances = { version = "2.0.0", path = "../balances" } +pallet-balances = { version = "2.0.0-dev", path = "../balances" } [features] default = ["std"] diff --git a/frame/contracts/Cargo.toml b/frame/contracts/Cargo.toml index 159e9f9d0c1..571ea2d08a7 100644 --- a/frame/contracts/Cargo.toml +++ b/frame/contracts/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "pallet-contracts" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } @@ -11,22 +13,22 @@ pwasm-utils = { version = "0.12.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } parity-wasm = { version = "0.41.0", default-features = false } wasmi-validation = { version = "0.3.0", default-features = false } -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-sandbox = { version = "0.8.0", default-features = false, path = "../../primitives/sandbox" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } -pallet-contracts-primitives = { version = "2.0.0", default-features = false, path = "common" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-sandbox = { version = "0.8.0-dev", default-features = false, path = "../../primitives/sandbox" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +pallet-contracts-primitives = { version = "2.0.0-dev", default-features = false, path = "common" } [dev-dependencies] wabt = "0.9.2" assert_matches = "1.3.0" hex-literal = "0.2.1" -pallet-balances = { version = "2.0.0", path = "../balances" } -pallet-timestamp = { version = "2.0.0", path = "../timestamp" } -pallet-randomness-collective-flip = { version = "2.0.0", path = "../randomness-collective-flip" } +pallet-balances = { version = "2.0.0-dev", path = "../balances" } +pallet-timestamp = { version = "2.0.0-dev", path = "../timestamp" } +pallet-randomness-collective-flip = { version = "2.0.0-dev", path = "../randomness-collective-flip" } [features] default = ["std"] diff --git a/frame/contracts/common/Cargo.toml b/frame/contracts/common/Cargo.toml index 6e4ee050bd1..e70143f76d3 100644 --- a/frame/contracts/common/Cargo.toml +++ b/frame/contracts/common/Cargo.toml @@ -1,14 +1,17 @@ [package] name = "pallet-contracts-primitives" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" +license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] # This crate should not rely on any of the frame primitives. codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../../../primitives/std" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../../primitives/runtime" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/runtime" } [features] default = ["std"] diff --git a/frame/contracts/rpc/Cargo.toml b/frame/contracts/rpc/Cargo.toml index d59260d11f5..6120cbe51ee 100644 --- a/frame/contracts/rpc/Cargo.toml +++ b/frame/contracts/rpc/Cargo.toml @@ -1,23 +1,25 @@ [package] name = "pallet-contracts-rpc" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0" } jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" -sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-rpc = { version = "2.0.0", path = "../../../primitives/rpc" } +sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-rpc = { version = "2.0.0-dev", path = "../../../primitives/rpc" } serde = { version = "1.0.101", features = ["derive"] } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -sp-api = { version = "2.0.0", path = "../../../primitives/api" } -pallet-contracts-primitives = { version = "2.0.0", path = "../common" } -pallet-contracts-rpc-runtime-api = { version = "0.8.0", path = "./runtime-api" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } +pallet-contracts-primitives = { version = "2.0.0-dev", path = "../common" } +pallet-contracts-rpc-runtime-api = { version = "0.8.0-dev", path = "./runtime-api" } [dev-dependencies] serde_json = "1.0.41" diff --git a/frame/contracts/rpc/runtime-api/Cargo.toml b/frame/contracts/rpc/runtime-api/Cargo.toml index dad9b92f6a3..ce810b8be36 100644 --- a/frame/contracts/rpc/runtime-api/Cargo.toml +++ b/frame/contracts/rpc/runtime-api/Cargo.toml @@ -1,16 +1,18 @@ [package] name = "pallet-contracts-rpc-runtime-api" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0", default-features = false, path = "../../../../primitives/api" } +sp-api = { version = "2.0.0-dev", default-features = false, path = "../../../../primitives/api" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../../../../primitives/std" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../../../primitives/runtime" } -pallet-contracts-primitives = { version = "2.0.0", default-features = false, path = "../../common" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../../../primitives/std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../../../primitives/runtime" } +pallet-contracts-primitives = { version = "2.0.0-dev", default-features = false, path = "../../common" } [features] default = ["std"] diff --git a/frame/democracy/Cargo.toml b/frame/democracy/Cargo.toml index 2428d2c1544..cf09d246200 100644 --- a/frame/democracy/Cargo.toml +++ b/frame/democracy/Cargo.toml @@ -1,23 +1,25 @@ [package] name = "pallet-democracy" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0", path = "../balances" } -sp-storage = { version = "2.0.0", path = "../../primitives/storage" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-dev", path = "../balances" } +sp-storage = { version = "2.0.0-dev", path = "../../primitives/storage" } hex-literal = "0.2.1" [features] diff --git a/frame/elections-phragmen/Cargo.toml b/frame/elections-phragmen/Cargo.toml index f3cfc800f01..6fc83fb370f 100644 --- a/frame/elections-phragmen/Cargo.toml +++ b/frame/elections-phragmen/Cargo.toml @@ -1,24 +1,26 @@ [package] name = "pallet-elections-phragmen" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-phragmen = { version = "2.0.0", default-features = false, path = "../../primitives/phragmen" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-phragmen = { version = "2.0.0-dev", default-features = false, path = "../../primitives/phragmen" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } [dev-dependencies] -sp-io = { version = "2.0.0", path = "../../primitives/io" } +sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } hex-literal = "0.2.1" -pallet-balances = { version = "2.0.0", path = "../balances" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } -substrate-test-utils = { version = "2.0.0", path = "../../test-utils" } +pallet-balances = { version = "2.0.0-dev", path = "../balances" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +substrate-test-utils = { version = "2.0.0-dev", path = "../../test-utils" } serde = { version = "1.0.101" } [features] diff --git a/frame/elections/Cargo.toml b/frame/elections/Cargo.toml index b7c98a65e15..eafdb2cc971 100644 --- a/frame/elections/Cargo.toml +++ b/frame/elections/Cargo.toml @@ -1,23 +1,25 @@ [package] name = "pallet-elections" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [dev-dependencies] hex-literal = "0.2.1" -pallet-balances = { version = "2.0.0", path = "../balances" } +pallet-balances = { version = "2.0.0-dev", path = "../balances" } [features] default = ["std"] diff --git a/frame/evm/Cargo.toml b/frame/evm/Cargo.toml index 66c809fa44c..202cc232385 100644 --- a/frame/evm/Cargo.toml +++ b/frame/evm/Cargo.toml @@ -1,21 +1,23 @@ [package] name = "pallet-evm" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } -pallet-timestamp = { version = "2.0.0", default-features = false, path = "../timestamp" } -pallet-balances = { version = "2.0.0", default-features = false, path = "../balances" } -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +pallet-timestamp = { version = "2.0.0-dev", default-features = false, path = "../timestamp" } +pallet-balances = { version = "2.0.0-dev", default-features = false, path = "../balances" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } primitive-types = { version = "0.6.2", default-features = false, features = ["rlp"] } rlp = { version = "0.4", default-features = false } evm = { version = "0.15", default-features = false } diff --git a/frame/example-offchain-worker/Cargo.toml b/frame/example-offchain-worker/Cargo.toml index ce858cacdab..4f4d797202f 100644 --- a/frame/example-offchain-worker/Cargo.toml +++ b/frame/example-offchain-worker/Cargo.toml @@ -1,18 +1,21 @@ [package] name = "pallet-example-offchain-worker" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" +license = "Unlicense" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } serde = { version = "1.0.101", optional = true } -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } serde_json = { version = "1.0.46", default-features = false, features = ["alloc"] } [features] diff --git a/frame/example/Cargo.toml b/frame/example/Cargo.toml index 0d37940fc73..07b0a992b2c 100644 --- a/frame/example/Cargo.toml +++ b/frame/example/Cargo.toml @@ -1,22 +1,24 @@ [package] name = "pallet-example" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" -license = "GPL-3.0" +license = "Unlicense" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } -pallet-balances = { version = "2.0.0", default-features = false, path = "../balances" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +pallet-balances = { version = "2.0.0-dev", default-features = false, path = "../balances" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } [dev-dependencies] -sp-core = { version = "2.0.0", path = "../../primitives/core" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/executive/Cargo.toml b/frame/executive/Cargo.toml index 514fb68d6db..0becc170a3c 100644 --- a/frame/executive/Cargo.toml +++ b/frame/executive/Cargo.toml @@ -1,25 +1,27 @@ [package] name = "frame-executive" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } serde = { version = "1.0.101", optional = true } -sp-io ={ path = "../../primitives/io", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } [dev-dependencies] hex-literal = "0.2.1" -sp-core = { version = "2.0.0", path = "../../primitives/core" } -pallet-indices = { version = "2.0.0", path = "../indices" } -pallet-balances = { version = "2.0.0", path = "../balances" } -pallet-transaction-payment = { version = "2.0.0", path = "../transaction-payment" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +pallet-indices = { version = "2.0.0-dev", path = "../indices" } +pallet-balances = { version = "2.0.0-dev", path = "../balances" } +pallet-transaction-payment = { version = "2.0.0-dev", path = "../transaction-payment" } [features] default = ["std"] diff --git a/frame/finality-tracker/Cargo.toml b/frame/finality-tracker/Cargo.toml index 7c87df4e548..e848c02a42d 100644 --- a/frame/finality-tracker/Cargo.toml +++ b/frame/finality-tracker/Cargo.toml @@ -1,24 +1,26 @@ [package] name = "pallet-finality-tracker" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-inherents = { version = "2.0.0", default-features = false, path = "../../primitives/inherents" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-finality-tracker = { version = "2.0.0", default-features = false, path = "../../primitives/finality-tracker" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-finality-tracker = { version = "2.0.0-dev", default-features = false, path = "../../primitives/finality-tracker" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } impl-trait-for-tuples = "0.1.3" [dev-dependencies] -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } [features] default = ["std"] diff --git a/frame/generic-asset/Cargo.toml b/frame/generic-asset/Cargo.toml index cd236d7b7d0..343267f89f3 100644 --- a/frame/generic-asset/Cargo.toml +++ b/frame/generic-asset/Cargo.toml @@ -1,21 +1,23 @@ [package] name = "pallet-generic-asset" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Centrality Developers "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [dev-dependencies] -sp-io ={ version = "2.0.0", path = "../../primitives/io" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } +sp-io ={ version = "2.0.0-dev", path = "../../primitives/io" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/grandpa/Cargo.toml b/frame/grandpa/Cargo.toml index e67e64dd5f3..95ed18b0ddc 100644 --- a/frame/grandpa/Cargo.toml +++ b/frame/grandpa/Cargo.toml @@ -1,25 +1,27 @@ [package] name = "pallet-grandpa" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } -sp-finality-grandpa = { version = "2.0.0", default-features = false, path = "../../primitives/finality-grandpa" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } -pallet-session = { version = "2.0.0", default-features = false, path = "../session" } -pallet-finality-tracker = { version = "2.0.0", default-features = false, path = "../finality-tracker" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-finality-grandpa = { version = "2.0.0-dev", default-features = false, path = "../../primitives/finality-grandpa" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-dev", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +pallet-session = { version = "2.0.0-dev", default-features = false, path = "../session" } +pallet-finality-tracker = { version = "2.0.0-dev", default-features = false, path = "../finality-tracker" } [dev-dependencies] -sp-io ={ version = "2.0.0", path = "../../primitives/io" } +sp-io ={ version = "2.0.0-dev", path = "../../primitives/io" } [features] default = ["std"] diff --git a/frame/identity/Cargo.toml b/frame/identity/Cargo.toml index c95d2302308..f275dba069e 100644 --- a/frame/identity/Cargo.toml +++ b/frame/identity/Cargo.toml @@ -1,24 +1,26 @@ [package] name = "pallet-identity" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } enumflags2 = { version = "0.6.2" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -frame-benchmarking = { version = "2.0.0", default-features = false, path = "../benchmarking" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +frame-benchmarking = { version = "2.0.0-dev", default-features = false, path = "../benchmarking" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0", path = "../balances" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-dev", path = "../balances" } [features] default = ["std"] diff --git a/frame/im-online/Cargo.toml b/frame/im-online/Cargo.toml index 46bff2dc358..d04b2f47a33 100644 --- a/frame/im-online/Cargo.toml +++ b/frame/im-online/Cargo.toml @@ -1,23 +1,25 @@ [package] name = "pallet-im-online" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0", default-features = false, path = "../../primitives/application-crypto" } -pallet-authorship = { version = "2.0.0", default-features = false, path = "../authorship" } +sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../../primitives/application-crypto" } +pallet-authorship = { version = "2.0.0-dev", default-features = false, path = "../authorship" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } -pallet-session = { version = "2.0.0", default-features = false, path = "../session" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +pallet-session = { version = "2.0.0-dev", default-features = false, path = "../session" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-dev", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [features] default = ["std", "pallet-session/historical"] diff --git a/frame/indices/Cargo.toml b/frame/indices/Cargo.toml index eb5298dcfa5..b02b96fc3bd 100644 --- a/frame/indices/Cargo.toml +++ b/frame/indices/Cargo.toml @@ -1,23 +1,25 @@ [package] name = "pallet-indices" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-keyring = { version = "2.0.0", optional = true, path = "../../primitives/keyring" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +sp-keyring = { version = "2.0.0-dev", optional = true, path = "../../primitives/keyring" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [dev-dependencies] -pallet-balances = { version = "2.0.0", path = "../balances" } +pallet-balances = { version = "2.0.0-dev", path = "../balances" } [features] default = ["std"] diff --git a/frame/membership/Cargo.toml b/frame/membership/Cargo.toml index 719718505e2..2e3356950b1 100644 --- a/frame/membership/Cargo.toml +++ b/frame/membership/Cargo.toml @@ -1,21 +1,23 @@ [package] name = "pallet-membership" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } [dev-dependencies] -sp-core = { version = "2.0.0", path = "../../primitives/core" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/metadata/Cargo.toml b/frame/metadata/Cargo.toml index e245f04849a..512898879ab 100644 --- a/frame/metadata/Cargo.toml +++ b/frame/metadata/Cargo.toml @@ -1,15 +1,17 @@ [package] name = "frame-metadata" -version = "11.0.0" +version = "11.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/nicks/Cargo.toml b/frame/nicks/Cargo.toml index 7c05080d491..eedbaccfe56 100644 --- a/frame/nicks/Cargo.toml +++ b/frame/nicks/Cargo.toml @@ -1,22 +1,24 @@ [package] name = "pallet-nicks" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0", path = "../balances" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-dev", path = "../balances" } [features] default = ["std"] diff --git a/frame/offences/Cargo.toml b/frame/offences/Cargo.toml index f5486f35ffd..1c244a74135 100644 --- a/frame/offences/Cargo.toml +++ b/frame/offences/Cargo.toml @@ -1,23 +1,25 @@ [package] name = "pallet-offences" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -pallet-balances = { version = "2.0.0", default-features = false, path = "../balances" } +pallet-balances = { version = "2.0.0-dev", default-features = false, path = "../balances" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-dev", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [dev-dependencies] -sp-io = { version = "2.0.0", path = "../../primitives/io" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } +sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/randomness-collective-flip/Cargo.toml b/frame/randomness-collective-flip/Cargo.toml index 56ff12d2dfe..d8bac86ab48 100644 --- a/frame/randomness-collective-flip/Cargo.toml +++ b/frame/randomness-collective-flip/Cargo.toml @@ -1,21 +1,23 @@ [package] name = "pallet-randomness-collective-flip" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] safe-mix = { version = "1.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } [dev-dependencies] -sp-core = { version = "2.0.0", path = "../../primitives/core" } -sp-io = { version = "2.0.0", path = "../../primitives/io" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } [features] default = ["std"] diff --git a/frame/recovery/Cargo.toml b/frame/recovery/Cargo.toml index 645b1f2e98a..13a74dcdcb2 100644 --- a/frame/recovery/Cargo.toml +++ b/frame/recovery/Cargo.toml @@ -1,23 +1,25 @@ [package] name = "pallet-recovery" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } enumflags2 = { version = "0.6.2" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0", path = "../balances" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-dev", path = "../balances" } [features] default = ["std"] diff --git a/frame/scored-pool/Cargo.toml b/frame/scored-pool/Cargo.toml index c0935cd88be..b8ee128df6b 100644 --- a/frame/scored-pool/Cargo.toml +++ b/frame/scored-pool/Cargo.toml @@ -1,22 +1,24 @@ [package] name = "pallet-scored-pool" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [dev-dependencies] -pallet-balances = { version = "2.0.0", path = "../balances" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-dev", path = "../balances" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/session/Cargo.toml b/frame/session/Cargo.toml index 06981240b15..bee544f99af 100644 --- a/frame/session/Cargo.toml +++ b/frame/session/Cargo.toml @@ -1,26 +1,28 @@ [package] name = "pallet-session" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } -pallet-timestamp = { version = "2.0.0", default-features = false, path = "../timestamp" } -sp-trie = { optional = true, path = "../../primitives/trie", default-features = false } -sp-io ={ path = "../../primitives/io", default-features = false } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-dev", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +pallet-timestamp = { version = "2.0.0-dev", default-features = false, path = "../timestamp" } +sp-trie = { optional = true, path = "../../primitives/trie", default-features = false , version = "2.0.0-dev"} +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} impl-trait-for-tuples = "0.1.3" [dev-dependencies] -sp-core = { version = "2.0.0", path = "../../primitives/core" } -sp-application-crypto = { version = "2.0.0", path = "../../primitives/application-crypto" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-application-crypto = { version = "2.0.0-dev", path = "../../primitives/application-crypto" } lazy_static = "1.4.0" [features] diff --git a/frame/society/Cargo.toml b/frame/society/Cargo.toml index ac140c97142..248820b522b 100644 --- a/frame/society/Cargo.toml +++ b/frame/society/Cargo.toml @@ -1,23 +1,25 @@ [package] name = "pallet-society" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-io ={ path = "../../primitives/io", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } rand_chacha = { version = "0.2", default-features = false } [dev-dependencies] -sp-core = { version = "2.0.0", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0", path = "../balances" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-dev", path = "../balances" } [features] default = ["std"] diff --git a/frame/staking/Cargo.toml b/frame/staking/Cargo.toml index a38cc0416b7..7eb7772054c 100644 --- a/frame/staking/Cargo.toml +++ b/frame/staking/Cargo.toml @@ -1,30 +1,32 @@ [package] name = "pallet-staking" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-keyring = { version = "2.0.0", optional = true, path = "../../primitives/keyring" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-phragmen = { version = "2.0.0", default-features = false, path = "../../primitives/phragmen" } -sp-io ={ path = "../../primitives/io", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } -pallet-session = { version = "2.0.0", features = ["historical"], path = "../session", default-features = false } -pallet-authorship = { version = "2.0.0", default-features = false, path = "../authorship" } +sp-keyring = { version = "2.0.0-dev", optional = true, path = "../../primitives/keyring" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-phragmen = { version = "2.0.0-dev", default-features = false, path = "../../primitives/phragmen" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-dev", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +pallet-session = { version = "2.0.0-dev", features = ["historical"], path = "../session", default-features = false } +pallet-authorship = { version = "2.0.0-dev", default-features = false, path = "../authorship" } [dev-dependencies] -sp-core = { version = "2.0.0", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0", path = "../balances" } -pallet-timestamp = { version = "2.0.0", path = "../timestamp" } -pallet-staking-reward-curve = { version = "2.0.0", path = "../staking/reward-curve" } -substrate-test-utils = { version = "2.0.0", path = "../../test-utils" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-dev", path = "../balances" } +pallet-timestamp = { version = "2.0.0-dev", path = "../timestamp" } +pallet-staking-reward-curve = { version = "2.0.0-dev", path = "../staking/reward-curve" } +substrate-test-utils = { version = "2.0.0-dev", path = "../../test-utils" } [features] migrate = [] diff --git a/frame/staking/reward-curve/Cargo.toml b/frame/staking/reward-curve/Cargo.toml index 0753400596e..95567f167fa 100644 --- a/frame/staking/reward-curve/Cargo.toml +++ b/frame/staking/reward-curve/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "pallet-staking-reward-curve" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [lib] proc-macro = true @@ -15,4 +17,4 @@ proc-macro2 = "1.0.6" proc-macro-crate = "0.1.4" [dev-dependencies] -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } diff --git a/frame/sudo/Cargo.toml b/frame/sudo/Cargo.toml index ac91129c574..979d58ee4e0 100644 --- a/frame/sudo/Cargo.toml +++ b/frame/sudo/Cargo.toml @@ -1,21 +1,23 @@ [package] name = "pallet-sudo" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0", path = "../../primitives/core" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/support/Cargo.toml b/frame/support/Cargo.toml index b20f5c73bfd..08c81ba5efc 100644 --- a/frame/support/Cargo.toml +++ b/frame/support/Cargo.toml @@ -1,32 +1,34 @@ [package] name = "frame-support" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] log = "0.4" serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] } -frame-metadata = { version = "11.0.0", default-features = false, path = "../metadata" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io ={ path = "../../primitives/io", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } -sp-arithmetic = { version = "2.0.0", default-features = false, path = "../../primitives/arithmetic" } -sp-inherents = { version = "2.0.0", default-features = false, path = "../../primitives/inherents" } -frame-support-procedural = { version = "2.0.0", path = "./procedural" } +frame-metadata = { version = "11.0.0-dev", default-features = false, path = "../metadata" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-arithmetic = { version = "2.0.0-dev", default-features = false, path = "../../primitives/arithmetic" } +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } +frame-support-procedural = { version = "2.0.0-dev", path = "./procedural" } paste = "0.1.6" once_cell = { version = "1", default-features = false, optional = true } -sp-state-machine = { version = "0.8", optional = true, path = "../../primitives/state-machine" } +sp-state-machine = { version = "0.8.0-dev", optional = true, path = "../../primitives/state-machine" } bitmask = { version = "0.5.0", default-features = false } impl-trait-for-tuples = "0.1.3" tracing = { version = "0.1.10", optional = true } [dev-dependencies] pretty_assertions = "0.6.1" -frame-system = { version = "2.0.0", path = "../system" } +frame-system = { version = "2.0.0-dev", path = "../system" } [features] default = ["std"] diff --git a/frame/support/procedural/Cargo.toml b/frame/support/procedural/Cargo.toml index 06a84750b58..965f964b2d5 100644 --- a/frame/support/procedural/Cargo.toml +++ b/frame/support/procedural/Cargo.toml @@ -1,15 +1,17 @@ [package] name = "frame-support-procedural" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [lib] proc-macro = true [dependencies] -frame-support-procedural-tools = { version = "2.0.0", path = "./tools" } +frame-support-procedural-tools = { version = "2.0.0-dev", path = "./tools" } proc-macro2 = "1.0.6" quote = "1.0.2" syn = { version = "1.0.7", features = ["full"] } diff --git a/frame/support/procedural/tools/Cargo.toml b/frame/support/procedural/tools/Cargo.toml index 4a1301e7126..c1f56fecc7b 100644 --- a/frame/support/procedural/tools/Cargo.toml +++ b/frame/support/procedural/tools/Cargo.toml @@ -1,12 +1,14 @@ [package] name = "frame-support-procedural-tools" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -frame-support-procedural-tools-derive = { version = "2.0.0", path = "./derive" } +frame-support-procedural-tools-derive = { version = "2.0.0-dev", path = "./derive" } proc-macro2 = "1.0.6" quote = "1.0.2" syn = { version = "1.0.7", features = ["full", "visit"] } diff --git a/frame/support/procedural/tools/derive/Cargo.toml b/frame/support/procedural/tools/derive/Cargo.toml index e65a7e0e5ff..6eee6d3186f 100644 --- a/frame/support/procedural/tools/derive/Cargo.toml +++ b/frame/support/procedural/tools/derive/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "frame-support-procedural-tools-derive" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [lib] proc-macro = true diff --git a/frame/support/test/Cargo.toml b/frame/support/test/Cargo.toml index 71d3893426f..df66918a2e8 100644 --- a/frame/support/test/Cargo.toml +++ b/frame/support/test/Cargo.toml @@ -1,19 +1,22 @@ [package] name = "frame-support-test" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +publish = false +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-io ={ path = "../../../primitives/io", default-features = false } -sp-state-machine = { version = "0.8", optional = true, path = "../../../primitives/state-machine" } -frame-support = { version = "2.0.0", default-features = false, path = "../" } -sp-inherents = { version = "2.0.0", default-features = false, path = "../../../primitives/inherents" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../../primitives/runtime" } -sp-core = { version = "2.0.0", default-features = false, path = "../../../primitives/core" } +sp-io ={ path = "../../../primitives/io", default-features = false , version = "2.0.0-dev"} +sp-state-machine = { version = "0.8.0-dev", optional = true, path = "../../../primitives/state-machine" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../" } +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/inherents" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/runtime" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/core" } trybuild = "1.0.17" pretty_assertions = "0.6.1" diff --git a/frame/system/Cargo.toml b/frame/system/Cargo.toml index 631d8eecb47..0c779e5d34e 100644 --- a/frame/system/Cargo.toml +++ b/frame/system/Cargo.toml @@ -1,25 +1,27 @@ [package] name = "frame-system" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io ={ path = "../../primitives/io", default-features = false } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-version = { version = "2.0.0", default-features = false, path = "../../primitives/version" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-version = { version = "2.0.0-dev", default-features = false, path = "../../primitives/version" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } impl-trait-for-tuples = "0.1.3" [dev-dependencies] criterion = "0.2.11" -sp-externalities = { version = "0.8.0", path = "../../primitives/externalities" } -substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" } +sp-externalities = { version = "0.8.0-dev", path = "../../primitives/externalities" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } [features] default = ["std"] diff --git a/frame/system/rpc/runtime-api/Cargo.toml b/frame/system/rpc/runtime-api/Cargo.toml index 62440323768..1d1ed8da47e 100644 --- a/frame/system/rpc/runtime-api/Cargo.toml +++ b/frame/system/rpc/runtime-api/Cargo.toml @@ -1,12 +1,14 @@ [package] name = "frame-system-rpc-runtime-api" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0", default-features = false, path = "../../../../primitives/api" } +sp-api = { version = "2.0.0-dev", default-features = false, path = "../../../../primitives/api" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } [features] diff --git a/frame/timestamp/Cargo.toml b/frame/timestamp/Cargo.toml index 107374799d3..136036b3074 100644 --- a/frame/timestamp/Cargo.toml +++ b/frame/timestamp/Cargo.toml @@ -1,26 +1,28 @@ [package] name = "pallet-timestamp" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-inherents = { version = "2.0.0", default-features = false, path = "../../primitives/inherents" } -frame-benchmarking = { version = "2.0.0", default-features = false, path = "../benchmarking" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } -sp-timestamp = { version = "2.0.0", default-features = false, path = "../../primitives/timestamp" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } +frame-benchmarking = { version = "2.0.0-dev", default-features = false, path = "../benchmarking" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../primitives/timestamp" } impl-trait-for-tuples = "0.1.3" [dev-dependencies] -sp-io ={ version = "2.0.0", path = "../../primitives/io" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } +sp-io ={ version = "2.0.0-dev", path = "../../primitives/io" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/transaction-payment/Cargo.toml b/frame/transaction-payment/Cargo.toml index ac3dbb2c2b1..f989a7e3395 100644 --- a/frame/transaction-payment/Cargo.toml +++ b/frame/transaction-payment/Cargo.toml @@ -1,22 +1,24 @@ [package] name = "pallet-transaction-payment" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } -pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0", default-features = false, path = "./rpc/runtime-api" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-dev", default-features = false, path = "./rpc/runtime-api" } [dev-dependencies] -sp-io = { version = "2.0.0", path = "../../primitives/io" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0", path = "../balances" } +sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-dev", path = "../balances" } [features] default = ["std"] diff --git a/frame/transaction-payment/rpc/Cargo.toml b/frame/transaction-payment/rpc/Cargo.toml index 5fb5f5e2745..c8f3aa2776b 100644 --- a/frame/transaction-payment/rpc/Cargo.toml +++ b/frame/transaction-payment/rpc/Cargo.toml @@ -1,19 +1,21 @@ [package] name = "pallet-transaction-payment-rpc" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0" } jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -sp-rpc = { version = "2.0.0", path = "../../../primitives/rpc" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-rpc = { version = "2.0.0-dev", path = "../../../primitives/rpc" } serde = { version = "1.0.101", features = ["derive"] } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -sp-api = { version = "2.0.0", path = "../../../primitives/api" } -sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } -pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0", path = "./runtime-api" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } +sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } +pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-dev", path = "./runtime-api" } diff --git a/frame/transaction-payment/rpc/runtime-api/Cargo.toml b/frame/transaction-payment/rpc/runtime-api/Cargo.toml index 8ee16a90dc3..f42ffabbefe 100644 --- a/frame/transaction-payment/rpc/runtime-api/Cargo.toml +++ b/frame/transaction-payment/rpc/runtime-api/Cargo.toml @@ -1,17 +1,19 @@ [package] name = "pallet-transaction-payment-rpc-runtime-api" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-api = { version = "2.0.0", default-features = false, path = "../../../../primitives/api" } +sp-api = { version = "2.0.0-dev", default-features = false, path = "../../../../primitives/api" } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../../../../primitives/std" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../../../primitives/runtime" } -frame-support = { version = "2.0.0", default-features = false, path = "../../../support" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../../../primitives/std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../../../primitives/runtime" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../../../support" } [dev-dependencies] serde_json = "1.0.41" diff --git a/frame/treasury/Cargo.toml b/frame/treasury/Cargo.toml index 10226f3572b..cac17bd8ad6 100644 --- a/frame/treasury/Cargo.toml +++ b/frame/treasury/Cargo.toml @@ -1,22 +1,24 @@ [package] name = "pallet-treasury" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } -pallet-balances = { version = "2.0.0", default-features = false, path = "../balances" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +pallet-balances = { version = "2.0.0-dev", default-features = false, path = "../balances" } [dev-dependencies] -sp-io ={ version = "2.0.0", path = "../../primitives/io" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } +sp-io ={ version = "2.0.0-dev", path = "../../primitives/io" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/utility/Cargo.toml b/frame/utility/Cargo.toml index 6d1187b0eea..3514a397394 100644 --- a/frame/utility/Cargo.toml +++ b/frame/utility/Cargo.toml @@ -1,23 +1,25 @@ [package] name = "pallet-utility" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } [dev-dependencies] -sp-core = { version = "2.0.0", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0", path = "../balances" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-dev", path = "../balances" } [features] default = ["std"] diff --git a/frame/vesting/Cargo.toml b/frame/vesting/Cargo.toml index 6923297af56..f1bf0812deb 100644 --- a/frame/vesting/Cargo.toml +++ b/frame/vesting/Cargo.toml @@ -1,23 +1,26 @@ [package] name = "pallet-vesting" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" +license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } enumflags2 = { version = "0.6.2" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0", default-features = false, path = "../support" } -frame-system = { version = "2.0.0", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0", path = "../balances" } -sp-storage = { version = "2.0.0", path = "../../primitives/storage" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-dev", path = "../balances" } +sp-storage = { version = "2.0.0-dev", path = "../../primitives/storage" } hex-literal = "0.2.1" [features] diff --git a/primitives/allocator/Cargo.toml b/primitives/allocator/Cargo.toml index 3cfc9a4de61..c122931850b 100644 --- a/primitives/allocator/Cargo.toml +++ b/primitives/allocator/Cargo.toml @@ -1,14 +1,16 @@ [package] name = "sp-allocator" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-std = { version = "2.0.0", path = "../std", default-features = false } -sp-core = { version = "2.0.0", path = "../core", default-features = false } -sp-wasm-interface = { version = "2.0.0", path = "../wasm-interface", default-features = false } +sp-std = { version = "2.0.0-dev", path = "../std", default-features = false } +sp-core = { version = "2.0.0-dev", path = "../core", default-features = false } +sp-wasm-interface = { version = "2.0.0-dev", path = "../wasm-interface", default-features = false } log = { version = "0.4.8", optional = true } derive_more = { version = "0.99.2", optional = true } diff --git a/primitives/api/Cargo.toml b/primitives/api/Cargo.toml index f6966f94622..503dedc34d8 100644 --- a/primitives/api/Cargo.toml +++ b/primitives/api/Cargo.toml @@ -1,22 +1,24 @@ [package] name = "sp-api" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-api-proc-macro = { version = "2.0.0", path = "proc-macro" } -sp-core = { version = "2.0.0", default-features = false, path = "../core" } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } -sp-version = { version = "2.0.0", default-features = false, path = "../version" } -sp-state-machine = { version = "0.8", optional = true, path = "../../primitives/state-machine" } +sp-api-proc-macro = { version = "2.0.0-dev", path = "proc-macro" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } +sp-version = { version = "2.0.0-dev", default-features = false, path = "../version" } +sp-state-machine = { version = "0.8.0-dev", optional = true, path = "../../primitives/state-machine" } hash-db = { version = "0.15.2", optional = true } [dev-dependencies] -sp-test-primitives = { version = "2.0.0", path = "../test-primitives" } +sp-test-primitives = { version = "2.0.0-dev", path = "../test-primitives" } [features] default = [ "std" ] diff --git a/primitives/api/proc-macro/Cargo.toml b/primitives/api/proc-macro/Cargo.toml index 66c2c5dba82..f9a56842ad6 100644 --- a/primitives/api/proc-macro/Cargo.toml +++ b/primitives/api/proc-macro/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "sp-api-proc-macro" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [lib] proc-macro = true diff --git a/primitives/api/test/Cargo.toml b/primitives/api/test/Cargo.toml index c193c9dc5ef..f94f97d2e7a 100644 --- a/primitives/api/test/Cargo.toml +++ b/primitives/api/test/Cargo.toml @@ -1,25 +1,28 @@ [package] name = "sp-api-test" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +publish = false +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0", path = "../" } -substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" } -sp-version = { version = "2.0.0", path = "../../version" } -sp-runtime = { version = "2.0.0", path = "../../runtime" } -sp-blockchain = { version = "2.0.0", path = "../../blockchain" } -sp-consensus = { version = "0.8", path = "../../../primitives/consensus/common" } +sp-api = { version = "2.0.0-dev", path = "../" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } +sp-version = { version = "2.0.0-dev", path = "../../version" } +sp-runtime = { version = "2.0.0-dev", path = "../../runtime" } +sp-blockchain = { version = "2.0.0-dev", path = "../../blockchain" } +sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-state-machine = { version = "0.8", path = "../../../primitives/state-machine" } +sp-state-machine = { version = "0.8.0-dev", path = "../../../primitives/state-machine" } trybuild = "1.0.17" rustversion = "1.0.0" [dev-dependencies] criterion = "0.3.0" -substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } [[bench]] name = "bench" diff --git a/primitives/application-crypto/Cargo.toml b/primitives/application-crypto/Cargo.toml index 1fa9a6631c4..4459389dc6a 100644 --- a/primitives/application-crypto/Cargo.toml +++ b/primitives/application-crypto/Cargo.toml @@ -1,17 +1,19 @@ [package] name = "sp-application-crypto" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" description = "Provides facilities for generating application specific crypto wrapper types." license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-core = { version = "2.0.0", default-features = false, path = "../core" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } [features] default = [ "std" ] diff --git a/primitives/application-crypto/test/Cargo.toml b/primitives/application-crypto/test/Cargo.toml index de4412db2d7..cc2fd0abd27 100644 --- a/primitives/application-crypto/test/Cargo.toml +++ b/primitives/application-crypto/test/Cargo.toml @@ -1,15 +1,17 @@ [package] name = "sp-application-crypto-test" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" description = "Integration tests for application-crypto" license = "GPL-3.0" publish = false +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-core = { version = "2.0.0", default-features = false, path = "../../core" } -substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" } -sp-runtime = { version = "2.0.0", path = "../../runtime" } -sp-api = { version = "2.0.0", path = "../../api" } -sp-application-crypto = { version = "2.0.0", path = "../" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../core" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } +sp-runtime = { version = "2.0.0-dev", path = "../../runtime" } +sp-api = { version = "2.0.0-dev", path = "../../api" } +sp-application-crypto = { version = "2.0.0-dev", path = "../" } diff --git a/primitives/arithmetic/Cargo.toml b/primitives/arithmetic/Cargo.toml index 995e36d5c90..f327d091f63 100644 --- a/primitives/arithmetic/Cargo.toml +++ b/primitives/arithmetic/Cargo.toml @@ -1,17 +1,19 @@ [package] name = "sp-arithmetic" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } integer-sqrt = "0.1.2" num-traits = { version = "0.2.8", default-features = false } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-debug-derive = { version = "2.0.0", default-features = false, path = "../../primitives/debug-derive" } +sp-debug-derive = { version = "2.0.0-dev", default-features = false, path = "../../primitives/debug-derive" } [dev-dependencies] primitive-types = "0.6.2" diff --git a/primitives/authority-discovery/Cargo.toml b/primitives/authority-discovery/Cargo.toml index 44a7cad1555..765f3a14c4d 100644 --- a/primitives/authority-discovery/Cargo.toml +++ b/primitives/authority-discovery/Cargo.toml @@ -1,17 +1,19 @@ [package] name = "sp-authority-discovery" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] description = "Authority discovery primitives" edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0", default-features = false, path = "../application-crypto" } +sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../application-crypto" } codec = { package = "parity-scale-codec", default-features = false, version = "1.0.3" } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } -sp-api = { version = "2.0.0", default-features = false, path = "../api" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-api = { version = "2.0.0-dev", default-features = false, path = "../api" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } [features] default = ["std"] diff --git a/primitives/authorship/Cargo.toml b/primitives/authorship/Cargo.toml index 7dc5fcfc95f..8bf4e935a20 100644 --- a/primitives/authorship/Cargo.toml +++ b/primitives/authorship/Cargo.toml @@ -1,15 +1,17 @@ [package] name = "sp-authorship" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] description = "Authorship primitives" edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-inherents = { version = "2.0.0", default-features = false, path = "../inherents" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../inherents" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } [features] diff --git a/primitives/block-builder/Cargo.toml b/primitives/block-builder/Cargo.toml index 1700209ec46..c8f6c864498 100644 --- a/primitives/block-builder/Cargo.toml +++ b/primitives/block-builder/Cargo.toml @@ -1,16 +1,18 @@ [package] name = "sp-block-builder" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } -sp-api = { version = "2.0.0", default-features = false, path = "../api" } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } +sp-api = { version = "2.0.0-dev", default-features = false, path = "../api" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false } -sp-inherents = { version = "2.0.0", default-features = false, path = "../inherents" } +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../inherents" } [features] default = [ "std" ] diff --git a/primitives/blockchain/Cargo.toml b/primitives/blockchain/Cargo.toml index 8b93436f9a3..afaca88fe56 100644 --- a/primitives/blockchain/Cargo.toml +++ b/primitives/blockchain/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "sp-blockchain" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] log = "0.4.8" @@ -11,7 +13,7 @@ lru = "0.4.0" parking_lot = "0.10.0" derive_more = "0.99.2" codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-consensus = { version = "0.8", path = "../consensus/common" } -sp-runtime = { version = "2.0.0", path = "../runtime" } -sp-block-builder = { version = "2.0.0", path = "../block-builder" } -sp-state-machine = { version = "0.8", path = "../state-machine" } +sp-consensus = { version = "0.8.0-dev", path = "../consensus/common" } +sp-runtime = { version = "2.0.0-dev", path = "../runtime" } +sp-block-builder = { version = "2.0.0-dev", path = "../block-builder" } +sp-state-machine = { version = "0.8.0-dev", path = "../state-machine" } diff --git a/primitives/consensus/aura/Cargo.toml b/primitives/consensus/aura/Cargo.toml index 6e05bf4aac4..55311ccf7e0 100644 --- a/primitives/consensus/aura/Cargo.toml +++ b/primitives/consensus/aura/Cargo.toml @@ -1,19 +1,21 @@ [package] name = "sp-consensus-aura" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] description = "Primitives for Aura consensus" edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0", default-features = false, path = "../../application-crypto" } +sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../../application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-std = { version = "2.0.0", default-features = false, path = "../../std" } -sp-api = { version = "2.0.0", default-features = false, path = "../../api" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../runtime" } -sp-inherents = { version = "2.0.0", default-features = false, path = "../../inherents" } -sp-timestamp = { version = "2.0.0", default-features = false, path = "../../timestamp" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../std" } +sp-api = { version = "2.0.0-dev", default-features = false, path = "../../api" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../runtime" } +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../inherents" } +sp-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../timestamp" } [features] default = ["std"] diff --git a/primitives/consensus/babe/Cargo.toml b/primitives/consensus/babe/Cargo.toml index 7f0277a7202..e0941f58c73 100644 --- a/primitives/consensus/babe/Cargo.toml +++ b/primitives/consensus/babe/Cargo.toml @@ -1,21 +1,23 @@ [package] name = "sp-consensus-babe" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] description = "Primitives for BABE consensus" edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0", default-features = false, path = "../../application-crypto" } +sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../../application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-std = { version = "2.0.0", default-features = false, path = "../../std" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../std" } schnorrkel = { version = "0.8.5", features = ["preaudit_deprecated"], optional = true } -sp-api = { version = "2.0.0", default-features = false, path = "../../api" } -sp-consensus = { version = "0.8", optional = true, path = "../common" } -sp-inherents = { version = "2.0.0", default-features = false, path = "../../inherents" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../runtime" } -sp-timestamp = { version = "2.0.0", default-features = false, path = "../../timestamp" } +sp-api = { version = "2.0.0-dev", default-features = false, path = "../../api" } +sp-consensus = { version = "0.8.0-dev", optional = true, path = "../common" } +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../inherents" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../runtime" } +sp-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../timestamp" } [features] default = ["std"] diff --git a/primitives/consensus/common/Cargo.toml b/primitives/consensus/common/Cargo.toml index 5af55ad46d9..56901983fd2 100644 --- a/primitives/consensus/common/Cargo.toml +++ b/primitives/consensus/common/Cargo.toml @@ -1,30 +1,32 @@ [package] name = "sp-consensus" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] description = "Common utilities for substrate consensus" edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] derive_more = "0.99.2" libp2p = { version = "0.16.1", default-features = false } log = "0.4.8" -sp-core = { path= "../../core" } -sp-inherents = { version = "2.0.0", path = "../../inherents" } -sp-state-machine = { version = "0.8.0", path = "../../../primitives/state-machine" } +sp-core = { path= "../../core" , version = "2.0.0-dev"} +sp-inherents = { version = "2.0.0-dev", path = "../../inherents" } +sp-state-machine = { version = "0.8.0-dev", path = "../../../primitives/state-machine" } futures = { version = "0.3.1", features = ["thread-pool"] } futures-timer = "3.0.1" futures-diagnose = "1.0" -sp-std = { version = "2.0.0", path = "../../std" } -sp-version = { version = "2.0.0", path = "../../version" } -sp-runtime = { version = "2.0.0", path = "../../runtime" } +sp-std = { version = "2.0.0-dev", path = "../../std" } +sp-version = { version = "2.0.0-dev", path = "../../version" } +sp-runtime = { version = "2.0.0-dev", path = "../../runtime" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } parking_lot = "0.10.0" serde = { version = "1.0", features = ["derive"] } [dev-dependencies] -sp-test-primitives = { version = "2.0.0", path = "../../test-primitives" } +sp-test-primitives = { version = "2.0.0-dev", path = "../../test-primitives" } [features] default = [] diff --git a/primitives/consensus/pow/Cargo.toml b/primitives/consensus/pow/Cargo.toml index 8e964e0c184..25b7f01a80e 100644 --- a/primitives/consensus/pow/Cargo.toml +++ b/primitives/consensus/pow/Cargo.toml @@ -1,16 +1,18 @@ [package] name = "sp-consensus-pow" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] description = "Primitives for Aura consensus" edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0", default-features = false, path = "../../api" } -sp-std = { version = "2.0.0", default-features = false, path = "../../std" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../runtime" } -sp-core = { version = "2.0.0", default-features = false, path = "../../core" } +sp-api = { version = "2.0.0-dev", default-features = false, path = "../../api" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../runtime" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../core" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } [features] diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index 0d28fe139a9..1241c277dde 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -1,12 +1,14 @@ [package] name = "sp-core" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-std = { version = "2.0.0", default-features = false, path = "../std" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } rustc-hex = { version = "2.0.1", default-features = false } log = { version = "0.4.8", default-features = false } @@ -26,9 +28,9 @@ num-traits = { version = "0.2.8", default-features = false } zeroize = { version = "1.0.0", default-features = false } lazy_static = { version = "1.4.0", default-features = false, optional = true } parking_lot = { version = "0.10.0", optional = true } -sp-debug-derive = { version = "2.0.0", path = "../debug-derive" } -sp-externalities = { version = "0.8.0", optional = true, path = "../externalities" } -sp-storage = { version = "2.0.0", default-features = false, path = "../storage" } +sp-debug-derive = { version = "2.0.0-dev", path = "../debug-derive" } +sp-externalities = { version = "0.8.0-dev", optional = true, path = "../externalities" } +sp-storage = { version = "2.0.0-dev", default-features = false, path = "../storage" } libsecp256k1 = { version = "0.3.2", default-features = false, features = ["hmac"] } parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } @@ -41,10 +43,10 @@ sha2 = { version = "0.8.0", default-features = false, optional = true } hex = { version = "0.4", default-features = false, optional = true } twox-hash = { version = "1.5.0", default-features = false, optional = true } -sp-runtime-interface = { version = "2.0.0", default-features = false, path = "../runtime-interface" } +sp-runtime-interface = { version = "2.0.0-dev", default-features = false, path = "../runtime-interface" } [dev-dependencies] -sp-serializer = { version = "2.0.0", path = "../serializer" } +sp-serializer = { version = "2.0.0-dev", path = "../serializer" } pretty_assertions = "0.6.1" hex-literal = "0.2.1" rand = "0.7.2" diff --git a/primitives/debug-derive/Cargo.toml b/primitives/debug-derive/Cargo.toml index 9b12bfb2059..248b5d449d3 100644 --- a/primitives/debug-derive/Cargo.toml +++ b/primitives/debug-derive/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "sp-debug-derive" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [lib] proc-macro = true diff --git a/primitives/externalities/Cargo.toml b/primitives/externalities/Cargo.toml index 23889da4ea2..7a8f20a048f 100644 --- a/primitives/externalities/Cargo.toml +++ b/primitives/externalities/Cargo.toml @@ -1,11 +1,13 @@ [package] name = "sp-externalities" -version = "0.8.0" +version = "0.8.0-dev" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-storage = { version = "2.0.0", path = "../storage" } -sp-std = { version = "2.0.0", path = "../std" } +sp-storage = { version = "2.0.0-dev", path = "../storage" } +sp-std = { version = "2.0.0-dev", path = "../std" } environmental = { version = "1.1.1" } diff --git a/primitives/finality-grandpa/Cargo.toml b/primitives/finality-grandpa/Cargo.toml index 6356ec82e53..62ac64eb0cd 100644 --- a/primitives/finality-grandpa/Cargo.toml +++ b/primitives/finality-grandpa/Cargo.toml @@ -1,17 +1,19 @@ [package] name = "sp-finality-grandpa" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0", default-features = false, path = "../application-crypto" } +sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-api = { version = "2.0.0", default-features = false, path = "../api" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } +sp-api = { version = "2.0.0-dev", default-features = false, path = "../api" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } [features] default = ["std"] diff --git a/primitives/finality-tracker/Cargo.toml b/primitives/finality-tracker/Cargo.toml index 1b0e81da917..99e471cac1b 100644 --- a/primitives/finality-tracker/Cargo.toml +++ b/primitives/finality-tracker/Cargo.toml @@ -1,14 +1,16 @@ [package] name = "sp-finality-tracker" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-inherents = { version = "2.0.0", default-features = false, path = "../../primitives/inherents" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } [features] default = ["std"] diff --git a/primitives/inherents/Cargo.toml b/primitives/inherents/Cargo.toml index 698ab5389a5..bd315c33cdb 100644 --- a/primitives/inherents/Cargo.toml +++ b/primitives/inherents/Cargo.toml @@ -1,14 +1,16 @@ [package] name = "sp-inherents" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] parking_lot = { version = "0.10.0", optional = true } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } -sp-core = { version = "2.0.0", default-features = false, path = "../core" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] } derive_more = { version = "0.99.2", optional = true } diff --git a/primitives/io/Cargo.toml b/primitives/io/Cargo.toml index f494697b4b5..7d61398b81e 100644 --- a/primitives/io/Cargo.toml +++ b/primitives/io/Cargo.toml @@ -1,21 +1,23 @@ [package] name = "sp-io" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false } hash-db = { version = "0.15.2", default-features = false } -sp-core = { version = "2.0.0", default-features = false, path = "../core" } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } libsecp256k1 = { version = "0.3.4", optional = true } -sp-state-machine = { version = "0.8", optional = true, path = "../../primitives/state-machine" } -sp-wasm-interface = { version = "2.0.0", path = "../../primitives/wasm-interface", default-features = false } -sp-runtime-interface = { version = "2.0.0", default-features = false, path = "../runtime-interface" } -sp-trie = { version = "2.0.0", optional = true, path = "../../primitives/trie" } -sp-externalities = { version = "0.8.0", optional = true, path = "../externalities" } +sp-state-machine = { version = "0.8.0-dev", optional = true, path = "../../primitives/state-machine" } +sp-wasm-interface = { version = "2.0.0-dev", path = "../../primitives/wasm-interface", default-features = false } +sp-runtime-interface = { version = "2.0.0-dev", default-features = false, path = "../runtime-interface" } +sp-trie = { version = "2.0.0-dev", optional = true, path = "../../primitives/trie" } +sp-externalities = { version = "0.8.0-dev", optional = true, path = "../externalities" } log = { version = "0.4.8", optional = true } [features] diff --git a/primitives/keyring/Cargo.toml b/primitives/keyring/Cargo.toml index e2603a02623..d712fcdf8eb 100644 --- a/primitives/keyring/Cargo.toml +++ b/primitives/keyring/Cargo.toml @@ -1,12 +1,14 @@ [package] name = "sp-keyring" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-core = { version = "2.0.0", path = "../core" } -sp-runtime = { version = "2.0.0", path = "../runtime" } +sp-core = { version = "2.0.0-dev", path = "../core" } +sp-runtime = { version = "2.0.0-dev", path = "../runtime" } lazy_static = "1.4.0" strum = { version = "0.16.0", features = ["derive"] } diff --git a/primitives/offchain/Cargo.toml b/primitives/offchain/Cargo.toml index ef6d0a6d2c7..70e1cffacfe 100644 --- a/primitives/offchain/Cargo.toml +++ b/primitives/offchain/Cargo.toml @@ -1,14 +1,16 @@ [package] description = "Substrate offchain workers primitives" name = "sp-offchain" -version = "2.0.0" +version = "2.0.0-dev" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0", default-features = false, path = "../api" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } +sp-api = { version = "2.0.0-dev", default-features = false, path = "../api" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } [features] default = ["std"] diff --git a/primitives/panic-handler/Cargo.toml b/primitives/panic-handler/Cargo.toml index 0fb6e3b173e..d29f2238e74 100644 --- a/primitives/panic-handler/Cargo.toml +++ b/primitives/panic-handler/Cargo.toml @@ -1,10 +1,12 @@ [package] name = "sp-panic-handler" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] description = "Substrate panic handler." edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] backtrace = "0.3.38" diff --git a/primitives/phragmen/Cargo.toml b/primitives/phragmen/Cargo.toml index 3bfff32d2a4..28f4cce9018 100644 --- a/primitives/phragmen/Cargo.toml +++ b/primitives/phragmen/Cargo.toml @@ -1,18 +1,20 @@ [package] name = "sp-phragmen" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } [dev-dependencies] -substrate-test-utils = { version = "2.0.0", path = "../../test-utils" } -sp-io ={ version = "2.0.0", path = "../../primitives/io" } +substrate-test-utils = { version = "2.0.0-dev", path = "../../test-utils" } +sp-io ={ version = "2.0.0-dev", path = "../../primitives/io" } rand = "0.7.2" [features] diff --git a/primitives/rpc/Cargo.toml b/primitives/rpc/Cargo.toml index 448f8b8c9cd..1f464e81a8f 100644 --- a/primitives/rpc/Cargo.toml +++ b/primitives/rpc/Cargo.toml @@ -1,13 +1,15 @@ [package] name = "sp-rpc" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", features = ["derive"] } -sp-core = { version = "2.0.0", path = "../core" } +sp-core = { version = "2.0.0-dev", path = "../core" } [dev-dependencies] serde_json = "1.0.41" diff --git a/primitives/runtime-interface/Cargo.toml b/primitives/runtime-interface/Cargo.toml index cef3acdbfbb..b1547fe6520 100644 --- a/primitives/runtime-interface/Cargo.toml +++ b/primitives/runtime-interface/Cargo.toml @@ -1,24 +1,26 @@ [package] name = "sp-runtime-interface" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-wasm-interface = { version = "2.0.0", path = "../wasm-interface", default-features = false } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } -sp-runtime-interface-proc-macro = { version = "2.0.0", path = "proc-macro" } -sp-externalities = { version = "0.8.0", optional = true, path = "../externalities" } +sp-wasm-interface = { version = "2.0.0-dev", path = "../wasm-interface", default-features = false } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-runtime-interface-proc-macro = { version = "2.0.0-dev", path = "proc-macro" } +sp-externalities = { version = "0.8.0-dev", optional = true, path = "../externalities" } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false } static_assertions = "1.0.0" primitive-types = { version = "0.6.2", default-features = false } [dev-dependencies] -sp-runtime-interface-test-wasm = { version = "2.0.0", path = "test-wasm" } -sp-state-machine = { version = "0.8", path = "../../primitives/state-machine" } -sp-core = { version = "2.0.0", path = "../core" } -sp-io = { version = "2.0.0", path = "../io" } +sp-runtime-interface-test-wasm = { version = "2.0.0-dev", path = "test-wasm" } +sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } +sp-core = { version = "2.0.0-dev", path = "../core" } +sp-io = { version = "2.0.0-dev", path = "../io" } rustversion = "1.0.0" trybuild = "1.0.17" diff --git a/primitives/runtime-interface/proc-macro/Cargo.toml b/primitives/runtime-interface/proc-macro/Cargo.toml index b239fbcce32..fe5a132aac5 100644 --- a/primitives/runtime-interface/proc-macro/Cargo.toml +++ b/primitives/runtime-interface/proc-macro/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "sp-runtime-interface-proc-macro" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [lib] proc-macro = true diff --git a/primitives/runtime-interface/test-wasm/Cargo.toml b/primitives/runtime-interface/test-wasm/Cargo.toml index c38413aee78..8461509842a 100644 --- a/primitives/runtime-interface/test-wasm/Cargo.toml +++ b/primitives/runtime-interface/test-wasm/Cargo.toml @@ -1,19 +1,21 @@ [package] name = "sp-runtime-interface-test-wasm" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-runtime-interface = { version = "2.0.0", default-features = false, path = "../" } -sp-std = { version = "2.0.0", default-features = false, path = "../../std" } -sp-io = { version = "2.0.0", default-features = false, path = "../../io" } -sp-core = { version = "2.0.0", default-features = false, path = "../../core" } +sp-runtime-interface = { version = "2.0.0-dev", default-features = false, path = "../" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../io" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../core" } [build-dependencies] -wasm-builder-runner = { version = "1.0.3", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" } +wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" } [features] default = [ "std" ] diff --git a/primitives/runtime-interface/test/Cargo.toml b/primitives/runtime-interface/test/Cargo.toml index d6d724da9db..34c5a7ac5f7 100644 --- a/primitives/runtime-interface/test/Cargo.toml +++ b/primitives/runtime-interface/test/Cargo.toml @@ -1,15 +1,17 @@ [package] name = "sp-runtime-interface-test" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" publish = false +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-runtime-interface = { version = "2.0.0", path = "../" } -sc-executor = { version = "0.8", path = "../../../client/executor" } -sp-runtime-interface-test-wasm = { version = "2.0.0", path = "../test-wasm" } -sp-state-machine = { version = "0.8", path = "../../../primitives/state-machine" } -sp-core = { version = "2.0.0", path = "../../core" } -sp-io = { version = "2.0.0", path = "../../io" } +sp-runtime-interface = { version = "2.0.0-dev", path = "../" } +sc-executor = { version = "0.8.0-dev", path = "../../../client/executor" } +sp-runtime-interface-test-wasm = { version = "2.0.0-dev", path = "../test-wasm" } +sp-state-machine = { version = "0.8.0-dev", path = "../../../primitives/state-machine" } +sp-core = { version = "2.0.0-dev", path = "../../core" } +sp-io = { version = "2.0.0-dev", path = "../../io" } diff --git a/primitives/runtime/Cargo.toml b/primitives/runtime/Cargo.toml index bf7b2b80a3c..29736af6e53 100644 --- a/primitives/runtime/Cargo.toml +++ b/primitives/runtime/Cargo.toml @@ -1,23 +1,25 @@ [package] name = "sp-runtime" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0", default-features = false, path = "../core" } -sp-application-crypto = { version = "2.0.0", default-features = false, path = "../application-crypto" } -sp-arithmetic = { version = "2.0.0", default-features = false, path = "../arithmetic" } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } -sp-io = { version = "2.0.0", default-features = false, path = "../io" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } +sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../application-crypto" } +sp-arithmetic = { version = "2.0.0-dev", default-features = false, path = "../arithmetic" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../io" } log = { version = "0.4.8", optional = true } paste = "0.1.6" rand = { version = "0.7.2", optional = true } impl-trait-for-tuples = "0.1.3" -sp-inherents = { version = "2.0.0", default-features = false, path = "../inherents" } +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../inherents" } parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } [dev-dependencies] diff --git a/primitives/sandbox/Cargo.toml b/primitives/sandbox/Cargo.toml index c942e019fe6..e09bdb8e006 100755 --- a/primitives/sandbox/Cargo.toml +++ b/primitives/sandbox/Cargo.toml @@ -1,16 +1,18 @@ [package] name = "sp-sandbox" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] wasmi = { version = "0.6.2", optional = true } -sp-core = { version = "2.0.0", default-features = false, path = "../core" } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } -sp-io = { version = "2.0.0", default-features = false, path = "../io" } -sp-wasm-interface = { version = "2.0.0", default-features = false, path = "../wasm-interface" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-io = { version = "2.0.0-dev", default-features = false, path = "../io" } +sp-wasm-interface = { version = "2.0.0-dev", default-features = false, path = "../wasm-interface" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } [dev-dependencies] diff --git a/primitives/serializer/Cargo.toml b/primitives/serializer/Cargo.toml index b9e78d968c6..b172c1439b2 100644 --- a/primitives/serializer/Cargo.toml +++ b/primitives/serializer/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "sp-serializer" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] serde = "1.0.101" diff --git a/primitives/session/Cargo.toml b/primitives/session/Cargo.toml index 143ff87942f..a395b44e81e 100644 --- a/primitives/session/Cargo.toml +++ b/primitives/session/Cargo.toml @@ -1,15 +1,17 @@ [package] name = "sp-session" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0", default-features = false, path = "../api" } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } -sp-core = { version = "2.0.0", default-features = false, path = "../core" } -sp-runtime = { version = "2.0.0", optional = true, path = "../runtime" } +sp-api = { version = "2.0.0-dev", default-features = false, path = "../api" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } +sp-runtime = { version = "2.0.0-dev", optional = true, path = "../runtime" } [features] default = [ "std" ] diff --git a/primitives/staking/Cargo.toml b/primitives/staking/Cargo.toml index 97afa0d0a76..60945cbf970 100644 --- a/primitives/staking/Cargo.toml +++ b/primitives/staking/Cargo.toml @@ -1,14 +1,16 @@ [package] name = "sp-staking" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } [features] default = ["std"] diff --git a/primitives/state-machine/Cargo.toml b/primitives/state-machine/Cargo.toml index 2408cce099b..9c682982041 100644 --- a/primitives/state-machine/Cargo.toml +++ b/primitives/state-machine/Cargo.toml @@ -1,10 +1,12 @@ [package] name = "sp-state-machine" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] description = "Substrate State Machine" edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] log = "0.4.8" @@ -12,13 +14,13 @@ parking_lot = "0.10.0" hash-db = "0.15.2" trie-db = "0.20.0" trie-root = "0.16.0" -sp-trie = { version = "2.0.0", path = "../trie" } -sp-core = { version = "2.0.0", path = "../core" } -sp-panic-handler = { version = "2.0.0", path = "../panic-handler" } +sp-trie = { version = "2.0.0-dev", path = "../trie" } +sp-core = { version = "2.0.0-dev", path = "../core" } +sp-panic-handler = { version = "2.0.0-dev", path = "../panic-handler" } codec = { package = "parity-scale-codec", version = "1.0.0" } num-traits = "0.2.8" rand = "0.7.2" -sp-externalities = { version = "0.8.0", path = "../externalities" } +sp-externalities = { version = "0.8.0-dev", path = "../externalities" } [dev-dependencies] hex-literal = "0.2.1" diff --git a/primitives/std/Cargo.toml b/primitives/std/Cargo.toml index dd4b7e4511f..4314281b3b7 100644 --- a/primitives/std/Cargo.toml +++ b/primitives/std/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "sp-std" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [features] default = ["std"] diff --git a/primitives/storage/Cargo.toml b/primitives/storage/Cargo.toml index c9fda1816b5..27c9f991922 100644 --- a/primitives/storage/Cargo.toml +++ b/primitives/storage/Cargo.toml @@ -1,16 +1,18 @@ [package] name = "sp-storage" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" description = "Storage related primitives" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-std = { version = "2.0.0", default-features = false, path = "../std" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } serde = { version = "1.0.101", optional = true, features = ["derive"] } impl-serde = { version = "0.2.3", optional = true } -sp-debug-derive = { version = "2.0.0", path = "../debug-derive" } +sp-debug-derive = { version = "2.0.0-dev", path = "../debug-derive" } [features] default = [ "std" ] diff --git a/primitives/test-primitives/Cargo.toml b/primitives/test-primitives/Cargo.toml index 2edd5f05751..1cff915f3c4 100644 --- a/primitives/test-primitives/Cargo.toml +++ b/primitives/test-primitives/Cargo.toml @@ -1,16 +1,18 @@ [package] name = "sp-test-primitives" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0", default-features = false, path = "../application-crypto" } +sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0", default-features = false, path = "../core" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } [features] diff --git a/primitives/timestamp/Cargo.toml b/primitives/timestamp/Cargo.toml index 815aaf5305f..1b97f53437f 100644 --- a/primitives/timestamp/Cargo.toml +++ b/primitives/timestamp/Cargo.toml @@ -1,16 +1,18 @@ [package] name = "sp-timestamp" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0", default-features = false, path = "../api" } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } +sp-api = { version = "2.0.0-dev", default-features = false, path = "../api" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-inherents = { version = "2.0.0", default-features = false, path = "../inherents" } +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../inherents" } impl-trait-for-tuples = "0.1.3" wasm-timer = "0.2" diff --git a/primitives/transaction-pool/Cargo.toml b/primitives/transaction-pool/Cargo.toml index 18b254f2c09..747cd3472cc 100644 --- a/primitives/transaction-pool/Cargo.toml +++ b/primitives/transaction-pool/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "sp-transaction-pool" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", optional = true } @@ -11,8 +13,8 @@ derive_more = { version = "0.99.2", optional = true } futures = { version = "0.3.1", optional = true } log = { version = "0.4.8", optional = true } serde = { version = "1.0.101", features = ["derive"], optional = true} -sp-api = { version = "2.0.0", default-features = false, path = "../api" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } +sp-api = { version = "2.0.0-dev", default-features = false, path = "../api" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } [features] default = [ "std" ] diff --git a/primitives/trie/Cargo.toml b/primitives/trie/Cargo.toml index 361ddb186cc..6aab0f290b2 100644 --- a/primitives/trie/Cargo.toml +++ b/primitives/trie/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "sp-trie" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] description = "Patricia trie stuff using a parity-scale-codec node format" -repository = "https://github.com/paritytech/substrate" +repository = "https://github.com/paritytech/substrate/" license = "GPL-3.0" edition = "2018" +homepage = "https://substrate.dev" [[bench]] name = "bench" @@ -13,12 +14,12 @@ harness = false [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } hash-db = { version = "0.15.2", default-features = false } trie-db = { version = "0.20.0", default-features = false } trie-root = { version = "0.16.0", default-features = false } memory-db = { version = "0.19.0", default-features = false } -sp-core = { version = "2.0.0", default-features = false, path = "../core" } +sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } [dev-dependencies] trie-bench = "0.20.0" diff --git a/primitives/version/Cargo.toml b/primitives/version/Cargo.toml index 1219d9840c3..4cd65cd0446 100644 --- a/primitives/version/Cargo.toml +++ b/primitives/version/Cargo.toml @@ -1,16 +1,18 @@ [package] name = "sp-version" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] impl-serde = { version = "0.2.3", optional = true } serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0", default-features = false, path = "../std" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } [features] default = ["std"] diff --git a/primitives/wasm-interface/Cargo.toml b/primitives/wasm-interface/Cargo.toml index bb9ea85872a..5d477ff9557 100644 --- a/primitives/wasm-interface/Cargo.toml +++ b/primitives/wasm-interface/Cargo.toml @@ -1,14 +1,16 @@ [package] name = "sp-wasm-interface" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] wasmi = { version = "0.6.2", optional = true } impl-trait-for-tuples = "0.1.2" -sp-std = { version = "2.0.0", path = "../std", default-features = false } +sp-std = { version = "2.0.0-dev", path = "../std", default-features = false } codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false, features = ["derive"] } [features] diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml index 0a552973c9a..54511bd9e44 100644 --- a/test-utils/Cargo.toml +++ b/test-utils/Cargo.toml @@ -1,6 +1,8 @@ [package] name = "substrate-test-utils" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" diff --git a/test-utils/client/Cargo.toml b/test-utils/client/Cargo.toml index 2107f3bdd8b..f4eb93d128f 100644 --- a/test-utils/client/Cargo.toml +++ b/test-utils/client/Cargo.toml @@ -1,21 +1,23 @@ [package] name = "substrate-test-client" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-client-api = { version = "2.0.0", path = "../../client/api" } -sc-client = { version = "0.8", path = "../../client/" } -sc-client-db = { version = "0.8", features = ["test-helpers"], path = "../../client/db" } -sp-consensus = { version = "0.8", path = "../../primitives/consensus/common" } -sc-executor = { version = "0.8", path = "../../client/executor" } +sc-client-api = { version = "2.0.0-dev", path = "../../client/api" } +sc-client = { version = "0.8.0-dev", path = "../../client/" } +sc-client-db = { version = "0.8.0-dev", features = ["test-helpers"], path = "../../client/db" } +sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } +sc-executor = { version = "0.8.0-dev", path = "../../client/executor" } futures = "0.3.1" hash-db = "0.15.2" -sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" } +sp-keyring = { version = "2.0.0-dev", path = "../../primitives/keyring" } codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-core = { version = "2.0.0", path = "../../primitives/core" } -sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } -sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" } -sp-state-machine = { version = "0.8", path = "../../primitives/state-machine" } +sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } +sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } diff --git a/test-utils/runtime/Cargo.toml b/test-utils/runtime/Cargo.toml index 01244d8c6fb..44d2a68b49f 100644 --- a/test-utils/runtime/Cargo.toml +++ b/test-utils/runtime/Cargo.toml @@ -1,51 +1,53 @@ [package] name = "substrate-test-runtime" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0", default-features = false, path = "../../primitives/application-crypto" } -sp-consensus-aura = { version = "0.8", default-features = false, path = "../../primitives/consensus/aura" } -sp-consensus-babe = { version = "0.8", default-features = false, path = "../../primitives/consensus/babe" } -sp-block-builder = { version = "2.0.0", default-features = false, path = "../../primitives/block-builder" } +sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../../primitives/application-crypto" } +sp-consensus-aura = { version = "0.8.0-dev", default-features = false, path = "../../primitives/consensus/aura" } +sp-consensus-babe = { version = "0.8.0-dev", default-features = false, path = "../../primitives/consensus/babe" } +sp-block-builder = { version = "2.0.0-dev", default-features = false, path = "../../primitives/block-builder" } cfg-if = "0.1.10" codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -frame-executive = { version = "2.0.0", default-features = false, path = "../../frame/executive" } -sp-inherents = { version = "2.0.0", default-features = false, path = "../../primitives/inherents" } -sp-keyring = { version = "2.0.0", optional = true, path = "../../primitives/keyring" } +frame-executive = { version = "2.0.0-dev", default-features = false, path = "../../frame/executive" } +sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } +sp-keyring = { version = "2.0.0-dev", optional = true, path = "../../primitives/keyring" } log = { version = "0.4.8", optional = true } memory-db = { version = "0.19.0", default-features = false } -sp-offchain = { path = "../../primitives/offchain", default-features = false} -sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } -sp-runtime-interface = { path = "../../primitives/runtime-interface", default-features = false} -sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } -frame-support = { version = "2.0.0", default-features = false, path = "../../frame/support" } -sp-version = { version = "2.0.0", default-features = false, path = "../../primitives/version" } +sp-offchain = { path = "../../primitives/offchain", default-features = false, version = "2.0.0-dev"} +sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-runtime-interface = { path = "../../primitives/runtime-interface", default-features = false, version = "2.0.0-dev"} +sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +frame-support = { version = "2.0.0-dev", default-features = false, path = "../../frame/support" } +sp-version = { version = "2.0.0-dev", default-features = false, path = "../../primitives/version" } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-session = { version = "2.0.0", default-features = false, path = "../../primitives/session" } -sp-api = { version = "2.0.0", default-features = false, path = "../../primitives/api" } -sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } -pallet-babe = { version = "2.0.0", default-features = false, path = "../../frame/babe" } -frame-system = { version = "2.0.0", default-features = false, path = "../../frame/system" } -frame-system-rpc-runtime-api = { version = "2.0.0", default-features = false, path = "../../frame/system/rpc/runtime-api" } -pallet-timestamp = { version = "2.0.0", default-features = false, path = "../../frame/timestamp" } -sc-client = { version = "0.8", optional = true, path = "../../client" } -sp-trie = { version = "2.0.0", default-features = false, path = "../../primitives/trie" } -sp-transaction-pool = { version = "2.0.0", default-features = false, path = "../../primitives/transaction-pool" } +sp-session = { version = "2.0.0-dev", default-features = false, path = "../../primitives/session" } +sp-api = { version = "2.0.0-dev", default-features = false, path = "../../primitives/api" } +sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +pallet-babe = { version = "2.0.0-dev", default-features = false, path = "../../frame/babe" } +frame-system = { version = "2.0.0-dev", default-features = false, path = "../../frame/system" } +frame-system-rpc-runtime-api = { version = "2.0.0-dev", default-features = false, path = "../../frame/system/rpc/runtime-api" } +pallet-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../frame/timestamp" } +sc-client = { version = "0.8.0-dev", optional = true, path = "../../client" } +sp-trie = { version = "2.0.0-dev", default-features = false, path = "../../primitives/trie" } +sp-transaction-pool = { version = "2.0.0-dev", default-features = false, path = "../../primitives/transaction-pool" } trie-db = { version = "0.20.0", default-features = false } parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } [dev-dependencies] -sc-executor = { version = "0.8", path = "../../client/executor" } -substrate-test-runtime-client = { version = "2.0.0", path = "./client" } -sp-state-machine = { version = "0.8", path = "../../primitives/state-machine" } +sc-executor = { version = "0.8.0-dev", path = "../../client/executor" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "./client" } +sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } [build-dependencies] -wasm-builder-runner = { version = "1.0.4", package = "substrate-wasm-builder-runner", path = "../../utils/wasm-builder-runner" } +wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../utils/wasm-builder-runner" } [features] default = [ diff --git a/test-utils/runtime/client/Cargo.toml b/test-utils/runtime/client/Cargo.toml index 643cde16b30..a588219690a 100644 --- a/test-utils/runtime/client/Cargo.toml +++ b/test-utils/runtime/client/Cargo.toml @@ -1,19 +1,21 @@ [package] name = "substrate-test-runtime-client" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-block-builder = { version = "0.8", path = "../../../client/block-builder" } -substrate-test-client = { version = "2.0.0", path = "../../client" } -sp-core = { version = "2.0.0", path = "../../../primitives/core" } -substrate-test-runtime = { version = "2.0.0", path = "../../runtime" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -sp-api = { version = "2.0.0", path = "../../../primitives/api" } -sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } +sc-block-builder = { version = "0.8.0-dev", path = "../../../client/block-builder" } +substrate-test-client = { version = "2.0.0-dev", path = "../../client" } +sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +substrate-test-runtime = { version = "2.0.0-dev", path = "../../runtime" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } +sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } codec = { package = "parity-scale-codec", version = "1.0.0" } -sc-client-api = { version = "2.0.0", path = "../../../client/api" } -sc-client = { version = "0.8", path = "../../../client/" } +sc-client-api = { version = "2.0.0-dev", path = "../../../client/api" } +sc-client = { version = "0.8.0-dev", path = "../../../client/" } futures = "0.3.1" diff --git a/test-utils/runtime/transaction-pool/Cargo.toml b/test-utils/runtime/transaction-pool/Cargo.toml index 72e81f5f19a..dfaeb7227f4 100644 --- a/test-utils/runtime/transaction-pool/Cargo.toml +++ b/test-utils/runtime/transaction-pool/Cargo.toml @@ -1,17 +1,19 @@ [package] name = "substrate-test-runtime-transaction-pool" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -substrate-test-runtime-client = { version = "2.0.0", path = "../client" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../client" } parking_lot = "0.10.0" codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" } -sc-transaction-graph = { version = "2.0.0", path = "../../../client/transaction-pool/graph" } +sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sp-transaction-pool = { version = "2.0.0-dev", path = "../../../primitives/transaction-pool" } +sc-transaction-graph = { version = "2.0.0-dev", path = "../../../client/transaction-pool/graph" } futures = { version = "0.3.1", features = ["compat"] } derive_more = "0.99.2" diff --git a/utils/browser/Cargo.toml b/utils/browser/Cargo.toml index 803a9c5ce27..bd513b8a173 100644 --- a/utils/browser/Cargo.toml +++ b/utils/browser/Cargo.toml @@ -1,10 +1,12 @@ [package] name = "browser-utils" -version = "0.8.0" +version = "0.8.0-dev" authors = ["Parity Technologies "] description = "Utilities for creating a browser light-client." edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] futures = "0.3" @@ -17,10 +19,10 @@ js-sys = "0.3.34" wasm-bindgen = "0.2.57" wasm-bindgen-futures = "0.4.7" kvdb-web = "0.4" -sc-informant = { version = "0.8", path = "../../client/informant" } -sc-service = { version = "0.8", path = "../../client/service", default-features = false } -sc-network = { path = "../../client/network" } -sc-chain-spec = { path = "../../client/chain-spec" } +sc-informant = { version = "0.8.0-dev", path = "../../client/informant" } +sc-service = { version = "0.8.0-dev", path = "../../client/service", default-features = false } +sc-network = { path = "../../client/network" , version = "0.8.0-dev"} +sc-chain-spec = { path = "../../client/chain-spec" , version = "2.0.0-dev"} # Imported just for the `no_cc` feature clear_on_drop = { version = "0.2.3", features = ["no_cc"] } diff --git a/utils/build-script-utils/Cargo.toml b/utils/build-script-utils/Cargo.toml index 8c94edd527b..d41b85a982f 100644 --- a/utils/build-script-utils/Cargo.toml +++ b/utils/build-script-utils/Cargo.toml @@ -1,8 +1,10 @@ [package] name = "substrate-build-script-utils" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] diff --git a/utils/fork-tree/Cargo.toml b/utils/fork-tree/Cargo.toml index 0ac0fb65220..be200007d52 100644 --- a/utils/fork-tree/Cargo.toml +++ b/utils/fork-tree/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "fork-tree" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } diff --git a/utils/frame/benchmarking-cli/Cargo.toml b/utils/frame/benchmarking-cli/Cargo.toml index 129104a901f..648b37933e7 100644 --- a/utils/frame/benchmarking-cli/Cargo.toml +++ b/utils/frame/benchmarking-cli/Cargo.toml @@ -1,17 +1,19 @@ [package] name = "frame-benchmarking-cli" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -frame-benchmarking = { version = "2.0.0", path = "../../../frame/benchmarking" } -sc-service = { version = "0.8.0", path = "../../../client/service" } -sc-cli = { version = "0.8.0", path = "../../../client/cli" } -sc-client = { version = "0.8.0", path = "../../../client" } -sc-client-db = { version = "0.8.0", path = "../../../client/db" } -sc-executor = { version = "0.8.0", path = "../../../client/executor" } -sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } +frame-benchmarking = { version = "2.0.0-dev", path = "../../../frame/benchmarking" } +sc-service = { version = "0.8.0-dev", path = "../../../client/service" } +sc-cli = { version = "0.8.0-dev", path = "../../../client/cli" } +sc-client = { version = "0.8.0-dev", path = "../../../client" } +sc-client-db = { version = "0.8.0-dev", path = "../../../client/db" } +sc-executor = { version = "0.8.0-dev", path = "../../../client/executor" } +sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } structopt = "0.3.8" codec = { version = "1.1.2", package = "parity-scale-codec" } diff --git a/utils/frame/rpc/support/Cargo.toml b/utils/frame/rpc/support/Cargo.toml index 3b4339496a9..51f004489a1 100644 --- a/utils/frame/rpc/support/Cargo.toml +++ b/utils/frame/rpc/support/Cargo.toml @@ -1,9 +1,11 @@ [package] name = "substrate-frame-rpc-support" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies ", "Andrew Dirksen "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] futures = { version = "0.3.0", features = ["compat"] } @@ -11,10 +13,10 @@ jsonrpc-client-transports = "14" jsonrpc-core = "14" codec = { package = "parity-scale-codec", version = "1" } serde = "1" -frame-support = { version = "2.0.0", path = "../../../../frame/support" } -sp-storage = { version = "2.0.0", path = "../../../../primitives/storage" } -sc-rpc-api = { version = "0.8", path = "../../../../client/rpc-api" } +frame-support = { version = "2.0.0-dev", path = "../../../../frame/support" } +sp-storage = { version = "2.0.0-dev", path = "../../../../primitives/storage" } +sc-rpc-api = { version = "0.8.0-dev", path = "../../../../client/rpc-api" } [dev-dependencies] -frame-system = { version = "2.0.0", path = "../../../../frame/system" } +frame-system = { version = "2.0.0-dev", path = "../../../../frame/system" } tokio = "0.1" diff --git a/utils/frame/rpc/system/Cargo.toml b/utils/frame/rpc/system/Cargo.toml index 818794f8469..88481ac8848 100644 --- a/utils/frame/rpc/system/Cargo.toml +++ b/utils/frame/rpc/system/Cargo.toml @@ -1,12 +1,14 @@ [package] name = "substrate-frame-rpc-system" -version = "2.0.0" +version = "2.0.0-dev" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-client = { version = "0.8", path = "../../../../client/" } +sc-client = { version = "0.8.0-dev", path = "../../../../client/" } codec = { package = "parity-scale-codec", version = "1.0.0" } futures = "0.3.1" jsonrpc-core = "14.0.3" @@ -14,14 +16,14 @@ jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" log = "0.4.8" serde = { version = "1.0.101", features = ["derive"] } -sp-runtime = { version = "2.0.0", path = "../../../../primitives/runtime" } -sp-api = { version = "2.0.0", path = "../../../../primitives/api" } -frame-system-rpc-runtime-api = { version = "2.0.0", path = "../../../../frame/system/rpc/runtime-api" } -sp-core = { version = "2.0.0", path = "../../../../primitives/core" } -sp-blockchain = { version = "2.0.0", path = "../../../../primitives/blockchain" } -sp-transaction-pool = { version = "2.0.0", path = "../../../../primitives/transaction-pool" } +sp-runtime = { version = "2.0.0-dev", path = "../../../../primitives/runtime" } +sp-api = { version = "2.0.0-dev", path = "../../../../primitives/api" } +frame-system-rpc-runtime-api = { version = "2.0.0-dev", path = "../../../../frame/system/rpc/runtime-api" } +sp-core = { version = "2.0.0-dev", path = "../../../../primitives/core" } +sp-blockchain = { version = "2.0.0-dev", path = "../../../../primitives/blockchain" } +sp-transaction-pool = { version = "2.0.0-dev", path = "../../../../primitives/transaction-pool" } [dev-dependencies] -substrate-test-runtime-client = { version = "2.0.0", path = "../../../../test-utils/runtime/client" } +substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../../test-utils/runtime/client" } env_logger = "0.7.0" -sc-transaction-pool = { version = "2.0.0", path = "../../../../client/transaction-pool" } +sc-transaction-pool = { version = "2.0.0-dev", path = "../../../../client/transaction-pool" } diff --git a/utils/prometheus/Cargo.toml b/utils/prometheus/Cargo.toml index 0111dfb740f..4c7ec546c8e 100644 --- a/utils/prometheus/Cargo.toml +++ b/utils/prometheus/Cargo.toml @@ -1,10 +1,12 @@ [package] description = "Prometheus exporter server" name = "prometheus-exporter" -version = "0.8.0" +version = "0.8.0-dev" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" +homepage = "https://substrate.dev" +repository = "https://github.com/paritytech/substrate/" [dependencies] log = "0.4.8" diff --git a/utils/wasm-builder-runner/Cargo.toml b/utils/wasm-builder-runner/Cargo.toml index 1380d64fb30..8a41fe98b27 100644 --- a/utils/wasm-builder-runner/Cargo.toml +++ b/utils/wasm-builder-runner/Cargo.toml @@ -5,7 +5,8 @@ authors = ["Parity Technologies "] description = "Runner for substrate-wasm-builder" edition = "2018" readme = "README.md" -repository = "https://github.com/paritytech/substrate" +repository = "https://github.com/paritytech/substrate/" license = "GPL-3.0" +homepage = "https://substrate.dev" [dependencies] diff --git a/utils/wasm-builder/Cargo.toml b/utils/wasm-builder/Cargo.toml index 5941a39ffb6..245ec631141 100644 --- a/utils/wasm-builder/Cargo.toml +++ b/utils/wasm-builder/Cargo.toml @@ -5,8 +5,9 @@ authors = ["Parity Technologies "] description = "Utility for building WASM binaries" edition = "2018" readme = "README.md" -repository = "https://github.com/paritytech/substrate" +repository = "https://github.com/paritytech/substrate/" license = "GPL-3.0" +homepage = "https://substrate.dev" [dependencies] build-helper = "0.1.1" -- GitLab From ddfa359cbe072726b6a4fec2e675cb9545a72847 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Mon, 24 Feb 2020 14:04:42 -0300 Subject: [PATCH 031/106] Lazy reaping (#4895) * Squash and rebase from gav-lazy-reaping * Bump version * Bump runtime again * Docs. * Remove old functions * Update frame/balances/src/lib.rs Co-Authored-By: Shawn Tabrizi * Update frame/contracts/src/lib.rs Co-Authored-By: Shawn Tabrizi * Warnings * Bump runtime version * Update frame/democracy/src/lib.rs Co-Authored-By: Shawn Tabrizi * Update frame/system/src/lib.rs * Clean up OnReapAccount * Use frame_support debug * Bump spec * Renames and fix * Fix * Fix rename * Fix * Increase time for test Co-authored-by: Shawn Tabrizi Co-authored-by: Benjamin Kampmann --- .../pallets/template/src/mock.rs | 2 +- bin/node-template/runtime/src/lib.rs | 2 +- bin/node/cli/src/chain_spec.rs | 2 +- bin/node/cli/tests/common.rs | 2 +- bin/node/executor/tests/basic.rs | 10 +- bin/node/executor/tests/fees.rs | 4 +- bin/node/executor/tests/submit_transaction.rs | 5 +- bin/node/runtime/src/lib.rs | 6 +- bin/node/testing/src/genesis.rs | 6 +- frame/assets/src/lib.rs | 2 +- frame/aura/src/mock.rs | 2 +- frame/authority-discovery/src/lib.rs | 2 +- frame/authorship/src/lib.rs | 2 +- frame/babe/src/mock.rs | 2 +- frame/balances/Cargo.toml | 1 - frame/balances/src/lib.rs | 51 ++++- frame/balances/src/tests.rs | 15 +- frame/balances/src/tests_composite.rs | 2 +- frame/balances/src/tests_local.rs | 2 +- frame/collective/src/lib.rs | 2 +- frame/contracts/src/account_db.rs | 2 +- frame/contracts/src/lib.rs | 10 +- frame/contracts/src/tests.rs | 4 +- frame/democracy/src/lib.rs | 166 ++++++++++---- frame/elections-phragmen/src/lib.rs | 2 +- frame/elections/src/mock.rs | 2 +- frame/example-offchain-worker/src/tests.rs | 6 +- frame/example/src/lib.rs | 2 +- frame/executive/src/lib.rs | 4 +- frame/finality-tracker/src/lib.rs | 2 +- frame/generic-asset/src/lib.rs | 2 +- frame/generic-asset/src/mock.rs | 2 +- frame/grandpa/src/mock.rs | 2 +- frame/identity/src/lib.rs | 2 +- frame/im-online/src/mock.rs | 2 +- frame/indices/src/mock.rs | 2 +- frame/membership/src/lib.rs | 2 +- frame/nicks/src/lib.rs | 2 +- frame/offences/src/mock.rs | 2 +- frame/randomness-collective-flip/src/lib.rs | 2 +- frame/recovery/src/lib.rs | 57 +++-- frame/recovery/src/mock.rs | 2 +- frame/recovery/src/tests.rs | 11 +- frame/scored-pool/src/mock.rs | 2 +- frame/session/src/historical.rs | 2 +- frame/session/src/lib.rs | 108 +++++++--- frame/session/src/mock.rs | 2 +- frame/society/src/mock.rs | 2 +- frame/staking/src/lib.rs | 53 +++-- frame/staking/src/mock.rs | 46 ++-- frame/staking/src/tests.rs | 10 + frame/support/src/storage/migration.rs | 5 + frame/support/src/traits.rs | 4 +- frame/system/benches/bench.rs | 2 +- frame/system/src/lib.rs | 202 +++++++++++++----- frame/system/src/offchain.rs | 9 +- frame/timestamp/src/lib.rs | 2 +- frame/transaction-payment/src/lib.rs | 2 +- frame/treasury/src/lib.rs | 2 +- frame/utility/src/lib.rs | 8 +- frame/vesting/src/lib.rs | 2 +- test-utils/runtime/src/lib.rs | 2 +- 62 files changed, 597 insertions(+), 280 deletions(-) diff --git a/bin/node-template/pallets/template/src/mock.rs b/bin/node-template/pallets/template/src/mock.rs index 7a23610e4b0..2ea81ffb456 100644 --- a/bin/node-template/pallets/template/src/mock.rs +++ b/bin/node-template/pallets/template/src/mock.rs @@ -41,7 +41,7 @@ impl system::Trait for Test { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } impl Trait for Test { type Event = (); diff --git a/bin/node-template/runtime/src/lib.rs b/bin/node-template/runtime/src/lib.rs index a1bcd157ad6..afc18177ce0 100644 --- a/bin/node-template/runtime/src/lib.rs +++ b/bin/node-template/runtime/src/lib.rs @@ -164,7 +164,7 @@ impl system::Trait for Runtime { /// What to do if a new account is created. type OnNewAccount = (); /// What to do if an account is fully reaped from the system. - type OnReapAccount = Balances; + type OnKilledAccount = (); /// The data to be stored in an account. type AccountData = balances::AccountData; } diff --git a/bin/node/cli/src/chain_spec.rs b/bin/node/cli/src/chain_spec.rs index 5cdfb5cab86..d163cdf3918 100644 --- a/bin/node/cli/src/chain_spec.rs +++ b/bin/node/cli/src/chain_spec.rs @@ -243,7 +243,7 @@ pub fn testnet_genesis( }), pallet_session: Some(SessionConfig { keys: initial_authorities.iter().map(|x| { - (x.0.clone(), session_keys(x.2.clone(), x.3.clone(), x.4.clone(), x.5.clone())) + (x.0.clone(), x.0.clone(), session_keys(x.2.clone(), x.3.clone(), x.4.clone(), x.5.clone())) }).collect::>(), }), pallet_staking: Some(StakingConfig { diff --git a/bin/node/cli/tests/common.rs b/bin/node/cli/tests/common.rs index 93a4a3e4e57..682a30bcc01 100644 --- a/bin/node/cli/tests/common.rs +++ b/bin/node/cli/tests/common.rs @@ -60,5 +60,5 @@ pub fn run_command_for_a_while(base_path: &Path, dev: bool) { // Stop the process kill(Pid::from_raw(cmd.id().try_into().unwrap()), SIGINT).unwrap(); - assert!(wait_for(&mut cmd, 20).map(|x| x.success()).unwrap_or_default()); + assert!(wait_for(&mut cmd, 40).map(|x| x.success()).unwrap_or_default()); } diff --git a/bin/node/executor/tests/basic.rs b/bin/node/executor/tests/basic.rs index 972c561a2fb..eb629029c6d 100644 --- a/bin/node/executor/tests/basic.rs +++ b/bin/node/executor/tests/basic.rs @@ -164,7 +164,7 @@ fn panic_execution_with_foreign_code_gives_error() { let mut t = TestExternalities::::new_with_code(BLOATY_CODE, Storage { top: map![ >::hashed_key_for(alice()) => { - (69u128, 0u128, 0u128, 0u128).encode() + (69u128, 0u8, 0u128, 0u128, 0u128).encode() }, >::hashed_key().to_vec() => { 69_u128.encode() @@ -200,7 +200,7 @@ fn bad_extrinsic_with_native_equivalent_code_gives_error() { let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage { top: map![ >::hashed_key_for(alice()) => { - (0u32, 69u128, 0u128, 0u128, 0u128).encode() + (0u32, 0u8, 69u128, 0u128, 0u128, 0u128).encode() }, >::hashed_key().to_vec() => { 69_u128.encode() @@ -236,7 +236,7 @@ fn successful_execution_with_native_equivalent_code_gives_ok() { let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage { top: map![ >::hashed_key_for(alice()) => { - (0u32, 111 * DOLLARS, 0u128, 0u128, 0u128).encode() + (0u32, 0u8, 111 * DOLLARS, 0u128, 0u128, 0u128).encode() }, >::hashed_key().to_vec() => { (111 * DOLLARS).encode() @@ -278,7 +278,7 @@ fn successful_execution_with_foreign_code_gives_ok() { let mut t = TestExternalities::::new_with_code(BLOATY_CODE, Storage { top: map![ >::hashed_key_for(alice()) => { - (0u32, 111 * DOLLARS, 0u128, 0u128, 0u128).encode() + (0u32, 0u8, 111 * DOLLARS, 0u128, 0u128, 0u128).encode() }, >::hashed_key().to_vec() => { (111 * DOLLARS).encode() @@ -734,7 +734,7 @@ fn successful_execution_gives_ok() { let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage { top: map![ >::hashed_key_for(alice()) => { - (0u32, 111 * DOLLARS, 0u128, 0u128, 0u128).encode() + (0u32, 0u8, 111 * DOLLARS, 0u128, 0u128, 0u128).encode() }, >::hashed_key().to_vec() => { (111 * DOLLARS).encode() diff --git a/bin/node/executor/tests/fees.rs b/bin/node/executor/tests/fees.rs index 374dee354f1..024c02bd6aa 100644 --- a/bin/node/executor/tests/fees.rs +++ b/bin/node/executor/tests/fees.rs @@ -139,10 +139,10 @@ fn transaction_fee_is_correct_ultimate() { let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage { top: map![ >::hashed_key_for(alice()) => { - (0u32, 100 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS).encode() + (0u32, 0u8, 100 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS).encode() }, >::hashed_key_for(bob()) => { - (0u32, 10 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS).encode() + (0u32, 0u8, 10 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS).encode() }, >::hashed_key().to_vec() => { (110 * DOLLARS).encode() diff --git a/bin/node/executor/tests/submit_transaction.rs b/bin/node/executor/tests/submit_transaction.rs index b870cf40370..1a92aeca6ba 100644 --- a/bin/node/executor/tests/submit_transaction.rs +++ b/bin/node/executor/tests/submit_transaction.rs @@ -167,8 +167,9 @@ fn submitted_transaction_should_be_valid() { // add balance to the account let author = extrinsic.signature.clone().unwrap().0; let address = Indices::lookup(author).unwrap(); - let account = pallet_balances::AccountData { free: 5_000_000_000_000, ..Default::default() }; - >::insert(&address, (0u32, account)); + let data = pallet_balances::AccountData { free: 5_000_000_000_000, ..Default::default() }; + let account = frame_system::AccountInfo { nonce: 0u32, refcount: 0u8, data }; + >::insert(&address, account); // check validity let res = Executive::validate_transaction(extrinsic); diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index b6be9335ca9..e91eca4e400 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -81,8 +81,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 224, - impl_version: 2, + spec_version: 225, + impl_version: 0, apis: RUNTIME_API_VERSIONS, }; @@ -131,7 +131,7 @@ impl frame_system::Trait for Runtime { type ModuleToIndex = ModuleToIndex; type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = (Balances, Staking, Contracts, Session, Recovery); + type OnKilledAccount = (); } parameter_types! { diff --git a/bin/node/testing/src/genesis.rs b/bin/node/testing/src/genesis.rs index 9c163ea6153..6aa7290a641 100644 --- a/bin/node/testing/src/genesis.rs +++ b/bin/node/testing/src/genesis.rs @@ -69,15 +69,15 @@ pub fn config_endowed( }), pallet_session: Some(SessionConfig { keys: vec![ - (alice(), to_session_keys( + (dave(), alice(), to_session_keys( &Ed25519Keyring::Alice, &Sr25519Keyring::Alice, )), - (bob(), to_session_keys( + (eve(), bob(), to_session_keys( &Ed25519Keyring::Bob, &Sr25519Keyring::Bob, )), - (charlie(), to_session_keys( + (ferdie(), charlie(), to_session_keys( &Ed25519Keyring::Charlie, &Sr25519Keyring::Charlie, )), diff --git a/frame/assets/src/lib.rs b/frame/assets/src/lib.rs index ebd1d17bcff..042ff899134 100644 --- a/frame/assets/src/lib.rs +++ b/frame/assets/src/lib.rs @@ -295,7 +295,7 @@ mod tests { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } impl Trait for Test { type Event = (); diff --git a/frame/aura/src/mock.rs b/frame/aura/src/mock.rs index 5b3ccd7745f..05a161ee49c 100644 --- a/frame/aura/src/mock.rs +++ b/frame/aura/src/mock.rs @@ -63,7 +63,7 @@ impl frame_system::Trait for Test { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } impl pallet_timestamp::Trait for Test { diff --git a/frame/authority-discovery/src/lib.rs b/frame/authority-discovery/src/lib.rs index 77906e1bfe3..8ee4931e488 100644 --- a/frame/authority-discovery/src/lib.rs +++ b/frame/authority-discovery/src/lib.rs @@ -159,7 +159,7 @@ mod tests { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } impl_outer_origin! { diff --git a/frame/authorship/src/lib.rs b/frame/authorship/src/lib.rs index 335e13a7fd7..d3c1bf752ae 100644 --- a/frame/authorship/src/lib.rs +++ b/frame/authorship/src/lib.rs @@ -433,7 +433,7 @@ mod tests { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } parameter_types! { diff --git a/frame/babe/src/mock.rs b/frame/babe/src/mock.rs index aef0b4b3860..2ec083728e8 100644 --- a/frame/babe/src/mock.rs +++ b/frame/babe/src/mock.rs @@ -66,7 +66,7 @@ impl frame_system::Trait for Test { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } impl_opaque_keys! { diff --git a/frame/balances/Cargo.toml b/frame/balances/Cargo.toml index 728adf9de76..be3fa14c7a0 100644 --- a/frame/balances/Cargo.toml +++ b/frame/balances/Cargo.toml @@ -18,7 +18,6 @@ frame-support = { version = "2.0.0-dev", default-features = false, path = "../su frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } [dev-dependencies] -sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } pallet-transaction-payment = { version = "2.0.0-dev", path = "../transaction-payment" } diff --git a/frame/balances/src/lib.rs b/frame/balances/src/lib.rs index 0f5e8b40d5e..4dbaf4b8a88 100644 --- a/frame/balances/src/lib.rs +++ b/frame/balances/src/lib.rs @@ -159,11 +159,12 @@ mod benchmarking; use sp_std::prelude::*; use sp_std::{cmp, result, mem, fmt::Debug, ops::BitOr, convert::Infallible}; +use sp_io::hashing::twox_64; use codec::{Codec, Encode, Decode}; use frame_support::{ StorageValue, Parameter, decl_event, decl_storage, decl_module, decl_error, ensure, weights::SimpleDispatchInfo, traits::{ - Currency, OnReapAccount, OnUnbalanced, TryDrop, StoredMap, + Currency, OnKilledAccount, OnUnbalanced, TryDrop, StoredMap, WithdrawReason, WithdrawReasons, LockIdentifier, LockableCurrency, ExistenceRequirement, Imbalance, SignedImbalance, ReservableCurrency, Get, ExistenceRequirement::KeepAlive, ExistenceRequirement::AllowDeath, IsDeadAccount, BalanceStatus as Status @@ -178,7 +179,7 @@ use sp_runtime::{ }; use frame_system::{self as system, ensure_signed, ensure_root}; use frame_support::storage::migration::{ - get_storage_value, take_storage_value, put_storage_value, StorageIterator + get_storage_value, take_storage_value, put_storage_value, StorageIterator, have_storage_value }; pub use self::imbalances::{PositiveImbalance, NegativeImbalance}; @@ -609,7 +610,16 @@ impl, I: Instance> Module { for (hash, balances) in StorageIterator::>::new(b"Balances", b"Account").drain() { let nonce = take_storage_value::(b"System", b"AccountNonce", &hash).unwrap_or_default(); - put_storage_value(b"System", b"Account", &hash, (nonce, balances)); + let mut refs: system::RefCount = 0; + // The items in Kusama that would result in a ref count being incremented. + if have_storage_value(b"Democracy", b"Proxy", &hash) { refs += 1 } + // We skip Recovered since it's being replaced anyway. + let mut prefixed_hash = twox_64(&b":session:keys"[..]).to_vec(); + prefixed_hash.extend(&b":session:keys"[..]); + prefixed_hash.extend(&hash[..]); + if have_storage_value(b"Session", b"NextKeys", &prefixed_hash) { refs += 1 } + if have_storage_value(b"Staking", b"Bonded", &hash) { refs += 1 } + put_storage_value(b"System", b"Account", &hash, (nonce, refs, &balances)); } } @@ -721,14 +731,21 @@ impl, I: Instance> Module { } } }); - Locks::::insert(who, locks); - } -} -impl, I: Instance> OnReapAccount for Module { - fn on_reap_account(who: &T::AccountId) { - Locks::::remove(who); - Account::::remove(who); + let existed = Locks::::contains_key(who); + if locks.is_empty() { + Locks::::remove(who); + if existed { + // TODO: use Locks::::hashed_key + // https://github.com/paritytech/substrate/issues/4969 + system::Module::::dec_ref(who); + } + } else { + Locks::::insert(who, locks); + if !existed { + system::Module::::inc_ref(who); + } + } } } @@ -923,7 +940,7 @@ impl, I: Instance> frame_system::Trait for ElevatedTrait { type Version = T::Version; type ModuleToIndex = T::ModuleToIndex; type OnNewAccount = T::OnNewAccount; - type OnReapAccount = T::OnReapAccount; + type OnKilledAccount = T::OnKilledAccount; type AccountData = T::AccountData; } impl, I: Instance> Trait for ElevatedTrait { @@ -1040,6 +1057,7 @@ impl, I: Instance> Currency for Module where )?; let allow_death = existence_requirement == ExistenceRequirement::AllowDeath; + let allow_death = allow_death && system::Module::::allow_death(transactor); ensure!(allow_death || from_account.free >= ed, Error::::KeepAlive); Ok(()) @@ -1283,6 +1301,17 @@ impl, I: Instance> ReservableCurrency for Module } } +/// Implement `OnKilledAccount` to remove the local account, if using local account storage. +/// +/// NOTE: You probably won't need to use this! This only needs to be "wired in" to System module +/// if you're using the local balance storage. **If you're using the composite system account +/// storage (which is the default in most examples and tests) then there's no need.** +impl, I: Instance> OnKilledAccount for Module { + fn on_killed_account(who: &T::AccountId) { + Account::::remove(who); + } +} + impl, I: Instance> LockableCurrency for Module where T::Balance: MaybeSerializeDeserialize + Debug diff --git a/frame/balances/src/tests.rs b/frame/balances/src/tests.rs index 3d0c9e9207f..98c7c856bc8 100644 --- a/frame/balances/src/tests.rs +++ b/frame/balances/src/tests.rs @@ -24,8 +24,10 @@ macro_rules! decl_tests { use sp_runtime::{Fixed64, traits::{SignedExtension, BadOrigin}}; use frame_support::{ assert_noop, assert_ok, assert_err, - traits::{LockableCurrency, LockIdentifier, WithdrawReason, WithdrawReasons, - Currency, ReservableCurrency, ExistenceRequirement::AllowDeath} + traits::{ + LockableCurrency, LockIdentifier, WithdrawReason, WithdrawReasons, + Currency, ReservableCurrency, ExistenceRequirement::AllowDeath, StoredMap + } }; use pallet_transaction_payment::ChargeTransactionPayment; use frame_system::RawOrigin; @@ -55,6 +57,15 @@ macro_rules! decl_tests { }); } + #[test] + fn account_should_be_reaped() { + <$ext_builder>::default().existential_deposit(1).monied(true).build().execute_with(|| { + assert_eq!(Balances::free_balance(1), 10); + assert_ok!(>::transfer(&1, &2, 10, AllowDeath)); + assert!(!<::AccountStore as StoredMap>>::is_explicit(&1)); + }); + } + #[test] fn partial_locking_should_work() { <$ext_builder>::default().existential_deposit(1).monied(true).build().execute_with(|| { diff --git a/frame/balances/src/tests_composite.rs b/frame/balances/src/tests_composite.rs index c566c9a9d00..3a5c2178f88 100644 --- a/frame/balances/src/tests_composite.rs +++ b/frame/balances/src/tests_composite.rs @@ -67,7 +67,7 @@ impl frame_system::Trait for Test { type ModuleToIndex = (); type AccountData = super::AccountData; type OnNewAccount = (); - type OnReapAccount = Module; + type OnKilledAccount = (); } parameter_types! { pub const TransactionBaseFee: u64 = 0; diff --git a/frame/balances/src/tests_local.rs b/frame/balances/src/tests_local.rs index a63046e901d..861c1972127 100644 --- a/frame/balances/src/tests_local.rs +++ b/frame/balances/src/tests_local.rs @@ -67,7 +67,7 @@ impl frame_system::Trait for Test { type ModuleToIndex = (); type AccountData = super::AccountData; type OnNewAccount = (); - type OnReapAccount = Module; + type OnKilledAccount = Module; } parameter_types! { pub const TransactionBaseFee: u64 = 0; diff --git a/frame/collective/src/lib.rs b/frame/collective/src/lib.rs index a3ea901a6fd..605cda3cb77 100644 --- a/frame/collective/src/lib.rs +++ b/frame/collective/src/lib.rs @@ -435,7 +435,7 @@ mod tests { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } impl Trait for Test { type Origin = Origin; diff --git a/frame/contracts/src/account_db.rs b/frame/contracts/src/account_db.rs index 5204f1003a6..374c55c374d 100644 --- a/frame/contracts/src/account_db.rs +++ b/frame/contracts/src/account_db.rs @@ -151,7 +151,7 @@ impl AccountDb for DirectAccountDb { let exists = !T::Currency::total_balance(&address).is_zero(); total_imbalance = total_imbalance.merge(imbalance); if existed && !exists { - // Account killed. This will ultimately lead to calling `OnReapAccount` callback + // Account killed. This will ultimately lead to calling `OnKilledAccount` callback // which will make removal of CodeHashOf and AccountStorage for this account. // In order to avoid writing over the deleted properties we `continue` here. continue; diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 42cbaa3a7c2..571ae9700cf 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -125,7 +125,7 @@ use frame_support::{ parameter_types, IsSubType, weights::DispatchInfo, }; -use frame_support::traits::{OnReapAccount, OnUnbalanced, Currency, Get, Time, Randomness}; +use frame_support::traits::{OnKilledAccount, OnUnbalanced, Currency, Get, Time, Randomness}; use frame_system::{self as system, ensure_signed, RawOrigin, ensure_root}; use sp_core::storage::well_known_keys::CHILD_STORAGE_KEY_PREFIX; use pallet_contracts_primitives::{RentProjection, ContractAccessError}; @@ -941,8 +941,12 @@ decl_storage! { } } -impl OnReapAccount for Module { - fn on_reap_account(who: &T::AccountId) { +// TODO: this should be removed in favour of a self-destruct contract host function allowing the +// contract to delete all storage and the `ContractInfoOf` key and transfer remaining balance to +// some other account. As it stands, it's an economic insecurity on any smart-contract chain. +// https://github.com/paritytech/substrate/issues/4952 +impl OnKilledAccount for Module { + fn on_killed_account(who: &T::AccountId) { if let Some(ContractInfo::Alive(info)) = >::take(who) { child::kill_storage(&info.trie_id, info.child_trie_unique_id()); } diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index ddd532334c1..e775998a3a5 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -117,7 +117,7 @@ impl frame_system::Trait for Test { type ModuleToIndex = (); type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = (Balances, Contracts); + type OnKilledAccount = Contracts; } impl pallet_balances::Trait for Test { type Balance = u64; @@ -1606,7 +1606,7 @@ fn restoration(test_different_storage: bool, test_restore_to_with_dirty_storage: assert_eq!(System::events(), vec![ EventRecord { phase: Phase::ApplyExtrinsic(0), - event: MetaEvent::system(system::RawEvent::ReapedAccount(DJANGO)), + event: MetaEvent::system(system::RawEvent::KilledAccount(DJANGO)), topics: vec![], }, EventRecord { diff --git a/frame/democracy/src/lib.rs b/frame/democracy/src/lib.rs index c2c44918b03..6755fabd203 100644 --- a/frame/democracy/src/lib.rs +++ b/frame/democracy/src/lib.rs @@ -30,7 +30,7 @@ use frame_support::{ weights::SimpleDispatchInfo, traits::{ Currency, ReservableCurrency, LockableCurrency, WithdrawReason, LockIdentifier, Get, - OnReapAccount, OnUnbalanced, BalanceStatus + OnUnbalanced, BalanceStatus } }; use frame_system::{self as system, ensure_signed, ensure_root}; @@ -260,6 +260,24 @@ impl ReferendumInfo } } +/// State of a proxy voting account. +#[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug)] +pub enum ProxyState { + /// Account is open to becoming a proxy but is not yet assigned. + Open(AccountId), + /// Account is actively being a proxy. + Active(AccountId), +} + +impl ProxyState { + fn as_active(self) -> Option { + match self { + ProxyState::Active(a) => Some(a), + ProxyState::Open(_) => None, + } + } +} + decl_storage! { trait Store for Module as Democracy { /// The number of (public) proposals that have been made so far. @@ -299,7 +317,7 @@ decl_storage! { /// Who is able to vote for whom. Value is the fund-holding account, key is the /// vote-transaction-sending account. - pub Proxy get(fn proxy): map hasher(blake2_256) T::AccountId => Option; + pub Proxy get(fn proxy): map hasher(blake2_256) T::AccountId => Option>; /// Get the account (and lock periods) to which another account is delegating vote. pub Delegations get(fn delegations): @@ -423,6 +441,12 @@ decl_error! { NotLocked, /// The lock on the account to be unlocked has not yet expired. NotExpired, + /// A proxy-pairing was attempted to an account that was not open. + NotOpen, + /// A proxy-pairing was attempted to an account that was open to another account. + WrongOpen, + /// A proxy-de-pairing was attempted to an account that was not active. + NotActive } } @@ -525,8 +549,9 @@ decl_module! { #[compact] ref_index: ReferendumIndex, vote: Vote ) -> DispatchResult { - let who = Self::proxy(ensure_signed(origin)?).ok_or(Error::::NotProxy)?; - Self::do_vote(who, ref_index, vote) + let who = ensure_signed(origin)?; + let voter = Self::proxy(who).and_then(|a| a.as_active()).ok_or(Error::::NotProxy)?; + Self::do_vote(voter, ref_index, vote) } /// Schedule an emergency cancellation of a referendum. Cannot happen twice to the same @@ -659,42 +684,65 @@ decl_module! { } } - /// Specify a proxy. Called by the stash. + /// Specify a proxy that is already open to us. Called by the stash. + /// + /// NOTE: Used to be called `set_proxy`. /// /// # /// - One extra DB entry. /// # #[weight = SimpleDispatchInfo::FixedNormal(100_000)] - fn set_proxy(origin, proxy: T::AccountId) { + fn activate_proxy(origin, proxy: T::AccountId) { let who = ensure_signed(origin)?; - ensure!(!>::contains_key(&proxy), Error::::AlreadyProxy); - >::insert(proxy, who) + Proxy::::try_mutate(&proxy, |a| match a.take() { + None => Err(Error::::NotOpen), + Some(ProxyState::Active(_)) => Err(Error::::AlreadyProxy), + Some(ProxyState::Open(x)) if &x == &who => { + *a = Some(ProxyState::Active(who)); + Ok(()) + } + Some(ProxyState::Open(_)) => Err(Error::::WrongOpen), + })?; } /// Clear the proxy. Called by the proxy. /// + /// NOTE: Used to be called `resign_proxy`. + /// /// # /// - One DB clear. /// # #[weight = SimpleDispatchInfo::FixedNormal(100_000)] - fn resign_proxy(origin) { + fn close_proxy(origin) { let who = ensure_signed(origin)?; - >::remove(who); + Proxy::::mutate(&who, |a| { + if a.is_some() { + system::Module::::dec_ref(&who); + } + *a = None; + }); } - /// Clear the proxy. Called by the stash. + /// Deactivate the proxy, but leave open to this account. Called by the stash. + /// + /// The proxy must already be active. + /// + /// NOTE: Used to be called `remove_proxy`. /// /// # /// - One DB clear. /// # #[weight = SimpleDispatchInfo::FixedNormal(100_000)] - fn remove_proxy(origin, proxy: T::AccountId) { + fn deactivate_proxy(origin, proxy: T::AccountId) { let who = ensure_signed(origin)?; - ensure!( - &Self::proxy(&proxy).ok_or(Error::::NotProxy)? == &who, - Error::::WrongProxy, - ); - >::remove(proxy); + Proxy::::try_mutate(&proxy, |a| match a.take() { + None | Some(ProxyState::Open(_)) => Err(Error::::NotActive), + Some(ProxyState::Active(x)) if &x == &who => { + *a = Some(ProxyState::Open(who)); + Ok(()) + } + Some(ProxyState::Active(_)) => Err(Error::::WrongProxy), + })?; } /// Delegate vote. @@ -818,6 +866,30 @@ decl_module! { Locks::::remove(&target); Self::deposit_event(RawEvent::Unlocked(target)); } + + /// Become a proxy. + /// + /// This must be called prior to a later `activate_proxy`. + /// + /// Origin must be a Signed. + /// + /// - `target`: The account whose votes will later be proxied. + /// + /// `close_proxy` must be called before the account can be destroyed. + /// + /// # + /// - One extra DB entry. + /// # + #[weight = SimpleDispatchInfo::FixedNormal(100_000)] + fn open_proxy(origin, target: T::AccountId) { + let who = ensure_signed(origin)?; + Proxy::::mutate(&who, |a| { + if a.is_none() { + system::Module::::inc_ref(&who); + } + *a = Some(ProxyState::Open(target)); + }); + } } } @@ -935,7 +1007,12 @@ impl Module { #[cfg(feature = "std")] pub fn force_proxy(stash: T::AccountId, proxy: T::AccountId) { - >::insert(proxy, stash) + Proxy::::mutate(&proxy, |o| { + if o.is_none() { + system::Module::::inc_ref(&proxy); + } + *o = Some(ProxyState::Active(stash)) + }) } /// Start a referendum. @@ -1162,12 +1239,6 @@ impl Module { } } -impl OnReapAccount for Module { - fn on_reap_account(who: &T::AccountId) { - >::remove(who) - } -} - #[cfg(test)] mod tests { use super::*; @@ -1229,7 +1300,7 @@ mod tests { type ModuleToIndex = (); type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = Balances; + type OnKilledAccount = (); } parameter_types! { pub const ExistentialDeposit: u64 = 1; @@ -1968,29 +2039,45 @@ mod tests { fn proxy_should_work() { new_test_ext().execute_with(|| { assert_eq!(Democracy::proxy(10), None); - assert_ok!(Democracy::set_proxy(Origin::signed(1), 10)); - assert_eq!(Democracy::proxy(10), Some(1)); + assert!(System::allow_death(&10)); + + assert_noop!(Democracy::activate_proxy(Origin::signed(1), 10), Error::::NotOpen); + + assert_ok!(Democracy::open_proxy(Origin::signed(10), 1)); + assert!(!System::allow_death(&10)); + assert_eq!(Democracy::proxy(10), Some(ProxyState::Open(1))); + + assert_noop!(Democracy::activate_proxy(Origin::signed(2), 10), Error::::WrongOpen); + assert_ok!(Democracy::activate_proxy(Origin::signed(1), 10)); + assert_eq!(Democracy::proxy(10), Some(ProxyState::Active(1))); // Can't set when already set. - assert_noop!(Democracy::set_proxy(Origin::signed(2), 10), Error::::AlreadyProxy); + assert_noop!(Democracy::activate_proxy(Origin::signed(2), 10), Error::::AlreadyProxy); // But this works because 11 isn't proxying. - assert_ok!(Democracy::set_proxy(Origin::signed(2), 11)); - assert_eq!(Democracy::proxy(10), Some(1)); - assert_eq!(Democracy::proxy(11), Some(2)); + assert_ok!(Democracy::open_proxy(Origin::signed(11), 2)); + assert_ok!(Democracy::activate_proxy(Origin::signed(2), 11)); + assert_eq!(Democracy::proxy(10), Some(ProxyState::Active(1))); + assert_eq!(Democracy::proxy(11), Some(ProxyState::Active(2))); // 2 cannot fire 1's proxy: - assert_noop!(Democracy::remove_proxy(Origin::signed(2), 10), Error::::WrongProxy); + assert_noop!(Democracy::deactivate_proxy(Origin::signed(2), 10), Error::::WrongProxy); - // 1 fires his proxy: - assert_ok!(Democracy::remove_proxy(Origin::signed(1), 10)); - assert_eq!(Democracy::proxy(10), None); - assert_eq!(Democracy::proxy(11), Some(2)); + // 1 deactivates their proxy: + assert_ok!(Democracy::deactivate_proxy(Origin::signed(1), 10)); + assert_eq!(Democracy::proxy(10), Some(ProxyState::Open(1))); + // but the proxy account cannot be killed until the proxy is closed. + assert!(!System::allow_death(&10)); - // 11 resigns: - assert_ok!(Democracy::resign_proxy(Origin::signed(11))); + // and then 10 closes it completely: + assert_ok!(Democracy::close_proxy(Origin::signed(10))); assert_eq!(Democracy::proxy(10), None); + assert!(System::allow_death(&10)); + + // 11 just closes without 2's "permission". + assert_ok!(Democracy::close_proxy(Origin::signed(11))); assert_eq!(Democracy::proxy(11), None); + assert!(System::allow_death(&11)); }); } @@ -2002,7 +2089,8 @@ mod tests { fast_forward_to(2); let r = 0; - assert_ok!(Democracy::set_proxy(Origin::signed(1), 10)); + assert_ok!(Democracy::open_proxy(Origin::signed(10), 1)); + assert_ok!(Democracy::activate_proxy(Origin::signed(1), 10)); assert_ok!(Democracy::proxy_vote(Origin::signed(10), r, AYE)); assert_eq!(Democracy::voters_for(r), vec![1]); diff --git a/frame/elections-phragmen/src/lib.rs b/frame/elections-phragmen/src/lib.rs index f250e771216..a9474ae8441 100644 --- a/frame/elections-phragmen/src/lib.rs +++ b/frame/elections-phragmen/src/lib.rs @@ -816,7 +816,7 @@ mod tests { type ModuleToIndex = (); type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = Balances; + type OnKilledAccount = (); } parameter_types! { diff --git a/frame/elections/src/mock.rs b/frame/elections/src/mock.rs index c5af6ba0456..b82e73d512a 100644 --- a/frame/elections/src/mock.rs +++ b/frame/elections/src/mock.rs @@ -56,7 +56,7 @@ impl frame_system::Trait for Test { type ModuleToIndex = (); type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = Balances; + type OnKilledAccount = (); } parameter_types! { diff --git a/frame/example-offchain-worker/src/tests.rs b/frame/example-offchain-worker/src/tests.rs index 6d6a82d8c99..9b6a567a178 100644 --- a/frame/example-offchain-worker/src/tests.rs +++ b/frame/example-offchain-worker/src/tests.rs @@ -50,10 +50,10 @@ parameter_types! { } impl frame_system::Trait for Test { type Origin = Origin; + type Call = (); type Index = u64; type BlockNumber = u64; type Hash = H256; - type Call = (); type Hashing = BlakeTwo256; type AccountId = sp_core::sr25519::Public; type Lookup = IdentityLookup; @@ -65,9 +65,9 @@ impl frame_system::Trait for Test { type AvailableBlockRatio = AvailableBlockRatio; type Version = (); type ModuleToIndex = (); - type OnReapAccount = (); - type OnNewAccount = (); type AccountData = (); + type OnNewAccount = (); + type OnKilledAccount = (); } type Extrinsic = TestXt, ()>; diff --git a/frame/example/src/lib.rs b/frame/example/src/lib.rs index 39f0d25d323..f4139a310a6 100644 --- a/frame/example/src/lib.rs +++ b/frame/example/src/lib.rs @@ -690,7 +690,7 @@ mod tests { type ModuleToIndex = (); type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = pallet_balances::Module; + type OnKilledAccount = (); } parameter_types! { pub const ExistentialDeposit: u64 = 1; diff --git a/frame/executive/src/lib.rs b/frame/executive/src/lib.rs index f58833440c2..d7fecf45909 100644 --- a/frame/executive/src/lib.rs +++ b/frame/executive/src/lib.rs @@ -469,7 +469,7 @@ mod tests { type ModuleToIndex = (); type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = Balances; + type OnKilledAccount = (); } parameter_types! { pub const ExistentialDeposit: u64 = 1; @@ -573,7 +573,7 @@ mod tests { header: Header { parent_hash: [69u8; 32].into(), number: 1, - state_root: hex!("96797237079b6d6ffab7a47f90ee257a439a0e8268bdab3fe2f1e52572b101de").into(), + state_root: hex!("17caebd966d10cc6dc9659edf7fa3196511593f6c39f80f9b97cdbc3b0855cf3").into(), extrinsics_root: hex!("03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314").into(), digest: Digest { logs: vec![], }, }, diff --git a/frame/finality-tracker/src/lib.rs b/frame/finality-tracker/src/lib.rs index ef6e0d9a4bb..08056a34ab0 100644 --- a/frame/finality-tracker/src/lib.rs +++ b/frame/finality-tracker/src/lib.rs @@ -263,7 +263,7 @@ mod tests { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } parameter_types! { pub const WindowSize: u64 = 11; diff --git a/frame/generic-asset/src/lib.rs b/frame/generic-asset/src/lib.rs index e98fc32ecbe..f1713dd586a 100644 --- a/frame/generic-asset/src/lib.rs +++ b/frame/generic-asset/src/lib.rs @@ -1124,7 +1124,7 @@ impl frame_system::Trait for ElevatedTrait { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } impl Trait for ElevatedTrait { type Balance = T::Balance; diff --git a/frame/generic-asset/src/mock.rs b/frame/generic-asset/src/mock.rs index 7a61a61c430..8db140d90c6 100644 --- a/frame/generic-asset/src/mock.rs +++ b/frame/generic-asset/src/mock.rs @@ -64,7 +64,7 @@ impl frame_system::Trait for Test { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } impl Trait for Test { diff --git a/frame/grandpa/src/mock.rs b/frame/grandpa/src/mock.rs index 77a19c76265..8b94becd5aa 100644 --- a/frame/grandpa/src/mock.rs +++ b/frame/grandpa/src/mock.rs @@ -67,7 +67,7 @@ impl frame_system::Trait for Test { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } mod grandpa { diff --git a/frame/identity/src/lib.rs b/frame/identity/src/lib.rs index 23a0620edff..68b7905961d 100644 --- a/frame/identity/src/lib.rs +++ b/frame/identity/src/lib.rs @@ -936,7 +936,7 @@ mod tests { type ModuleToIndex = (); type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = Balances; + type OnKilledAccount = (); } parameter_types! { pub const ExistentialDeposit: u64 = 1; diff --git a/frame/im-online/src/mock.rs b/frame/im-online/src/mock.rs index 7ee4c89ab46..a703b24629c 100644 --- a/frame/im-online/src/mock.rs +++ b/frame/im-online/src/mock.rs @@ -117,7 +117,7 @@ impl frame_system::Trait for Runtime { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } parameter_types! { diff --git a/frame/indices/src/mock.rs b/frame/indices/src/mock.rs index fe01b680bcc..355b3cc792c 100644 --- a/frame/indices/src/mock.rs +++ b/frame/indices/src/mock.rs @@ -67,7 +67,7 @@ impl frame_system::Trait for Test { type ModuleToIndex = (); type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = Balances; + type OnKilledAccount = (); } parameter_types! { diff --git a/frame/membership/src/lib.rs b/frame/membership/src/lib.rs index 1ad187b2ee3..c39055c1bc9 100644 --- a/frame/membership/src/lib.rs +++ b/frame/membership/src/lib.rs @@ -271,7 +271,7 @@ mod tests { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } ord_parameter_types! { pub const One: u64 = 1; diff --git a/frame/nicks/src/lib.rs b/frame/nicks/src/lib.rs index 2b2d59014d8..caed6e40acc 100644 --- a/frame/nicks/src/lib.rs +++ b/frame/nicks/src/lib.rs @@ -287,7 +287,7 @@ mod tests { type ModuleToIndex = (); type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = Balances; + type OnKilledAccount = (); } parameter_types! { pub const ExistentialDeposit: u64 = 1; diff --git a/frame/offences/src/mock.rs b/frame/offences/src/mock.rs index f2e19b63f5a..a003ad69157 100644 --- a/frame/offences/src/mock.rs +++ b/frame/offences/src/mock.rs @@ -91,7 +91,7 @@ impl frame_system::Trait for Runtime { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } impl Trait for Runtime { diff --git a/frame/randomness-collective-flip/src/lib.rs b/frame/randomness-collective-flip/src/lib.rs index 53d640688ef..0ded7dd6b0c 100644 --- a/frame/randomness-collective-flip/src/lib.rs +++ b/frame/randomness-collective-flip/src/lib.rs @@ -193,7 +193,7 @@ mod tests { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } type System = frame_system::Module; diff --git a/frame/recovery/src/lib.rs b/frame/recovery/src/lib.rs index 6fa00af751e..1b3c9416388 100644 --- a/frame/recovery/src/lib.rs +++ b/frame/recovery/src/lib.rs @@ -159,9 +159,8 @@ use codec::{Encode, Decode}; use frame_support::{ decl_module, decl_event, decl_storage, decl_error, ensure, - Parameter, RuntimeDebug, - weights::{GetDispatchInfo, SimpleDispatchInfo, FunctionOf}, - traits::{Currency, ReservableCurrency, Get, OnReapAccount, BalanceStatus}, + Parameter, RuntimeDebug, weights::{GetDispatchInfo, SimpleDispatchInfo, FunctionOf}, + traits::{Currency, ReservableCurrency, Get, BalanceStatus}, }; use frame_system::{self as system, ensure_signed, ensure_root}; @@ -241,6 +240,7 @@ decl_storage! { pub Recoverable get(fn recovery_config): map hasher(blake2_256) T::AccountId => Option, T::AccountId>>; + /// Active recovery attempts. /// /// First account is the account to be recovered, and the second account @@ -248,10 +248,11 @@ decl_storage! { pub ActiveRecoveries get(fn active_recovery): double_map hasher(twox_64_concat) T::AccountId, hasher(twox_64_concat) T::AccountId => Option, T::AccountId>>; - /// The final list of recovered accounts. + + /// The list of allowed proxy accounts. /// - /// Map from the recovered account to the user who can access it. - pub Recovered get(fn recovered_account): + /// Map from the user who can access it to the recovered account. + pub Proxy get(fn proxy): map hasher(blake2_256) T::AccountId => Option; } } @@ -308,6 +309,8 @@ decl_error! { StillActive, /// There was an overflow in a calculation Overflow, + /// This account is already set up for recovery + AlreadyProxy, } } @@ -332,7 +335,7 @@ decl_module! { /// - One storage lookup to check account is recovered by `who`. O(1) /// # #[weight = FunctionOf( - |args: (&T::AccountId, &Box<::Call>)| args.1.get_dispatch_info().weight + 10_000, + |args: (&T::AccountId, &Box<::Call>)| args.1.get_dispatch_info().weight + 10_000, |args: (&T::AccountId, &Box<::Call>)| args.1.get_dispatch_info().class, true )] @@ -342,7 +345,8 @@ decl_module! { ) -> DispatchResult { let who = ensure_signed(origin)?; // Check `who` is allowed to make a call on behalf of `account` - ensure!(Self::recovered_account(&account) == Some(who), Error::::NotAllowed); + let target = Self::proxy(&who).ok_or(Error::::NotAllowed)?; + ensure!(&target == &account, Error::::NotAllowed); call.dispatch(frame_system::RawOrigin::Signed(account).into()) } @@ -363,7 +367,7 @@ decl_module! { fn set_recovered(origin, lost: T::AccountId, rescuer: T::AccountId) { ensure_root(origin)?; // Create the recovery storage item. - >::insert(&lost, &rescuer); + >::insert(&rescuer, &lost); Self::deposit_event(RawEvent::AccountRecovered(lost, rescuer)); } @@ -428,6 +432,7 @@ decl_module! { }; // Create the recovery configuration storage item >::insert(&who, recovery_config); + Self::deposit_event(RawEvent::RecoveryCreated(who)); } @@ -545,6 +550,7 @@ decl_module! { let recovery_config = Self::recovery_config(&account).ok_or(Error::::NotRecoverable)?; // Get the active recovery process for the rescuer let active_recovery = Self::active_recovery(&account, &who).ok_or(Error::::NotStarted)?; + ensure!(!Proxy::::contains_key(&who), Error::::AlreadyProxy); // Make sure the delay period has passed let current_block_number = >::block_number(); let recoverable_block_number = active_recovery.created @@ -557,7 +563,8 @@ decl_module! { Error::::Threshold ); // Create the recovery storage item - >::insert(&account, &who); + Proxy::::insert(&who, &account); + system::Module::::inc_ref(&who); Self::deposit_event(RawEvent::AccountRecovered(account, who)); } @@ -592,7 +599,7 @@ decl_module! { Self::deposit_event(RawEvent::RecoveryClosed(who, rescuer)); } - /// Remove the recovery process for your account. + /// Remove the recovery process for your account. Recovered accounts are still accessible. /// /// NOTE: The user must make sure to call `close_recovery` on all active /// recovery attempts before calling this function else it will fail. @@ -621,10 +628,30 @@ decl_module! { ensure!(active_recoveries.next().is_none(), Error::::StillActive); // Take the recovery configuration for this account. let recovery_config = >::take(&who).ok_or(Error::::NotRecoverable)?; + // Unreserve the initial deposit for the recovery configuration. T::Currency::unreserve(&who, recovery_config.deposit); Self::deposit_event(RawEvent::RecoveryRemoved(who)); } + + /// Cancel the ability to use `as_recovered` for `account`. + /// + /// The dispatch origin for this call must be _Signed_ and registered to + /// be able to make calls on behalf of the recovered account. + /// + /// Parameters: + /// - `account`: The recovered account you are able to call on-behalf-of. + /// + /// # + /// - One storage mutation to check account is recovered by `who`. O(1) + /// # + fn cancel_recovered(origin, account: T::AccountId) { + let who = ensure_signed(origin)?; + // Check `who` is allowed to make a call on behalf of `account` + ensure!(Self::proxy(&who) == Some(account), Error::::NotAllowed); + Proxy::::remove(&who); + system::Module::::dec_ref(&who); + } } } @@ -639,11 +666,3 @@ impl Module { friends.binary_search(&friend).is_ok() } } - -impl OnReapAccount for Module { - /// Remove any existing access another account might have when the account is reaped. - /// This removes the final storage item managed by this module for any given account. - fn on_reap_account(who: &T::AccountId) { - >::remove(who); - } -} diff --git a/frame/recovery/src/mock.rs b/frame/recovery/src/mock.rs index 97ee07bc6a2..a5b7731c228 100644 --- a/frame/recovery/src/mock.rs +++ b/frame/recovery/src/mock.rs @@ -80,7 +80,7 @@ impl frame_system::Trait for Test { type ModuleToIndex = (); type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = (Balances, Recovery); + type OnKilledAccount = (); } parameter_types! { diff --git a/frame/recovery/src/tests.rs b/frame/recovery/src/tests.rs index 97d4791cce5..9c644291c90 100644 --- a/frame/recovery/src/tests.rs +++ b/frame/recovery/src/tests.rs @@ -31,7 +31,7 @@ use frame_support::{ fn basic_setup_works() { new_test_ext().execute_with(|| { // Nothing in storage to start - assert_eq!(Recovery::recovered_account(&1), None); + assert_eq!(Recovery::proxy(&2), None); assert_eq!(Recovery::active_recovery(&1, &2), None); assert_eq!(Recovery::recovery_config(&1), None); // Everyone should have starting balance of 100 @@ -91,10 +91,13 @@ fn recovery_life_cycle_works() { // All funds have been fully recovered! assert_eq!(Balances::free_balance(1), 200); assert_eq!(Balances::free_balance(5), 0); + // Remove the proxy link. + assert_ok!(Recovery::cancel_recovered(Origin::signed(1), 5)); + // All storage items are removed from the module assert!(!>::contains_key(&5, &1)); assert!(!>::contains_key(&5)); - assert!(!>::contains_key(&5)); + assert!(!>::contains_key(&1)); }); } @@ -335,7 +338,7 @@ fn claim_recovery_works() { // Account can be recovered. assert_ok!(Recovery::claim_recovery(Origin::signed(1), 5)); // Recovered storage item is correctly created - assert_eq!(>::get(&5), Some(1)); + assert_eq!(>::get(&1), Some(5)); // Account could be re-recovered in the case that the recoverer account also gets lost. assert_ok!(Recovery::initiate_recovery(Origin::signed(4), 5)); assert_ok!(Recovery::vouch_recovery(Origin::signed(2), 5, 4)); @@ -347,7 +350,7 @@ fn claim_recovery_works() { // Account is re-recovered. assert_ok!(Recovery::claim_recovery(Origin::signed(4), 5)); // Recovered storage item is correctly updated - assert_eq!(>::get(&5), Some(4)); + assert_eq!(>::get(&4), Some(5)); }); } diff --git a/frame/scored-pool/src/mock.rs b/frame/scored-pool/src/mock.rs index 90006da91e9..a28b7891370 100644 --- a/frame/scored-pool/src/mock.rs +++ b/frame/scored-pool/src/mock.rs @@ -72,7 +72,7 @@ impl frame_system::Trait for Test { type ModuleToIndex = (); type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = Balances; + type OnKilledAccount = (); } impl pallet_balances::Trait for Test { diff --git a/frame/session/src/historical.rs b/frame/session/src/historical.rs index cf20f31360c..ced630e5fd8 100644 --- a/frame/session/src/historical.rs +++ b/frame/session/src/historical.rs @@ -318,7 +318,7 @@ mod tests { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); crate::GenesisConfig:: { keys: NEXT_VALIDATORS.with(|l| - l.borrow().iter().cloned().map(|i| (i, UintAuthorityId(i).into())).collect() + l.borrow().iter().cloned().map(|i| (i, i, UintAuthorityId(i).into())).collect() ), }.assimilate_storage(&mut t).unwrap(); sp_io::TestExternalities::new(t) diff --git a/frame/session/src/lib.rs b/frame/session/src/lib.rs index 0abe06527b3..6340b79f0f5 100644 --- a/frame/session/src/lib.rs +++ b/frame/session/src/lib.rs @@ -105,8 +105,9 @@ use sp_runtime::{KeyTypeId, Perbill, RuntimeAppPublic, BoundToRuntimeAppPublic}; use frame_support::weights::SimpleDispatchInfo; use sp_runtime::traits::{Convert, Zero, Member, OpaqueKeys}; use sp_staking::SessionIndex; -use frame_support::{dispatch, ConsensusEngineId, decl_module, decl_event, decl_storage, decl_error}; -use frame_support::{ensure, traits::{OnReapAccount, Get, FindAuthor, ValidatorRegistration}, Parameter}; +use frame_support::{ensure, decl_module, decl_event, decl_storage, decl_error, ConsensusEngineId}; +use frame_support::{traits::{Get, FindAuthor, ValidatorRegistration}, Parameter}; +use frame_support::dispatch::{self, DispatchResult, DispatchError}; use frame_system::{self as system, ensure_signed}; #[cfg(test)] @@ -361,6 +362,7 @@ decl_storage! { /// /// The first key is always `DEDUP_KEY_PREFIX` to have all the data in the same branch of /// the trie. Having all data in the same branch should prevent slowing down other queries. + // TODO: Migrate to a normal map now https://github.com/paritytech/substrate/issues/4917 NextKeys: double_map hasher(twox_64_concat) Vec, hasher(blake2_256) T::ValidatorId => Option; @@ -368,11 +370,12 @@ decl_storage! { /// /// The first key is always `DEDUP_KEY_PREFIX` to have all the data in the same branch of /// the trie. Having all data in the same branch should prevent slowing down other queries. + // TODO: Migrate to a normal map now https://github.com/paritytech/substrate/issues/4917 KeyOwner: double_map hasher(twox_64_concat) Vec, hasher(blake2_256) (KeyTypeId, Vec) => Option; } add_extra_genesis { - config(keys): Vec<(T::ValidatorId, T::Keys)>; + config(keys): Vec<(T::AccountId, T::ValidatorId, T::Keys)>; build(|config: &GenesisConfig| { if T::SessionHandler::KEY_TYPE_IDS.len() != T::Keys::key_ids().len() { panic!("Number of keys in session handler and session keys does not match"); @@ -388,21 +391,17 @@ decl_storage! { } }); - for (who, keys) in config.keys.iter().cloned() { - assert!( - >::load_keys(&who).is_none(), - "genesis config contained duplicate validator {:?}", who, - ); - - >::do_set_keys(&who, keys) + for (account, val, keys) in config.keys.iter().cloned() { + >::inner_set_keys(&val, keys) .expect("genesis config must not contain duplicates; qed"); + system::Module::::inc_ref(&account); } let initial_validators_0 = T::SessionManager::new_session(0) .unwrap_or_else(|| { frame_support::print("No initial validator provided by `SessionManager`, use \ session config keys to generate initial validator set."); - config.keys.iter().map(|(ref v, _)| v.clone()).collect() + config.keys.iter().map(|x| x.1.clone()).collect() }); assert!(!initial_validators_0.is_empty(), "Empty validator set for session 0 in genesis block!"); @@ -445,6 +444,8 @@ decl_error! { NoAssociatedValidatorId, /// Registered duplicate key. DuplicatedKey, + /// No keys are associated with this account. + NoKeys, } } @@ -467,6 +468,8 @@ decl_module! { /// # /// - O(log n) in number of accounts. /// - One extra DB entry. + /// - Increases system account refs by one on success iff there were previously no keys set. + /// In this case, purge_keys will need to be called before the account can be removed. /// # #[weight = SimpleDispatchInfo::FixedNormal(150_000)] fn set_keys(origin, keys: T::Keys, proof: Vec) -> dispatch::DispatchResult { @@ -474,13 +477,27 @@ decl_module! { ensure!(keys.ownership_proof_is_valid(&proof), Error::::InvalidProof); - let who = T::ValidatorIdOf::convert(who).ok_or(Error::::NoAssociatedValidatorId)?; - Self::do_set_keys(&who, keys)?; Ok(()) } + /// Removes any session key(s) of the function caller. + /// This doesn't take effect until the next session. + /// + /// The dispatch origin of this function must be signed. + /// + /// # + /// - O(N) in number of key types. + /// - Removes N + 1 DB entries. + /// - Reduces system account refs by one on success. + /// # + #[weight = SimpleDispatchInfo::FixedNormal(150_000)] + fn purge_keys(origin) { + let who = ensure_signed(origin)?; + Self::do_purge_keys(&who)?; + } + /// Called when a block is initialized. Will rotate session if it is the last /// block of the current session. fn on_initialize(n: T::BlockNumber) { @@ -612,10 +629,30 @@ impl Module { Self::validators().iter().position(|i| i == c).map(Self::disable_index).ok_or(()) } - // perform the set_key operation, checking for duplicates. - // does not set `Changed`. - fn do_set_keys(who: &T::ValidatorId, keys: T::Keys) -> dispatch::DispatchResult { - let old_keys = Self::load_keys(&who); + /// Perform the set_key operation, checking for duplicates. Does not set `Changed`. + /// + /// This ensures that the reference counter in system is incremented appropriately and as such + /// must accept an account ID, rather than a validator ID. + fn do_set_keys(account: &T::AccountId, keys: T::Keys) -> dispatch::DispatchResult { + let who = T::ValidatorIdOf::convert(account.clone()) + .ok_or(Error::::NoAssociatedValidatorId)?; + + let old_keys = Self::inner_set_keys(&who, keys)?; + if old_keys.is_none() { + system::Module::::inc_ref(&account); + } + + Ok(()) + } + + /// Perform the set_key operation, checking for duplicates. Does not set `Changed`. + /// + /// The old keys for this validator are returned, or `None` if there were none. + /// + /// This does not ensure that the reference counter in system is incremented appropriately, it + /// must be done by the caller or the keys will be leaked in storage. + fn inner_set_keys(who: &T::ValidatorId, keys: T::Keys) -> Result, DispatchError> { + let old_keys = Self::load_keys(who); for id in T::Keys::key_ids() { let key = keys.get_raw(*id); @@ -634,21 +671,25 @@ impl Module { Self::clear_key_owner(*id, old); } - Self::put_key_owner(*id, key, &who); + Self::put_key_owner(*id, key, who); } - Self::put_keys(&who, &keys); - - Ok(()) + Self::put_keys(who, &keys); + Ok(old_keys) } - fn prune_dead_keys(who: &T::ValidatorId) { - if let Some(old_keys) = Self::take_keys(who) { - for id in T::Keys::key_ids() { - let key_data = old_keys.get_raw(*id); - Self::clear_key_owner(*id, key_data); - } + fn do_purge_keys(account: &T::AccountId) -> DispatchResult { + let who = T::ValidatorIdOf::convert(account.clone()) + .ok_or(Error::::NoAssociatedValidatorId)?; + + let old_keys = Self::take_keys(&who).ok_or(Error::::NoKeys)?; + for id in T::Keys::key_ids() { + let key_data = old_keys.get_raw(*id); + Self::clear_key_owner(*id, key_data); } + system::Module::::dec_ref(&account); + + Ok(()) } fn load_keys(v: &T::ValidatorId) -> Option { @@ -676,12 +717,6 @@ impl Module { } } -impl OnReapAccount for Module { - fn on_reap_account(who: &T::ValidatorId) { - Self::prune_dead_keys(who); - } -} - /// Wraps the author-scraping logic for consensus engines that can recover /// the canonical index of an author. This then transforms it into the /// registering account-ID of that session key index. @@ -716,7 +751,7 @@ mod tests { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); GenesisConfig:: { keys: NEXT_VALIDATORS.with(|l| - l.borrow().iter().cloned().map(|i| (i, UintAuthorityId(i).into())).collect() + l.borrow().iter().cloned().map(|i| (i, i, UintAuthorityId(i).into())).collect() ), }.assimilate_storage(&mut t).unwrap(); sp_io::TestExternalities::new(t) @@ -754,7 +789,10 @@ mod tests { let id = DUMMY; assert_eq!(Session::key_owner(id, UintAuthorityId(1).get_raw(id)), Some(1)); - Session::on_reap_account(&1); + assert!(!System::allow_death(&1)); + assert_ok!(Session::purge_keys(Origin::signed(1))); + assert!(System::allow_death(&1)); + assert_eq!(Session::load_keys(&1), None); assert_eq!(Session::key_owner(id, UintAuthorityId(1).get_raw(id)), None); }) diff --git a/frame/session/src/mock.rs b/frame/session/src/mock.rs index 0c922670697..df858c8ed57 100644 --- a/frame/session/src/mock.rs +++ b/frame/session/src/mock.rs @@ -178,7 +178,7 @@ impl frame_system::Trait for Test { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = Session; + type OnKilledAccount = (); } impl pallet_timestamp::Trait for Test { diff --git a/frame/society/src/mock.rs b/frame/society/src/mock.rs index 62be1aa9f1d..158f139df56 100644 --- a/frame/society/src/mock.rs +++ b/frame/society/src/mock.rs @@ -78,7 +78,7 @@ impl frame_system::Trait for Test { type Version = (); type ModuleToIndex = (); type OnNewAccount = (); - type OnReapAccount = Balances; + type OnKilledAccount = (); type AccountData = pallet_balances::AccountData; } diff --git a/frame/staking/src/lib.rs b/frame/staking/src/lib.rs index 3f84597912f..ee708dabd3c 100644 --- a/frame/staking/src/lib.rs +++ b/frame/staking/src/lib.rs @@ -259,6 +259,7 @@ use codec::{HasCompact, Encode, Decode}; use frame_support::{ decl_module, decl_event, decl_storage, ensure, decl_error, weights::SimpleDispatchInfo, + dispatch::DispatchResult, traits::{ Currency, LockIdentifier, LockableCurrency, WithdrawReasons, OnUnbalanced, Imbalance, Get, Time @@ -282,7 +283,6 @@ use sp_runtime::{Serialize, Deserialize}; use frame_system::{self as system, ensure_signed, ensure_root}; use sp_phragmen::ExtendedBalance; -use frame_support::traits::OnReapAccount; const DEFAULT_MINIMUM_VALIDATOR_COUNT: u32 = 4; const MAX_NOMINATIONS: usize = 16; @@ -831,6 +831,8 @@ decl_error! { NoMoreChunks, /// Can not rebond without unlocking chunks. NoUnlockChunk, + /// Attempting to target a stash that still has funds. + FundedTarget, } } @@ -900,6 +902,8 @@ decl_module! { >::insert(&stash, &controller); >::insert(&stash, payee); + system::Module::::inc_ref(&stash); + let stash_balance = T::Currency::free_balance(&stash); let value = value.min(stash_balance); let item = StakingLedger { stash, total: value, active: value, unlocking: vec![] }; @@ -1013,10 +1017,10 @@ decl_module! { // portion to fall below existential deposit + will have no more unlocking chunks // left. We can now safely remove this. let stash = ledger.stash; + // remove all staking-related information. + Self::kill_stash(&stash)?; // remove the lock. T::Currency::remove_lock(STAKING_ID, &stash); - // remove all staking-related information. - Self::kill_stash(&stash); } else { // This was the consequence of a partial unbond. just update the ledger and move on. Self::update_ledger(&controller, &ledger); @@ -1187,10 +1191,11 @@ decl_module! { fn force_unstake(origin, stash: T::AccountId) { ensure_root(origin)?; + // remove all staking-related information. + Self::kill_stash(&stash)?; + // remove the lock. T::Currency::remove_lock(STAKING_ID, &stash); - // remove all staking-related information. - Self::kill_stash(&stash); } /// Force there to be a new era at the end of sessions indefinitely. @@ -1254,9 +1259,22 @@ decl_module! { ); let ledger = ledger.rebond(value); - Self::update_ledger(&controller, &ledger); } + + /// Remove all data structure concerning a staker/stash once its balance is zero. + /// This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone + /// and the target `stash` must have no funds left. + /// + /// This can be called from any origin. + /// + /// - `stash`: The stash account to reap. Its balance must be zero. + fn reap_stash(_origin, stash: T::AccountId) { + Self::ensure_storage_upgraded(); + ensure!(T::Currency::total_balance(&stash).is_zero(), Error::::FundedTarget); + Self::kill_stash(&stash)?; + T::Currency::remove_lock(STAKING_ID, &stash); + } } } @@ -1585,18 +1603,22 @@ impl Module { /// /// Assumes storage is upgraded before calling. /// - /// This is called : - /// - Immediately when an account's balance falls below existential deposit. + /// This is called: /// - after a `withdraw_unbond()` call that frees all of a stash's bonded balance. - fn kill_stash(stash: &T::AccountId) { - if let Some(controller) = >::take(stash) { - >::remove(&controller); - } + /// - through `reap_stash()` if the balance has fallen to zero (through slashing). + fn kill_stash(stash: &T::AccountId) -> DispatchResult { + let controller = Bonded::::take(stash).ok_or(Error::::NotStash)?; + >::remove(&controller); + >::remove(stash); >::remove(stash); >::remove(stash); slashing::clear_stash_metadata::(stash); + + system::Module::::dec_ref(stash); + + Ok(()) } /// Add reward points to validators using their stash account ID. @@ -1676,13 +1698,6 @@ impl SessionManager> } } -impl OnReapAccount for Module { - fn on_reap_account(stash: &T::AccountId) { - Self::ensure_storage_upgraded(); - Self::kill_stash(stash); - } -} - /// Add reward points to block authors: /// * 20 points to the block producer for producing a (non-uncle) block in the relay chain, /// * 2 points to the block producer for each reference to a previously unreferenced uncle, and diff --git a/frame/staking/src/mock.rs b/frame/staking/src/mock.rs index c5f3ef25080..22d66284635 100644 --- a/frame/staking/src/mock.rs +++ b/frame/staking/src/mock.rs @@ -140,12 +140,12 @@ impl frame_system::Trait for Test { type ModuleToIndex = (); type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = (Balances, Staking, Session); + type OnKilledAccount = (); } impl pallet_balances::Trait for Test { type Balance = Balance; - type Event = (); type DustRemoval = (); + type Event = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; } @@ -156,13 +156,13 @@ parameter_types! { pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(25); } impl pallet_session::Trait for Test { - type SessionManager = pallet_session::historical::NoteHistoricalRoot; - type Keys = UintAuthorityId; - type ShouldEndSession = pallet_session::PeriodicSessions; - type SessionHandler = TestSessionHandler; type Event = (); type ValidatorId = AccountId; type ValidatorIdOf = crate::StashOf; + type ShouldEndSession = pallet_session::PeriodicSessions; + type SessionManager = pallet_session::historical::NoteHistoricalRoot; + type SessionHandler = TestSessionHandler; + type Keys = UintAuthorityId; type DisabledValidatorsThreshold = DisabledValidatorsThreshold; } @@ -300,22 +300,22 @@ impl ExtBuilder { let _ = pallet_balances::GenesisConfig::{ balances: vec![ - (1, 10 * balance_factor), - (2, 20 * balance_factor), - (3, 300 * balance_factor), - (4, 400 * balance_factor), - (10, balance_factor), - (11, balance_factor * 1000), - (20, balance_factor), - (21, balance_factor * 2000), - (30, balance_factor), - (31, balance_factor * 2000), - (40, balance_factor), - (41, balance_factor * 2000), - (100, 2000 * balance_factor), - (101, 2000 * balance_factor), - // This allow us to have a total_payout different from 0. - (999, 1_000_000_000_000), + (1, 10 * balance_factor), + (2, 20 * balance_factor), + (3, 300 * balance_factor), + (4, 400 * balance_factor), + (10, balance_factor), + (11, balance_factor * 1000), + (20, balance_factor), + (21, balance_factor * 2000), + (30, balance_factor), + (31, balance_factor * 2000), + (40, balance_factor), + (41, balance_factor * 2000), + (100, 2000 * balance_factor), + (101, 2000 * balance_factor), + // This allow us to have a total_payout different from 0. + (999, 1_000_000_000_000), ], }.assimilate_storage(&mut storage); @@ -346,7 +346,7 @@ impl ExtBuilder { }.assimilate_storage(&mut storage); let _ = pallet_session::GenesisConfig:: { - keys: validators.iter().map(|x| (*x, UintAuthorityId(*x))).collect(), + keys: validators.iter().map(|x| (*x, *x, UintAuthorityId(*x))).collect(), }.assimilate_storage(&mut storage); let mut ext = sp_io::TestExternalities::from(storage); diff --git a/frame/staking/src/tests.rs b/frame/staking/src/tests.rs index 73215d61177..d950c171ad1 100644 --- a/frame/staking/src/tests.rs +++ b/frame/staking/src/tests.rs @@ -1456,6 +1456,9 @@ fn on_free_balance_zero_stash_removes_validator() { // Check total balance of stash assert_eq!(Balances::total_balance(&11), 0); + // Reap the stash + assert_ok!(Staking::reap_stash(Origin::NONE, 11)); + // Check storage items do not exist assert!(!>::contains_key(&10)); assert!(!>::contains_key(&11)); @@ -1509,6 +1512,9 @@ fn on_free_balance_zero_stash_removes_nominator() { // Check total balance of stash assert_eq!(Balances::total_balance(&11), 0); + // Reap the stash + assert_ok!(Staking::reap_stash(Origin::NONE, 11)); + // Check storage items do not exist assert!(!>::contains_key(&10)); assert!(!>::contains_key(&11)); @@ -2303,6 +2309,10 @@ fn garbage_collection_after_slashing() { // so we don't test those here. assert_eq!(Balances::free_balance(11), 0); + assert_eq!(Balances::total_balance(&11), 0); + + assert_ok!(Staking::reap_stash(Origin::NONE, 11)); + assert!(::SlashingSpans::get(&11).is_none()); assert_eq!(::SpanSlash::get(&(11, 0)).amount_slashed(), &0); }) diff --git a/frame/support/src/storage/migration.rs b/frame/support/src/storage/migration.rs index e8d58b46d4c..291dceb4ea1 100644 --- a/frame/support/src/storage/migration.rs +++ b/frame/support/src/storage/migration.rs @@ -70,6 +70,11 @@ impl Iterator for StorageIterator { } } +/// Get a particular value in storage by the `module`, the map's `item` name and the key `hash`. +pub fn have_storage_value(module: &[u8], item: &[u8], hash: &[u8]) -> bool { + get_storage_value::<()>(module, item, hash).is_some() +} + /// Get a particular value in storage by the `module`, the map's `item` name and the key `hash`. pub fn get_storage_value(module: &[u8], item: &[u8], hash: &[u8]) -> Option { let mut key = vec![0u8; 32 + hash.len()]; diff --git a/frame/support/src/traits.rs b/frame/support/src/traits.rs index 4730e1955e7..bd6895bda5b 100644 --- a/frame/support/src/traits.rs +++ b/frame/support/src/traits.rs @@ -195,9 +195,9 @@ pub trait OnNewAccount { /// The account with the given id was reaped. #[impl_trait_for_tuples::impl_for_tuples(30)] -pub trait OnReapAccount { +pub trait OnKilledAccount { /// The account with the given id was reaped. - fn on_reap_account(who: &AccountId); + fn on_killed_account(who: &AccountId); } /// A trait for finding the author of a block header based on the `PreRuntime` digests contained diff --git a/frame/system/benches/bench.rs b/frame/system/benches/bench.rs index 1e24cb2c059..cfcaa6f64ac 100644 --- a/frame/system/benches/bench.rs +++ b/frame/system/benches/bench.rs @@ -78,7 +78,7 @@ impl system::Trait for Runtime { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } impl module::Trait for Runtime { diff --git a/frame/system/src/lib.rs b/frame/system/src/lib.rs index ec35fe3b603..f89c9efbd29 100644 --- a/frame/system/src/lib.rs +++ b/frame/system/src/lib.rs @@ -93,6 +93,7 @@ use serde::Serialize; use sp_std::prelude::*; #[cfg(any(feature = "std", test))] use sp_std::map; +use sp_std::convert::Infallible; use sp_std::marker::PhantomData; use sp_std::fmt::Debug; use sp_version::RuntimeVersion; @@ -112,9 +113,9 @@ use sp_runtime::{ use sp_core::{ChangesTrieConfiguration, storage::well_known_keys}; use frame_support::{ - decl_module, decl_event, decl_storage, decl_error, storage, Parameter, + decl_module, decl_event, decl_storage, decl_error, storage, Parameter, ensure, debug, traits::{ - Contains, Get, ModuleToIndex, OnNewAccount, OnReapAccount, IsDeadAccount, Happened, + Contains, Get, ModuleToIndex, OnNewAccount, OnKilledAccount, IsDeadAccount, Happened, StoredMap }, weights::{Weight, DispatchInfo, DispatchClass, SimpleDispatchInfo, FunctionOf}, @@ -219,7 +220,7 @@ pub trait Trait: 'static + Eq + Clone { /// A function that is invoked when an account has been determined to be dead. /// /// All resources should be cleaned up associated with the given account. - type OnReapAccount: OnReapAccount; + type OnKilledAccount: OnKilledAccount; } pub type DigestOf = generic::Digest<::Hash>; @@ -290,13 +291,29 @@ fn hash69 + Default>() -> T { /// which can't contain more than `u32::max_value()` items. type EventIndex = u32; +/// Type used to encode the number of references an account has. +pub type RefCount = u8; + +/// Information of an account. +#[derive(Clone, Eq, PartialEq, Default, RuntimeDebug, Encode, Decode)] +pub struct AccountInfo { + /// The number of transactions this account has sent. + pub nonce: Index, + /// The number of other modules that currently depend on this account's existence. The account + /// cannot be reaped until this is zero. + pub refcount: RefCount, + /// The additional data that belongs to this account. Used to store the balance(s) in a lot of + /// chains. + pub data: AccountData, +} + decl_storage! { trait Store for Module as System { /// The full account information for a particular account ID. // TODO: should be hasher(twox64_concat) - will need staged migration - // TODO: should not including T::Index (the nonce) // https://github.com/paritytech/substrate/issues/4917 - pub Account get(fn account): map hasher(blake2_256) T::AccountId => (T::Index, T::AccountData); + pub Account get(fn account): + map hasher(blake2_256) T::AccountId => AccountInfo; /// Total extrinsics count for the current block. ExtrinsicCount: Option; @@ -384,7 +401,7 @@ decl_event!( /// A new account was created. NewAccount(AccountId), /// An account was reaped. - ReapedAccount(AccountId), + KilledAccount(AccountId), } ); @@ -407,6 +424,11 @@ decl_error! { /// /// Either calling `Core_version` or decoding `RuntimeVersion` failed. FailedToExtractRuntimeVersion, + + /// Suicide called when the account has non-default composite data. + NonDefaultComposite, + /// There is a non-zero reference count preventing the account from being purged. + NonZeroRefCount } } @@ -517,6 +539,17 @@ decl_module! { ensure_root(origin)?; storage::unhashed::kill_prefix(&prefix); } + + /// Kill the sending account, assuming there are no references outstanding and the composite + /// data is equal to its default value. + #[weight = SimpleDispatchInfo::FixedOperational(25_000)] + fn suicide(origin) { + let who = ensure_signed(origin)?; + let account = Account::::get(&who); + ensure!(account.refcount == 0, Error::::NonZeroRefCount); + ensure!(account.data == T::AccountData::default(), Error::::NonDefaultComposite); + Account::::remove(who); + } } } @@ -637,13 +670,40 @@ impl Default for InitKind { } } +/// Reference status; can be either referenced or unreferenced. +pub enum RefStatus { + Referenced, + Unreferenced, +} + impl Module { /// Deposits an event into this block's event record. pub fn deposit_event(event: impl Into) { Self::deposit_event_indexed(&[], event.into()); } - /// Deposits an event into this block's event record adding this event + /// Increment the reference counter on an account. + pub fn inc_ref(who: &T::AccountId) { + Account::::mutate(who, |a| a.refcount = a.refcount.saturating_add(1)); + } + + /// Decrement the reference counter on an account. This *MUST* only be done once for every time + /// you called `inc_ref` on `who`. + pub fn dec_ref(who: &T::AccountId) { + Account::::mutate(who, |a| a.refcount = a.refcount.saturating_sub(1)); + } + + /// The number of outstanding references for the account `who`. + pub fn refs(who: &T::AccountId) -> RefCount { + Account::::get(who).refcount + } + + /// True if the account has no outstanding references. + pub fn allow_death(who: &T::AccountId) -> bool { + Account::::get(who).refcount == 0 + } + + /// Deposits an event into this block's event record adding this event /// to the corresponding topic indexes. /// /// This will update storage entries that correspond to the specified topics. @@ -855,12 +915,12 @@ impl Module { /// Retrieve the account transaction counter from storage. pub fn account_nonce(who: impl EncodeLike) -> T::Index { - Account::::get(who).0 + Account::::get(who).nonce } /// Increment a particular account's nonce by 1. pub fn inc_account_nonce(who: impl EncodeLike) { - Account::::mutate(who, |a| a.0 += T::Index::one()); + Account::::mutate(who, |a| a.nonce += T::Index::one()); } /// Note what the extrinsic data of the current extrinsic index is. If this @@ -912,18 +972,28 @@ impl Module { Self::deposit_event(RawEvent::NewAccount(who)); } - /// Kill the account and reap any related information. - pub fn kill_account(who: T::AccountId) { - if Account::::contains_key(&who) { - Account::::remove(&who); - Self::on_killed_account(who); - } - } - /// Do anything that needs to be done after an account has been killed. fn on_killed_account(who: T::AccountId) { - T::OnReapAccount::on_reap_account(&who); - Self::deposit_event(RawEvent::ReapedAccount(who)); + T::OnKilledAccount::on_killed_account(&who); + Self::deposit_event(RawEvent::KilledAccount(who)); + } + + /// Remove an account from storage. This should only be done when its refs are zero or you'll + /// get storage leaks in other modules. Nonetheless we assume that the calling logic knows best. + /// + /// This is a no-op if the account doesn't already exist. If it does then it will ensure + /// cleanups (those in `on_killed_account`) take place. + fn kill_account(who: &T::AccountId) { + if Account::::contains_key(who) { + let account = Account::::take(who); + if account.refcount > 0 { + debug::debug!( + target: "system", + "WARNING: Referenced account deleted. This is probably a bug." + ); + } + Module::::on_killed_account(who.clone()); + } } } @@ -939,7 +1009,7 @@ impl Happened for CallOnCreatedAccount { pub struct CallKillAccount(PhantomData); impl Happened for CallKillAccount { fn happened(who: &T::AccountId) { - Module::::kill_account(who.clone()); + Module::::kill_account(who) } } @@ -948,53 +1018,45 @@ impl Happened for CallKillAccount { // Anything more complex will need more sophisticated logic. impl StoredMap for Module { fn get(k: &T::AccountId) -> T::AccountData { - Account::::get(k).1 + Account::::get(k).data } fn is_explicit(k: &T::AccountId) -> bool { Account::::contains_key(k) } - fn insert(k: &T::AccountId, t: T::AccountData) { + fn insert(k: &T::AccountId, data: T::AccountData) { let existed = Account::::contains_key(k); - Account::::insert(k, (T::Index::default(), t)); + Account::::mutate(k, |a| a.data = data); if !existed { Self::on_created_account(k.clone()); } } fn remove(k: &T::AccountId) { - if Account::::contains_key(&k) { - Self::kill_account(k.clone()); - } + Self::kill_account(k) } fn mutate(k: &T::AccountId, f: impl FnOnce(&mut T::AccountData) -> R) -> R { let existed = Account::::contains_key(k); - let r = Account::::mutate(k, |a| f(&mut a.1)); + let r = Account::::mutate(k, |a| f(&mut a.data)); if !existed { Self::on_created_account(k.clone()); } r } fn mutate_exists(k: &T::AccountId, f: impl FnOnce(&mut Option) -> R) -> R { - let (existed, exists, r) = Account::::mutate_exists(k, |maybe_value| { - let existed = maybe_value.is_some(); - let (maybe_nonce, mut maybe_extra) = split_inner(maybe_value.take(), |v| v); - let r = f(&mut maybe_extra); - *maybe_value = maybe_extra.map(|extra| (maybe_nonce.unwrap_or_default(), extra)); - (existed, maybe_value.is_some(), r) - }); - if !existed && exists { - Self::on_created_account(k.clone()); - } else if existed && !exists { - Self::on_killed_account(k.clone()); - } - r + Self::try_mutate_exists(k, |x| -> Result { Ok(f(x)) }).expect("Infallible; qed") } fn try_mutate_exists(k: &T::AccountId, f: impl FnOnce(&mut Option) -> Result) -> Result { Account::::try_mutate_exists(k, |maybe_value| { let existed = maybe_value.is_some(); - let (maybe_nonce, mut maybe_extra) = split_inner(maybe_value.take(), |v| v); - f(&mut maybe_extra).map(|v| { - *maybe_value = maybe_extra.map(|extra| (maybe_nonce.unwrap_or_default(), extra)); - (existed, maybe_value.is_some(), v) + let (maybe_prefix, mut maybe_data) = split_inner( + maybe_value.take(), + |account| ((account.nonce, account.refcount), account.data) + ); + f(&mut maybe_data).map(|result| { + *maybe_value = maybe_data.map(|data| { + let (nonce, refcount) = maybe_prefix.unwrap_or_default(); + AccountInfo { nonce, refcount, data } + }); + (existed, maybe_value.is_some(), result) }) }).map(|(existed, exists, v)| { if !existed && exists { @@ -1213,17 +1275,18 @@ impl SignedExtension for CheckNonce { _info: Self::DispatchInfo, _len: usize, ) -> Result<(), TransactionValidityError> { - let (expected, extra) = Account::::get(who); - if self.0 != expected { + let mut account = Account::::get(who); + if self.0 != account.nonce { return Err( - if self.0 < expected { + if self.0 < account.nonce { InvalidTransaction::Stale } else { InvalidTransaction::Future }.into() ) } - Account::::insert(who, (expected + T::Index::one(), extra)); + account.nonce += T::Index::one(); + Account::::insert(who, account); Ok(()) } @@ -1235,13 +1298,13 @@ impl SignedExtension for CheckNonce { _len: usize, ) -> TransactionValidity { // check index - let (expected, _extra) = Account::::get(who); - if self.0 < expected { + let account = Account::::get(who); + if self.0 < account.nonce { return InvalidTransaction::Stale.into() } let provides = vec![Encode::encode(&(who, self.0))]; - let requires = if expected < self.0 { + let requires = if account.nonce < self.0 { vec![Encode::encode(&(who, self.0 - One::one()))] } else { vec![] @@ -1411,6 +1474,7 @@ impl Lookup for ChainContext { #[cfg(test)] mod tests { use super::*; + use sp_std::cell::RefCell; use sp_core::H256; use sp_runtime::{traits::{BlakeTwo256, IdentityLookup}, testing::Header, DispatchError}; use frame_support::{impl_outer_origin, parameter_types}; @@ -1437,6 +1501,15 @@ mod tests { }; } + thread_local!{ + pub static KILLED: RefCell> = RefCell::new(vec![]); + } + + pub struct RecordKilled; + impl OnKilledAccount for RecordKilled { + fn on_killed_account(who: &u64) { KILLED.with(|r| r.borrow_mut().push(*who)) } + } + impl Trait for Test { type Origin = Origin; type Call = (); @@ -1454,9 +1527,9 @@ mod tests { type MaximumBlockLength = MaximumBlockLength; type Version = Version; type ModuleToIndex = (); - type AccountData = (); + type AccountData = u32; type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = RecordKilled; } impl From> for u16 { @@ -1493,6 +1566,27 @@ mod tests { assert_eq!(x, Ok(RawOrigin::::Signed(1u64))); } + #[test] + fn stored_map_works() { + new_test_ext().execute_with(|| { + System::insert(&0, 42); + assert!(System::allow_death(&0)); + + System::inc_ref(&0); + assert!(!System::allow_death(&0)); + + System::insert(&0, 69); + assert!(!System::allow_death(&0)); + + System::dec_ref(&0); + assert!(System::allow_death(&0)); + + assert!(KILLED.with(|r| r.borrow().is_empty())); + System::kill_account(&0); + assert_eq!(KILLED.with(|r| r.borrow().clone()), vec![0u64]); + }); + } + #[test] fn deposit_event_should_work() { new_test_ext().execute_with(|| { @@ -1645,7 +1739,7 @@ mod tests { #[test] fn signed_ext_check_nonce_works() { new_test_ext().execute_with(|| { - Account::::insert(1, (1, ())); + Account::::insert(1, AccountInfo { nonce: 1, refcount: 0, data: 0 }); let info = DispatchInfo::default(); let len = 0_usize; // stale diff --git a/frame/system/src/offchain.rs b/frame/system/src/offchain.rs index 507092f626d..5abafe76551 100644 --- a/frame/system/src/offchain.rs +++ b/frame/system/src/offchain.rs @@ -128,19 +128,20 @@ pub trait SignAndSubmitTransaction { fn sign_and_submit(call: impl Into, public: PublicOf) -> Result<(), ()> { let call = call.into(); let id = public.clone().into_account(); - let (expected_nonce, extra) = super::Account::::get(&id); + let mut account = super::Account::::get(&id); debug::native::debug!( target: "offchain", "Creating signed transaction from account: {:?} (nonce: {:?})", id, - expected_nonce, + account.nonce, ); let (call, signature_data) = Self::CreateTransaction - ::create_transaction::(call, public, id.clone(), expected_nonce) + ::create_transaction::(call, public, id.clone(), account.nonce) .ok_or(())?; // increment the nonce. This is fine, since the code should always // be running in off-chain context, so we NEVER persists data. - super::Account::::insert(&id, (expected_nonce + One::one(), extra)); + account.nonce += One::one(); + super::Account::::insert(&id, account); let xt = Self::Extrinsic::new(call, Some(signature_data)).ok_or(())?; sp_io::offchain::submit_transaction(xt.encode()) diff --git a/frame/timestamp/src/lib.rs b/frame/timestamp/src/lib.rs index de36b65851b..1c3fec2112a 100644 --- a/frame/timestamp/src/lib.rs +++ b/frame/timestamp/src/lib.rs @@ -278,7 +278,7 @@ mod tests { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } parameter_types! { pub const MinimumPeriod: u64 = 5; diff --git a/frame/transaction-payment/src/lib.rs b/frame/transaction-payment/src/lib.rs index 0d9cfc0b776..67b3fa63ac0 100644 --- a/frame/transaction-payment/src/lib.rs +++ b/frame/transaction-payment/src/lib.rs @@ -304,7 +304,7 @@ mod tests { type ModuleToIndex = (); type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = Balances; + type OnKilledAccount = (); } parameter_types! { diff --git a/frame/treasury/src/lib.rs b/frame/treasury/src/lib.rs index 192dd1aff61..bbf31cc599d 100644 --- a/frame/treasury/src/lib.rs +++ b/frame/treasury/src/lib.rs @@ -760,7 +760,7 @@ mod tests { type ModuleToIndex = (); type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = Balances; + type OnKilledAccount = (); } parameter_types! { pub const ExistentialDeposit: u64 = 1; diff --git a/frame/utility/src/lib.rs b/frame/utility/src/lib.rs index da099fcb4ad..76f3ca6bf62 100644 --- a/frame/utility/src/lib.rs +++ b/frame/utility/src/lib.rs @@ -258,7 +258,7 @@ decl_module! { /// - The weight of the `call` + 10,000. /// # #[weight = FunctionOf( - |args: (&u16, &Box<::Call>)| args.1.get_dispatch_info().weight + 10_000, + |args: (&u16, &Box<::Call>)| args.1.get_dispatch_info().weight + 10_000, |args: (&u16, &Box<::Call>)| args.1.get_dispatch_info().class, true )] @@ -410,7 +410,7 @@ decl_module! { #[weight = FunctionOf( |args: (&u16, &Vec, &Option>, &[u8; 32])| { 10_000 * (args.1.len() as u32 + 1) - }, + }, DispatchClass::Normal, true )] @@ -485,7 +485,7 @@ decl_module! { #[weight = FunctionOf( |args: (&u16, &Vec, &Timepoint, &[u8; 32])| { 10_000 * (args.1.len() as u32 + 1) - }, + }, DispatchClass::Normal, true )] @@ -624,7 +624,7 @@ mod tests { type ModuleToIndex = (); type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = Balances; + type OnKilledAccount = (); } parameter_types! { pub const ExistentialDeposit: u64 = 1; diff --git a/frame/vesting/src/lib.rs b/frame/vesting/src/lib.rs index dd512598428..fdc480ddd04 100644 --- a/frame/vesting/src/lib.rs +++ b/frame/vesting/src/lib.rs @@ -339,7 +339,7 @@ mod tests { type ModuleToIndex = (); type AccountData = pallet_balances::AccountData; type OnNewAccount = (); - type OnReapAccount = Balances; + type OnKilledAccount = (); } impl pallet_balances::Trait for Test { type Balance = u64; diff --git a/test-utils/runtime/src/lib.rs b/test-utils/runtime/src/lib.rs index 138e79cdd5c..55e153103d9 100644 --- a/test-utils/runtime/src/lib.rs +++ b/test-utils/runtime/src/lib.rs @@ -374,7 +374,7 @@ impl frame_system::Trait for Runtime { type ModuleToIndex = (); type AccountData = (); type OnNewAccount = (); - type OnReapAccount = (); + type OnKilledAccount = (); } impl pallet_timestamp::Trait for Runtime { -- GitLab From 41bb2193a267805e2093a081bc3e2aaccc64283a Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Mon, 24 Feb 2020 18:07:38 +0100 Subject: [PATCH 032/106] Add storage root recalculation time to benchmarks (#5035) --- frame/benchmarking/src/lib.rs | 17 ++++++++++++----- frame/benchmarking/src/utils.rs | 2 +- utils/frame/benchmarking-cli/src/lib.rs | 5 +++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/frame/benchmarking/src/lib.rs b/frame/benchmarking/src/lib.rs index a78d59ef339..3ad4a9a8a07 100644 --- a/frame/benchmarking/src/lib.rs +++ b/frame/benchmarking/src/lib.rs @@ -20,6 +20,8 @@ mod utils; pub use utils::*; +#[doc(hidden)] +pub use sp_io::storage::root as storage_root; /// Construct pallet benchmarks for weighing dispatchables. /// @@ -177,12 +179,17 @@ macro_rules! impl_benchmark { // Commit the externalities to the database, flushing the DB cache. // This will enable worst case scenario for reading from the database. $crate::benchmarking::commit_db(); - // Run the benchmark. - let start = $crate::benchmarking::current_time(); + // Time the extrinsic logic. + let start_extrinsic = $crate::benchmarking::current_time(); call.dispatch(caller.into())?; - let finish = $crate::benchmarking::current_time(); - let elapsed = finish - start; - results.push((c.clone(), elapsed)); + let finish_extrinsic = $crate::benchmarking::current_time(); + let elapsed_extrinsic = finish_extrinsic - start_extrinsic; + // Time the storage root recalculation. + let start_storage_root = $crate::benchmarking::current_time(); + $crate::storage_root(); + let finish_storage_root = $crate::benchmarking::current_time(); + let elapsed_storage_root = finish_storage_root - start_storage_root; + results.push((c.clone(), elapsed_extrinsic, elapsed_storage_root)); // Wipe the DB back to the genesis state. $crate::benchmarking::wipe_db(); } diff --git a/frame/benchmarking/src/utils.rs b/frame/benchmarking/src/utils.rs index 81e87a45f89..5a67ea69431 100644 --- a/frame/benchmarking/src/utils.rs +++ b/frame/benchmarking/src/utils.rs @@ -31,7 +31,7 @@ pub enum BenchmarkParameter { /// Results from running benchmarks on a FRAME pallet. /// Contains duration of the function call in nanoseconds along with the benchmark parameters /// used for that benchmark result. -pub type BenchmarkResults = (Vec<(BenchmarkParameter, u32)>, u128); +pub type BenchmarkResults = (Vec<(BenchmarkParameter, u32)>, u128, u128); sp_api::decl_runtime_apis! { /// Runtime api for benchmarking a FRAME runtime. diff --git a/utils/frame/benchmarking-cli/src/lib.rs b/utils/frame/benchmarking-cli/src/lib.rs index b515e490131..816ce521310 100644 --- a/utils/frame/benchmarking-cli/src/lib.rs +++ b/utils/frame/benchmarking-cli/src/lib.rs @@ -124,12 +124,13 @@ impl BenchmarkCmd { // Print the table header results[0].0.iter().for_each(|param| print!("{:?},", param.0)); - print!("time\n"); + print!("extrinsic_time,storage_root_time\n"); // Print the values results.iter().for_each(|result| { let parameters = &result.0; parameters.iter().for_each(|param| print!("{:?},", param.1)); - print!("{:?}\n", result.1); + // Print extrinsic time and storage root time + print!("{:?},{:?}\n", result.1, result.2); }); eprintln!("Done."); -- GitLab From 993e5f694a1dfc06f64adb17ba2b624c8a1fbb12 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Tue, 25 Feb 2020 15:48:29 +0100 Subject: [PATCH 033/106] adding unleash to ci (#5020) * adding unleash to ci * fixing formatting * with a dot please * alpha.3 now * do not publish testing helpers * remove old test-helpers cruft * fix cargo.lock * with alpha 4 * do not publish runtime-interface-test either * disable more test crates from publishing * switch to alpha.5 * replace tempdir with tempfile * update lru * switch to bytes 0.5 * release script fixes * switch on and to latest alpha * BUT THE SPACES --- .gitlab-ci.yml | 21 ++ Cargo.lock | 292 +++++++----------- bin/node/testing/Cargo.toml | 3 +- bin/node/testing/src/bench.rs | 6 +- client/authority-discovery/Cargo.toml | 2 +- client/network-gossip/Cargo.toml | 2 +- client/network/Cargo.toml | 5 +- .../runtime-interface/test-wasm/Cargo.toml | 1 + primitives/test-primitives/Cargo.toml | 1 + test-utils/client/Cargo.toml | 1 + test-utils/runtime/Cargo.toml | 1 + test-utils/runtime/client/Cargo.toml | 1 + .../runtime/transaction-pool/Cargo.toml | 1 + 13 files changed, 147 insertions(+), 190 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 36e1da8d108..1fa4a6dadb5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,6 +37,9 @@ variables: CI_SERVER_NAME: "GitLab CI" DOCKER_OS: "debian:stretch" ARCH: "x86_64" + # FIXME set to release + CARGO_UNLEASH_INSTALL_PARAMS: "--version 1.0.0-alpha.6" + CARGO_UNLEASH_PKG_DEF: "--skip node node-* subkey chain-spec-builder" .collect-artifacts: &collect-artifacts @@ -174,6 +177,9 @@ test-dependency-rules: - $DEPLOY_TAG script: - .maintain/ensure-deps.sh + # FIXME set to release + - cargo install cargo-unleash ${CARGO_UNLEASH_INSTALL_PARAMS} + - cargo unleash check ${CARGO_UNLEASH_PKG_DEF} test-frame-staking: stage: test @@ -550,6 +556,21 @@ publish-draft-release: interruptible: true allow_failure: true +publish-to-crates-io: + stage: publish + <<: *docker-env + dependencies: + - build-linux-substrate + - test-dependency-rules + only: + - tags + - /^v[0-9]+\.[0-9]+\.[0-9]+.*$/ + script: + - cargo install cargo-unleash ${CARGO_UNLEASH_INSTALL_PARAMS} + - cargo unleash em-dragons --no-check ${CARGO_UNLEASH_PKG_DEF} + interruptible: true + allow_failure: true + .deploy-template: &deploy stage: kubernetes when: manual diff --git a/Cargo.lock b/Cargo.lock index 48b14599b1c..38021aeeb32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -146,7 +146,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502" dependencies = [ - "quote 1.0.2", + "quote", "syn", ] @@ -305,25 +305,26 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.49.4" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c07087f3d5731bf3fb375a81841b99597e25dc11bd3bc72d16d43adf6624a6e" +checksum = "99de13bb6361e01e493b3db7928085dcc474b7ba4f5481818e53a89d76b8393f" dependencies = [ "bitflags", "cexpr", "cfg-if", "clang-sys", "clap", - "env_logger 0.6.2", - "fxhash", + "env_logger 0.7.1", "lazy_static", + "lazycell", "log 0.4.8", "peeking_take_while", - "proc-macro2 0.4.30", - "quote 0.6.13", + "proc-macro2", + "quote", "regex", + "rustc-hash", "shlex", - "which 2.0.1", + "which", ] [[package]] @@ -1015,7 +1016,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd8ce37ad4184ab2ce004c33bf6379185d3b1c95801cab51026bd271bf68eedc" dependencies = [ - "quote 1.0.2", + "quote", "syn", ] @@ -1077,8 +1078,8 @@ version = "0.99.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a806e96c59a76a5ba6e18735b6cf833344671e61e7863f2edb5c518ea2cac95c" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -1168,8 +1169,8 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ecf634c5213044b8d54a46dd282cf5dd1f86bb5cb53e92c409cb4680a7fb9894" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -1334,8 +1335,8 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", "synstructure", ] @@ -1530,8 +1531,8 @@ name = "frame-support-procedural" version = "2.0.0-dev" dependencies = [ "frame-support-procedural-tools", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -1541,8 +1542,8 @@ version = "2.0.0-dev" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -1550,8 +1551,8 @@ dependencies = [ name = "frame-support-procedural-tools-derive" version = "2.0.0-dev" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -1750,8 +1751,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -1828,15 +1829,6 @@ dependencies = [ "pin-project", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder 1.3.4", -] - [[package]] name = "gcc" version = "0.3.55" @@ -2010,12 +2002,6 @@ dependencies = [ "crunchy", ] -[[package]] -name = "hashbrown" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1de41fb8dba9714efd92241565cdff73f78508c95697dd56787d3cba27e2353" - [[package]] name = "hashbrown" version = "0.6.3" @@ -2316,8 +2302,8 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -2439,8 +2425,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8609af8f63b626e8e211f52441fcdb6ec54f1a446606b10d5c89ae9bf8a20058" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -2621,9 +2607,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.66" +version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" +checksum = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018" [[package]] name = "libloading" @@ -2712,7 +2698,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d472e9d522f588805c77801de10b957be84e10f019ca5f869fa1825b15ea9b" dependencies = [ - "quote 1.0.2", + "quote", "syn", ] @@ -2770,7 +2756,7 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log 0.4.8", - "lru 0.4.3", + "lru", "prost", "prost-build", "rand 0.7.3", @@ -3050,9 +3036,9 @@ dependencies = [ [[package]] name = "librocksdb-sys" -version = "6.2.4" +version = "6.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a0785e816e1e11e7599388a492c61ef80ddc2afc91e313e61662cce537809be" +checksum = "4e3b727e2dd20ec2fb7ed93f23d9fd5328a0871185485ebdaff007b47d3e27e4" dependencies = [ "bindgen", "cc", @@ -3130,22 +3116,13 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "lru" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8f669d42c72d18514dfca8115689c5f6370a17d980cb5bd777a67f404594c8" -dependencies = [ - "hashbrown 0.5.0", -] - [[package]] name = "lru" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237" dependencies = [ - "hashbrown 0.6.3", + "hashbrown", ] [[package]] @@ -3171,9 +3148,9 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "memchr" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53445de381a1f436797497c61d851644d0e8e88e6140f22872ad33a704933978" +checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" [[package]] name = "memoffset" @@ -3192,7 +3169,7 @@ checksum = "198831fe8722331a395bc199a5d08efbc197497ef354cb4c77b969c02ffc0fc4" dependencies = [ "ahash", "hash-db", - "hashbrown 0.6.3", + "hashbrown", "parity-util-mem", ] @@ -3693,7 +3670,7 @@ dependencies = [ "sp-runtime", "sp-timestamp", "substrate-test-client", - "tempdir", + "tempfile", "wabt", ] @@ -4417,8 +4394,8 @@ name = "pallet-staking-reward-curve" version = "2.0.0-dev" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "sp-runtime", "syn", ] @@ -4653,8 +4630,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34e513ff3e406f3ede6796dcdc83d0b32ffb86668cea1ccf7363118abeb00476" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -4685,7 +4662,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" dependencies = [ - "proc-macro2 1.0.8", + "proc-macro2", "syn", "synstructure", ] @@ -4772,8 +4749,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4214c9e912ef61bf42b81ba9a47e8aad1b2ffaf739ab162bf96d1e011f54e6c5" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -4836,8 +4813,8 @@ version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -4950,8 +4927,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "052b3c9af39c7e5e94245f820530487d19eb285faedcb40e0c3275132293f242" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "rustversion", "syn", ] @@ -4962,8 +4939,8 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d175bef481c7902e63e3165627123fff3502f06ac043d3ef42d08c1246da9253" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "rustversion", "syn", "syn-mid", @@ -4975,8 +4952,8 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -4986,22 +4963,13 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" -[[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.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" dependencies = [ - "unicode-xid 0.2.0", + "unicode-xid", ] [[package]] @@ -5056,7 +5024,7 @@ dependencies = [ "prost", "prost-types", "tempfile", - "which 3.1.0", + "which", ] [[package]] @@ -5067,8 +5035,8 @@ checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -5128,22 +5096,13 @@ dependencies = [ "pin-project-lite", ] -[[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.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" dependencies = [ - "proc-macro2 1.0.8", + "proc-macro2", ] [[package]] @@ -5550,8 +5509,8 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3bba175698996010c4f6dce5e7f173b6eb781fce25d2cfc45e27091ce0b79f6" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -5620,7 +5579,7 @@ dependencies = [ name = "sc-authority-discovery" version = "0.8.0-dev" dependencies = [ - "bytes 0.4.12", + "bytes 0.5.4", "derive_more", "env_logger 0.7.1", "futures 0.3.4", @@ -5703,8 +5662,8 @@ name = "sc-chain-spec-derive" version = "2.0.0-dev" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -6228,7 +6187,7 @@ dependencies = [ "linked-hash-map", "linked_hash_set", "log 0.4.8", - "lru 0.4.3", + "lru", "nohash-hasher", "parity-scale-codec", "parking_lot 0.10.0", @@ -6255,7 +6214,6 @@ dependencies = [ "sp-keyring", "sp-runtime", "sp-test-primitives", - "substrate-test-client", "substrate-test-runtime", "substrate-test-runtime-client", "tempfile", @@ -6274,7 +6232,7 @@ dependencies = [ "futures-timer 3.0.2", "libp2p", "log 0.4.8", - "lru 0.1.17", + "lru", "parking_lot 0.10.0", "sc-network", "sp-runtime", @@ -6652,8 +6610,8 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8584eea9b9ff42825b46faf46a8c24d2cff13ec152fa2a50df788b87c07ee28" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -6746,8 +6704,8 @@ version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -6876,8 +6834,8 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a945ec7f7ce853e89ffa36be1e27dce9a43e82ff9093bf3461c30d5da74ed11b" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -6972,8 +6930,8 @@ version = "2.0.0-dev" dependencies = [ "blake2-rfc", "proc-macro-crate", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -7069,7 +7027,7 @@ version = "2.0.0-dev" dependencies = [ "derive_more", "log 0.4.8", - "lru 0.4.3", + "lru", "parity-scale-codec", "parking_lot 0.10.0", "sp-block-builder", @@ -7187,8 +7145,8 @@ dependencies = [ name = "sp-debug-derive" version = "2.0.0-dev" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -7342,8 +7300,8 @@ version = "2.0.0-dev" dependencies = [ "Inflector", "proc-macro-crate", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -7590,8 +7548,8 @@ checksum = "095064aa1f5b94d14e635d0a5684cf140c43ae40a0fd990708d38f5d669e5f64" dependencies = [ "heck", "proc-macro-error", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -7611,8 +7569,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0054a7df764039a6cd8592b9de84be4bec368ff081d203a7d5371cbfa8e65c81" dependencies = [ "heck", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -7829,13 +7787,13 @@ checksum = "7c65d530b10ccaeac294f349038a597e435b18fb456aadd0840a623f83b9e941" [[package]] name = "syn" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5" +checksum = "7a0294dc449adc58bb6592fff1a23d3e5e6e235afc6a0ffca2657d19e7bbffe5" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", - "unicode-xid 0.2.0", + "proc-macro2", + "quote", + "unicode-xid", ] [[package]] @@ -7844,8 +7802,8 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -7855,10 +7813,10 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", - "unicode-xid 0.2.0", + "unicode-xid", ] [[package]] @@ -7892,16 +7850,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe" -[[package]] -name = "tempdir" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -dependencies = [ - "rand 0.4.6", - "remove_dir_all", -] - [[package]] name = "tempfile" version = "3.1.0" @@ -7932,8 +7880,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a605baa797821796a751f4a959e1206079b24a4b7e1ed302b7d785d81a9276c9" dependencies = [ "lazy_static", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", "version_check 0.9.1", ] @@ -7962,8 +7910,8 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7b51e1fbc44b5a0840be594fbc0f960be09050f2617e61e6aa43bef97cd3ef4" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -8166,8 +8114,8 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4b1e7ed7d5d4c2af3d999904b0eebe76544897cdbfb2b9684bed2174ab20f7c" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", ] @@ -8356,7 +8304,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04cfd395def5a60236e187e1ff905cb55668a59f29928dec05e6e1b1fd2ac1f3" dependencies = [ - "quote 1.0.2", + "quote", "syn", ] @@ -8404,7 +8352,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de9222c50cc325855621271157c973da27a0dcd26fa06f8edf81020bd2333df0" dependencies = [ "hash-db", - "hashbrown 0.6.3", + "hashbrown", "log 0.4.8", "rustc-hex", "smallvec 1.2.0", @@ -8437,9 +8385,9 @@ checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" [[package]] name = "trybuild" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5867c525891caf154503954cb743ff7f1c4ca2c3e8578f6a5af84c913aa084c8" +checksum = "26ff1b18659a2218332848d76ad1c867ce4c6ee37b085e6bc8de9a6d11401220" dependencies = [ "glob 0.3.0", "lazy_static", @@ -8541,12 +8489,6 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" -[[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" @@ -8719,8 +8661,8 @@ dependencies = [ "bumpalo", "lazy_static", "log 0.4.8", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", "wasm-bindgen-shared", ] @@ -8743,7 +8685,7 @@ version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3" dependencies = [ - "quote 1.0.2", + "quote", "wasm-bindgen-macro-support", ] @@ -8753,8 +8695,8 @@ version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -8775,8 +8717,8 @@ dependencies = [ "anyhow", "heck", "log 0.4.8", - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", "wasm-bindgen-backend", "weedle", @@ -9064,16 +9006,6 @@ dependencies = [ "nom", ] -[[package]] -name = "which" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164" -dependencies = [ - "failure", - "libc", -] - [[package]] name = "which" version = "3.1.0" @@ -9218,8 +9150,8 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2" dependencies = [ - "proc-macro2 1.0.8", - "quote 1.0.2", + "proc-macro2", + "quote", "syn", "synstructure", ] diff --git a/bin/node/testing/Cargo.toml b/bin/node/testing/Cargo.toml index 4530c957608..936ae4c52b6 100644 --- a/bin/node/testing/Cargo.toml +++ b/bin/node/testing/Cargo.toml @@ -7,6 +7,7 @@ edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +publish = true [dependencies] pallet-balances = { version = "2.0.0-dev", path = "../../../frame/balances" } @@ -43,7 +44,7 @@ sp-block-builder = { version = "2.0.0-dev", path = "../../../primitives/block-bu sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } log = "0.4.8" -tempdir = "0.3" +tempfile = "3.1.0" fs_extra = "1" [dev-dependencies] diff --git a/bin/node/testing/src/bench.rs b/bin/node/testing/src/bench.rs index 5653ba77016..58a7ab933ee 100644 --- a/bin/node/testing/src/bench.rs +++ b/bin/node/testing/src/bench.rs @@ -81,7 +81,7 @@ pub struct BenchDb { impl Clone for BenchDb { fn clone(&self) -> Self { let keyring = self.keyring.clone(); - let dir = tempdir::TempDir::new("sub-bench").expect("temp dir creation failed"); + let dir = tempfile::tempdir().expect("temp dir creation failed"); let seed_dir = self.directory_guard.0.path(); @@ -120,7 +120,7 @@ impl BenchDb { pub fn new(keyring_length: usize) -> Self { let keyring = BenchKeyring::new(keyring_length); - let dir = tempdir::TempDir::new("sub-bench").expect("temp dir creation failed"); + let dir = tempfile::tempdir().expect("temp dir creation failed"); log::trace!( target: "bench-logistics", "Created seed db at {}", @@ -357,7 +357,7 @@ impl Profile { } } -struct Guard(tempdir::TempDir); +struct Guard(tempfile::TempDir); impl Guard { fn path(&self) -> &Path { diff --git a/client/authority-discovery/Cargo.toml b/client/authority-discovery/Cargo.toml index a87a0fee979..3ba2436e5da 100644 --- a/client/authority-discovery/Cargo.toml +++ b/client/authority-discovery/Cargo.toml @@ -12,7 +12,7 @@ repository = "https://github.com/paritytech/substrate/" prost-build = "0.6.1" [dependencies] -bytes = "0.4.12" +bytes = "0.5.0" codec = { package = "parity-scale-codec", default-features = false, version = "1.0.3" } derive_more = "0.99.2" futures = "0.3.1" diff --git a/client/network-gossip/Cargo.toml b/client/network-gossip/Cargo.toml index 25b0548c840..d9d1281911f 100644 --- a/client/network-gossip/Cargo.toml +++ b/client/network-gossip/Cargo.toml @@ -13,7 +13,7 @@ futures = "0.3.1" futures-timer = "3.0.1" libp2p = { version = "0.16.1", default-features = false, features = ["libp2p-websocket"] } log = "0.4.8" -lru = "0.1.2" +lru = "0.4.3" parking_lot = "0.10.0" sc-network = { version = "0.8.0-dev", path = "../network" } sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index 48a6fee638a..5d223f90319 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -49,10 +49,7 @@ sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } sp-consensus-babe = { version = "0.8.0-dev", path = "../../primitives/consensus/babe" } sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sp-keyring = { version = "2.0.0-dev", optional = true, path = "../../primitives/keyring" } sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } -substrate-test-client = { version = "2.0.0-dev", optional = true, path = "../../test-utils/client" } -substrate-test-runtime-client = { version = "2.0.0-dev", optional = true, path = "../../test-utils/runtime/client" } thiserror = "1" unsigned-varint = { version = "0.3.1", features = ["futures", "futures-codec"] } void = "1.0.2" @@ -72,4 +69,4 @@ tempfile = "3.1.0" [features] default = [] -test-helpers = ["sp-keyring", "substrate-test-runtime-client"] + diff --git a/primitives/runtime-interface/test-wasm/Cargo.toml b/primitives/runtime-interface/test-wasm/Cargo.toml index 8461509842a..e07adb01952 100644 --- a/primitives/runtime-interface/test-wasm/Cargo.toml +++ b/primitives/runtime-interface/test-wasm/Cargo.toml @@ -7,6 +7,7 @@ build = "build.rs" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +publish = false [dependencies] sp-runtime-interface = { version = "2.0.0-dev", default-features = false, path = "../" } diff --git a/primitives/test-primitives/Cargo.toml b/primitives/test-primitives/Cargo.toml index 1cff915f3c4..99d070013e5 100644 --- a/primitives/test-primitives/Cargo.toml +++ b/primitives/test-primitives/Cargo.toml @@ -6,6 +6,7 @@ edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +publish = false [dependencies] sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../application-crypto" } diff --git a/test-utils/client/Cargo.toml b/test-utils/client/Cargo.toml index f4eb93d128f..99511f051be 100644 --- a/test-utils/client/Cargo.toml +++ b/test-utils/client/Cargo.toml @@ -6,6 +6,7 @@ edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +publish = false [dependencies] sc-client-api = { version = "2.0.0-dev", path = "../../client/api" } diff --git a/test-utils/runtime/Cargo.toml b/test-utils/runtime/Cargo.toml index 44d2a68b49f..993e44685c9 100644 --- a/test-utils/runtime/Cargo.toml +++ b/test-utils/runtime/Cargo.toml @@ -7,6 +7,7 @@ build = "build.rs" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +publish = false [dependencies] sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../../primitives/application-crypto" } diff --git a/test-utils/runtime/client/Cargo.toml b/test-utils/runtime/client/Cargo.toml index a588219690a..3911bea7839 100644 --- a/test-utils/runtime/client/Cargo.toml +++ b/test-utils/runtime/client/Cargo.toml @@ -6,6 +6,7 @@ edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +publish = false [dependencies] sc-block-builder = { version = "0.8.0-dev", path = "../../../client/block-builder" } diff --git a/test-utils/runtime/transaction-pool/Cargo.toml b/test-utils/runtime/transaction-pool/Cargo.toml index dfaeb7227f4..8b5e34be88a 100644 --- a/test-utils/runtime/transaction-pool/Cargo.toml +++ b/test-utils/runtime/transaction-pool/Cargo.toml @@ -6,6 +6,7 @@ edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +publish = false [dependencies] substrate-test-runtime-client = { version = "2.0.0-dev", path = "../client" } -- GitLab From a64dd527fb280c3feac4b0326e7483b4874efd6e Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Tue, 25 Feb 2020 15:48:50 +0100 Subject: [PATCH 034/106] Fix: CI failing for some CLI tests (#5043) * Initial commit Forked at: 41bb2193a267805e2093a081bc3e2aaccc64283a Parent branch: origin/master * Increase killing grace period of CLI tests and display more info * Use --dev everywhere possible * Put pruning mode to its own params struct * Add pruning params to export-blocks command * Added missing file * Removed not-dev mode in tests * Add pruning mode to the revert command * Decrease killing grace period again * Move back unsafe_pruning to import_params * Applied proposed changes --- bin/node/cli/tests/check_block_works.rs | 4 +- bin/node/cli/tests/common.rs | 18 ++--- .../tests/import_export_and_revert_work.rs | 8 +-- bin/node/cli/tests/inspect_works.rs | 4 +- bin/node/cli/tests/purge_chain_works.rs | 2 +- client/cli/src/commands/export_blocks_cmd.rs | 10 ++- client/cli/src/commands/revert_cmd.rs | 10 ++- client/cli/src/params/import_params.rs | 41 +++-------- client/cli/src/params/mod.rs | 2 + client/cli/src/params/pruning_params.rs | 69 +++++++++++++++++++ 10 files changed, 112 insertions(+), 56 deletions(-) create mode 100644 client/cli/src/params/pruning_params.rs diff --git a/bin/node/cli/tests/check_block_works.rs b/bin/node/cli/tests/check_block_works.rs index e4c93c9e885..6bfb82a8bfa 100644 --- a/bin/node/cli/tests/check_block_works.rs +++ b/bin/node/cli/tests/check_block_works.rs @@ -26,10 +26,10 @@ mod common; fn check_block_works() { let base_path = tempdir().expect("could not create a temp dir"); - common::run_command_for_a_while(base_path.path(), false); + common::run_dev_node_for_a_while(base_path.path()); let status = Command::new(cargo_bin("substrate")) - .args(&["check-block", "-d"]) + .args(&["check-block", "--dev", "--pruning", "archive", "-d"]) .arg(base_path.path()) .arg("1") .status() diff --git a/bin/node/cli/tests/common.rs b/bin/node/cli/tests/common.rs index 682a30bcc01..34e371195c1 100644 --- a/bin/node/cli/tests/common.rs +++ b/bin/node/cli/tests/common.rs @@ -27,13 +27,18 @@ use nix::unistd::Pid; /// /// Returns the `Some(exit status)` or `None` if the process did not finish in the given time. pub fn wait_for(child: &mut Child, secs: usize) -> Option { - for _ in 0..secs { + for i in 0..secs { match child.try_wait().unwrap() { - Some(status) => return Some(status), + Some(status) => { + if i > 5 { + eprintln!("Child process took {} seconds to exit gracefully", i); + } + return Some(status) + }, None => thread::sleep(Duration::from_secs(1)), } } - eprintln!("Took to long to exit. Killing..."); + eprintln!("Took too long to exit (> {} seconds). Killing...", secs); let _ = child.kill(); child.wait().unwrap(); @@ -41,14 +46,11 @@ pub fn wait_for(child: &mut Child, secs: usize) -> Option { } /// Run the node for a while (30 seconds) -pub fn run_command_for_a_while(base_path: &Path, dev: bool) { +pub fn run_dev_node_for_a_while(base_path: &Path) { let mut cmd = Command::new(cargo_bin("substrate")); - if dev { - cmd.arg("--dev"); - } - let mut cmd = cmd + .args(&["--dev"]) .arg("-d") .arg(base_path) .spawn() diff --git a/bin/node/cli/tests/import_export_and_revert_work.rs b/bin/node/cli/tests/import_export_and_revert_work.rs index e109aa279eb..131265e3b4a 100644 --- a/bin/node/cli/tests/import_export_and_revert_work.rs +++ b/bin/node/cli/tests/import_export_and_revert_work.rs @@ -27,10 +27,10 @@ fn import_export_and_revert_work() { let base_path = tempdir().expect("could not create a temp dir"); let exported_blocks = base_path.path().join("exported_blocks"); - common::run_command_for_a_while(base_path.path(), false); + common::run_dev_node_for_a_while(base_path.path()); let status = Command::new(cargo_bin("substrate")) - .args(&["export-blocks", "-d"]) + .args(&["export-blocks", "--dev", "--pruning", "archive", "-d"]) .arg(base_path.path()) .arg(&exported_blocks) .status() @@ -43,7 +43,7 @@ fn import_export_and_revert_work() { let _ = fs::remove_dir_all(base_path.path().join("db")); let status = Command::new(cargo_bin("substrate")) - .args(&["import-blocks", "-d"]) + .args(&["import-blocks", "--dev", "--pruning", "archive", "-d"]) .arg(base_path.path()) .arg(&exported_blocks) .status() @@ -51,7 +51,7 @@ fn import_export_and_revert_work() { assert!(status.success()); let status = Command::new(cargo_bin("substrate")) - .args(&["revert", "-d"]) + .args(&["revert", "--dev", "--pruning", "archive", "-d"]) .arg(base_path.path()) .status() .unwrap(); diff --git a/bin/node/cli/tests/inspect_works.rs b/bin/node/cli/tests/inspect_works.rs index 0bd48c36938..441b08ccf46 100644 --- a/bin/node/cli/tests/inspect_works.rs +++ b/bin/node/cli/tests/inspect_works.rs @@ -26,10 +26,10 @@ mod common; fn inspect_works() { let base_path = tempdir().expect("could not create a temp dir"); - common::run_command_for_a_while(base_path.path(), false); + common::run_dev_node_for_a_while(base_path.path()); let status = Command::new(cargo_bin("substrate")) - .args(&["inspect", "-d"]) + .args(&["inspect", "--dev", "--pruning", "archive", "-d"]) .arg(base_path.path()) .args(&["block", "1"]) .status() diff --git a/bin/node/cli/tests/purge_chain_works.rs b/bin/node/cli/tests/purge_chain_works.rs index 42a5bc3ce14..020259d0c59 100644 --- a/bin/node/cli/tests/purge_chain_works.rs +++ b/bin/node/cli/tests/purge_chain_works.rs @@ -25,7 +25,7 @@ mod common; fn purge_chain_works() { let base_path = tempdir().expect("could not create a temp dir"); - common::run_command_for_a_while(base_path.path(), true); + common::run_dev_node_for_a_while(base_path.path()); let status = Command::new(cargo_bin("substrate")) .args(&["purge-chain", "--dev", "-d"]) diff --git a/client/cli/src/commands/export_blocks_cmd.rs b/client/cli/src/commands/export_blocks_cmd.rs index 8db650ae8c8..cdfa463c6d5 100644 --- a/client/cli/src/commands/export_blocks_cmd.rs +++ b/client/cli/src/commands/export_blocks_cmd.rs @@ -22,15 +22,14 @@ use log::info; use structopt::StructOpt; use sc_service::{ Configuration, ChainSpecExtension, RuntimeGenesis, ServiceBuilderCommand, ChainSpec, - config::DatabaseConfig, + config::DatabaseConfig, Roles, }; use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; use crate::error; use crate::VersionInfo; use crate::runtime::run_until_exit; -use crate::params::SharedParams; -use crate::params::BlockNumber; +use crate::params::{SharedParams, BlockNumber, PruningParams}; /// The `export-blocks` command used to export blocks. #[derive(Debug, StructOpt, Clone)] @@ -58,6 +57,10 @@ pub struct ExportBlocksCmd { #[allow(missing_docs)] #[structopt(flatten)] pub shared_params: SharedParams, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub pruning_params: PruningParams, } impl ExportBlocksCmd { @@ -106,6 +109,7 @@ impl ExportBlocksCmd { F: FnOnce(&str) -> Result>, String>, { self.shared_params.update_config(&mut config, spec_factory, version)?; + self.pruning_params.update_config(&mut config, Roles::FULL, true)?; config.use_in_memory_keystore()?; Ok(()) diff --git a/client/cli/src/commands/revert_cmd.rs b/client/cli/src/commands/revert_cmd.rs index 9ab86986cdd..f0c534898ef 100644 --- a/client/cli/src/commands/revert_cmd.rs +++ b/client/cli/src/commands/revert_cmd.rs @@ -17,14 +17,13 @@ use std::fmt::Debug; use structopt::StructOpt; use sc_service::{ - Configuration, ChainSpecExtension, RuntimeGenesis, ServiceBuilderCommand, ChainSpec, + Configuration, ChainSpecExtension, RuntimeGenesis, ServiceBuilderCommand, ChainSpec, Roles, }; use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; use crate::error; use crate::VersionInfo; -use crate::params::BlockNumber; -use crate::params::SharedParams; +use crate::params::{BlockNumber, SharedParams, PruningParams}; /// The `revert` command used revert the chain to a previous state. #[derive(Debug, StructOpt, Clone)] @@ -36,6 +35,10 @@ pub struct RevertCmd { #[allow(missing_docs)] #[structopt(flatten)] pub shared_params: SharedParams, + + #[allow(missing_docs)] + #[structopt(flatten)] + pub pruning_params: PruningParams, } impl RevertCmd { @@ -72,6 +75,7 @@ impl RevertCmd { F: FnOnce(&str) -> Result>, String>, { self.shared_params.update_config(&mut config, spec_factory, version)?; + self.pruning_params.update_config(&mut config, Roles::FULL, true)?; config.use_in_memory_keystore()?; Ok(()) diff --git a/client/cli/src/params/import_params.rs b/client/cli/src/params/import_params.rs index 98809a38ae4..36c62bc979c 100644 --- a/client/cli/src/params/import_params.rs +++ b/client/cli/src/params/import_params.rs @@ -15,10 +15,7 @@ // along with Substrate. If not, see . use structopt::StructOpt; -use sc_service::{ - Configuration, RuntimeGenesis, - config::DatabaseConfig, PruningMode, -}; +use sc_service::{Configuration, RuntimeGenesis, config::DatabaseConfig}; use crate::error; use crate::arg_enums::{ @@ -26,17 +23,14 @@ use crate::arg_enums::{ DEFAULT_EXECUTION_IMPORT_BLOCK, DEFAULT_EXECUTION_OFFCHAIN_WORKER, DEFAULT_EXECUTION_OTHER, DEFAULT_EXECUTION_SYNCING }; +use crate::params::PruningParams; /// Parameters for block import. #[derive(Debug, StructOpt, Clone)] pub struct ImportParams { - /// Specify the state pruning mode, a number of blocks to keep or 'archive'. - /// - /// Default is to keep all block states if the node is running as a - /// validator (i.e. 'archive'), otherwise state is only kept for the last - /// 256 blocks. - #[structopt(long = "pruning", value_name = "PRUNING_MODE")] - pub pruning: Option, + #[allow(missing_docs)] + #[structopt(flatten)] + pub pruning_params: PruningParams, /// Force start with unsafe pruning settings. /// @@ -87,7 +81,7 @@ impl ImportParams { /// Put block import CLI params into `config` object. pub fn update_config( &self, - config: &mut Configuration, + mut config: &mut Configuration, role: sc_service::Roles, is_dev: bool, ) -> error::Result<()> @@ -102,27 +96,7 @@ impl ImportParams { config.state_cache_size = self.state_cache_size; - // by default we disable pruning if the node is an authority (i.e. - // `ArchiveAll`), otherwise we keep state for the last 256 blocks. if the - // node is an authority and pruning is enabled explicitly, then we error - // unless `unsafe_pruning` is set. - config.pruning = match &self.pruning { - Some(ref s) if s == "archive" => PruningMode::ArchiveAll, - None if role == sc_service::Roles::AUTHORITY => PruningMode::ArchiveAll, - None => PruningMode::default(), - Some(s) => { - if role == sc_service::Roles::AUTHORITY && !self.unsafe_pruning { - return Err(error::Error::Input( - "Validators should run with state pruning disabled (i.e. archive). \ - You can ignore this check with `--unsafe-pruning`.".to_string() - )); - } - - PruningMode::keep_blocks(s.parse() - .map_err(|_| error::Error::Input("Invalid pruning mode specified".to_string()))? - ) - }, - }; + self.pruning_params.update_config(&mut config, role, self.unsafe_pruning)?; config.wasm_method = self.wasm_method.into(); @@ -144,6 +118,7 @@ impl ImportParams { exec_all_or(exec.execution_offchain_worker, DEFAULT_EXECUTION_OFFCHAIN_WORKER), other: exec_all_or(exec.execution_other, DEFAULT_EXECUTION_OTHER), }; + Ok(()) } } diff --git a/client/cli/src/params/mod.rs b/client/cli/src/params/mod.rs index 75509afa425..f684cab3364 100644 --- a/client/cli/src/params/mod.rs +++ b/client/cli/src/params/mod.rs @@ -19,6 +19,7 @@ mod transaction_pool_params; mod shared_params; mod node_key_params; mod network_configuration_params; +mod pruning_params; use std::str::FromStr; use std::fmt::Debug; @@ -28,6 +29,7 @@ pub use crate::params::transaction_pool_params::*; pub use crate::params::shared_params::*; pub use crate::params::node_key_params::*; pub use crate::params::network_configuration_params::*; +pub use crate::params::pruning_params::*; /// Wrapper type of `String` that holds an unsigned integer of arbitrary size, formatted as a decimal. #[derive(Debug, Clone)] diff --git a/client/cli/src/params/pruning_params.rs b/client/cli/src/params/pruning_params.rs new file mode 100644 index 00000000000..ad64d757dcb --- /dev/null +++ b/client/cli/src/params/pruning_params.rs @@ -0,0 +1,69 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use structopt::StructOpt; +use sc_service::{Configuration, RuntimeGenesis, PruningMode}; + +use crate::error; + +/// Parameters to define the pruning mode +#[derive(Debug, StructOpt, Clone)] +pub struct PruningParams { + /// Specify the state pruning mode, a number of blocks to keep or 'archive'. + /// + /// Default is to keep all block states if the node is running as a + /// validator (i.e. 'archive'), otherwise state is only kept for the last + /// 256 blocks. + #[structopt(long = "pruning", value_name = "PRUNING_MODE")] + pub pruning: Option, +} + +impl PruningParams { + /// Put block pruning CLI params into `config` object. + pub fn update_config( + &self, + mut config: &mut Configuration, + role: sc_service::Roles, + unsafe_pruning: bool, + ) -> error::Result<()> + where + G: RuntimeGenesis, + { + // by default we disable pruning if the node is an authority (i.e. + // `ArchiveAll`), otherwise we keep state for the last 256 blocks. if the + // node is an authority and pruning is enabled explicitly, then we error + // unless `unsafe_pruning` is set. + config.pruning = match &self.pruning { + Some(ref s) if s == "archive" => PruningMode::ArchiveAll, + None if role == sc_service::Roles::AUTHORITY => PruningMode::ArchiveAll, + None => PruningMode::default(), + Some(s) => { + if role == sc_service::Roles::AUTHORITY && !unsafe_pruning { + return Err(error::Error::Input( + "Validators should run with state pruning disabled (i.e. archive). \ + You can ignore this check with `--unsafe-pruning`.".to_string() + )); + } + + PruningMode::keep_blocks(s.parse() + .map_err(|_| error::Error::Input("Invalid pruning mode specified".to_string()))? + ) + }, + }; + + Ok(()) + } +} -- GitLab From ab8da7472e2f60fccfd8ec4290a2e96ecdc4f833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Tue, 25 Feb 2020 14:49:06 +0000 Subject: [PATCH 035/106] aura: remove unused tx pool (#5046) * aura: remove unused transaction pool parameter * node-template: remove transaction pool from aura * aura: fix tests --- bin/node-template/node/src/service.rs | 8 +++----- client/consensus/aura/src/lib.rs | 25 +++++++------------------ 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/bin/node-template/node/src/service.rs b/bin/node-template/node/src/service.rs index 5b64984c47c..6298f194e4f 100644 --- a/bin/node-template/node/src/service.rs +++ b/bin/node-template/node/src/service.rs @@ -37,7 +37,7 @@ 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| { + .with_import_queue(|_config, client, mut select_chain, _transaction_pool| { let select_chain = select_chain.take() .ok_or_else(|| sc_service::Error::SelectChainRequired)?; @@ -50,14 +50,13 @@ macro_rules! new_full_start { grandpa_block_import.clone(), client.clone(), ); - let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _>( + 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(), - Some(transaction_pool), )?; import_setup = Some((grandpa_block_import, grandpa_link)); @@ -210,14 +209,13 @@ pub fn new_light(config: Configuration) let finality_proof_request_builder = finality_proof_import.create_finality_proof_request_builder(); - let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, ()>( + 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(), - None, )?; Ok((import_queue, finality_proof_request_builder)) diff --git a/client/consensus/aura/src/lib.rs b/client/consensus/aura/src/lib.rs index 13dd81c1989..355c0586450 100644 --- a/client/consensus/aura/src/lib.rs +++ b/client/consensus/aura/src/lib.rs @@ -405,21 +405,17 @@ fn find_pre_digest(header: &B::Header) -> Result( +fn check_header( client: &C, slot_now: u64, mut header: B::Header, hash: B::Hash, authorities: &[AuthorityId

], - _transaction_pool: Option<&T>, ) -> Result)>, Error> where DigestItemFor: CompatibleDigestItem

, P::Signature: Decode, C: sc_client_api::backend::AuxStore, P::Public: Encode + Decode + PartialEq + Clone, - T: Send + Sync + 'static, { let seal = match header.digest_mut().pop() { Some(x) => x, @@ -469,14 +465,13 @@ fn check_header( } /// A verifier for Aura blocks. -pub struct AuraVerifier { +pub struct AuraVerifier { client: Arc, phantom: PhantomData

, inherent_data_providers: sp_inherents::InherentDataProviders, - transaction_pool: Option>, } -impl AuraVerifier +impl AuraVerifier where P: Send + Sync + 'static { fn check_inherents( @@ -531,7 +526,7 @@ impl AuraVerifier } #[forbid(deprecated)] -impl Verifier for AuraVerifier where +impl Verifier for AuraVerifier where C: ProvideRuntimeApi + Send + Sync + @@ -543,7 +538,6 @@ impl Verifier for AuraVerifier where P: Pair + Send + Sync + 'static, P::Public: Send + Sync + Hash + Eq + Clone + Decode + Encode + Debug + 'static, P::Signature: Encode + Decode, - T: Send + Sync + 'static, { fn verify( &mut self, @@ -565,13 +559,12 @@ impl Verifier for AuraVerifier where // we add one to allow for some small drift. // FIXME #1019 in the future, alter this queue to allow deferring of // headers - let checked_header = check_header::( + let checked_header = check_header::( &self.client, slot_now + 1, header, hash, &authorities[..], - self.transaction_pool.as_ref().map(|x| &**x), ).map_err(|e| e.to_string())?; match checked_header { CheckedHeader::Checked(pre_header, (slot_num, seal)) => { @@ -795,14 +788,13 @@ impl BlockImport for AuraBlockImport( +pub fn import_queue( slot_duration: SlotDuration, block_import: I, justification_import: Option>, finality_proof_import: Option>, client: Arc, inherent_data_providers: InherentDataProviders, - transaction_pool: Option>, ) -> Result>, sp_consensus::Error> where B: BlockT, C::Api: BlockBuilderApi + AuraApi> + ApiExt, @@ -812,7 +804,6 @@ pub fn import_queue( P: Pair + Send + Sync + 'static, P::Public: Clone + Eq + Send + Sync + Hash + Debug + Encode + Decode, P::Signature: Encode + Decode, - T: Send + Sync + 'static, { register_aura_inherent_data_provider(&inherent_data_providers, slot_duration.get())?; initialize_authorities_cache(&*client)?; @@ -821,7 +812,6 @@ pub fn import_queue( client: client.clone(), inherent_data_providers, phantom: PhantomData, - transaction_pool, }; Ok(BasicQueue::new( verifier, @@ -900,7 +890,7 @@ mod tests { } impl TestNetFactory for AuraTestNet { - type Verifier = AuraVerifier; + type Verifier = AuraVerifier; type PeerData = (); /// Create new test network with peers and given config. @@ -926,7 +916,6 @@ mod tests { AuraVerifier { client, inherent_data_providers, - transaction_pool: Default::default(), phantom: Default::default(), } }, -- GitLab From b874cb2b6e3dad7f06f601d6191f655898784bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Tue, 25 Feb 2020 15:50:45 +0100 Subject: [PATCH 036/106] Extend rust nightly detection in `wasm-builder` (#5021) Instead of just testing `cargo` and `rustup run nightly`, we now test the `CARGO` env variable and also scan non default nightlies. The user is also now able to select the toolchain with `WASM_BUILD_TOOLCHAIN`. --- utils/wasm-builder/README.md | 5 ++ utils/wasm-builder/src/lib.rs | 78 ++++++++++++++++++-------- utils/wasm-builder/src/wasm_project.rs | 1 + 3 files changed, 62 insertions(+), 22 deletions(-) diff --git a/utils/wasm-builder/README.md b/utils/wasm-builder/README.md index 2fd9a6ab4cf..5f4ca615d50 100644 --- a/utils/wasm-builder/README.md +++ b/utils/wasm-builder/README.md @@ -50,6 +50,8 @@ By using environment variables, you can configure which WASM binaries are built - `WASM_BUILD_NO_COLOR` - Disable color output of the wasm build. - `WASM_TARGET_DIRECTORY` - Will copy any build wasm binary to the given directory. The path needs to be absolute. +- `WASM_BUILD_TOOLCHAIN` - The toolchain that should be used to build the wasm binaries. The + format needs to be the same as used by cargo, e.g. `nightly-2020-02-20`. Each project can be skipped individually by using the environment variable `SKIP_PROJECT_NAME_WASM_BUILD`. Where `PROJECT_NAME` needs to be replaced by the name of the cargo project, e.g. `node-runtime` will @@ -61,5 +63,8 @@ WASM builder requires the following prerequisites for building the WASM binary: - rust nightly + `wasm32-unknown-unknown` toolchain +If a specific rust nightly is installed with `rustup`, it is important that the wasm target is installed +as well. For example if installing the rust nightly from 20.02.2020 using `rustup install nightly-2020-02-20`, +the wasm target needs to be installed as well `rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-20`. License: GPL-3.0 diff --git a/utils/wasm-builder/src/lib.rs b/utils/wasm-builder/src/lib.rs index 8500eba4a01..195527a1227 100644 --- a/utils/wasm-builder/src/lib.rs +++ b/utils/wasm-builder/src/lib.rs @@ -66,6 +66,8 @@ //! - `WASM_BUILD_NO_COLOR` - Disable color output of the wasm build. //! - `WASM_TARGET_DIRECTORY` - Will copy any build wasm binary to the given directory. The path needs //! to be absolute. +//! - `WASM_BUILD_TOOLCHAIN` - The toolchain that should be used to build the wasm binaries. The +//! format needs to be the same as used by cargo, e.g. `nightly-2020-02-20`. //! //! Each project can be skipped individually by using the environment variable `SKIP_PROJECT_NAME_WASM_BUILD`. //! Where `PROJECT_NAME` needs to be replaced by the name of the cargo project, e.g. `node-runtime` will @@ -77,8 +79,11 @@ //! //! - rust nightly + `wasm32-unknown-unknown` toolchain //! +//! If a specific rust nightly is installed with `rustup`, it is important that the wasm target is installed +//! as well. For example if installing the rust nightly from 20.02.2020 using `rustup install nightly-2020-02-20`, +//! the wasm target needs to be installed as well `rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-20`. -use std::{env, fs, path::PathBuf, process::{Command, Stdio, self}}; +use std::{env, fs, path::PathBuf, process::{Command, self}, io::BufRead}; mod prerequisites; mod wasm_project; @@ -103,6 +108,9 @@ const WASM_TARGET_DIRECTORY: &str = "WASM_TARGET_DIRECTORY"; /// Environment variable to disable color output of the wasm build. const WASM_BUILD_NO_COLOR: &str = "WASM_BUILD_NO_COLOR"; +/// Environment variable to set the toolchain used to compile the wasm binary. +const WASM_BUILD_TOOLCHAIN: &str = "WASM_BUILD_TOOLCHAIN"; + /// Build the currently built project as wasm binary. /// /// The current project is determined by using the `CARGO_MANIFEST_DIR` environment variable. @@ -178,19 +186,56 @@ fn write_file_if_changed(file: PathBuf, content: String) { /// Get a cargo command that compiles with nightly fn get_nightly_cargo() -> CargoCommand { + let env_cargo = CargoCommand::new( + &env::var("CARGO").expect("`CARGO` env variable is always set by cargo"), + ); let default_cargo = CargoCommand::new("cargo"); - let mut rustup_run_nightly = CargoCommand::new("rustup"); - rustup_run_nightly.args(&["run", "nightly", "cargo"]); + let rustup_run_nightly = CargoCommand::new_with_args("rustup", &["run", "nightly", "cargo"]); + let wasm_toolchain = env::var(WASM_BUILD_TOOLCHAIN).ok(); - if default_cargo.is_nightly() { + // First check if the user requested a specific toolchain + if let Some(cmd) = wasm_toolchain.and_then(|t| get_rustup_nightly(Some(t))) { + cmd + } else if env_cargo.is_nightly() { + env_cargo + } else if default_cargo.is_nightly() { default_cargo - } else if rustup_run_nightly.works() { + } else if rustup_run_nightly.is_nightly() { rustup_run_nightly } else { - default_cargo + // If no command before provided us with a nightly compiler, we try to search one + // with rustup. If that fails as well, we return the default cargo and let the prequisities + // check fail. + get_rustup_nightly(None).unwrap_or(default_cargo) } } +/// Get a nightly from rustup. If `selected` is `Some(_)`, a `CargoCommand` using the given +/// nightly is returned. +fn get_rustup_nightly(selected: Option) -> Option { + let host = format!("-{}", env::var("HOST").expect("`HOST` is always set by cargo")); + + let version = match selected { + Some(selected) => selected, + None => { + let output = Command::new("rustup").args(&["toolchain", "list"]).output().ok()?.stdout; + let lines = output.as_slice().lines(); + + let mut latest_nightly = None; + for line in lines.filter_map(|l| l.ok()) { + if line.starts_with("nightly-") && line.ends_with(&host) { + // Rustup prints them sorted + latest_nightly = Some(line.clone()); + } + } + + latest_nightly?.trim_end_matches(&host).into() + } + }; + + Some(CargoCommand::new_with_args("rustup", &["run", &version, "cargo"])) +} + /// Builder for cargo commands #[derive(Debug)] struct CargoCommand { @@ -203,14 +248,11 @@ impl CargoCommand { CargoCommand { program: program.into(), args: Vec::new() } } - fn arg(&mut self, arg: &str) -> &mut Self { - self.args.push(arg.into()); - self - } - - fn args(&mut self, args: &[&str]) -> &mut Self { - args.into_iter().for_each(|a| { self.arg(a); }); - self + fn new_with_args(program: &str, args: &[&str]) -> Self { + CargoCommand { + program: program.into(), + args: args.iter().map(ToString::to_string).collect(), + } } fn command(&self) -> Command { @@ -219,14 +261,6 @@ impl CargoCommand { cmd } - fn works(&self) -> bool { - self.command() - .stdout(Stdio::null()) - .stderr(Stdio::null()) - .status() - .map(|s| s.success()).unwrap_or(false) - } - /// Check if the supplied cargo command is a nightly version fn is_nightly(&self) -> bool { // `RUSTC_BOOTSTRAP` tells a stable compiler to behave like a nightly. So, when this env diff --git a/utils/wasm-builder/src/wasm_project.rs b/utils/wasm-builder/src/wasm_project.rs index 60be4684ba8..c4f00b9cf43 100644 --- a/utils/wasm-builder/src/wasm_project.rs +++ b/utils/wasm-builder/src/wasm_project.rs @@ -453,6 +453,7 @@ fn generate_rerun_if_changed_instructions( println!("cargo:rerun-if-env-changed={}", crate::WASM_BUILD_TYPE_ENV); println!("cargo:rerun-if-env-changed={}", crate::WASM_BUILD_RUSTFLAGS_ENV); println!("cargo:rerun-if-env-changed={}", crate::WASM_TARGET_DIRECTORY); + println!("cargo:rerun-if-env-changed={}", crate::WASM_BUILD_TOOLCHAIN); } /// Copy the WASM binary to the target directory set in `WASM_TARGET_DIRECTORY` environment variable. -- GitLab From 063c0c38f56d66840e3a96a3d443e0afcad2bd55 Mon Sep 17 00:00:00 2001 From: Marcio Diaz Date: Tue, 25 Feb 2020 15:51:25 +0100 Subject: [PATCH 037/106] Add steps setting to benchmarking CLI (#5033) * Add steps setting to CLI, use max value to hit worst case. * Bump impl_version. * Apply review suggestion. --- bin/node/runtime/src/lib.rs | 4 ++-- frame/benchmarking/src/lib.rs | 18 ++++++++++++------ frame/benchmarking/src/utils.rs | 4 ++-- utils/frame/benchmarking-cli/src/lib.rs | 7 ++++--- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index e91eca4e400..980f033024d 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -82,7 +82,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. spec_version: 225, - impl_version: 0, + impl_version: 1, apis: RUNTIME_API_VERSIONS, }; @@ -819,7 +819,7 @@ impl_runtime_apis! { fn dispatch_benchmark( module: Vec, extrinsic: Vec, - steps: u32, + steps: Vec, repeat: u32, ) -> Option> { use frame_benchmarking::Benchmarking; diff --git a/frame/benchmarking/src/lib.rs b/frame/benchmarking/src/lib.rs index 3ad4a9a8a07..e6b6a4f3f59 100644 --- a/frame/benchmarking/src/lib.rs +++ b/frame/benchmarking/src/lib.rs @@ -140,7 +140,7 @@ macro_rules! impl_benchmark { $( $name:ident ),* ) => { impl $crate::Benchmarking<$crate::BenchmarkResults> for Module { - fn run_benchmark(extrinsic: Vec, steps: u32, repeat: u32) -> Result, &'static str> { + fn run_benchmark(extrinsic: Vec, steps: Vec, repeat: u32) -> Result, &'static str> { // Map the input to the selected benchmark. let extrinsic = sp_std::str::from_utf8(extrinsic.as_slice()) .map_err(|_| "Could not find extrinsic")?; @@ -153,15 +153,21 @@ macro_rules! impl_benchmark { $crate::benchmarking::commit_db(); $crate::benchmarking::wipe_db(); - // first one is set_identity. let components = , RawOrigin>>::components(&selected_benchmark); - // results go here let mut results: Vec<$crate::BenchmarkResults> = Vec::new(); + + // Default number of steps for a component. + let mut prev_steps = &10; + // Select the component we will be benchmarking. Each component will be benchmarked. - for (name, low, high) in components.iter() { + for (idx, (name, low, high)) in components.iter().enumerate() { + // Get the number of steps for this component. + let steps = steps.get(idx).unwrap_or(&prev_steps); + prev_steps = steps; + // Create up to `STEPS` steps for that component between high and low. let step_size = ((high - low) / steps).max(1); - let num_of_steps = (high - low) / step_size; + let num_of_steps = (high - low) / step_size + 1; for s in 0..num_of_steps { // This is the value we will be testing for component `name` let component_value = low + step_size * s; @@ -169,7 +175,7 @@ macro_rules! impl_benchmark { // Select the mid value for all the other components. let c: Vec<($crate::BenchmarkParameter, u32)> = components.iter() .map(|(n, l, h)| - (*n, if n == name { component_value } else { (h - l) / 2 + l }) + (*n, if n == name { component_value } else { *h }) ).collect(); // Run the benchmark `repeat` times. diff --git a/frame/benchmarking/src/utils.rs b/frame/benchmarking/src/utils.rs index 5a67ea69431..9db981a61c8 100644 --- a/frame/benchmarking/src/utils.rs +++ b/frame/benchmarking/src/utils.rs @@ -40,7 +40,7 @@ sp_api::decl_runtime_apis! { fn dispatch_benchmark( module: Vec, extrinsic: Vec, - steps: u32, + steps: Vec, repeat: u32, ) -> Option>; } @@ -78,7 +78,7 @@ pub trait Benchmarking { /// - `extrinsic`: The name of extrinsic function you want to benchmark encoded as bytes. /// - `steps`: The number of sample points you want to take across the range of parameters. /// - `repeat`: The number of times you want to repeat a benchmark. - fn run_benchmark(extrinsic: Vec, steps: u32, repeat: u32) -> Result, &'static str>; + fn run_benchmark(extrinsic: Vec, steps: Vec, repeat: u32) -> Result, &'static str>; } /// The required setup for creating a benchmark. diff --git a/utils/frame/benchmarking-cli/src/lib.rs b/utils/frame/benchmarking-cli/src/lib.rs index 816ce521310..b2f360e584e 100644 --- a/utils/frame/benchmarking-cli/src/lib.rs +++ b/utils/frame/benchmarking-cli/src/lib.rs @@ -36,8 +36,8 @@ pub struct BenchmarkCmd { pub extrinsic: String, /// Select how many samples we should take across the variable components. - #[structopt(short, long, default_value = "1")] - pub steps: u32, + #[structopt(short, long, use_delimiter = true)] + pub steps: Vec, /// Select how many repetitions of this benchmark should run. #[structopt(short, long, default_value = "1")] @@ -97,13 +97,14 @@ impl BenchmarkCmd { wasm_method, None, // heap pages ); + let result = StateMachine::<_, _, NumberFor, _>::new( &state, None, &mut changes, &executor, "Benchmark_dispatch_benchmark", - &(&self.pallet, &self.extrinsic, self.steps, self.repeat).encode(), + &(&self.pallet, &self.extrinsic, self.steps.clone(), self.repeat).encode(), Default::default(), ) .execute(strategy.into()) -- GitLab From 71d10b4564d1ffcb74ee8058c76d7f279a8a3842 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Tue, 25 Feb 2020 15:51:46 +0100 Subject: [PATCH 038/106] Remove indices from node-template (#5025) * Remove indices from node-template * Use identity lookup instead * Bump impl * clean cargo.toml --- Cargo.lock | 1 - bin/node-template/node/src/chain_spec.rs | 11 ++++------ bin/node-template/runtime/Cargo.toml | 2 -- bin/node-template/runtime/src/lib.rs | 26 ++++-------------------- frame/indices/src/lib.rs | 2 +- 5 files changed, 9 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 38021aeeb32..56f960c796e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3606,7 +3606,6 @@ dependencies = [ "pallet-aura", "pallet-balances", "pallet-grandpa", - "pallet-indices", "pallet-randomness-collective-flip", "pallet-sudo", "pallet-template", diff --git a/bin/node-template/node/src/chain_spec.rs b/bin/node-template/node/src/chain_spec.rs index 9bdfea3b782..64b84005072 100644 --- a/bin/node-template/node/src/chain_spec.rs +++ b/bin/node-template/node/src/chain_spec.rs @@ -1,7 +1,7 @@ use sp_core::{Pair, Public, sr25519}; use node_template_runtime::{ AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, - IndicesConfig, SudoConfig, SystemConfig, WASM_BINARY, Signature + SudoConfig, SystemConfig, WASM_BINARY, Signature }; use sp_consensus_aura::sr25519::{AuthorityId as AuraId}; use grandpa_primitives::{AuthorityId as GrandpaId}; @@ -127,21 +127,18 @@ fn testnet_genesis(initial_authorities: Vec<(AuraId, GrandpaId)>, code: WASM_BINARY.to_vec(), changes_trie_config: Default::default(), }), - indices: Some(IndicesConfig { - indices: vec![], - }), 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(), }), + sudo: Some(SudoConfig { + key: root_key, + }), } } diff --git a/bin/node-template/runtime/Cargo.toml b/bin/node-template/runtime/Cargo.toml index b5a89febce0..671123016e4 100644 --- a/bin/node-template/runtime/Cargo.toml +++ b/bin/node-template/runtime/Cargo.toml @@ -14,7 +14,6 @@ aura = { version = "2.0.0-dev", default-features = false, package = "pallet-aura balances = { version = "2.0.0-dev", default-features = false, package = "pallet-balances", path = "../../../frame/balances" } frame-support = { version = "2.0.0-dev", default-features = false, path = "../../../frame/support" } grandpa = { version = "2.0.0-dev", default-features = false, package = "pallet-grandpa", path = "../../../frame/grandpa" } -indices = { version = "2.0.0-dev", default-features = false, package = "pallet-indices", path = "../../../frame/indices" } randomness-collective-flip = { version = "2.0.0-dev", default-features = false, package = "pallet-randomness-collective-flip", path = "../../../frame/randomness-collective-flip" } sudo = { version = "2.0.0-dev", default-features = false, package = "pallet-sudo", path = "../../../frame/sudo" } system = { version = "2.0.0-dev", default-features = false, package = "frame-system", path = "../../../frame/system" } @@ -49,7 +48,6 @@ std = [ "frame-executive/std", "frame-support/std", "grandpa/std", - "indices/std", "randomness-collective-flip/std", "serde", "sp-api/std", diff --git a/bin/node-template/runtime/src/lib.rs b/bin/node-template/runtime/src/lib.rs index afc18177ce0..2bc4c274500 100644 --- a/bin/node-template/runtime/src/lib.rs +++ b/bin/node-template/runtime/src/lib.rs @@ -15,7 +15,7 @@ use sp_runtime::{ impl_opaque_keys, MultiSignature, }; use sp_runtime::traits::{ - BlakeTwo256, Block as BlockT, StaticLookup, Verify, ConvertInto, IdentifyAccount + BlakeTwo256, Block as BlockT, IdentityLookup, Verify, ConvertInto, IdentifyAccount }; use sp_api::impl_runtime_apis; use sp_consensus_aura::sr25519::AuthorityId as AuraId; @@ -132,7 +132,7 @@ impl system::Trait for Runtime { /// 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 = Indices; + type Lookup = IdentityLookup; /// The index type for storing how many extrinsics an account has signed. type Index = Index; /// The index type for blocks. @@ -177,23 +177,6 @@ impl grandpa::Trait for Runtime { type Event = Event; } -parameter_types! { - /// How much an index costs. - pub const IndexDeposit: u128 = 100; -} - -impl indices::Trait for Runtime { - /// The type for recording indexing into the account enumeration. If this ever overflows, there - /// will be problems! - type AccountIndex = AccountIndex; - /// The ubiquitous event type. - type Event = Event; - /// The currency type. - type Currency = Balances; - /// How much an index costs. - type Deposit = IndexDeposit; -} - parameter_types! { pub const MinimumPeriod: u64 = SLOT_DURATION / 2; } @@ -250,21 +233,20 @@ construct_runtime!( UncheckedExtrinsic = UncheckedExtrinsic { System: system::{Module, Call, Config, Storage, Event}, + RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage}, Timestamp: timestamp::{Module, Call, Storage, Inherent}, Aura: aura::{Module, Config, Inherent(Timestamp)}, Grandpa: grandpa::{Module, Call, Storage, Config, Event}, - Indices: indices::{Module, Call, Storage, Event, Config}, Balances: balances::{Module, Call, Storage, Config, Event}, TransactionPayment: transaction_payment::{Module, Storage}, Sudo: sudo::{Module, Call, Config, Storage, Event}, // Used for the module template in `./template.rs` TemplateModule: template::{Module, Call, Storage, Event}, - RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage}, } ); /// The address format for describing accounts. -pub type Address = ::Source; +pub type Address = AccountId; /// Block header type as expected by this runtime. pub type Header = generic::Header; /// Block type as expected by this runtime. diff --git a/frame/indices/src/lib.rs b/frame/indices/src/lib.rs index d59a5017937..95ac6cf7528 100644 --- a/frame/indices/src/lib.rs +++ b/frame/indices/src/lib.rs @@ -264,7 +264,7 @@ impl StaticLookup for Module { type Source = address::Address; type Target = T::AccountId; - fn lookup(a: Self::Source) -> Result { + fn lookup(a: Self::Source) -> Result { Self::lookup_address(a).ok_or(LookupError) } -- GitLab From 88b03c92fe9f95589b579330ecf1d1a5c3e2f238 Mon Sep 17 00:00:00 2001 From: Nikolay Volf Date: Tue, 25 Feb 2020 19:58:24 +0300 Subject: [PATCH 039/106] Fix documentation for "BlockBuilder::push_trusted" (#5051) * fix doc * rephrase --- client/block-builder/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/block-builder/src/lib.rs b/client/block-builder/src/lib.rs index 9bc14cb6e9e..a93ad137835 100644 --- a/client/block-builder/src/lib.rs +++ b/client/block-builder/src/lib.rs @@ -131,8 +131,7 @@ where /// Push onto the block's list of extrinsics. /// - /// This will treat incoming extrinsic `xt` as untrusted and perform additional checks - /// (currenty checking signature). + /// This will treat incoming extrinsic `xt` as trusted and skip signature check (for signed transactions). pub fn push_trusted(&mut self, xt: ::Extrinsic) -> Result<(), ApiErrorFor> { self.push_internal(xt, true) } -- GitLab From 504478a8017dba69d49987369bba9df82b8408b3 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Tue, 25 Feb 2020 20:02:57 +0100 Subject: [PATCH 040/106] do not check unleash on every PR, only master and tags (#5054) * do not check unleash on every PR, only master and tags * move scripts folder * add signed-tag check to CI * remove publish-to-crates-io dependencies Co-authored-by: s3krit --- .gitlab-ci.yml | 26 ++++++++++++++----- .maintain/gitlab/check_signed.sh | 16 ++++++++++++ {scripts => .maintain}/gitlab/lib.sh | 0 .../gitlab/publish_draft_release.sh | 11 -------- 4 files changed, 36 insertions(+), 17 deletions(-) create mode 100755 .maintain/gitlab/check_signed.sh rename {scripts => .maintain}/gitlab/lib.sh (100%) rename {scripts => .maintain}/gitlab/publish_draft_release.sh (86%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1fa4a6dadb5..bc7ce84a805 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,7 +19,7 @@ # script: # - echo "List of shell commands to run in your job" # - echo "You can also just specify a script here, like so:" -# - ./scripts/gitlab/my_amazing_script.sh +# - ./.maintain/gitlab/my_amazing_script.sh stages: - test @@ -104,6 +104,16 @@ check-runtime: interruptible: true allow_failure: true +check-signed-tag: + stage: test + image: parity/tools:latest + <<: *kubernetes-build + only: + - tags + - /^v[0-9]+\.[0-9]+\.[0-9]+.*$/ + script: + - ./.maintain/gitlab/check_signed.sh + allow_failure: false check-line-width: stage: test @@ -177,7 +187,14 @@ test-dependency-rules: - $DEPLOY_TAG script: - .maintain/ensure-deps.sh - # FIXME set to release + +unleash-check: + stage: test + <<: *docker-env + only: + - master + - tags + script: - cargo install cargo-unleash ${CARGO_UNLEASH_INSTALL_PARAMS} - cargo unleash check ${CARGO_UNLEASH_PKG_DEF} @@ -552,16 +569,13 @@ publish-draft-release: - tags - /^v[0-9]+\.[0-9]+\.[0-9]+.*$/ script: - - ./scripts/gitlab/publish_draft_release.sh + - ./.maintain/gitlab/publish_draft_release.sh interruptible: true allow_failure: true publish-to-crates-io: stage: publish <<: *docker-env - dependencies: - - build-linux-substrate - - test-dependency-rules only: - tags - /^v[0-9]+\.[0-9]+\.[0-9]+.*$/ diff --git a/.maintain/gitlab/check_signed.sh b/.maintain/gitlab/check_signed.sh new file mode 100755 index 00000000000..7c4cc47baba --- /dev/null +++ b/.maintain/gitlab/check_signed.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# shellcheck source=lib.sh +source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/lib.sh" + +version="$CI_COMMIT_TAG" + +echo '[+] Checking tag has been signed' +check_tag "paritytech/substrate" "$version" +case $? in + 0) echo '[+] Tag found and has been signed'; exit 0 + ;; + 1) echo '[!] Tag found but has not been signed. Aborting release.'; exit 1 + ;; + 2) echo '[!] Tag not found. Aborting release.'; exit 1 +esac diff --git a/scripts/gitlab/lib.sh b/.maintain/gitlab/lib.sh similarity index 100% rename from scripts/gitlab/lib.sh rename to .maintain/gitlab/lib.sh diff --git a/scripts/gitlab/publish_draft_release.sh b/.maintain/gitlab/publish_draft_release.sh similarity index 86% rename from scripts/gitlab/publish_draft_release.sh rename to .maintain/gitlab/publish_draft_release.sh index 463d8ee6c85..8566827a099 100755 --- a/scripts/gitlab/publish_draft_release.sh +++ b/.maintain/gitlab/publish_draft_release.sh @@ -14,17 +14,6 @@ version="$CI_COMMIT_TAG" last_version=$(git tag -l | sort -V | grep -B 1 -x "$version" | head -n 1) echo "[+] Version: $version; Previous version: $last_version" -# Check that a signed tag exists on github for this version -echo '[+] Checking tag has been signed' -#check_tag "paritytech/substrate" "$version" -case $? in - 0) echo '[+] Tag found and has been signed' - ;; - 1) echo '[!] Tag found but has not been signed. Aborting release.'; exit 1 - ;; - 2) echo '[!] Tag not found. Aborting release.'; exit -esac - all_changes="$(sanitised_git_logs "$last_version" "$version")" labelled_changes="" echo "[+] Iterating through $(wc -l <<< "$all_changes") changes to find labelled PRs" -- GitLab From 7c751574d8c53108e78440bfa5dffb80ab644972 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Tue, 25 Feb 2020 21:44:23 +0100 Subject: [PATCH 041/106] prepare version to alpha.1 (#5055) bump version to -alpha.1 --- Cargo.lock | 298 +++++++++--------- bin/node-template/node/Cargo.toml | 38 +-- bin/node-template/pallets/template/Cargo.toml | 12 +- bin/node-template/runtime/Cargo.toml | 48 +-- bin/node/cli/Cargo.toml | 108 +++---- bin/node/executor/Cargo.toml | 46 +-- bin/node/inspect/Cargo.toml | 14 +- bin/node/primitives/Cargo.toml | 8 +- bin/node/rpc-client/Cargo.toml | 6 +- bin/node/rpc/Cargo.toml | 34 +- bin/node/runtime/Cargo.toml | 104 +++--- bin/node/testing/Cargo.toml | 66 ++-- bin/node/transaction-factory/Cargo.toml | 22 +- bin/utils/chain-spec-builder/Cargo.toml | 8 +- bin/utils/subkey/Cargo.toml | 18 +- client/Cargo.toml | 36 +-- client/api/Cargo.toml | 32 +- client/authority-discovery/Cargo.toml | 20 +- client/basic-authorship/Cargo.toml | 26 +- client/block-builder/Cargo.toml | 18 +- client/chain-spec/Cargo.toml | 12 +- client/chain-spec/derive/Cargo.toml | 2 +- client/cli/Cargo.toml | 28 +- client/consensus/aura/Cargo.toml | 44 +-- client/consensus/babe/Cargo.toml | 52 +-- client/consensus/babe/rpc/Cargo.toml | 24 +- client/consensus/epochs/Cargo.toml | 10 +- client/consensus/manual-seal/Cargo.toml | 20 +- client/consensus/pow/Cargo.toml | 22 +- client/consensus/slots/Cargo.toml | 20 +- client/consensus/uncles/Cargo.toml | 14 +- client/db/Cargo.toml | 24 +- client/executor/Cargo.toml | 28 +- client/executor/common/Cargo.toml | 12 +- client/executor/runtime-test/Cargo.toml | 12 +- client/executor/wasmi/Cargo.toml | 12 +- client/executor/wasmtime/Cargo.toml | 12 +- client/finality-grandpa/Cargo.toml | 42 +-- client/informant/Cargo.toml | 12 +- client/keystore/Cargo.toml | 6 +- client/network-gossip/Cargo.toml | 6 +- client/network/Cargo.toml | 26 +- client/network/test/Cargo.toml | 18 +- client/offchain/Cargo.toml | 22 +- client/peerset/Cargo.toml | 2 +- client/rpc-api/Cargo.toml | 12 +- client/rpc-servers/Cargo.toml | 4 +- client/rpc/Cargo.toml | 38 +-- client/service/Cargo.toml | 54 ++-- client/service/test/Cargo.toml | 14 +- client/state-db/Cargo.toml | 4 +- client/telemetry/Cargo.toml | 2 +- client/tracing/Cargo.toml | 4 +- client/transaction-pool/Cargo.toml | 18 +- client/transaction-pool/graph/Cargo.toml | 10 +- frame/assets/Cargo.toml | 14 +- frame/aura/Cargo.toml | 26 +- frame/authority-discovery/Cargo.toml | 22 +- frame/authorship/Cargo.toml | 18 +- frame/babe/Cargo.toml | 28 +- frame/balances/Cargo.toml | 18 +- frame/benchmarking/Cargo.toml | 10 +- frame/collective/Cargo.toml | 16 +- frame/contracts/Cargo.toml | 24 +- frame/contracts/common/Cargo.toml | 6 +- frame/contracts/rpc/Cargo.toml | 16 +- frame/contracts/rpc/runtime-api/Cargo.toml | 10 +- frame/democracy/Cargo.toml | 18 +- frame/elections-phragmen/Cargo.toml | 20 +- frame/elections/Cargo.toml | 16 +- frame/evm/Cargo.toml | 18 +- frame/example-offchain-worker/Cargo.toml | 14 +- frame/example/Cargo.toml | 16 +- frame/executive/Cargo.toml | 20 +- frame/finality-tracker/Cargo.toml | 18 +- frame/generic-asset/Cargo.toml | 14 +- frame/grandpa/Cargo.toml | 22 +- frame/identity/Cargo.toml | 18 +- frame/im-online/Cargo.toml | 22 +- frame/indices/Cargo.toml | 18 +- frame/membership/Cargo.toml | 14 +- frame/metadata/Cargo.toml | 6 +- frame/nicks/Cargo.toml | 16 +- frame/offences/Cargo.toml | 18 +- frame/randomness-collective-flip/Cargo.toml | 14 +- frame/recovery/Cargo.toml | 16 +- frame/scored-pool/Cargo.toml | 16 +- frame/session/Cargo.toml | 22 +- frame/society/Cargo.toml | 16 +- frame/staking/Cargo.toml | 32 +- frame/staking/reward-curve/Cargo.toml | 4 +- frame/sudo/Cargo.toml | 14 +- frame/support/Cargo.toml | 22 +- frame/support/procedural/Cargo.toml | 4 +- frame/support/procedural/tools/Cargo.toml | 4 +- .../procedural/tools/derive/Cargo.toml | 2 +- frame/support/test/Cargo.toml | 12 +- frame/system/Cargo.toml | 16 +- frame/system/rpc/runtime-api/Cargo.toml | 4 +- frame/timestamp/Cargo.toml | 22 +- frame/transaction-payment/Cargo.toml | 18 +- frame/transaction-payment/rpc/Cargo.toml | 14 +- .../rpc/runtime-api/Cargo.toml | 10 +- frame/treasury/Cargo.toml | 16 +- frame/utility/Cargo.toml | 18 +- frame/vesting/Cargo.toml | 18 +- primitives/allocator/Cargo.toml | 8 +- primitives/api/Cargo.toml | 14 +- primitives/api/proc-macro/Cargo.toml | 2 +- primitives/api/test/Cargo.toml | 12 +- primitives/application-crypto/Cargo.toml | 8 +- primitives/application-crypto/test/Cargo.toml | 8 +- primitives/arithmetic/Cargo.toml | 6 +- primitives/authority-discovery/Cargo.toml | 10 +- primitives/authorship/Cargo.toml | 8 +- primitives/block-builder/Cargo.toml | 10 +- primitives/blockchain/Cargo.toml | 10 +- primitives/consensus/aura/Cargo.toml | 14 +- primitives/consensus/babe/Cargo.toml | 16 +- primitives/consensus/common/Cargo.toml | 14 +- primitives/consensus/pow/Cargo.toml | 10 +- primitives/core/Cargo.toml | 14 +- primitives/debug-derive/Cargo.toml | 2 +- primitives/externalities/Cargo.toml | 6 +- primitives/finality-grandpa/Cargo.toml | 10 +- primitives/finality-tracker/Cargo.toml | 6 +- primitives/inherents/Cargo.toml | 6 +- primitives/io/Cargo.toml | 16 +- primitives/keyring/Cargo.toml | 6 +- primitives/offchain/Cargo.toml | 6 +- primitives/panic-handler/Cargo.toml | 2 +- primitives/phragmen/Cargo.toml | 10 +- primitives/rpc/Cargo.toml | 4 +- primitives/runtime-interface/Cargo.toml | 16 +- .../runtime-interface/proc-macro/Cargo.toml | 2 +- .../runtime-interface/test-wasm/Cargo.toml | 8 +- primitives/runtime-interface/test/Cargo.toml | 10 +- primitives/runtime/Cargo.toml | 14 +- primitives/sandbox/Cargo.toml | 10 +- primitives/serializer/Cargo.toml | 2 +- primitives/session/Cargo.toml | 10 +- primitives/staking/Cargo.toml | 6 +- primitives/state-machine/Cargo.toml | 10 +- primitives/std/Cargo.toml | 2 +- primitives/storage/Cargo.toml | 6 +- primitives/test-primitives/Cargo.toml | 6 +- primitives/timestamp/Cargo.toml | 10 +- primitives/transaction-pool/Cargo.toml | 6 +- primitives/trie/Cargo.toml | 6 +- primitives/version/Cargo.toml | 6 +- primitives/wasm-interface/Cargo.toml | 4 +- test-utils/Cargo.toml | 2 +- test-utils/client/Cargo.toml | 20 +- test-utils/runtime/Cargo.toml | 52 +-- test-utils/runtime/client/Cargo.toml | 14 +- .../runtime/transaction-pool/Cargo.toml | 8 +- utils/browser/Cargo.toml | 10 +- utils/build-script-utils/Cargo.toml | 2 +- utils/fork-tree/Cargo.toml | 2 +- utils/frame/benchmarking-cli/Cargo.toml | 16 +- utils/frame/rpc/support/Cargo.toml | 10 +- utils/frame/rpc/system/Cargo.toml | 18 +- utils/prometheus/Cargo.toml | 2 +- 163 files changed, 1471 insertions(+), 1471 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 56f960c796e..b49fdbaf9e0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -424,7 +424,7 @@ dependencies = [ [[package]] name = "browser-utils" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "chrono", "clear_on_drop", @@ -598,7 +598,7 @@ dependencies = [ [[package]] name = "chain-spec-builder" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "ansi_term 0.12.1", "node-cli", @@ -1442,14 +1442,14 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "parity-scale-codec", ] [[package]] name = "frame-benchmarking" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "parity-scale-codec", "sp-api", @@ -1460,7 +1460,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-benchmarking", "parity-scale-codec", @@ -1475,7 +1475,7 @@ dependencies = [ [[package]] name = "frame-executive" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -1493,7 +1493,7 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "11.0.0-dev" +version = "11.0.0-alpha.1" dependencies = [ "parity-scale-codec", "serde", @@ -1503,7 +1503,7 @@ dependencies = [ [[package]] name = "frame-support" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "bitmask", "frame-metadata", @@ -1528,7 +1528,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support-procedural-tools", "proc-macro2", @@ -1538,7 +1538,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -1549,7 +1549,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "proc-macro2", "quote", @@ -1574,7 +1574,7 @@ dependencies = [ [[package]] name = "frame-system" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "criterion 0.2.11", "frame-support", @@ -1592,7 +1592,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "parity-scale-codec", "sp-api", @@ -3342,7 +3342,7 @@ dependencies = [ [[package]] name = "node-cli" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "assert_cmd", "browser-utils", @@ -3413,7 +3413,7 @@ dependencies = [ [[package]] name = "node-executor" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "criterion 0.3.1", "frame-benchmarking", @@ -3446,7 +3446,7 @@ dependencies = [ [[package]] name = "node-inspect" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "derive_more", "log 0.4.8", @@ -3462,7 +3462,7 @@ dependencies = [ [[package]] name = "node-primitives" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "pretty_assertions", "sp-core", @@ -3472,7 +3472,7 @@ dependencies = [ [[package]] name = "node-rpc" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "jsonrpc-core", "node-primitives", @@ -3495,7 +3495,7 @@ dependencies = [ [[package]] name = "node-rpc-client" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "env_logger 0.7.1", "futures 0.1.29", @@ -3508,7 +3508,7 @@ dependencies = [ [[package]] name = "node-runtime" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-benchmarking", "frame-executive", @@ -3570,7 +3570,7 @@ dependencies = [ [[package]] name = "node-template" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "futures 0.3.4", "log 0.4.8", @@ -3598,7 +3598,7 @@ dependencies = [ [[package]] name = "node-template-runtime" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-executive", "frame-support", @@ -3630,7 +3630,7 @@ dependencies = [ [[package]] name = "node-testing" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "criterion 0.3.1", "frame-support", @@ -3675,7 +3675,7 @@ dependencies = [ [[package]] name = "node-transaction-factory" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "log 0.4.8", "parity-scale-codec", @@ -3849,7 +3849,7 @@ dependencies = [ [[package]] name = "pallet-assets" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -3863,7 +3863,7 @@ dependencies = [ [[package]] name = "pallet-aura" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -3885,7 +3885,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -3903,7 +3903,7 @@ dependencies = [ [[package]] name = "pallet-authorship" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -3919,7 +3919,7 @@ dependencies = [ [[package]] name = "pallet-babe" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -3944,7 +3944,7 @@ dependencies = [ [[package]] name = "pallet-balances" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-benchmarking", "frame-support", @@ -3960,7 +3960,7 @@ dependencies = [ [[package]] name = "pallet-collective" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -3976,7 +3976,7 @@ dependencies = [ [[package]] name = "pallet-contracts" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "assert_matches", "frame-support", @@ -4001,7 +4001,7 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -4010,7 +4010,7 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4029,7 +4029,7 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc-runtime-api" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "pallet-contracts-primitives", "parity-scale-codec", @@ -4040,7 +4040,7 @@ dependencies = [ [[package]] name = "pallet-democracy" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4057,7 +4057,7 @@ dependencies = [ [[package]] name = "pallet-elections" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4073,7 +4073,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4091,7 +4091,7 @@ dependencies = [ [[package]] name = "pallet-evm" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "evm", "frame-support", @@ -4111,7 +4111,7 @@ dependencies = [ [[package]] name = "pallet-example" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4126,7 +4126,7 @@ dependencies = [ [[package]] name = "pallet-example-offchain-worker" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4141,7 +4141,7 @@ dependencies = [ [[package]] name = "pallet-finality-tracker" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4158,7 +4158,7 @@ dependencies = [ [[package]] name = "pallet-generic-asset" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4172,7 +4172,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4190,7 +4190,7 @@ dependencies = [ [[package]] name = "pallet-identity" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4207,7 +4207,7 @@ dependencies = [ [[package]] name = "pallet-im-online" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4225,7 +4225,7 @@ dependencies = [ [[package]] name = "pallet-indices" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4241,7 +4241,7 @@ dependencies = [ [[package]] name = "pallet-membership" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4255,7 +4255,7 @@ dependencies = [ [[package]] name = "pallet-nicks" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4270,7 +4270,7 @@ dependencies = [ [[package]] name = "pallet-offences" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4286,7 +4286,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4300,7 +4300,7 @@ dependencies = [ [[package]] name = "pallet-recovery" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "enumflags2", "frame-support", @@ -4316,7 +4316,7 @@ dependencies = [ [[package]] name = "pallet-scored-pool" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4331,7 +4331,7 @@ dependencies = [ [[package]] name = "pallet-session" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4351,7 +4351,7 @@ dependencies = [ [[package]] name = "pallet-society" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4367,7 +4367,7 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4390,7 +4390,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -4401,7 +4401,7 @@ dependencies = [ [[package]] name = "pallet-sudo" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4415,7 +4415,7 @@ dependencies = [ [[package]] name = "pallet-template" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4428,7 +4428,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-benchmarking", "frame-support", @@ -4446,7 +4446,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4461,7 +4461,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4478,7 +4478,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "parity-scale-codec", @@ -4491,7 +4491,7 @@ dependencies = [ [[package]] name = "pallet-treasury" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4506,7 +4506,7 @@ dependencies = [ [[package]] name = "pallet-utility" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -4521,7 +4521,7 @@ dependencies = [ [[package]] name = "pallet-vesting" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "enumflags2", "frame-support", @@ -4987,7 +4987,7 @@ dependencies = [ [[package]] name = "prometheus-exporter" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "async-std", "derive_more", @@ -5576,7 +5576,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "bytes 0.5.4", "derive_more", @@ -5605,7 +5605,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "futures 0.3.4", "log 0.4.8", @@ -5629,7 +5629,7 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -5644,7 +5644,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "impl-trait-for-tuples", "sc-chain-spec-derive", @@ -5658,7 +5658,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5668,7 +5668,7 @@ dependencies = [ [[package]] name = "sc-cli" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "ansi_term 0.12.1", "app_dirs", @@ -5707,7 +5707,7 @@ dependencies = [ [[package]] name = "sc-client" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "derive_more", "env_logger 0.7.1", @@ -5744,7 +5744,7 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "derive_more", "fnv", @@ -5775,7 +5775,7 @@ dependencies = [ [[package]] name = "sc-client-db" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "env_logger 0.7.1", "hash-db", @@ -5806,7 +5806,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "derive_more", "env_logger 0.7.1", @@ -5845,7 +5845,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "derive_more", "env_logger 0.7.1", @@ -5896,7 +5896,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "derive_more", "futures 0.3.4", @@ -5921,7 +5921,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "fork-tree", "parity-scale-codec", @@ -5933,7 +5933,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "derive_more", "env_logger 0.7.1", @@ -5961,7 +5961,7 @@ dependencies = [ [[package]] name = "sc-consensus-pow" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "derive_more", "futures 0.3.4", @@ -5981,7 +5981,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "futures 0.3.4", "futures-timer 3.0.2", @@ -6002,7 +6002,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "log 0.4.8", "sc-client-api", @@ -6015,7 +6015,7 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "assert_matches", "derive_more", @@ -6048,7 +6048,7 @@ dependencies = [ [[package]] name = "sc-executor-common" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "derive_more", "log 0.4.8", @@ -6063,7 +6063,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "log 0.4.8", "parity-scale-codec", @@ -6078,7 +6078,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "assert_matches", "log 0.4.8", @@ -6095,7 +6095,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "assert_matches", "env_logger 0.7.1", @@ -6136,7 +6136,7 @@ dependencies = [ [[package]] name = "sc-informant" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "ansi_term 0.12.1", "futures 0.3.4", @@ -6152,7 +6152,7 @@ dependencies = [ [[package]] name = "sc-keystore" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "derive_more", "hex", @@ -6167,7 +6167,7 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "assert_matches", "async-std", @@ -6225,7 +6225,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "futures 0.3.4", "futures-timer 3.0.2", @@ -6267,7 +6267,7 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "bytes 0.5.4", "env_logger 0.7.1", @@ -6298,7 +6298,7 @@ dependencies = [ [[package]] name = "sc-peerset" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "futures 0.3.4", "libp2p", @@ -6310,7 +6310,7 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "assert_matches", "futures 0.1.29", @@ -6347,7 +6347,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "derive_more", "futures 0.3.4", @@ -6369,7 +6369,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "jsonrpc-core", "jsonrpc-http-server", @@ -6396,7 +6396,7 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "derive_more", "exit-future", @@ -6469,7 +6469,7 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "env_logger 0.7.1", "log 0.4.8", @@ -6480,7 +6480,7 @@ dependencies = [ [[package]] name = "sc-telemetry" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "bytes 0.5.4", "futures 0.3.4", @@ -6501,7 +6501,7 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "erased-serde", "log 0.4.8", @@ -6516,7 +6516,7 @@ dependencies = [ [[package]] name = "sc-transaction-graph" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "assert_matches", "criterion 0.3.1", @@ -6538,7 +6538,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "derive_more", "futures 0.3.4", @@ -6899,7 +6899,7 @@ checksum = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" [[package]] name = "sp-allocator" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "derive_more", "log 0.4.8", @@ -6910,7 +6910,7 @@ dependencies = [ [[package]] name = "sp-api" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "hash-db", "parity-scale-codec", @@ -6925,7 +6925,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "blake2-rfc", "proc-macro-crate", @@ -6953,7 +6953,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "parity-scale-codec", "serde", @@ -6975,7 +6975,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "criterion 0.3.1", "integer-sqrt", @@ -6990,7 +6990,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "parity-scale-codec", "sp-api", @@ -7001,7 +7001,7 @@ dependencies = [ [[package]] name = "sp-authorship" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -7011,7 +7011,7 @@ dependencies = [ [[package]] name = "sp-block-builder" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "parity-scale-codec", "sp-api", @@ -7022,7 +7022,7 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "derive_more", "log 0.4.8", @@ -7037,7 +7037,7 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "derive_more", "futures 0.3.4", @@ -7059,7 +7059,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "parity-scale-codec", "sp-api", @@ -7072,7 +7072,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -7087,7 +7087,7 @@ dependencies = [ [[package]] name = "sp-consensus-pow" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "parity-scale-codec", "sp-api", @@ -7098,7 +7098,7 @@ dependencies = [ [[package]] name = "sp-core" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "base58", "blake2-rfc", @@ -7142,7 +7142,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "proc-macro2", "quote", @@ -7151,7 +7151,7 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "environmental", "sp-std", @@ -7160,7 +7160,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "parity-scale-codec", "serde", @@ -7172,7 +7172,7 @@ dependencies = [ [[package]] name = "sp-finality-tracker" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -7181,7 +7181,7 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "derive_more", "parity-scale-codec", @@ -7192,7 +7192,7 @@ dependencies = [ [[package]] name = "sp-io" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "hash-db", "libsecp256k1", @@ -7209,7 +7209,7 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "lazy_static", "sp-core", @@ -7219,7 +7219,7 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "sp-api", "sp-runtime", @@ -7227,7 +7227,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "backtrace", "log 0.4.8", @@ -7235,7 +7235,7 @@ dependencies = [ [[package]] name = "sp-phragmen" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "rand 0.7.3", "serde", @@ -7247,7 +7247,7 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "serde", "serde_json", @@ -7256,7 +7256,7 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "impl-trait-for-tuples", "log 0.4.8", @@ -7276,7 +7276,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "parity-scale-codec", "primitive-types", @@ -7295,7 +7295,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "Inflector", "proc-macro-crate", @@ -7329,7 +7329,7 @@ dependencies = [ [[package]] name = "sp-sandbox" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "assert_matches", "parity-scale-codec", @@ -7343,7 +7343,7 @@ dependencies = [ [[package]] name = "sp-serializer" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "serde", "serde_json", @@ -7351,7 +7351,7 @@ dependencies = [ [[package]] name = "sp-session" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "sp-api", "sp-core", @@ -7361,7 +7361,7 @@ dependencies = [ [[package]] name = "sp-staking" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -7370,7 +7370,7 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" dependencies = [ "hash-db", "hex-literal", @@ -7389,11 +7389,11 @@ dependencies = [ [[package]] name = "sp-std" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" [[package]] name = "sp-storage" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "impl-serde 0.2.3", "serde", @@ -7415,7 +7415,7 @@ dependencies = [ [[package]] name = "sp-timestamp" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7428,7 +7428,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "derive_more", "futures 0.3.4", @@ -7441,7 +7441,7 @@ dependencies = [ [[package]] name = "sp-trie" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "criterion 0.2.11", "hash-db", @@ -7458,7 +7458,7 @@ dependencies = [ [[package]] name = "sp-version" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "impl-serde 0.2.3", "parity-scale-codec", @@ -7469,7 +7469,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7575,7 +7575,7 @@ dependencies = [ [[package]] name = "subkey" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "clap", "derive_more", @@ -7617,11 +7617,11 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" [[package]] name = "substrate-frame-rpc-support" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "frame-support", "frame-system", @@ -7637,7 +7637,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" dependencies = [ "env_logger 0.7.1", "frame-system-rpc-runtime-api", @@ -7752,7 +7752,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" [[package]] name = "substrate-wasm-builder" diff --git a/bin/node-template/node/Cargo.toml b/bin/node-template/node/Cargo.toml index c21d380d4b7..4933b778db1 100644 --- a/bin/node-template/node/Cargo.toml +++ b/bin/node-template/node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-template" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Anonymous"] edition = "2018" license = "Unlicense" @@ -16,25 +16,25 @@ futures = "0.3.1" log = "0.4.8" structopt = "0.3.8" -sc-cli = { version = "0.8.0-dev", path = "../../../client/cli" } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sc-executor = { version = "0.8.0-dev", path = "../../../client/executor" } -sc-service = { version = "0.8.0-dev", path = "../../../client/service" } -sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } -sc-transaction-pool = { version = "2.0.0-dev", path = "../../../client/transaction-pool" } -sp-transaction-pool = { version = "2.0.0-dev", path = "../../../primitives/transaction-pool" } -sc-network = { version = "0.8.0-dev", path = "../../../client/network" } -sc-consensus-aura = { version = "0.8.0-dev", path = "../../../client/consensus/aura" } -sp-consensus-aura = { version = "0.8.0-dev", path = "../../../primitives/consensus/aura" } -sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } -grandpa = { version = "0.8.0-dev", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" } -grandpa-primitives = { version = "2.0.0-dev", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" } -sc-client = { version = "0.8.0-dev", path = "../../../client/" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -sc-basic-authorship = { path = "../../../client/basic-authorship" , version = "0.8.0-dev"} +sc-cli = { version = "0.8.0-alpha.1", path = "../../../client/cli" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sc-executor = { version = "0.8.0-alpha.1", path = "../../../client/executor" } +sc-service = { version = "0.8.0-alpha.1", path = "../../../client/service" } +sp-inherents = { version = "2.0.0-alpha.1", path = "../../../primitives/inherents" } +sc-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../client/transaction-pool" } +sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../primitives/transaction-pool" } +sc-network = { version = "0.8.0-alpha.1", path = "../../../client/network" } +sc-consensus-aura = { version = "0.8.0-alpha.1", path = "../../../client/consensus/aura" } +sp-consensus-aura = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/aura" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } +grandpa = { version = "0.8.0-alpha.1", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" } +grandpa-primitives = { version = "2.0.0-alpha.1", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" } +sc-client = { version = "0.8.0-alpha.1", path = "../../../client/" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sc-basic-authorship = { path = "../../../client/basic-authorship" , version = "0.8.0-alpha.1"} -node-template-runtime = { version = "2.0.0-dev", path = "../runtime" } +node-template-runtime = { version = "2.0.0-alpha.1", path = "../runtime" } [build-dependencies] vergen = "3.0.4" -build-script-utils = { version = "2.0.0-dev", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } +build-script-utils = { version = "2.0.0-alpha.1", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } diff --git a/bin/node-template/pallets/template/Cargo.toml b/bin/node-template/pallets/template/Cargo.toml index a2abe4c6e2c..bd08787f1aa 100644 --- a/bin/node-template/pallets/template/Cargo.toml +++ b/bin/node-template/pallets/template/Cargo.toml @@ -2,7 +2,7 @@ authors = ['Anonymous'] edition = '2018' name = 'pallet-template' -version = "2.0.0-dev" +version = "2.0.0-alpha.1" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" @@ -12,28 +12,28 @@ safe-mix = { default-features = false, version = '1.0.0' } [dependencies.frame-support] default-features = false -version = "2.0.0-dev" +version = "2.0.0-alpha.1" path = "../../../../frame/support" [dependencies.system] default-features = false package = 'frame-system' -version = "2.0.0-dev" +version = "2.0.0-alpha.1" path = "../../../../frame/system" [dev-dependencies.sp-core] default-features = false -version = "2.0.0-dev" +version = "2.0.0-alpha.1" path = "../../../../primitives/core" [dev-dependencies.sp-io] default-features = false -version = "2.0.0-dev" +version = "2.0.0-alpha.1" path = "../../../../primitives/io" [dev-dependencies.sp-runtime] default-features = false -version = "2.0.0-dev" +version = "2.0.0-alpha.1" path = "../../../../primitives/runtime" [features] diff --git a/bin/node-template/runtime/Cargo.toml b/bin/node-template/runtime/Cargo.toml index 671123016e4..049953ecead 100644 --- a/bin/node-template/runtime/Cargo.toml +++ b/bin/node-template/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-template-runtime" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Anonymous"] edition = "2018" license = "Unlicense" @@ -10,31 +10,31 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -aura = { version = "2.0.0-dev", default-features = false, package = "pallet-aura", path = "../../../frame/aura" } -balances = { version = "2.0.0-dev", default-features = false, package = "pallet-balances", path = "../../../frame/balances" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../../../frame/support" } -grandpa = { version = "2.0.0-dev", default-features = false, package = "pallet-grandpa", path = "../../../frame/grandpa" } -randomness-collective-flip = { version = "2.0.0-dev", default-features = false, package = "pallet-randomness-collective-flip", path = "../../../frame/randomness-collective-flip" } -sudo = { version = "2.0.0-dev", default-features = false, package = "pallet-sudo", path = "../../../frame/sudo" } -system = { version = "2.0.0-dev", default-features = false, package = "frame-system", path = "../../../frame/system" } -timestamp = { version = "2.0.0-dev", default-features = false, package = "pallet-timestamp", path = "../../../frame/timestamp" } -transaction-payment = { version = "2.0.0-dev", default-features = false, package = "pallet-transaction-payment", path = "../../../frame/transaction-payment" } -frame-executive = { version = "2.0.0-dev", default-features = false, path = "../../../frame/executive" } +aura = { version = "2.0.0-alpha.1", default-features = false, package = "pallet-aura", path = "../../../frame/aura" } +balances = { version = "2.0.0-alpha.1", default-features = false, package = "pallet-balances", path = "../../../frame/balances" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/support" } +grandpa = { version = "2.0.0-alpha.1", default-features = false, package = "pallet-grandpa", path = "../../../frame/grandpa" } +randomness-collective-flip = { version = "2.0.0-alpha.1", default-features = false, package = "pallet-randomness-collective-flip", path = "../../../frame/randomness-collective-flip" } +sudo = { version = "2.0.0-alpha.1", default-features = false, package = "pallet-sudo", path = "../../../frame/sudo" } +system = { version = "2.0.0-alpha.1", default-features = false, package = "frame-system", path = "../../../frame/system" } +timestamp = { version = "2.0.0-alpha.1", default-features = false, package = "pallet-timestamp", path = "../../../frame/timestamp" } +transaction-payment = { version = "2.0.0-alpha.1", default-features = false, package = "pallet-transaction-payment", path = "../../../frame/transaction-payment" } +frame-executive = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/executive" } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-api = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/api" } -sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0-dev"} -sp-consensus-aura = { version = "0.8.0-dev", default-features = false, path = "../../../primitives/consensus/aura" } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/core" } -sp-inherents = { path = "../../../primitives/inherents", default-features = false, version = "2.0.0-dev"} -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/io" } -sp-offchain = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/offchain" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/runtime" } -sp-session = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/session" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/std" } -sp-transaction-pool = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/transaction-pool" } -sp-version = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/version" } +sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/api" } +sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0-alpha.1"} +sp-consensus-aura = { version = "0.8.0-alpha.1", default-features = false, path = "../../../primitives/consensus/aura" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/core" } +sp-inherents = { path = "../../../primitives/inherents", default-features = false, version = "2.0.0-alpha.1"} +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/io" } +sp-offchain = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/offchain" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/runtime" } +sp-session = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/session" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/std" } +sp-transaction-pool = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/transaction-pool" } +sp-version = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/version" } -template = { version = "2.0.0-dev", default-features = false, path = "../pallets/template", package = "pallet-template" } +template = { version = "2.0.0-alpha.1", default-features = false, path = "../pallets/template", package = "pallet-template" } [build-dependencies] wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" } diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml index 7f17f1eaa6f..1aa49414bdd 100644 --- a/bin/node/cli/Cargo.toml +++ b/bin/node/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-cli" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] description = "Substrate node implementation in Rust." build = "build.rs" @@ -42,68 +42,68 @@ structopt = { version = "0.3.8", optional = true } tracing = "0.1.10" # primitives -sp-authority-discovery = { version = "2.0.0-dev", path = "../../../primitives/authority-discovery" } -sp-consensus-babe = { version = "0.8.0-dev", path = "../../../primitives/consensus/babe" } -grandpa-primitives = { version = "2.0.0-dev", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -sp-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/timestamp" } -sp-finality-tracker = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/finality-tracker" } -sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } -sp-keyring = { version = "2.0.0-dev", path = "../../../primitives/keyring" } -sp-io = { version = "2.0.0-dev", path = "../../../primitives/io" } -sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } +sp-authority-discovery = { version = "2.0.0-alpha.1", path = "../../../primitives/authority-discovery" } +sp-consensus-babe = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/babe" } +grandpa-primitives = { version = "2.0.0-alpha.1", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sp-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/timestamp" } +sp-finality-tracker = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/finality-tracker" } +sp-inherents = { version = "2.0.0-alpha.1", path = "../../../primitives/inherents" } +sp-keyring = { version = "2.0.0-alpha.1", path = "../../../primitives/keyring" } +sp-io = { version = "2.0.0-alpha.1", path = "../../../primitives/io" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } # client dependencies -sc-client-api = { version = "2.0.0-dev", path = "../../../client/api" } -sc-client = { version = "0.8.0-dev", path = "../../../client/" } -sc-chain-spec = { version = "2.0.0-dev", path = "../../../client/chain-spec" } -sc-transaction-pool = { version = "2.0.0-dev", path = "../../../client/transaction-pool" } -sp-transaction-pool = { version = "2.0.0-dev", path = "../../../primitives/transaction-pool" } -sc-network = { version = "0.8.0-dev", path = "../../../client/network" } -sc-consensus-babe = { version = "0.8.0-dev", path = "../../../client/consensus/babe" } -grandpa = { version = "0.8.0-dev", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" } -sc-client-db = { version = "0.8.0-dev", default-features = false, path = "../../../client/db" } -sc-offchain = { version = "2.0.0-dev", path = "../../../client/offchain" } -sc-rpc = { version = "2.0.0-dev", path = "../../../client/rpc" } -sc-basic-authorship = { version = "0.8.0-dev", path = "../../../client/basic-authorship" } -sc-service = { version = "0.8.0-dev", default-features = false, path = "../../../client/service" } -sc-tracing = { version = "2.0.0-dev", path = "../../../client/tracing" } -sc-telemetry = { version = "2.0.0-dev", path = "../../../client/telemetry" } -sc-authority-discovery = { version = "0.8.0-dev", path = "../../../client/authority-discovery" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../../../client/api" } +sc-client = { version = "0.8.0-alpha.1", path = "../../../client/" } +sc-chain-spec = { version = "2.0.0-alpha.1", path = "../../../client/chain-spec" } +sc-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../client/transaction-pool" } +sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../primitives/transaction-pool" } +sc-network = { version = "0.8.0-alpha.1", path = "../../../client/network" } +sc-consensus-babe = { version = "0.8.0-alpha.1", path = "../../../client/consensus/babe" } +grandpa = { version = "0.8.0-alpha.1", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" } +sc-client-db = { version = "0.8.0-alpha.1", default-features = false, path = "../../../client/db" } +sc-offchain = { version = "2.0.0-alpha.1", path = "../../../client/offchain" } +sc-rpc = { version = "2.0.0-alpha.1", path = "../../../client/rpc" } +sc-basic-authorship = { version = "0.8.0-alpha.1", path = "../../../client/basic-authorship" } +sc-service = { version = "0.8.0-alpha.1", default-features = false, path = "../../../client/service" } +sc-tracing = { version = "2.0.0-alpha.1", path = "../../../client/tracing" } +sc-telemetry = { version = "2.0.0-alpha.1", path = "../../../client/telemetry" } +sc-authority-discovery = { version = "0.8.0-alpha.1", path = "../../../client/authority-discovery" } # frame dependencies -pallet-indices = { version = "2.0.0-dev", path = "../../../frame/indices" } -pallet-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../../frame/timestamp" } -pallet-contracts = { version = "2.0.0-dev", path = "../../../frame/contracts" } -frame-system = { version = "2.0.0-dev", path = "../../../frame/system" } -pallet-balances = { version = "2.0.0-dev", path = "../../../frame/balances" } -pallet-transaction-payment = { version = "2.0.0-dev", path = "../../../frame/transaction-payment" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../../../frame/support" } -pallet-im-online = { version = "2.0.0-dev", default-features = false, path = "../../../frame/im-online" } -pallet-authority-discovery = { version = "2.0.0-dev", path = "../../../frame/authority-discovery" } +pallet-indices = { version = "2.0.0-alpha.1", path = "../../../frame/indices" } +pallet-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/timestamp" } +pallet-contracts = { version = "2.0.0-alpha.1", path = "../../../frame/contracts" } +frame-system = { version = "2.0.0-alpha.1", path = "../../../frame/system" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../../../frame/balances" } +pallet-transaction-payment = { version = "2.0.0-alpha.1", path = "../../../frame/transaction-payment" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/support" } +pallet-im-online = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/im-online" } +pallet-authority-discovery = { version = "2.0.0-alpha.1", path = "../../../frame/authority-discovery" } # node-specific dependencies -node-runtime = { version = "2.0.0-dev", path = "../runtime" } -node-rpc = { version = "2.0.0-dev", path = "../rpc" } -node-primitives = { version = "2.0.0-dev", path = "../primitives" } -node-executor = { version = "2.0.0-dev", path = "../executor" } +node-runtime = { version = "2.0.0-alpha.1", path = "../runtime" } +node-rpc = { version = "2.0.0-alpha.1", path = "../rpc" } +node-primitives = { version = "2.0.0-alpha.1", path = "../primitives" } +node-executor = { version = "2.0.0-alpha.1", path = "../executor" } # CLI-specific dependencies -sc-cli = { version = "0.8.0-dev", optional = true, path = "../../../client/cli" } -frame-benchmarking-cli = { version = "2.0.0-dev", optional = true, path = "../../../utils/frame/benchmarking-cli" } -node-transaction-factory = { version = "0.8.0-dev", optional = true, path = "../transaction-factory" } -node-inspect = { version = "0.8.0-dev", optional = true, path = "../inspect" } +sc-cli = { version = "0.8.0-alpha.1", optional = true, path = "../../../client/cli" } +frame-benchmarking-cli = { version = "2.0.0-alpha.1", optional = true, path = "../../../utils/frame/benchmarking-cli" } +node-transaction-factory = { version = "0.8.0-alpha.1", optional = true, path = "../transaction-factory" } +node-inspect = { version = "0.8.0-alpha.1", optional = true, path = "../inspect" } # WASM-specific dependencies wasm-bindgen = { version = "0.2.57", optional = true } wasm-bindgen-futures = { version = "0.4.7", optional = true } -browser-utils = { path = "../../../utils/browser", optional = true , version = "0.8.0-dev"} +browser-utils = { path = "../../../utils/browser", optional = true , version = "0.8.0-alpha.1"} [dev-dependencies] -sc-keystore = { version = "2.0.0-dev", path = "../../../client/keystore" } -sc-consensus-babe = { version = "0.8.0-dev", features = ["test-helpers"], path = "../../../client/consensus/babe" } -sc-consensus-epochs = { version = "0.8.0-dev", path = "../../../client/consensus/epochs" } +sc-keystore = { version = "2.0.0-alpha.1", path = "../../../client/keystore" } +sc-consensus-babe = { version = "0.8.0-alpha.1", features = ["test-helpers"], path = "../../../client/consensus/babe" } +sc-consensus-epochs = { version = "0.8.0-alpha.1", path = "../../../client/consensus/epochs" } sc-service-test = { version = "2.0.0-dev", path = "../../../client/service/test" } futures = "0.3.1" tempfile = "3.1.0" @@ -112,14 +112,14 @@ nix = "0.17" serde_json = "1.0" [build-dependencies] -build-script-utils = { version = "2.0.0-dev", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } +build-script-utils = { version = "2.0.0-alpha.1", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } structopt = { version = "0.3.8", optional = true } -node-transaction-factory = { version = "0.8.0-dev", optional = true, path = "../transaction-factory" } -node-inspect = { version = "0.8.0-dev", optional = true, path = "../inspect" } -frame-benchmarking-cli = { version = "2.0.0-dev", optional = true, path = "../../../utils/frame/benchmarking-cli" } +node-transaction-factory = { version = "0.8.0-alpha.1", optional = true, path = "../transaction-factory" } +node-inspect = { version = "0.8.0-alpha.1", optional = true, path = "../inspect" } +frame-benchmarking-cli = { version = "2.0.0-alpha.1", optional = true, path = "../../../utils/frame/benchmarking-cli" } [build-dependencies.sc-cli] -version = "0.8.0-dev" +version = "0.8.0-alpha.1" package = "sc-cli" path = "../../../client/cli" optional = true diff --git a/bin/node/executor/Cargo.toml b/bin/node/executor/Cargo.toml index 321ef3bec0b..a4eacbb822b 100644 --- a/bin/node/executor/Cargo.toml +++ b/bin/node/executor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-executor" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] description = "Substrate node implementation in Rust." edition = "2018" @@ -10,32 +10,32 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0" } -node-primitives = { version = "2.0.0-dev", path = "../primitives" } -node-runtime = { version = "2.0.0-dev", path = "../runtime" } -sc-executor = { version = "0.8.0-dev", path = "../../../client/executor" } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-io = { version = "2.0.0-dev", path = "../../../primitives/io" } -sp-state-machine = { version = "0.8.0-dev", path = "../../../primitives/state-machine" } -sp-trie = { version = "2.0.0-dev", path = "../../../primitives/trie" } +node-primitives = { version = "2.0.0-alpha.1", path = "../primitives" } +node-runtime = { version = "2.0.0-alpha.1", path = "../runtime" } +sc-executor = { version = "0.8.0-alpha.1", path = "../../../client/executor" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-io = { version = "2.0.0-alpha.1", path = "../../../primitives/io" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../../../primitives/state-machine" } +sp-trie = { version = "2.0.0-alpha.1", path = "../../../primitives/trie" } trie-root = "0.16.0" -frame-benchmarking = { version = "2.0.0-dev", path = "../../../frame/benchmarking" } +frame-benchmarking = { version = "2.0.0-alpha.1", path = "../../../frame/benchmarking" } [dev-dependencies] criterion = "0.3.0" -frame-support = { version = "2.0.0-dev", path = "../../../frame/support" } -frame-system = { version = "2.0.0-dev", path = "../../../frame/system" } -node-testing = { version = "2.0.0-dev", path = "../testing" } -pallet-balances = { version = "2.0.0-dev", path = "../../../frame/balances" } -pallet-contracts = { version = "2.0.0-dev", path = "../../../frame/contracts" } -pallet-grandpa = { version = "2.0.0-dev", path = "../../../frame/grandpa" } -pallet-im-online = { version = "2.0.0-dev", path = "../../../frame/im-online" } -pallet-indices = { version = "2.0.0-dev", path = "../../../frame/indices" } -pallet-session = { version = "2.0.0-dev", path = "../../../frame/session" } -pallet-timestamp = { version = "2.0.0-dev", path = "../../../frame/timestamp" } -pallet-transaction-payment = { version = "2.0.0-dev", path = "../../../frame/transaction-payment" } -pallet-treasury = { version = "2.0.0-dev", path = "../../../frame/treasury" } -sp-application-crypto = { version = "2.0.0-dev", path = "../../../primitives/application-crypto" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.1", path = "../../../frame/support" } +frame-system = { version = "2.0.0-alpha.1", path = "../../../frame/system" } +node-testing = { version = "2.0.0-alpha.1", path = "../testing" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../../../frame/balances" } +pallet-contracts = { version = "2.0.0-alpha.1", path = "../../../frame/contracts" } +pallet-grandpa = { version = "2.0.0-alpha.1", path = "../../../frame/grandpa" } +pallet-im-online = { version = "2.0.0-alpha.1", path = "../../../frame/im-online" } +pallet-indices = { version = "2.0.0-alpha.1", path = "../../../frame/indices" } +pallet-session = { version = "2.0.0-alpha.1", path = "../../../frame/session" } +pallet-timestamp = { version = "2.0.0-alpha.1", path = "../../../frame/timestamp" } +pallet-transaction-payment = { version = "2.0.0-alpha.1", path = "../../../frame/transaction-payment" } +pallet-treasury = { version = "2.0.0-alpha.1", path = "../../../frame/treasury" } +sp-application-crypto = { version = "2.0.0-alpha.1", path = "../../../primitives/application-crypto" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } substrate-test-client = { version = "2.0.0-dev", path = "../../../test-utils/client" } wabt = "0.9.2" diff --git a/bin/node/inspect/Cargo.toml b/bin/node/inspect/Cargo.toml index b512c458d80..353daf7a4f2 100644 --- a/bin/node/inspect/Cargo.toml +++ b/bin/node/inspect/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-inspect" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -11,10 +11,10 @@ repository = "https://github.com/paritytech/substrate/" codec = { package = "parity-scale-codec", version = "1.0.0" } derive_more = "0.99" log = "0.4.8" -sc-cli = { version = "0.8.0-dev", path = "../../../client/cli" } -sc-client-api = { version = "2.0.0-dev", path = "../../../client/api" } -sc-service = { version = "0.8.0-dev", default-features = false, path = "../../../client/service" } -sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sc-cli = { version = "0.8.0-alpha.1", path = "../../../client/cli" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../../../client/api" } +sc-service = { version = "0.8.0-alpha.1", default-features = false, path = "../../../client/service" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } structopt = "0.3.8" diff --git a/bin/node/primitives/Cargo.toml b/bin/node/primitives/Cargo.toml index 79819614b3f..d82fc49059d 100644 --- a/bin/node/primitives/Cargo.toml +++ b/bin/node/primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-primitives" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,11 +8,11 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/runtime" } [dev-dependencies] -sp-serializer = { version = "2.0.0-dev", path = "../../../primitives/serializer" } +sp-serializer = { version = "2.0.0-alpha.1", path = "../../../primitives/serializer" } pretty_assertions = "0.6.1" [features] diff --git a/bin/node/rpc-client/Cargo.toml b/bin/node/rpc-client/Cargo.toml index d9f35829a12..029f79695a5 100644 --- a/bin/node/rpc-client/Cargo.toml +++ b/bin/node/rpc-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-rpc-client" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -13,5 +13,5 @@ futures = "0.1.29" hyper = "0.12.35" jsonrpc-core-client = { version = "14.0.3", features = ["http", "ws"] } log = "0.4.8" -node-primitives = { version = "2.0.0-dev", path = "../primitives" } -sc-rpc = { version = "2.0.0-dev", path = "../../../client/rpc" } +node-primitives = { version = "2.0.0-alpha.1", path = "../primitives" } +sc-rpc = { version = "2.0.0-alpha.1", path = "../../../client/rpc" } diff --git a/bin/node/rpc/Cargo.toml b/bin/node/rpc/Cargo.toml index a714c8a1725..88dd8b7e826 100644 --- a/bin/node/rpc/Cargo.toml +++ b/bin/node/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-rpc" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,20 +8,20 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-client = { version = "0.8.0-dev", path = "../../../client/" } +sc-client = { version = "0.8.0-alpha.1", path = "../../../client/" } jsonrpc-core = "14.0.3" -node-primitives = { version = "2.0.0-dev", path = "../primitives" } -node-runtime = { version = "2.0.0-dev", path = "../runtime" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } -pallet-contracts-rpc = { version = "0.8.0-dev", path = "../../../frame/contracts/rpc/" } -pallet-transaction-payment-rpc = { version = "2.0.0-dev", path = "../../../frame/transaction-payment/rpc/" } -substrate-frame-rpc-system = { version = "2.0.0-dev", path = "../../../utils/frame/rpc/system" } -sp-transaction-pool = { version = "2.0.0-dev", path = "../../../primitives/transaction-pool" } -sc-consensus-babe = { version = "0.8.0-dev", path = "../../../client/consensus/babe" } -sc-consensus-babe-rpc = { version = "0.8.0-dev", path = "../../../client/consensus/babe/rpc" } -sp-consensus-babe = { version = "0.8.0-dev", path = "../../../primitives/consensus/babe" } -sc-keystore = { version = "2.0.0-dev", path = "../../../client/keystore" } -sc-consensus-epochs = { version = "0.8.0-dev", path = "../../../client/consensus/epochs" } -sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } -sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } +node-primitives = { version = "2.0.0-alpha.1", path = "../primitives" } +node-runtime = { version = "2.0.0-alpha.1", path = "../runtime" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } +pallet-contracts-rpc = { version = "0.8.0-alpha.1", path = "../../../frame/contracts/rpc/" } +pallet-transaction-payment-rpc = { version = "2.0.0-alpha.1", path = "../../../frame/transaction-payment/rpc/" } +substrate-frame-rpc-system = { version = "2.0.0-alpha.1", path = "../../../utils/frame/rpc/system" } +sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../primitives/transaction-pool" } +sc-consensus-babe = { version = "0.8.0-alpha.1", path = "../../../client/consensus/babe" } +sc-consensus-babe-rpc = { version = "0.8.0-alpha.1", path = "../../../client/consensus/babe/rpc" } +sp-consensus-babe = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/babe" } +sc-keystore = { version = "2.0.0-alpha.1", path = "../../../client/keystore" } +sc-consensus-epochs = { version = "0.8.0-alpha.1", path = "../../../client/consensus/epochs" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } diff --git a/bin/node/runtime/Cargo.toml b/bin/node/runtime/Cargo.toml index ddb1f168985..6e2fd1fdb39 100644 --- a/bin/node/runtime/Cargo.toml +++ b/bin/node/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-runtime" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" @@ -17,64 +17,64 @@ rustc-hex = { version = "2.0", optional = true } serde = { version = "1.0.102", optional = true } # primitives -sp-authority-discovery = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/authority-discovery" } -sp-consensus-babe = { version = "0.8.0-dev", default-features = false, path = "../../../primitives/consensus/babe" } -sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0-dev"} -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/inherents" } -node-primitives = { version = "2.0.0-dev", default-features = false, path = "../primitives" } -sp-offchain = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/offchain" } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/core" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/std" } -sp-api = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/api" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/runtime" } -sp-staking = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/staking" } -sp-keyring = { version = "2.0.0-dev", optional = true, path = "../../../primitives/keyring" } -sp-session = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/session" } -sp-transaction-pool = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/transaction-pool" } -sp-version = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/version" } +sp-authority-discovery = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/authority-discovery" } +sp-consensus-babe = { version = "0.8.0-alpha.1", default-features = false, path = "../../../primitives/consensus/babe" } +sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0-alpha.1"} +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/inherents" } +node-primitives = { version = "2.0.0-alpha.1", default-features = false, path = "../primitives" } +sp-offchain = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/offchain" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/core" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/std" } +sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/api" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/runtime" } +sp-staking = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/staking" } +sp-keyring = { version = "2.0.0-alpha.1", optional = true, path = "../../../primitives/keyring" } +sp-session = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/session" } +sp-transaction-pool = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/transaction-pool" } +sp-version = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/version" } # frame dependencies -frame-executive = { version = "2.0.0-dev", default-features = false, path = "../../../frame/executive" } -frame-benchmarking = { version = "2.0.0-dev", default-features = false, path = "../../../frame/benchmarking" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../../../frame/support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../../../frame/system" } -frame-system-rpc-runtime-api = { version = "2.0.0-dev", default-features = false, path = "../../../frame/system/rpc/runtime-api/" } -pallet-authority-discovery = { version = "2.0.0-dev", default-features = false, path = "../../../frame/authority-discovery" } -pallet-authorship = { version = "2.0.0-dev", default-features = false, path = "../../../frame/authorship" } -pallet-babe = { version = "2.0.0-dev", default-features = false, path = "../../../frame/babe" } -pallet-balances = { version = "2.0.0-dev", default-features = false, path = "../../../frame/balances" } -pallet-collective = { version = "2.0.0-dev", default-features = false, path = "../../../frame/collective" } -pallet-contracts = { version = "2.0.0-dev", default-features = false, path = "../../../frame/contracts" } -pallet-contracts-primitives = { version = "2.0.0-dev", default-features = false, path = "../../../frame/contracts/common/" } -pallet-contracts-rpc-runtime-api = { version = "0.8.0-dev", default-features = false, path = "../../../frame/contracts/rpc/runtime-api/" } -pallet-democracy = { version = "2.0.0-dev", default-features = false, path = "../../../frame/democracy" } -pallet-elections-phragmen = { version = "2.0.0-dev", default-features = false, path = "../../../frame/elections-phragmen" } -pallet-finality-tracker = { version = "2.0.0-dev", default-features = false, path = "../../../frame/finality-tracker" } -pallet-grandpa = { version = "2.0.0-dev", default-features = false, path = "../../../frame/grandpa" } -pallet-im-online = { version = "2.0.0-dev", default-features = false, path = "../../../frame/im-online" } -pallet-indices = { version = "2.0.0-dev", default-features = false, path = "../../../frame/indices" } -pallet-identity = { version = "2.0.0-dev", default-features = false, path = "../../../frame/identity" } -pallet-membership = { version = "2.0.0-dev", default-features = false, path = "../../../frame/membership" } -pallet-offences = { version = "2.0.0-dev", default-features = false, path = "../../../frame/offences" } -pallet-randomness-collective-flip = { version = "2.0.0-dev", default-features = false, path = "../../../frame/randomness-collective-flip" } -pallet-recovery = { version = "2.0.0-dev", default-features = false, path = "../../../frame/recovery" } -pallet-session = { version = "2.0.0-dev", features = ["historical"], path = "../../../frame/session", default-features = false } -pallet-staking = { version = "2.0.0-dev", features = ["migrate"], path = "../../../frame/staking", default-features = false } -pallet-staking-reward-curve = { version = "2.0.0-dev", path = "../../../frame/staking/reward-curve" } -pallet-sudo = { version = "2.0.0-dev", default-features = false, path = "../../../frame/sudo" } -pallet-society = { version = "2.0.0-dev", default-features = false, path = "../../../frame/society" } -pallet-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../../frame/timestamp" } -pallet-treasury = { version = "2.0.0-dev", default-features = false, path = "../../../frame/treasury" } -pallet-utility = { version = "2.0.0-dev", default-features = false, path = "../../../frame/utility" } -pallet-transaction-payment = { version = "2.0.0-dev", default-features = false, path = "../../../frame/transaction-payment" } -pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-dev", default-features = false, path = "../../../frame/transaction-payment/rpc/runtime-api/" } -pallet-vesting = { version = "2.0.0-dev", default-features = false, path = "../../../frame/vesting" } +frame-executive = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/executive" } +frame-benchmarking = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/benchmarking" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/system" } +frame-system-rpc-runtime-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/system/rpc/runtime-api/" } +pallet-authority-discovery = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/authority-discovery" } +pallet-authorship = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/authorship" } +pallet-babe = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/babe" } +pallet-balances = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/balances" } +pallet-collective = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/collective" } +pallet-contracts = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/contracts" } +pallet-contracts-primitives = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/contracts/common/" } +pallet-contracts-rpc-runtime-api = { version = "0.8.0-alpha.1", default-features = false, path = "../../../frame/contracts/rpc/runtime-api/" } +pallet-democracy = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/democracy" } +pallet-elections-phragmen = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/elections-phragmen" } +pallet-finality-tracker = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/finality-tracker" } +pallet-grandpa = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/grandpa" } +pallet-im-online = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/im-online" } +pallet-indices = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/indices" } +pallet-identity = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/identity" } +pallet-membership = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/membership" } +pallet-offences = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/offences" } +pallet-randomness-collective-flip = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/randomness-collective-flip" } +pallet-recovery = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/recovery" } +pallet-session = { version = "2.0.0-alpha.1", features = ["historical"], path = "../../../frame/session", default-features = false } +pallet-staking = { version = "2.0.0-alpha.1", features = ["migrate"], path = "../../../frame/staking", default-features = false } +pallet-staking-reward-curve = { version = "2.0.0-alpha.1", path = "../../../frame/staking/reward-curve" } +pallet-sudo = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/sudo" } +pallet-society = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/society" } +pallet-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/timestamp" } +pallet-treasury = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/treasury" } +pallet-utility = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/utility" } +pallet-transaction-payment = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/transaction-payment" } +pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/transaction-payment/rpc/runtime-api/" } +pallet-vesting = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/vesting" } [build-dependencies] wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" } [dev-dependencies] -sp-io = { version = "2.0.0-dev", path = "../../../primitives/io" } +sp-io = { version = "2.0.0-alpha.1", path = "../../../primitives/io" } [features] default = ["std"] diff --git a/bin/node/testing/Cargo.toml b/bin/node/testing/Cargo.toml index 936ae4c52b6..0187fc83be2 100644 --- a/bin/node/testing/Cargo.toml +++ b/bin/node/testing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-testing" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] description = "Test utilities for Substrate node." edition = "2018" @@ -10,47 +10,47 @@ repository = "https://github.com/paritytech/substrate/" publish = true [dependencies] -pallet-balances = { version = "2.0.0-dev", path = "../../../frame/balances" } -sc-client = { version = "0.8.0-dev", path = "../../../client/" } -sc-client-db = { version = "0.8.0-dev", path = "../../../client/db/", features = ["kvdb-rocksdb"] } -sc-client-api = { version = "2.0.0-dev", path = "../../../client/api/" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../../../frame/balances" } +sc-client = { version = "0.8.0-alpha.1", path = "../../../client/" } +sc-client-db = { version = "0.8.0-alpha.1", path = "../../../client/db/", features = ["kvdb-rocksdb"] } +sc-client-api = { version = "2.0.0-alpha.1", path = "../../../client/api/" } codec = { package = "parity-scale-codec", version = "1.0.0" } -pallet-contracts = { version = "2.0.0-dev", path = "../../../frame/contracts" } -pallet-grandpa = { version = "2.0.0-dev", path = "../../../frame/grandpa" } -pallet-indices = { version = "2.0.0-dev", path = "../../../frame/indices" } -sp-keyring = { version = "2.0.0-dev", path = "../../../primitives/keyring" } -node-executor = { version = "2.0.0-dev", path = "../executor" } -node-primitives = { version = "2.0.0-dev", path = "../primitives" } -node-runtime = { version = "2.0.0-dev", path = "../runtime" } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-io = { version = "2.0.0-dev", path = "../../../primitives/io" } -frame-support = { version = "2.0.0-dev", path = "../../../frame/support" } -pallet-session = { version = "2.0.0-dev", path = "../../../frame/session" } -pallet-society = { version = "2.0.0-dev", path = "../../../frame/society" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -pallet-staking = { version = "2.0.0-dev", path = "../../../frame/staking" } -sc-executor = { version = "0.8.0-dev", path = "../../../client/executor", features = ["wasmtime"] } -sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } -frame-system = { version = "2.0.0-dev", path = "../../../frame/system" } +pallet-contracts = { version = "2.0.0-alpha.1", path = "../../../frame/contracts" } +pallet-grandpa = { version = "2.0.0-alpha.1", path = "../../../frame/grandpa" } +pallet-indices = { version = "2.0.0-alpha.1", path = "../../../frame/indices" } +sp-keyring = { version = "2.0.0-alpha.1", path = "../../../primitives/keyring" } +node-executor = { version = "2.0.0-alpha.1", path = "../executor" } +node-primitives = { version = "2.0.0-alpha.1", path = "../primitives" } +node-runtime = { version = "2.0.0-alpha.1", path = "../runtime" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-io = { version = "2.0.0-alpha.1", path = "../../../primitives/io" } +frame-support = { version = "2.0.0-alpha.1", path = "../../../frame/support" } +pallet-session = { version = "2.0.0-alpha.1", path = "../../../frame/session" } +pallet-society = { version = "2.0.0-alpha.1", path = "../../../frame/society" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +pallet-staking = { version = "2.0.0-alpha.1", path = "../../../frame/staking" } +sc-executor = { version = "0.8.0-alpha.1", path = "../../../client/executor", features = ["wasmtime"] } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } +frame-system = { version = "2.0.0-alpha.1", path = "../../../frame/system" } substrate-test-client = { version = "2.0.0-dev", path = "../../../test-utils/client" } -pallet-timestamp = { version = "2.0.0-dev", path = "../../../frame/timestamp" } -pallet-transaction-payment = { version = "2.0.0-dev", path = "../../../frame/transaction-payment" } -pallet-treasury = { version = "2.0.0-dev", path = "../../../frame/treasury" } +pallet-timestamp = { version = "2.0.0-alpha.1", path = "../../../frame/timestamp" } +pallet-transaction-payment = { version = "2.0.0-alpha.1", path = "../../../frame/transaction-payment" } +pallet-treasury = { version = "2.0.0-alpha.1", path = "../../../frame/treasury" } wabt = "0.9.2" -sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } -sp-finality-tracker = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/finality-tracker" } -sp-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/timestamp" } -sp-block-builder = { version = "2.0.0-dev", path = "../../../primitives/block-builder" } -sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } -sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } +sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } +sp-finality-tracker = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/finality-tracker" } +sp-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/timestamp" } +sp-block-builder = { version = "2.0.0-alpha.1", path = "../../../primitives/block-builder" } +sp-inherents = { version = "2.0.0-alpha.1", path = "../../../primitives/inherents" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } log = "0.4.8" tempfile = "3.1.0" fs_extra = "1" [dev-dependencies] criterion = "0.3.0" -sc-cli = { version = "0.8.0-dev", path = "../../../client/cli" } -sc-service = { version = "0.8.0-dev", path = "../../../client/service", features = ["rocksdb"] } +sc-cli = { version = "0.8.0-alpha.1", path = "../../../client/cli" } +sc-service = { version = "0.8.0-alpha.1", path = "../../../client/service", features = ["rocksdb"] } [[bench]] name = "import" diff --git a/bin/node/transaction-factory/Cargo.toml b/bin/node/transaction-factory/Cargo.toml index 5d44c3a86a7..b73f5b65824 100644 --- a/bin/node/transaction-factory/Cargo.toml +++ b/bin/node/transaction-factory/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-transaction-factory" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,15 +8,15 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-block-builder = { version = "2.0.0-dev", path = "../../../primitives/block-builder" } -sc-cli = { version = "0.8.0-dev", path = "../../../client/cli" } -sc-client-api = { version = "2.0.0-dev", path = "../../../client/api" } -sc-client = { version = "0.8.0-dev", path = "../../../client" } +sp-block-builder = { version = "2.0.0-alpha.1", path = "../../../primitives/block-builder" } +sc-cli = { version = "0.8.0-alpha.1", path = "../../../client/cli" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../../../client/api" } +sc-client = { version = "0.8.0-alpha.1", path = "../../../client" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } log = "0.4.8" -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -sc-service = { version = "0.8.0-dev", path = "../../../client/service" } -sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sc-service = { version = "0.8.0-alpha.1", path = "../../../client/service" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } diff --git a/bin/utils/chain-spec-builder/Cargo.toml b/bin/utils/chain-spec-builder/Cargo.toml index b211b308e18..328bc5e064a 100644 --- a/bin/utils/chain-spec-builder/Cargo.toml +++ b/bin/utils/chain-spec-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chain-spec-builder" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" @@ -10,8 +10,8 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] ansi_term = "0.12.1" -sc-keystore = { version = "2.0.0-dev", path = "../../../client/keystore" } -node-cli = { version = "2.0.0-dev", path = "../../node/cli" } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sc-keystore = { version = "2.0.0-alpha.1", path = "../../../client/keystore" } +node-cli = { version = "2.0.0-alpha.1", path = "../../node/cli" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } rand = "0.7.2" structopt = "0.3.8" diff --git a/bin/utils/subkey/Cargo.toml b/bin/utils/subkey/Cargo.toml index 14e5cb4be0b..49a57d7de02 100644 --- a/bin/utils/subkey/Cargo.toml +++ b/bin/utils/subkey/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subkey" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -9,10 +9,10 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] futures = "0.1.29" -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -node-runtime = { version = "2.0.0-dev", path = "../../node/runtime" } -node-primitives = { version = "2.0.0-dev", path = "../../node/primitives" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +node-runtime = { version = "2.0.0-alpha.1", path = "../../node/runtime" } +node-primitives = { version = "2.0.0-alpha.1", path = "../../node/primitives" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } rand = "0.7.2" clap = "2.33.0" tiny-bip39 = "0.7" @@ -21,13 +21,13 @@ substrate-bip39 = "0.3.1" hex = "0.4.0" hex-literal = "0.2.1" codec = { package = "parity-scale-codec", version = "1.0.0" } -frame-system = { version = "2.0.0-dev", path = "../../../frame/system" } -pallet-balances = { version = "2.0.0-dev", path = "../../../frame/balances" } -pallet-transaction-payment = { version = "2.0.0-dev", path = "../../../frame/transaction-payment" } +frame-system = { version = "2.0.0-alpha.1", path = "../../../frame/system" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../../../frame/balances" } +pallet-transaction-payment = { version = "2.0.0-alpha.1", path = "../../../frame/transaction-payment" } rpassword = "4.0.1" itertools = "0.8.2" derive_more = { version = "0.99.2" } -sc-rpc = { version = "2.0.0-dev", path = "../../../client/rpc" } +sc-rpc = { version = "2.0.0-alpha.1", path = "../../../client/rpc" } jsonrpc-core-client = { version = "14.0.3", features = ["http"] } hyper = "0.12.35" libp2p = "0.16.1" diff --git a/client/Cargo.toml b/client/Cargo.toml index b8a6efd05d8..0ae03b56ef4 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-client" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,31 +8,31 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-block-builder = { version = "0.8.0-dev", path = "block-builder" } -sc-client-api = { version = "2.0.0-dev", path = "api" } +sc-block-builder = { version = "0.8.0-alpha.1", path = "block-builder" } +sc-client-api = { version = "2.0.0-alpha.1", path = "api" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -sp-consensus = { version = "0.8.0-dev", path = "../primitives/consensus/common" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../primitives/consensus/common" } derive_more = { version = "0.99.2" } -sc-executor = { version = "0.8.0-dev", path = "executor" } -sp-externalities = { version = "0.8.0-dev", path = "../primitives/externalities" } +sc-executor = { version = "0.8.0-alpha.1", path = "executor" } +sp-externalities = { version = "0.8.0-alpha.1", path = "../primitives/externalities" } fnv = { version = "1.0.6" } futures = { version = "0.3.1", features = ["compat"] } hash-db = { version = "0.15.2" } hex-literal = { version = "0.2.1" } -sp-inherents = { version = "2.0.0-dev", path = "../primitives/inherents" } -sp-keyring = { version = "2.0.0-dev", path = "../primitives/keyring" } +sp-inherents = { version = "2.0.0-alpha.1", path = "../primitives/inherents" } +sp-keyring = { version = "2.0.0-alpha.1", path = "../primitives/keyring" } kvdb = "0.4.0" log = { version = "0.4.8" } parking_lot = "0.10.0" -sp-core = { version = "2.0.0-dev", path = "../primitives/core" } -sp-std = { version = "2.0.0-dev", path = "../primitives/std" } -sp-version = { version = "2.0.0-dev", path = "../primitives/version" } -sp-api = { version = "2.0.0-dev", path = "../primitives/api" } -sp-runtime = { version = "2.0.0-dev", path = "../primitives/runtime" } -sp-blockchain = { version = "2.0.0-dev", path = "../primitives/blockchain" } -sp-state-machine = { version = "0.8.0-dev", path = "../primitives/state-machine" } -sc-telemetry = { version = "2.0.0-dev", path = "telemetry" } -sp-trie = { version = "2.0.0-dev", path = "../primitives/trie" } +sp-core = { version = "2.0.0-alpha.1", path = "../primitives/core" } +sp-std = { version = "2.0.0-alpha.1", path = "../primitives/std" } +sp-version = { version = "2.0.0-alpha.1", path = "../primitives/version" } +sp-api = { version = "2.0.0-alpha.1", path = "../primitives/api" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../primitives/runtime" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../primitives/blockchain" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../primitives/state-machine" } +sc-telemetry = { version = "2.0.0-alpha.1", path = "telemetry" } +sp-trie = { version = "2.0.0-alpha.1", path = "../primitives/trie" } tracing = "0.1.10" [dev-dependencies] @@ -40,4 +40,4 @@ env_logger = "0.7.0" tempfile = "3.1.0" substrate-test-runtime-client = { version = "2.0.0-dev", path = "../test-utils/runtime/client" } kvdb-memorydb = "0.4.0" -sp-panic-handler = { version = "2.0.0-dev", path = "../primitives/panic-handler" } +sp-panic-handler = { version = "2.0.0-alpha.1", path = "../primitives/panic-handler" } diff --git a/client/api/Cargo.toml b/client/api/Cargo.toml index a848875029f..6256a99bb88 100644 --- a/client/api/Cargo.toml +++ b/client/api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-client-api" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -9,29 +9,29 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } derive_more = { version = "0.99.2" } -sc-executor = { version = "0.8.0-dev", path = "../executor" } -sp-externalities = { version = "0.8.0-dev", path = "../../primitives/externalities" } +sc-executor = { version = "0.8.0-alpha.1", path = "../executor" } +sp-externalities = { version = "0.8.0-alpha.1", path = "../../primitives/externalities" } fnv = { version = "1.0.6" } futures = { version = "0.3.1" } hash-db = { version = "0.15.2", default-features = false } -sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } hex-literal = { version = "0.2.1" } -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } -sp-keyring = { version = "2.0.0-dev", path = "../../primitives/keyring" } +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } +sp-keyring = { version = "2.0.0-alpha.1", path = "../../primitives/keyring" } kvdb = "0.4.0" log = { version = "0.4.8" } parking_lot = "0.10.0" -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-version = { version = "2.0.0-dev", default-features = false, path = "../../primitives/version" } -sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } -sc-telemetry = { version = "2.0.0-dev", path = "../telemetry" } -sp-trie = { version = "2.0.0-dev", path = "../../primitives/trie" } -sp-transaction-pool = { version = "2.0.0-dev", path = "../../primitives/transaction-pool" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-version = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/version" } +sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } +sc-telemetry = { version = "2.0.0-alpha.1", path = "../telemetry" } +sp-trie = { version = "2.0.0-alpha.1", path = "../../primitives/trie" } +sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../primitives/transaction-pool" } [dev-dependencies] sp-test-primitives = { version = "2.0.0-dev", path = "../../primitives/test-primitives" } diff --git a/client/authority-discovery/Cargo.toml b/client/authority-discovery/Cargo.toml index 3ba2436e5da..95e0d78240e 100644 --- a/client/authority-discovery/Cargo.toml +++ b/client/authority-discovery/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-authority-discovery" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" @@ -21,18 +21,18 @@ libp2p = { version = "0.16.1", default-features = false, features = ["secp256k1" log = "0.4.8" prost = "0.6.1" rand = "0.7.2" -sc-client-api = { version = "2.0.0-dev", path = "../api" } -sc-keystore = { version = "2.0.0-dev", path = "../keystore" } -sc-network = { version = "0.8.0-dev", path = "../network" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } +sc-keystore = { version = "2.0.0-alpha.1", path = "../keystore" } +sc-network = { version = "0.8.0-alpha.1", path = "../network" } serde_json = "1.0.41" -sp-authority-discovery = { version = "2.0.0-dev", path = "../../primitives/authority-discovery" } -sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } -sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } +sp-authority-discovery = { version = "2.0.0-alpha.1", path = "../../primitives/authority-discovery" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } +sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } [dev-dependencies] env_logger = "0.7.0" quickcheck = "0.9.0" -sc-peerset = { version = "2.0.0-dev", path = "../peerset" } +sc-peerset = { version = "2.0.0-alpha.1", path = "../peerset" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client"} diff --git a/client/basic-authorship/Cargo.toml b/client/basic-authorship/Cargo.toml index 15a94def5f3..971279297ac 100644 --- a/client/basic-authorship/Cargo.toml +++ b/client/basic-authorship/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-basic-authorship" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -11,20 +11,20 @@ repository = "https://github.com/paritytech/substrate/" log = "0.4.8" futures = "0.3.1" codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } -sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } -sc-client = { version = "0.8.0-dev", path = "../" } -sc-client-api = { version = "2.0.0-dev", path = "../api" } -sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } -sp-inherents = { version = "2.0.0-dev", path = "../../primitives/inherents" } -sc-telemetry = { version = "2.0.0-dev", path = "../telemetry" } -sp-transaction-pool = { version = "2.0.0-dev", path = "../../primitives/transaction-pool" } -sc-block-builder = { version = "0.8.0-dev", path = "../block-builder" } +sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } +sc-client = { version = "0.8.0-alpha.1", path = "../" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } +sp-inherents = { version = "2.0.0-alpha.1", path = "../../primitives/inherents" } +sc-telemetry = { version = "2.0.0-alpha.1", path = "../telemetry" } +sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../primitives/transaction-pool" } +sc-block-builder = { version = "0.8.0-alpha.1", path = "../block-builder" } tokio-executor = { version = "0.2.0-alpha.6", features = ["blocking"] } [dev-dependencies] -sc-transaction-pool = { version = "2.0.0-dev", path = "../../client/transaction-pool" } +sc-transaction-pool = { version = "2.0.0-alpha.1", path = "../../client/transaction-pool" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } parking_lot = "0.10.0" diff --git a/client/block-builder/Cargo.toml b/client/block-builder/Cargo.toml index f706265cabf..94b7640d2f5 100644 --- a/client/block-builder/Cargo.toml +++ b/client/block-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-block-builder" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,12 +8,12 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } -sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } -sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } -sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } -sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sp-block-builder = { version = "2.0.0-dev", path = "../../primitives/block-builder" } -sc-client-api = { version = "2.0.0-dev", path = "../api" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } +sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-block-builder = { version = "2.0.0-alpha.1", path = "../../primitives/block-builder" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } codec = { package = "parity-scale-codec", version = "1.0.6", features = ["derive"] } diff --git a/client/chain-spec/Cargo.toml b/client/chain-spec/Cargo.toml index b2dee23ac5e..e1fc4fbc20c 100644 --- a/client/chain-spec/Cargo.toml +++ b/client/chain-spec/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-chain-spec" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,11 +8,11 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-chain-spec-derive = { version = "2.0.0-dev", path = "./derive" } +sc-chain-spec-derive = { version = "2.0.0-alpha.1", path = "./derive" } impl-trait-for-tuples = "0.1.3" -sc-network = { version = "0.8.0-dev", path = "../network" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sc-network = { version = "0.8.0-alpha.1", path = "../network" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } serde = { version = "1.0.101", features = ["derive"] } serde_json = "1.0.41" -sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } -sc-telemetry = { version = "2.0.0-dev", path = "../telemetry" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } +sc-telemetry = { version = "2.0.0-alpha.1", path = "../telemetry" } diff --git a/client/chain-spec/derive/Cargo.toml b/client/chain-spec/derive/Cargo.toml index 9b23b71ab52..61fe7e9df0e 100644 --- a/client/chain-spec/derive/Cargo.toml +++ b/client/chain-spec/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-chain-spec-derive" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index 30c749ff85e..9c724296389 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-cli" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] description = "Substrate CLI interface." edition = "2018" @@ -23,21 +23,21 @@ tokio = { version = "0.2.9", features = [ "signal", "rt-core", "rt-threaded" ] } futures = "0.3.1" fdlimit = "0.1.1" serde_json = "1.0.41" -sc-informant = { version = "0.8.0-dev", path = "../informant" } -sp-panic-handler = { version = "2.0.0-dev", path = "../../primitives/panic-handler" } -sc-client-api = { version = "2.0.0-dev", path = "../api" } -sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } -sc-network = { version = "0.8.0-dev", path = "../network" } -sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sc-service = { version = "0.8.0-dev", default-features = false, path = "../service" } -sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } -sc-telemetry = { version = "2.0.0-dev", path = "../telemetry" } -prometheus-exporter = { path = "../../utils/prometheus" , version = "0.8.0-dev"} -sp-keyring = { version = "2.0.0-dev", path = "../../primitives/keyring" } +sc-informant = { version = "0.8.0-alpha.1", path = "../informant" } +sp-panic-handler = { version = "2.0.0-alpha.1", path = "../../primitives/panic-handler" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } +sc-network = { version = "0.8.0-alpha.1", path = "../network" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sc-service = { version = "0.8.0-alpha.1", default-features = false, path = "../service" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } +sc-telemetry = { version = "2.0.0-alpha.1", path = "../telemetry" } +prometheus-exporter = { path = "../../utils/prometheus" , version = "0.8.0-alpha.1"} +sp-keyring = { version = "2.0.0-alpha.1", path = "../../primitives/keyring" } names = "0.11.0" structopt = "0.3.8" -sc-tracing = { version = "2.0.0-dev", path = "../tracing" } +sc-tracing = { version = "2.0.0-alpha.1", path = "../tracing" } chrono = "0.4.10" parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } diff --git a/client/consensus/aura/Cargo.toml b/client/consensus/aura/Cargo.toml index 24c42fe0fc1..420b0e30053 100644 --- a/client/consensus/aura/Cargo.toml +++ b/client/consensus/aura/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-aura" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] description = "Aura consensus algorithm for substrate" edition = "2018" @@ -9,36 +9,36 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0-dev", path = "../../../primitives/application-crypto" } -sp-consensus-aura = { version = "0.8.0-dev", path = "../../../primitives/consensus/aura" } -sp-block-builder = { version = "2.0.0-dev", path = "../../../primitives/block-builder" } -sc-client = { version = "0.8.0-dev", path = "../../" } -sc-client-api = { version = "2.0.0-dev", path = "../../api" } +sp-application-crypto = { version = "2.0.0-alpha.1", path = "../../../primitives/application-crypto" } +sp-consensus-aura = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/aura" } +sp-block-builder = { version = "2.0.0-alpha.1", path = "../../../primitives/block-builder" } +sc-client = { version = "0.8.0-alpha.1", path = "../../" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../../api" } codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } derive_more = "0.99.2" futures = "0.3.1" futures-timer = "3.0.1" -sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } -sc-keystore = { version = "2.0.0-dev", path = "../../keystore" } +sp-inherents = { version = "2.0.0-alpha.1", path = "../../../primitives/inherents" } +sc-keystore = { version = "2.0.0-alpha.1", path = "../../keystore" } log = "0.4.8" parking_lot = "0.10.0" -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } -sp-io = { version = "2.0.0-dev", path = "../../../primitives/io" } -sp-version = { version = "2.0.0-dev", path = "../../../primitives/version" } -sc-consensus-slots = { version = "0.8.0-dev", path = "../slots" } -sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -sp-timestamp = { version = "2.0.0-dev", path = "../../../primitives/timestamp" } -sc-telemetry = { version = "2.0.0-dev", path = "../../telemetry" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } +sp-io = { version = "2.0.0-alpha.1", path = "../../../primitives/io" } +sp-version = { version = "2.0.0-alpha.1", path = "../../../primitives/version" } +sc-consensus-slots = { version = "0.8.0-alpha.1", path = "../slots" } +sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sp-timestamp = { version = "2.0.0-alpha.1", path = "../../../primitives/timestamp" } +sc-telemetry = { version = "2.0.0-alpha.1", path = "../../telemetry" } [dev-dependencies] -sp-keyring = { version = "2.0.0-dev", path = "../../../primitives/keyring" } -sc-executor = { version = "0.8.0-dev", path = "../../executor" } -sc-network = { version = "0.8.0-dev", path = "../../network" } +sp-keyring = { version = "2.0.0-alpha.1", path = "../../../primitives/keyring" } +sc-executor = { version = "0.8.0-alpha.1", path = "../../executor" } +sc-network = { version = "0.8.0-alpha.1", path = "../../network" } sc-network-test = { version = "0.8.0-dev", path = "../../network/test" } -sc-service = { version = "0.8.0-dev", path = "../../service" } +sc-service = { version = "0.8.0-alpha.1", path = "../../service" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } tokio = "0.1.22" env_logger = "0.7.0" diff --git a/client/consensus/babe/Cargo.toml b/client/consensus/babe/Cargo.toml index 2e11d741dcb..a05723539a5 100644 --- a/client/consensus/babe/Cargo.toml +++ b/client/consensus/babe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-babe" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] description = "BABE consensus algorithm for substrate" edition = "2018" @@ -10,30 +10,30 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -sp-consensus-babe = { version = "0.8.0-dev", path = "../../../primitives/consensus/babe" } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-application-crypto = { version = "2.0.0-dev", path = "../../../primitives/application-crypto" } +sp-consensus-babe = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/babe" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-application-crypto = { version = "2.0.0-alpha.1", path = "../../../primitives/application-crypto" } num-bigint = "0.2.3" num-rational = "0.2.2" num-traits = "0.2.8" serde = { version = "1.0.104", features = ["derive"] } -sp-version = { version = "2.0.0-dev", path = "../../../primitives/version" } -sp-io = { version = "2.0.0-dev", path = "../../../primitives/io" } -sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } -sp-timestamp = { version = "2.0.0-dev", path = "../../../primitives/timestamp" } -sc-telemetry = { version = "2.0.0-dev", path = "../../telemetry" } -sc-keystore = { version = "2.0.0-dev", path = "../../keystore" } -sc-client-api = { version = "2.0.0-dev", path = "../../api" } -sc-client = { version = "0.8.0-dev", path = "../../" } -sc-consensus-epochs = { version = "0.8.0-dev", path = "../epochs" } -sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } -sp-block-builder = { version = "2.0.0-dev", path = "../../../primitives/block-builder" } -sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } -sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } -sc-consensus-uncles = { version = "0.8.0-dev", path = "../uncles" } -sc-consensus-slots = { version = "0.8.0-dev", path = "../slots" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -fork-tree = { version = "2.0.0-dev", path = "../../../utils/fork-tree" } +sp-version = { version = "2.0.0-alpha.1", path = "../../../primitives/version" } +sp-io = { version = "2.0.0-alpha.1", path = "../../../primitives/io" } +sp-inherents = { version = "2.0.0-alpha.1", path = "../../../primitives/inherents" } +sp-timestamp = { version = "2.0.0-alpha.1", path = "../../../primitives/timestamp" } +sc-telemetry = { version = "2.0.0-alpha.1", path = "../../telemetry" } +sc-keystore = { version = "2.0.0-alpha.1", path = "../../keystore" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../../api" } +sc-client = { version = "0.8.0-alpha.1", path = "../../" } +sc-consensus-epochs = { version = "0.8.0-alpha.1", path = "../epochs" } +sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } +sp-block-builder = { version = "2.0.0-alpha.1", path = "../../../primitives/block-builder" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } +sc-consensus-uncles = { version = "0.8.0-alpha.1", path = "../uncles" } +sc-consensus-slots = { version = "0.8.0-alpha.1", path = "../slots" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +fork-tree = { version = "2.0.0-alpha.1", path = "../../../utils/fork-tree" } futures = "0.3.1" futures-timer = "3.0.1" parking_lot = "0.10.0" @@ -45,13 +45,13 @@ pdqselect = "0.1.0" derive_more = "0.99.2" [dev-dependencies] -sp-keyring = { version = "2.0.0-dev", path = "../../../primitives/keyring" } -sc-executor = { version = "0.8.0-dev", path = "../../executor" } -sc-network = { version = "0.8.0-dev", path = "../../network" } +sp-keyring = { version = "2.0.0-alpha.1", path = "../../../primitives/keyring" } +sc-executor = { version = "0.8.0-alpha.1", path = "../../executor" } +sc-network = { version = "0.8.0-alpha.1", path = "../../network" } sc-network-test = { version = "0.8.0-dev", path = "../../network/test" } -sc-service = { version = "0.8.0-dev", path = "../../service" } +sc-service = { version = "0.8.0-alpha.1", path = "../../service" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } -sc-block-builder = { version = "0.8.0-dev", path = "../../block-builder" } +sc-block-builder = { version = "0.8.0-alpha.1", path = "../../block-builder" } tokio = "0.1.22" env_logger = "0.7.0" tempfile = "3.1.0" diff --git a/client/consensus/babe/rpc/Cargo.toml b/client/consensus/babe/rpc/Cargo.toml index 524b90046d6..a2d367df5c0 100644 --- a/client/consensus/babe/rpc/Cargo.toml +++ b/client/consensus/babe/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-babe-rpc" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] description = "RPC extensions for the BABE consensus algorithm" edition = "2018" @@ -9,24 +9,24 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-consensus-babe = { version = "0.8.0-dev", path = "../" } +sc-consensus-babe = { version = "0.8.0-alpha.1", path = "../" } jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" -sp-consensus-babe = { version = "0.8.0-dev", path = "../../../../primitives/consensus/babe" } +sp-consensus-babe = { version = "0.8.0-alpha.1", path = "../../../../primitives/consensus/babe" } serde = { version = "1.0.104", features=["derive"] } -sp-blockchain = { version = "2.0.0-dev", path = "../../../../primitives/blockchain" } -sp-runtime = { version = "2.0.0-dev", path = "../../../../primitives/runtime" } -sc-consensus-epochs = { version = "0.8.0-dev", path = "../../epochs" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../../primitives/runtime" } +sc-consensus-epochs = { version = "0.8.0-alpha.1", path = "../../epochs" } futures = "0.3.1" derive_more = "0.99.2" -sp-api = { version = "2.0.0-dev", path = "../../../../primitives/api" } -sp-consensus = { version = "0.8.0-dev", path = "../../../../primitives/consensus/common" } -sp-core = { version = "2.0.0-dev", path = "../../../../primitives/core" } -sc-keystore = { version = "2.0.0-dev", path = "../../../keystore" } +sp-api = { version = "2.0.0-alpha.1", path = "../../../../primitives/api" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../../../primitives/consensus/common" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../../primitives/core" } +sc-keystore = { version = "2.0.0-alpha.1", path = "../../../keystore" } [dev-dependencies] substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../../test-utils/runtime/client" } -sp-application-crypto = { version = "2.0.0-dev", path = "../../../../primitives/application-crypto" } -sp-keyring = { version = "2.0.0-dev", path = "../../../../primitives/keyring" } +sp-application-crypto = { version = "2.0.0-alpha.1", path = "../../../../primitives/application-crypto" } +sp-keyring = { version = "2.0.0-alpha.1", path = "../../../../primitives/keyring" } tempfile = "3.1.0" diff --git a/client/consensus/epochs/Cargo.toml b/client/consensus/epochs/Cargo.toml index 26dc2062b87..8fc7d813036 100644 --- a/client/consensus/epochs/Cargo.toml +++ b/client/consensus/epochs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-epochs" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] description = "Generic epochs-based utilities for consensus" edition = "2018" @@ -11,7 +11,7 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } parking_lot = "0.10.0" -fork-tree = { version = "2.0.0-dev", path = "../../../utils/fork-tree" } -sp-runtime = { path = "../../../primitives/runtime" , version = "2.0.0-dev"} -sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } -sc-client-api = { path = "../../api" , version = "2.0.0-dev"} +fork-tree = { version = "2.0.0-alpha.1", path = "../../../utils/fork-tree" } +sp-runtime = { path = "../../../primitives/runtime" , version = "2.0.0-alpha.1"} +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } +sc-client-api = { path = "../../api" , version = "2.0.0-alpha.1"} diff --git a/client/consensus/manual-seal/Cargo.toml b/client/consensus/manual-seal/Cargo.toml index 25650f3300d..f432523a43d 100644 --- a/client/consensus/manual-seal/Cargo.toml +++ b/client/consensus/manual-seal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-manual-seal" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] description = "Manual sealing engine for Substrate" edition = "2018" @@ -18,17 +18,17 @@ log = "0.4.8" parking_lot = "0.10.0" serde = { version = "1.0", features=["derive"] } -sc-client = { path = "../../../client" , version = "0.8.0-dev"} -sc-client-api = { path = "../../../client/api" , version = "2.0.0-dev"} -sc-transaction-pool = { path = "../../transaction-pool" , version = "2.0.0-dev"} -sp-blockchain = { path = "../../../primitives/blockchain" , version = "2.0.0-dev"} -sp-consensus = { package = "sp-consensus", path = "../../../primitives/consensus/common" , version = "0.8.0-dev"} -sp-inherents = { path = "../../../primitives/inherents" , version = "2.0.0-dev"} -sp-runtime = { path = "../../../primitives/runtime" , version = "2.0.0-dev"} -sp-transaction-pool = { path = "../../../primitives/transaction-pool" , version = "2.0.0-dev"} +sc-client = { path = "../../../client" , version = "0.8.0-alpha.1"} +sc-client-api = { path = "../../../client/api" , version = "2.0.0-alpha.1"} +sc-transaction-pool = { path = "../../transaction-pool" , version = "2.0.0-alpha.1"} +sp-blockchain = { path = "../../../primitives/blockchain" , version = "2.0.0-alpha.1"} +sp-consensus = { package = "sp-consensus", path = "../../../primitives/consensus/common" , version = "0.8.0-alpha.1"} +sp-inherents = { path = "../../../primitives/inherents" , version = "2.0.0-alpha.1"} +sp-runtime = { path = "../../../primitives/runtime" , version = "2.0.0-alpha.1"} +sp-transaction-pool = { path = "../../../primitives/transaction-pool" , version = "2.0.0-alpha.1"} [dev-dependencies] -sc-basic-authorship = { path = "../../basic-authorship" , version = "0.8.0-dev"} +sc-basic-authorship = { path = "../../basic-authorship" , version = "0.8.0-alpha.1"} substrate-test-runtime-client = { path = "../../../test-utils/runtime/client" , version = "2.0.0-dev"} substrate-test-runtime-transaction-pool = { path = "../../../test-utils/runtime/transaction-pool" , version = "2.0.0-dev"} tokio = { version = "0.2", features = ["rt-core", "macros"] } diff --git a/client/consensus/pow/Cargo.toml b/client/consensus/pow/Cargo.toml index b700b52ab09..d3e0be60f4d 100644 --- a/client/consensus/pow/Cargo.toml +++ b/client/consensus/pow/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-pow" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] description = "PoW consensus algorithm for substrate" edition = "2018" @@ -10,16 +10,16 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } -sc-client-api = { version = "2.0.0-dev", path = "../../api" } -sp-block-builder = { version = "2.0.0-dev", path = "../../../primitives/block-builder" } -sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } -sp-consensus-pow = { version = "0.8.0-dev", path = "../../../primitives/consensus/pow" } -sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../../api" } +sp-block-builder = { version = "2.0.0-alpha.1", path = "../../../primitives/block-builder" } +sp-inherents = { version = "2.0.0-alpha.1", path = "../../../primitives/inherents" } +sp-consensus-pow = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/pow" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } log = "0.4.8" futures = { version = "0.3.1", features = ["compat"] } -sp-timestamp = { version = "2.0.0-dev", path = "../../../primitives/timestamp" } +sp-timestamp = { version = "2.0.0-alpha.1", path = "../../../primitives/timestamp" } derive_more = "0.99.2" diff --git a/client/consensus/slots/Cargo.toml b/client/consensus/slots/Cargo.toml index 9a75972f588..87422a8c6c9 100644 --- a/client/consensus/slots/Cargo.toml +++ b/client/consensus/slots/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-slots" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] description = "Generic slots-based utilities for consensus" edition = "2018" @@ -11,15 +11,15 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0" } -sc-client-api = { version = "2.0.0-dev", path = "../../api" } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -sp-state-machine = { version = "0.8.0-dev", path = "../../../primitives/state-machine" } -sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } -sc-telemetry = { version = "2.0.0-dev", path = "../../telemetry" } -sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } -sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../../api" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../../../primitives/state-machine" } +sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } +sc-telemetry = { version = "2.0.0-alpha.1", path = "../../telemetry" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } +sp-inherents = { version = "2.0.0-alpha.1", path = "../../../primitives/inherents" } futures = "0.3.1" futures-timer = "3.0.1" parking_lot = "0.10.0" diff --git a/client/consensus/uncles/Cargo.toml b/client/consensus/uncles/Cargo.toml index ad9ac538425..f263cd21710 100644 --- a/client/consensus/uncles/Cargo.toml +++ b/client/consensus/uncles/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-uncles" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] description = "Generic uncle inclusion utilities for consensus" edition = "2018" @@ -9,10 +9,10 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-client-api = { version = "2.0.0-dev", path = "../../api" } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -sp-authorship = { version = "2.0.0-dev", path = "../../../primitives/authorship" } -sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } -sp-inherents = { version = "2.0.0-dev", path = "../../../primitives/inherents" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../../api" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sp-authorship = { version = "2.0.0-alpha.1", path = "../../../primitives/authorship" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } +sp-inherents = { version = "2.0.0-alpha.1", path = "../../../primitives/inherents" } log = "0.4.8" diff --git a/client/db/Cargo.toml b/client/db/Cargo.toml index c2e27ae7e63..6446608d35f 100644 --- a/client/db/Cargo.toml +++ b/client/db/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-client-db" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -19,19 +19,19 @@ hash-db = "0.15.2" parity-util-mem = { version = "0.5.1", default-features = false, features = ["std"] } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -sc-client-api = { version = "2.0.0-dev", path = "../api" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } -sc-client = { version = "0.8.0-dev", path = "../" } -sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } -sc-executor = { version = "0.8.0-dev", path = "../executor" } -sc-state-db = { version = "0.8.0-dev", path = "../state-db" } -sp-trie = { version = "2.0.0-dev", path = "../../primitives/trie" } -sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } -sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } +sc-client = { version = "0.8.0-alpha.1", path = "../" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } +sc-executor = { version = "0.8.0-alpha.1", path = "../executor" } +sc-state-db = { version = "0.8.0-alpha.1", path = "../state-db" } +sp-trie = { version = "2.0.0-alpha.1", path = "../../primitives/trie" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } [dev-dependencies] -sp-keyring = { version = "2.0.0-dev", path = "../../primitives/keyring" } +sp-keyring = { version = "2.0.0-alpha.1", path = "../../primitives/keyring" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } env_logger = "0.7.0" quickcheck = "0.9" diff --git a/client/executor/Cargo.toml b/client/executor/Cargo.toml index f98cbf97e05..559a2d8b929 100644 --- a/client/executor/Cargo.toml +++ b/client/executor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-executor" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,21 +10,21 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] derive_more = "0.99.2" codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sp-trie = { version = "2.0.0-dev", path = "../../primitives/trie" } -sp-serializer = { version = "2.0.0-dev", path = "../../primitives/serializer" } -sp-version = { version = "2.0.0-dev", path = "../../primitives/version" } -sp-panic-handler = { version = "2.0.0-dev", path = "../../primitives/panic-handler" } +sp-io = { version = "2.0.0-alpha.1", path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-trie = { version = "2.0.0-alpha.1", path = "../../primitives/trie" } +sp-serializer = { version = "2.0.0-alpha.1", path = "../../primitives/serializer" } +sp-version = { version = "2.0.0-alpha.1", path = "../../primitives/version" } +sp-panic-handler = { version = "2.0.0-alpha.1", path = "../../primitives/panic-handler" } wasmi = "0.6.2" parity-wasm = "0.41.0" lazy_static = "1.4.0" -sp-wasm-interface = { version = "2.0.0-dev", path = "../../primitives/wasm-interface" } -sp-runtime-interface = { version = "2.0.0-dev", path = "../../primitives/runtime-interface" } -sp-externalities = { version = "0.8.0-dev", path = "../../primitives/externalities" } -sc-executor-common = { version = "0.8.0-dev", path = "common" } -sc-executor-wasmi = { version = "0.8.0-dev", path = "wasmi" } -sc-executor-wasmtime = { version = "0.8.0-dev", path = "wasmtime", optional = true } +sp-wasm-interface = { version = "2.0.0-alpha.1", path = "../../primitives/wasm-interface" } +sp-runtime-interface = { version = "2.0.0-alpha.1", path = "../../primitives/runtime-interface" } +sp-externalities = { version = "0.8.0-alpha.1", path = "../../primitives/externalities" } +sc-executor-common = { version = "0.8.0-alpha.1", path = "common" } +sc-executor-wasmi = { version = "0.8.0-alpha.1", path = "wasmi" } +sc-executor-wasmtime = { version = "0.8.0-alpha.1", path = "wasmtime", optional = true } parking_lot = "0.10.0" log = "0.4.8" libsecp256k1 = "0.3.4" @@ -35,7 +35,7 @@ wabt = "0.9.2" hex-literal = "0.2.1" sc-runtime-test = { version = "2.0.0-dev", path = "runtime-test" } substrate-test-runtime = { version = "2.0.0-dev", path = "../../test-utils/runtime" } -sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } test-case = "0.3.3" [features] diff --git a/client/executor/common/Cargo.toml b/client/executor/common/Cargo.toml index fd3645719c2..474b05bcccf 100644 --- a/client/executor/common/Cargo.toml +++ b/client/executor/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-executor-common" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -12,11 +12,11 @@ log = "0.4.8" derive_more = "0.99.2" codec = { package = "parity-scale-codec", version = "1.0.0" } wasmi = "0.6.2" -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-allocator = { version = "2.0.0-dev", path = "../../../primitives/allocator" } -sp-wasm-interface = { version = "2.0.0-dev", path = "../../../primitives/wasm-interface" } -sp-runtime-interface = { version = "2.0.0-dev", path = "../../../primitives/runtime-interface" } -sp-serializer = { version = "2.0.0-dev", path = "../../../primitives/serializer" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-allocator = { version = "2.0.0-alpha.1", path = "../../../primitives/allocator" } +sp-wasm-interface = { version = "2.0.0-alpha.1", path = "../../../primitives/wasm-interface" } +sp-runtime-interface = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime-interface" } +sp-serializer = { version = "2.0.0-alpha.1", path = "../../../primitives/serializer" } [features] default = [] diff --git a/client/executor/runtime-test/Cargo.toml b/client/executor/runtime-test/Cargo.toml index b677dcd07d6..6964f7d1126 100644 --- a/client/executor/runtime-test/Cargo.toml +++ b/client/executor/runtime-test/Cargo.toml @@ -10,12 +10,12 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/io" } -sp-sandbox = { version = "0.8.0-dev", default-features = false, path = "../../../primitives/sandbox" } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/runtime" } -sp-allocator = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/allocator" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/io" } +sp-sandbox = { version = "0.8.0-alpha.1", default-features = false, path = "../../../primitives/sandbox" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/runtime" } +sp-allocator = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/allocator" } [build-dependencies] wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" } diff --git a/client/executor/wasmi/Cargo.toml b/client/executor/wasmi/Cargo.toml index 6c8ba4c747d..da9c4cb598a 100644 --- a/client/executor/wasmi/Cargo.toml +++ b/client/executor/wasmi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-executor-wasmi" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -12,8 +12,8 @@ log = "0.4.8" wasmi = "0.6.2" parity-wasm = "0.41.0" codec = { package = "parity-scale-codec", version = "1.0.0" } -sc-executor-common = { version = "0.8.0-dev", path = "../common" } -sp-wasm-interface = { version = "2.0.0-dev", path = "../../../primitives/wasm-interface" } -sp-runtime-interface = { version = "2.0.0-dev", path = "../../../primitives/runtime-interface" } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-allocator = { version = "2.0.0-dev", path = "../../../primitives/allocator" } +sc-executor-common = { version = "0.8.0-alpha.1", path = "../common" } +sp-wasm-interface = { version = "2.0.0-alpha.1", path = "../../../primitives/wasm-interface" } +sp-runtime-interface = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime-interface" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-allocator = { version = "2.0.0-alpha.1", path = "../../../primitives/allocator" } diff --git a/client/executor/wasmtime/Cargo.toml b/client/executor/wasmtime/Cargo.toml index cd7e5dead9f..709da352530 100644 --- a/client/executor/wasmtime/Cargo.toml +++ b/client/executor/wasmtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-executor-wasmtime" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -12,11 +12,11 @@ log = "0.4.8" wasmi = "0.6.2" parity-wasm = "0.41.0" codec = { package = "parity-scale-codec", version = "1.0.0" } -sc-executor-common = { version = "0.8.0-dev", path = "../common" } -sp-wasm-interface = { version = "2.0.0-dev", path = "../../../primitives/wasm-interface" } -sp-runtime-interface = { version = "2.0.0-dev", path = "../../../primitives/runtime-interface" } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-allocator = { version = "2.0.0-dev", path = "../../../primitives/allocator" } +sc-executor-common = { version = "0.8.0-alpha.1", path = "../common" } +sp-wasm-interface = { version = "2.0.0-alpha.1", path = "../../../primitives/wasm-interface" } +sp-runtime-interface = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime-interface" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-allocator = { version = "2.0.0-alpha.1", path = "../../../primitives/allocator" } wasmtime = "0.11" diff --git a/client/finality-grandpa/Cargo.toml b/client/finality-grandpa/Cargo.toml index 46dd444cdfc..733e5415b82 100644 --- a/client/finality-grandpa/Cargo.toml +++ b/client/finality-grandpa/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-finality-grandpa" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,7 +8,7 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -fork-tree = { version = "2.0.0-dev", path = "../../utils/fork-tree" } +fork-tree = { version = "2.0.0-alpha.1", path = "../../utils/fork-tree" } futures = "0.3.1" futures-timer = "3.0.1" log = "0.4.8" @@ -16,34 +16,34 @@ parking_lot = "0.10.0" rand = "0.7.2" assert_matches = "1.3.0" parity-scale-codec = { version = "1.0.0", features = ["derive"] } -sp-arithmetic = { version = "2.0.0-dev", path = "../../primitives/arithmetic" } -sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } -sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sc-telemetry = { version = "2.0.0-dev", path = "../telemetry" } -sc-keystore = { version = "2.0.0-dev", path = "../keystore" } +sp-arithmetic = { version = "2.0.0-alpha.1", path = "../../primitives/arithmetic" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sc-telemetry = { version = "2.0.0-alpha.1", path = "../telemetry" } +sc-keystore = { version = "2.0.0-alpha.1", path = "../keystore" } serde_json = "1.0.41" -sc-client-api = { version = "2.0.0-dev", path = "../api" } -sc-client = { version = "0.8.0-dev", path = "../" } -sp-inherents = { version = "2.0.0-dev", path = "../../primitives/inherents" } -sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } -sc-network = { version = "0.8.0-dev", path = "../network" } -sc-network-gossip = { version = "0.8.0-dev", path = "../network-gossip" } -sp-finality-tracker = { version = "2.0.0-dev", path = "../../primitives/finality-tracker" } -sp-finality-grandpa = { version = "2.0.0-dev", path = "../../primitives/finality-grandpa" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } +sc-client = { version = "0.8.0-alpha.1", path = "../" } +sp-inherents = { version = "2.0.0-alpha.1", path = "../../primitives/inherents" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } +sc-network = { version = "0.8.0-alpha.1", path = "../network" } +sc-network-gossip = { version = "0.8.0-alpha.1", path = "../network-gossip" } +sp-finality-tracker = { version = "2.0.0-alpha.1", path = "../../primitives/finality-tracker" } +sp-finality-grandpa = { version = "2.0.0-alpha.1", path = "../../primitives/finality-grandpa" } finality-grandpa = { version = "0.11.1", features = ["derive-codec"] } pin-project = "0.4.6" [dev-dependencies] finality-grandpa = { version = "0.11.1", features = ["derive-codec", "test-helpers"] } -sc-network = { version = "0.8.0-dev", path = "../network" } +sc-network = { version = "0.8.0-alpha.1", path = "../network" } sc-network-test = { version = "0.8.0-dev", path = "../network/test" } -sp-keyring = { version = "2.0.0-dev", path = "../../primitives/keyring" } +sp-keyring = { version = "2.0.0-alpha.1", path = "../../primitives/keyring" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } -sp-consensus-babe = { version = "0.8.0-dev", path = "../../primitives/consensus/babe" } -sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } +sp-consensus-babe = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/babe" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } env_logger = "0.7.0" tokio = "0.1.22" tempfile = "3.1.0" -sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } +sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } futures01 = { package = "futures", version = "0.1.29" } diff --git a/client/informant/Cargo.toml b/client/informant/Cargo.toml index f60abeee349..c7a6c084325 100644 --- a/client/informant/Cargo.toml +++ b/client/informant/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-informant" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] description = "Substrate informant." edition = "2018" @@ -14,8 +14,8 @@ futures = "0.3.1" log = "0.4.8" parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } wasm-timer = "0.2" -sc-client-api = { version = "2.0.0-dev", path = "../api" } -sc-network = { version = "0.8.0-dev", path = "../network" } -sc-service = { version = "0.8.0-dev", default-features = false, path = "../service" } -sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } -sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } +sc-network = { version = "0.8.0-alpha.1", path = "../network" } +sc-service = { version = "0.8.0-alpha.1", default-features = false, path = "../service" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } diff --git a/client/keystore/Cargo.toml b/client/keystore/Cargo.toml index 221449d34ef..d96b2db69ac 100644 --- a/client/keystore/Cargo.toml +++ b/client/keystore/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-keystore" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -9,8 +9,8 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] derive_more = "0.99.2" -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sp-application-crypto = { version = "2.0.0-dev", path = "../../primitives/application-crypto" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-application-crypto = { version = "2.0.0-alpha.1", path = "../../primitives/application-crypto" } hex = "0.4.0" rand = "0.7.2" serde_json = "1.0.41" diff --git a/client/network-gossip/Cargo.toml b/client/network-gossip/Cargo.toml index d9d1281911f..e42306c340e 100644 --- a/client/network-gossip/Cargo.toml +++ b/client/network-gossip/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Gossiping for the Substrate network protocol" name = "sc-network-gossip" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" @@ -15,6 +15,6 @@ libp2p = { version = "0.16.1", default-features = false, features = ["libp2p-web log = "0.4.8" lru = "0.4.3" parking_lot = "0.10.0" -sc-network = { version = "0.8.0-dev", path = "../network" } -sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +sc-network = { version = "0.8.0-alpha.1", path = "../network" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } wasm-timer = "0.2" diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index 5d223f90319..2d50146653a 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate network protocol" name = "sc-network" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" @@ -19,7 +19,7 @@ derive_more = "0.99.2" either = "1.5.3" erased-serde = "0.3.9" fnv = "1.0.6" -fork-tree = { version = "2.0.0-dev", path = "../../utils/fork-tree" } +fork-tree = { version = "2.0.0-alpha.1", path = "../../utils/fork-tree" } futures = "0.3.1" futures_codec = "0.3.3" futures-timer = "3.0.1" @@ -34,22 +34,22 @@ parking_lot = "0.10.0" prost = "0.6.1" rand = "0.7.2" rustc-hex = "2.0.1" -sc-block-builder = { version = "0.8.0-dev", path = "../block-builder" } -sc-client = { version = "0.8.0-dev", path = "../" } -sc-client-api = { version = "2.0.0-dev", path = "../api" } -sc-peerset = { version = "2.0.0-dev", path = "../peerset" } +sc-block-builder = { version = "0.8.0-alpha.1", path = "../block-builder" } +sc-client = { version = "0.8.0-alpha.1", path = "../" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } +sc-peerset = { version = "2.0.0-alpha.1", path = "../peerset" } pin-project = "0.4.6" serde = { version = "1.0.101", features = ["derive"] } serde_json = "1.0.41" slog = { version = "2.5.2", features = ["nested-values"] } slog_derive = "0.2.0" smallvec = "0.6.10" -sp-arithmetic = { version = "2.0.0-dev", path = "../../primitives/arithmetic" } -sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } -sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } -sp-consensus-babe = { version = "0.8.0-dev", path = "../../primitives/consensus/babe" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +sp-arithmetic = { version = "2.0.0-alpha.1", path = "../../primitives/arithmetic" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } +sp-consensus-babe = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/babe" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } thiserror = "1" unsigned-varint = { version = "0.3.1", features = ["futures", "futures-codec"] } void = "1.0.2" @@ -61,7 +61,7 @@ assert_matches = "1.3" env_logger = "0.7.0" quickcheck = "0.9.0" rand = "0.7.2" -sp-keyring = { version = "2.0.0-dev", path = "../../primitives/keyring" } +sp-keyring = { version = "2.0.0-alpha.1", path = "../../primitives/keyring" } sp-test-primitives = { version = "2.0.0-dev", path = "../../primitives/test-primitives" } substrate-test-runtime = { version = "2.0.0-dev", path = "../../test-utils/runtime" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } diff --git a/client/network/test/Cargo.toml b/client/network/test/Cargo.toml index 5f8a1b6d5e9..cd9258cc08b 100644 --- a/client/network/test/Cargo.toml +++ b/client/network/test/Cargo.toml @@ -10,7 +10,7 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-network = { version = "0.8.0-dev", path = "../" } +sc-network = { version = "0.8.0-alpha.1", path = "../" } log = "0.4.8" parking_lot = "0.10.0" futures = "0.1.29" @@ -18,14 +18,14 @@ futures03 = { package = "futures", version = "0.3.1", features = ["compat"] } futures-timer = "3.0.1" rand = "0.7.2" libp2p = { version = "0.16.1", default-features = false, features = ["libp2p-websocket"] } -sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } -sc-client = { version = "0.8.0-dev", path = "../../" } -sc-client-api = { version = "2.0.0-dev", path = "../../api" } -sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sc-block-builder = { version = "0.8.0-dev", path = "../../block-builder" } -sp-consensus-babe = { version = "0.8.0-dev", path = "../../../primitives/consensus/babe" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } +sc-client = { version = "0.8.0-alpha.1", path = "../../" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../../api" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sc-block-builder = { version = "0.8.0-alpha.1", path = "../../block-builder" } +sp-consensus-babe = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/babe" } env_logger = "0.7.0" substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } substrate-test-runtime = { version = "2.0.0-dev", path = "../../../test-utils/runtime" } diff --git a/client/offchain/Cargo.toml b/client/offchain/Cargo.toml index 062f6cab564..ba7cee68112 100644 --- a/client/offchain/Cargo.toml +++ b/client/offchain/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate offchain workers" name = "sc-offchain" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" @@ -10,34 +10,34 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] bytes = "0.5" -sc-client-api = { version = "2.0.0-dev", path = "../api" } -sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } +sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } fnv = "1.0.6" futures = "0.3.1" futures-timer = "3.0.1" log = "0.4.8" threadpool = "1.7" num_cpus = "1.10" -sp-offchain = { version = "2.0.0-dev", path = "../../primitives/offchain" } +sp-offchain = { version = "2.0.0-alpha.1", path = "../../primitives/offchain" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } parking_lot = "0.10.0" -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } rand = "0.7.2" -sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } -sc-network = { version = "0.8.0-dev", path = "../network" } -sc-keystore = { version = "2.0.0-dev", path = "../keystore" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } +sc-network = { version = "0.8.0-alpha.1", path = "../network" } +sc-keystore = { version = "2.0.0-alpha.1", path = "../keystore" } [target.'cfg(not(target_os = "unknown"))'.dependencies] hyper = "0.13.2" hyper-rustls = "0.19" [dev-dependencies] -sc-client-db = { version = "0.8.0-dev", default-features = true, path = "../db/" } +sc-client-db = { version = "0.8.0-alpha.1", default-features = true, path = "../db/" } env_logger = "0.7.0" substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } tokio = "0.2" -sc-transaction-pool = { version = "2.0.0-dev", path = "../../client/transaction-pool" } -sp-transaction-pool = { version = "2.0.0-dev", path = "../../primitives/transaction-pool" } +sc-transaction-pool = { version = "2.0.0-alpha.1", path = "../../client/transaction-pool" } +sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../primitives/transaction-pool" } [features] default = [] diff --git a/client/peerset/Cargo.toml b/client/peerset/Cargo.toml index 5a01d9d03ba..2ba10466fb5 100644 --- a/client/peerset/Cargo.toml +++ b/client/peerset/Cargo.toml @@ -3,7 +3,7 @@ description = "Connectivity manager based on reputation" homepage = "http://parity.io" license = "GPL-3.0" name = "sc-peerset" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" repository = "https://github.com/paritytech/substrate/" diff --git a/client/rpc-api/Cargo.toml b/client/rpc-api/Cargo.toml index bf97f072219..7ab70df55cc 100644 --- a/client/rpc-api/Cargo.toml +++ b/client/rpc-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-rpc-api" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -17,10 +17,10 @@ jsonrpc-derive = "14.0.3" jsonrpc-pubsub = "14.0.3" log = "0.4.8" parking_lot = "0.10.0" -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sp-version = { version = "2.0.0-dev", path = "../../primitives/version" } -sp-runtime = { path = "../../primitives/runtime" , version = "2.0.0-dev"} +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-version = { version = "2.0.0-alpha.1", path = "../../primitives/version" } +sp-runtime = { path = "../../primitives/runtime" , version = "2.0.0-alpha.1"} serde = { version = "1.0.101", features = ["derive"] } serde_json = "1.0.41" -sp-transaction-pool = { version = "2.0.0-dev", path = "../../primitives/transaction-pool" } -sp-rpc = { version = "2.0.0-dev", path = "../../primitives/rpc" } +sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../primitives/transaction-pool" } +sp-rpc = { version = "2.0.0-alpha.1", path = "../../primitives/rpc" } diff --git a/client/rpc-servers/Cargo.toml b/client/rpc-servers/Cargo.toml index d32aaf3e686..1bec566f52b 100644 --- a/client/rpc-servers/Cargo.toml +++ b/client/rpc-servers/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-rpc-server" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -13,7 +13,7 @@ pubsub = { package = "jsonrpc-pubsub", version = "14.0.3" } log = "0.4.8" serde = "1.0.101" serde_json = "1.0.41" -sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } [target.'cfg(not(target_os = "unknown"))'.dependencies] http = { package = "jsonrpc-http-server", version = "14.0.3" } diff --git a/client/rpc/Cargo.toml b/client/rpc/Cargo.toml index 2c0feeb8a95..d4f618f0064 100644 --- a/client/rpc/Cargo.toml +++ b/client/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-rpc" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,36 +8,36 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-rpc-api = { version = "0.8.0-dev", path = "../rpc-api" } -sc-client-api = { version = "2.0.0-dev", path = "../api" } -sc-client = { version = "0.8.0-dev", path = "../" } -sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } +sc-rpc-api = { version = "0.8.0-alpha.1", path = "../rpc-api" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } +sc-client = { version = "0.8.0-alpha.1", path = "../" } +sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } codec = { package = "parity-scale-codec", version = "1.0.0" } futures = { version = "0.3.1", features = ["compat"] } jsonrpc-pubsub = "14.0.3" log = "0.4.8" -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } rpc = { package = "jsonrpc-core", version = "14.0.3" } -sp-version = { version = "2.0.0-dev", path = "../../primitives/version" } +sp-version = { version = "2.0.0-alpha.1", path = "../../primitives/version" } serde_json = "1.0.41" -sp-session = { version = "2.0.0-dev", path = "../../primitives/session" } -sp-offchain = { version = "2.0.0-dev", path = "../../primitives/offchain" } -sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } -sp-rpc = { version = "2.0.0-dev", path = "../../primitives/rpc" } -sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } -sc-executor = { version = "0.8.0-dev", path = "../executor" } -sc-keystore = { version = "2.0.0-dev", path = "../keystore" } -sp-transaction-pool = { version = "2.0.0-dev", path = "../../primitives/transaction-pool" } -sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } +sp-session = { version = "2.0.0-alpha.1", path = "../../primitives/session" } +sp-offchain = { version = "2.0.0-alpha.1", path = "../../primitives/offchain" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } +sp-rpc = { version = "2.0.0-alpha.1", path = "../../primitives/rpc" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } +sc-executor = { version = "0.8.0-alpha.1", path = "../executor" } +sc-keystore = { version = "2.0.0-alpha.1", path = "../keystore" } +sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../primitives/transaction-pool" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } hash-db = { version = "0.15.2", default-features = false } parking_lot = "0.10.0" [dev-dependencies] assert_matches = "1.3.0" futures01 = { package = "futures", version = "0.1.29" } -sc-network = { version = "0.8.0-dev", path = "../network" } +sc-network = { version = "0.8.0-alpha.1", path = "../network" } rustc-hex = "2.0.1" -sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } +sp-io = { version = "2.0.0-alpha.1", path = "../../primitives/io" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } tokio = "0.1.22" -sc-transaction-pool = { version = "2.0.0-dev", path = "../transaction-pool" } +sc-transaction-pool = { version = "2.0.0-alpha.1", path = "../transaction-pool" } diff --git a/client/service/Cargo.toml b/client/service/Cargo.toml index 024f61aba59..53c7739b09c 100644 --- a/client/service/Cargo.toml +++ b/client/service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-service" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -32,37 +32,37 @@ serde = "1.0.101" serde_json = "1.0.41" sysinfo = "0.9.5" target_info = "0.1.0" -sc-keystore = { version = "2.0.0-dev", path = "../keystore" } -sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } -sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sp-session = { version = "2.0.0-dev", path = "../../primitives/session" } -sp-application-crypto = { version = "2.0.0-dev", path = "../../primitives/application-crypto" } -sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } -sc-network = { version = "0.8.0-dev", path = "../network" } -sc-chain-spec = { version = "2.0.0-dev", path = "../chain-spec" } -sc-client-api = { version = "2.0.0-dev", path = "../api" } -sc-client = { version = "0.8.0-dev", path = "../" } -sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } -sc-client-db = { version = "0.8.0-dev", path = "../db" } +sc-keystore = { version = "2.0.0-alpha.1", path = "../keystore" } +sp-io = { version = "2.0.0-alpha.1", path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-session = { version = "2.0.0-alpha.1", path = "../../primitives/session" } +sp-application-crypto = { version = "2.0.0-alpha.1", path = "../../primitives/application-crypto" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } +sc-network = { version = "0.8.0-alpha.1", path = "../network" } +sc-chain-spec = { version = "2.0.0-alpha.1", path = "../chain-spec" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } +sc-client = { version = "0.8.0-alpha.1", path = "../" } +sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } +sc-client-db = { version = "0.8.0-alpha.1", path = "../db" } codec = { package = "parity-scale-codec", version = "1.0.0" } -sc-executor = { version = "0.8.0-dev", path = "../executor" } -sc-transaction-pool = { version = "2.0.0-dev", path = "../transaction-pool" } -sp-transaction-pool = { version = "2.0.0-dev", path = "../../primitives/transaction-pool" } -sc-rpc-server = { version = "2.0.0-dev", path = "../rpc-servers" } -sc-rpc = { version = "2.0.0-dev", path = "../rpc" } -sc-telemetry = { version = "2.0.0-dev", path = "../telemetry" } -sc-offchain = { version = "2.0.0-dev", path = "../offchain" } +sc-executor = { version = "0.8.0-alpha.1", path = "../executor" } +sc-transaction-pool = { version = "2.0.0-alpha.1", path = "../transaction-pool" } +sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../primitives/transaction-pool" } +sc-rpc-server = { version = "2.0.0-alpha.1", path = "../rpc-servers" } +sc-rpc = { version = "2.0.0-alpha.1", path = "../rpc" } +sc-telemetry = { version = "2.0.0-alpha.1", path = "../telemetry" } +sc-offchain = { version = "2.0.0-alpha.1", path = "../offchain" } parity-multiaddr = { package = "parity-multiaddr", version = "0.5.0" } -prometheus-exporter = { path = "../../utils/prometheus" , version = "0.8.0-dev"} -sc-tracing = { version = "2.0.0-dev", path = "../tracing" } +prometheus-exporter = { path = "../../utils/prometheus" , version = "0.8.0-alpha.1"} +sc-tracing = { version = "2.0.0-alpha.1", path = "../tracing" } tracing = "0.1.10" parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } [dev-dependencies] substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } -sp-consensus-babe = { version = "0.8.0-dev", path = "../../primitives/consensus/babe" } -grandpa = { version = "0.8.0-dev", package = "sc-finality-grandpa", path = "../finality-grandpa" } -grandpa-primitives = { version = "2.0.0-dev", package = "sp-finality-grandpa", path = "../../primitives/finality-grandpa" } +sp-consensus-babe = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/babe" } +grandpa = { version = "0.8.0-alpha.1", package = "sc-finality-grandpa", path = "../finality-grandpa" } +grandpa-primitives = { version = "2.0.0-alpha.1", package = "sp-finality-grandpa", path = "../../primitives/finality-grandpa" } tokio = { version = "0.2", features = ["rt-core"] } diff --git a/client/service/test/Cargo.toml b/client/service/test/Cargo.toml index d733d9a7bdd..80683ab89e7 100644 --- a/client/service/test/Cargo.toml +++ b/client/service/test/Cargo.toml @@ -16,10 +16,10 @@ log = "0.4.8" env_logger = "0.7.0" fdlimit = "0.1.1" futures = { version = "0.3.1", features = ["compat"] } -sc-service = { version = "0.8.0-dev", default-features = false, path = "../../service" } -sc-network = { version = "0.8.0-dev", path = "../../network" } -sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } -sc-client = { version = "0.8.0-dev", path = "../../" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-transaction-pool = { version = "2.0.0-dev", path = "../../../primitives/transaction-pool" } +sc-service = { version = "0.8.0-alpha.1", default-features = false, path = "../../service" } +sc-network = { version = "0.8.0-alpha.1", path = "../../network" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } +sc-client = { version = "0.8.0-alpha.1", path = "../../" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../primitives/transaction-pool" } diff --git a/client/state-db/Cargo.toml b/client/state-db/Cargo.toml index 93a12cdf082..84ab2621629 100644 --- a/client/state-db/Cargo.toml +++ b/client/state-db/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-state-db" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,7 +10,7 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] parking_lot = "0.10.0" log = "0.4.8" -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } [dev-dependencies] diff --git a/client/telemetry/Cargo.toml b/client/telemetry/Cargo.toml index 89ef2868048..7ba8abafba5 100644 --- a/client/telemetry/Cargo.toml +++ b/client/telemetry/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-telemetry" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] description = "Telemetry utils" edition = "2018" diff --git a/client/tracing/Cargo.toml b/client/tracing/Cargo.toml index b85c0371f3a..e508c728f3e 100644 --- a/client/tracing/Cargo.toml +++ b/client/tracing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-tracing" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" @@ -16,7 +16,7 @@ serde_json = "1.0.41" slog = { version = "2.5.2", features = ["nested-values"] } tracing-core = "0.1.7" -sc-telemetry = { version = "2.0.0-dev", path = "../telemetry" } +sc-telemetry = { version = "2.0.0-alpha.1", path = "../telemetry" } [dev-dependencies] tracing = "0.1.10" diff --git a/client/transaction-pool/Cargo.toml b/client/transaction-pool/Cargo.toml index 6f863550bc1..025fcec8818 100644 --- a/client/transaction-pool/Cargo.toml +++ b/client/transaction-pool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-transaction-pool" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -15,17 +15,17 @@ futures-diagnose = "1.0" log = "0.4.8" parking_lot = "0.10.0" wasm-timer = "0.2" -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sp-api = { version = "2.0.0-dev", path = "../../primitives/api" } -sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } -sc-transaction-graph = { version = "2.0.0-dev", path = "./graph" } -sp-transaction-pool = { version = "2.0.0-dev", path = "../../primitives/transaction-pool" } -sc-client-api = { version = "2.0.0-dev", path = "../api" } -sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } +sc-transaction-graph = { version = "2.0.0-alpha.1", path = "./graph" } +sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../primitives/transaction-pool" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } futures-timer = "2.0" parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } [dev-dependencies] -sp-keyring = { version = "2.0.0-dev", path = "../../primitives/keyring" } +sp-keyring = { version = "2.0.0-alpha.1", path = "../../primitives/keyring" } substrate-test-runtime-transaction-pool = { version = "2.0.0-dev", path = "../../test-utils/runtime/transaction-pool" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } diff --git a/client/transaction-pool/graph/Cargo.toml b/client/transaction-pool/graph/Cargo.toml index 6335cdecb37..ba290dc6168 100644 --- a/client/transaction-pool/graph/Cargo.toml +++ b/client/transaction-pool/graph/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-transaction-graph" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -14,10 +14,10 @@ log = "0.4.8" parking_lot = "0.10.0" serde = { version = "1.0.101", features = ["derive"] } wasm-timer = "0.2" -sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -sp-transaction-pool = { version = "2.0.0-dev", path = "../../../primitives/transaction-pool" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../primitives/transaction-pool" } parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } linked-hash-map = "0.5.2" diff --git a/frame/assets/Cargo.toml b/frame/assets/Cargo.toml index 9b2b01e91ed..f9121d9d02d 100644 --- a/frame/assets/Cargo.toml +++ b/frame/assets/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-assets" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -11,16 +11,16 @@ repository = "https://github.com/paritytech/substrate/" serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } # Needed for various traits. In our case, `OnFinalize`. -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } # Needed for type-safe access to storage DB. -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } # `system` module provides us with all sorts of useful stuff and macros depend on it being around. -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sp-std = { version = "2.0.0-dev", path = "../../primitives/std" } -sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.1", path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", path = "../../primitives/io" } [features] default = ["std"] diff --git a/frame/aura/Cargo.toml b/frame/aura/Cargo.toml index 516ee883c44..8e2da7547c8 100644 --- a/frame/aura/Cargo.toml +++ b/frame/aura/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-aura" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,20 +8,20 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../../primitives/application-crypto" } +sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } -pallet-session = { version = "2.0.0-dev", default-features = false, path = "../session" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -sp-consensus-aura = { path = "../../primitives/consensus/aura", default-features = false, version = "0.8.0-dev"} -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } -sp-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../primitives/timestamp" } -pallet-timestamp = { version = "2.0.0-dev", default-features = false, path = "../timestamp" } +pallet-session = { version = "2.0.0-alpha.1", default-features = false, path = "../session" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +sp-consensus-aura = { path = "../../primitives/consensus/aura", default-features = false, version = "0.8.0-alpha.1"} +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/timestamp" } +pallet-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../timestamp" } [dev-dependencies] diff --git a/frame/authority-discovery/Cargo.toml b/frame/authority-discovery/Cargo.toml index 77dbd9de4ab..7d79bf20f31 100644 --- a/frame/authority-discovery/Cargo.toml +++ b/frame/authority-discovery/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-authority-discovery" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,20 +8,20 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-authority-discovery = { version = "2.0.0-dev", default-features = false, path = "../../primitives/authority-discovery" } -sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../../primitives/application-crypto" } +sp-authority-discovery = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/authority-discovery" } +sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -pallet-session = { version = "2.0.0-dev", features = ["historical" ], path = "../session", default-features = false } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +pallet-session = { version = "2.0.0-alpha.1", features = ["historical" ], path = "../session", default-features = false } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } [dev-dependencies] -sp-staking = { version = "2.0.0-dev", default-features = false, path = "../../primitives/staking" } +sp-staking = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/staking" } [features] default = ["std"] diff --git a/frame/authorship/Cargo.toml b/frame/authorship/Cargo.toml index afbea4ceecd..f1d4c734a28 100644 --- a/frame/authorship/Cargo.toml +++ b/frame/authorship/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-authorship" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" description = "Block and Uncle Author tracking for the FRAME" authors = ["Parity Technologies "] edition = "2018" @@ -9,15 +9,15 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } -sp-authorship = { version = "2.0.0-dev", default-features = false, path = "../../primitives/authorship" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } +sp-authorship = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/authorship" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} impl-trait-for-tuples = "0.1.3" [features] diff --git a/frame/babe/Cargo.toml b/frame/babe/Cargo.toml index 1748481295d..88e32d6a074 100644 --- a/frame/babe/Cargo.toml +++ b/frame/babe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-babe" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -11,23 +11,23 @@ repository = "https://github.com/paritytech/substrate/" hex-literal = "0.2.1" codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true } -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0-dev", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } -pallet-timestamp = { version = "2.0.0-dev", default-features = false, path = "../timestamp" } -sp-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../primitives/timestamp" } -pallet-session = { version = "2.0.0-dev", default-features = false, path = "../session" } -sp-consensus-babe = { version = "0.8.0-dev", default-features = false, path = "../../primitives/consensus/babe" } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +pallet-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../timestamp" } +sp-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/timestamp" } +pallet-session = { version = "2.0.0-alpha.1", default-features = false, path = "../session" } +sp-consensus-babe = { version = "0.8.0-alpha.1", default-features = false, path = "../../primitives/consensus/babe" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} [dev-dependencies] lazy_static = "1.4.0" parking_lot = "0.10.0" -sp-version = { version = "2.0.0-dev", default-features = false, path = "../../primitives/version" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-version = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/version" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } substrate-test-runtime = { version = "2.0.0-dev", path = "../../test-utils/runtime" } [features] diff --git a/frame/balances/Cargo.toml b/frame/balances/Cargo.toml index be3fa14c7a0..4356b43e614 100644 --- a/frame/balances/Cargo.toml +++ b/frame/balances/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-balances" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,16 +10,16 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -frame-benchmarking = { version = "2.0.0-dev", default-features = false, path = "../benchmarking" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +frame-benchmarking = { version = "2.0.0-alpha.1", default-features = false, path = "../benchmarking" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -pallet-transaction-payment = { version = "2.0.0-dev", path = "../transaction-payment" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +pallet-transaction-payment = { version = "2.0.0-alpha.1", path = "../transaction-payment" } [features] default = ["std"] diff --git a/frame/benchmarking/Cargo.toml b/frame/benchmarking/Cargo.toml index 63db66fb204..72395d5cb14 100644 --- a/frame/benchmarking/Cargo.toml +++ b/frame/benchmarking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-benchmarking" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -9,10 +9,10 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false } -sp-api = { version = "2.0.0-dev", path = "../../primitives/api", default-features = false } -sp-runtime-interface = { version = "2.0.0-dev", path = "../../primitives/runtime-interface", default-features = false } -sp-std = { version = "2.0.0-dev", path = "../../primitives/std", default-features = false } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} +sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api", default-features = false } +sp-runtime-interface = { version = "2.0.0-alpha.1", path = "../../primitives/runtime-interface", default-features = false } +sp-std = { version = "2.0.0-alpha.1", path = "../../primitives/std", default-features = false } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} [features] default = [ "std" ] diff --git a/frame/collective/Cargo.toml b/frame/collective/Cargo.toml index 1e906e95850..ca2f3203d5a 100644 --- a/frame/collective/Cargo.toml +++ b/frame/collective/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-collective" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,16 +10,16 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } [dev-dependencies] hex-literal = "0.2.1" -pallet-balances = { version = "2.0.0-dev", path = "../balances" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } [features] default = ["std"] diff --git a/frame/contracts/Cargo.toml b/frame/contracts/Cargo.toml index 571ea2d08a7..6feaf59f573 100644 --- a/frame/contracts/Cargo.toml +++ b/frame/contracts/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-contracts" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -13,22 +13,22 @@ pwasm-utils = { version = "0.12.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } parity-wasm = { version = "0.41.0", default-features = false } wasmi-validation = { version = "0.3.0", default-features = false } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-sandbox = { version = "0.8.0-dev", default-features = false, path = "../../primitives/sandbox" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } -pallet-contracts-primitives = { version = "2.0.0-dev", default-features = false, path = "common" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-sandbox = { version = "0.8.0-alpha.1", default-features = false, path = "../../primitives/sandbox" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +pallet-contracts-primitives = { version = "2.0.0-alpha.1", default-features = false, path = "common" } [dev-dependencies] wabt = "0.9.2" assert_matches = "1.3.0" hex-literal = "0.2.1" -pallet-balances = { version = "2.0.0-dev", path = "../balances" } -pallet-timestamp = { version = "2.0.0-dev", path = "../timestamp" } -pallet-randomness-collective-flip = { version = "2.0.0-dev", path = "../randomness-collective-flip" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } +pallet-timestamp = { version = "2.0.0-alpha.1", path = "../timestamp" } +pallet-randomness-collective-flip = { version = "2.0.0-alpha.1", path = "../randomness-collective-flip" } [features] default = ["std"] diff --git a/frame/contracts/common/Cargo.toml b/frame/contracts/common/Cargo.toml index e70143f76d3..03a03038d81 100644 --- a/frame/contracts/common/Cargo.toml +++ b/frame/contracts/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-contracts-primitives" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,8 +10,8 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] # This crate should not rely on any of the frame primitives. codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/std" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/runtime" } [features] default = ["std"] diff --git a/frame/contracts/rpc/Cargo.toml b/frame/contracts/rpc/Cargo.toml index 6120cbe51ee..b91e17e608a 100644 --- a/frame/contracts/rpc/Cargo.toml +++ b/frame/contracts/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-contracts-rpc" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -12,14 +12,14 @@ codec = { package = "parity-scale-codec", version = "1.0.0" } jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" -sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-rpc = { version = "2.0.0-dev", path = "../../../primitives/rpc" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-rpc = { version = "2.0.0-alpha.1", path = "../../../primitives/rpc" } serde = { version = "1.0.101", features = ["derive"] } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } -pallet-contracts-primitives = { version = "2.0.0-dev", path = "../common" } -pallet-contracts-rpc-runtime-api = { version = "0.8.0-dev", path = "./runtime-api" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } +pallet-contracts-primitives = { version = "2.0.0-alpha.1", path = "../common" } +pallet-contracts-rpc-runtime-api = { version = "0.8.0-alpha.1", path = "./runtime-api" } [dev-dependencies] serde_json = "1.0.41" diff --git a/frame/contracts/rpc/runtime-api/Cargo.toml b/frame/contracts/rpc/runtime-api/Cargo.toml index ce810b8be36..c84ab739df1 100644 --- a/frame/contracts/rpc/runtime-api/Cargo.toml +++ b/frame/contracts/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-contracts-rpc-runtime-api" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,11 +8,11 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0-dev", default-features = false, path = "../../../../primitives/api" } +sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../../../primitives/api" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../../../primitives/std" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../../../primitives/runtime" } -pallet-contracts-primitives = { version = "2.0.0-dev", default-features = false, path = "../../common" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../../../primitives/runtime" } +pallet-contracts-primitives = { version = "2.0.0-alpha.1", default-features = false, path = "../../common" } [features] default = ["std"] diff --git a/frame/democracy/Cargo.toml b/frame/democracy/Cargo.toml index cf09d246200..512a4676cb1 100644 --- a/frame/democracy/Cargo.toml +++ b/frame/democracy/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-democracy" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,16 +10,16 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-dev", path = "../balances" } -sp-storage = { version = "2.0.0-dev", path = "../../primitives/storage" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } +sp-storage = { version = "2.0.0-alpha.1", path = "../../primitives/storage" } hex-literal = "0.2.1" [features] diff --git a/frame/elections-phragmen/Cargo.toml b/frame/elections-phragmen/Cargo.toml index 6fc83fb370f..882185bdcea 100644 --- a/frame/elections-phragmen/Cargo.toml +++ b/frame/elections-phragmen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-elections-phragmen" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -9,18 +9,18 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-phragmen = { version = "2.0.0-dev", default-features = false, path = "../../primitives/phragmen" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-phragmen = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/phragmen" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } [dev-dependencies] -sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } +sp-io = { version = "2.0.0-alpha.1", path = "../../primitives/io" } hex-literal = "0.2.1" -pallet-balances = { version = "2.0.0-dev", path = "../balances" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -substrate-test-utils = { version = "2.0.0-dev", path = "../../test-utils" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +substrate-test-utils = { version = "2.0.0-alpha.1", path = "../../test-utils" } serde = { version = "1.0.101" } [features] diff --git a/frame/elections/Cargo.toml b/frame/elections/Cargo.toml index eafdb2cc971..38eec0dc244 100644 --- a/frame/elections/Cargo.toml +++ b/frame/elections/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-elections" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,16 +10,16 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } [dev-dependencies] hex-literal = "0.2.1" -pallet-balances = { version = "2.0.0-dev", path = "../balances" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } [features] default = ["std"] diff --git a/frame/evm/Cargo.toml b/frame/evm/Cargo.toml index 202cc232385..d521b87270a 100644 --- a/frame/evm/Cargo.toml +++ b/frame/evm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-evm" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,14 +10,14 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } -pallet-timestamp = { version = "2.0.0-dev", default-features = false, path = "../timestamp" } -pallet-balances = { version = "2.0.0-dev", default-features = false, path = "../balances" } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +pallet-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../timestamp" } +pallet-balances = { version = "2.0.0-alpha.1", default-features = false, path = "../balances" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } primitive-types = { version = "0.6.2", default-features = false, features = ["rlp"] } rlp = { version = "0.4", default-features = false } evm = { version = "0.15", default-features = false } diff --git a/frame/example-offchain-worker/Cargo.toml b/frame/example-offchain-worker/Cargo.toml index 4f4d797202f..b10d9cb3906 100644 --- a/frame/example-offchain-worker/Cargo.toml +++ b/frame/example-offchain-worker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-example-offchain-worker" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "Unlicense" @@ -9,13 +9,13 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } serde = { version = "1.0.101", optional = true } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } serde_json = { version = "1.0.46", default-features = false, features = ["alloc"] } [features] diff --git a/frame/example/Cargo.toml b/frame/example/Cargo.toml index 07b0a992b2c..bb6625e8925 100644 --- a/frame/example/Cargo.toml +++ b/frame/example/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-example" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "Unlicense" @@ -10,15 +10,15 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } -pallet-balances = { version = "2.0.0-dev", default-features = false, path = "../balances" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +pallet-balances = { version = "2.0.0-alpha.1", default-features = false, path = "../balances" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } [dev-dependencies] -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/executive/Cargo.toml b/frame/executive/Cargo.toml index 0becc170a3c..8e959983601 100644 --- a/frame/executive/Cargo.toml +++ b/frame/executive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-executive" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -9,19 +9,19 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } serde = { version = "1.0.101", optional = true } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } [dev-dependencies] hex-literal = "0.2.1" -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -pallet-indices = { version = "2.0.0-dev", path = "../indices" } -pallet-balances = { version = "2.0.0-dev", path = "../balances" } -pallet-transaction-payment = { version = "2.0.0-dev", path = "../transaction-payment" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +pallet-indices = { version = "2.0.0-alpha.1", path = "../indices" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } +pallet-transaction-payment = { version = "2.0.0-alpha.1", path = "../transaction-payment" } [features] default = ["std"] diff --git a/frame/finality-tracker/Cargo.toml b/frame/finality-tracker/Cargo.toml index e848c02a42d..e9c661ebe65 100644 --- a/frame/finality-tracker/Cargo.toml +++ b/frame/finality-tracker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-finality-tracker" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,17 +10,17 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-finality-tracker = { version = "2.0.0-dev", default-features = false, path = "../../primitives/finality-tracker" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-finality-tracker = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/finality-tracker" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } impl-trait-for-tuples = "0.1.3" [dev-dependencies] -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } [features] default = ["std"] diff --git a/frame/generic-asset/Cargo.toml b/frame/generic-asset/Cargo.toml index 343267f89f3..ba79a8c13b2 100644 --- a/frame/generic-asset/Cargo.toml +++ b/frame/generic-asset/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-generic-asset" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Centrality Developers "] edition = "2018" license = "GPL-3.0" @@ -10,14 +10,14 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } [dev-dependencies] -sp-io ={ version = "2.0.0-dev", path = "../../primitives/io" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-io ={ version = "2.0.0-alpha.1", path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/grandpa/Cargo.toml b/frame/grandpa/Cargo.toml index 95ed18b0ddc..a50e3beb322 100644 --- a/frame/grandpa/Cargo.toml +++ b/frame/grandpa/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-grandpa" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,18 +10,18 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } -sp-finality-grandpa = { version = "2.0.0-dev", default-features = false, path = "../../primitives/finality-grandpa" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0-dev", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } -pallet-session = { version = "2.0.0-dev", default-features = false, path = "../session" } -pallet-finality-tracker = { version = "2.0.0-dev", default-features = false, path = "../finality-tracker" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-finality-grandpa = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/finality-grandpa" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +pallet-session = { version = "2.0.0-alpha.1", default-features = false, path = "../session" } +pallet-finality-tracker = { version = "2.0.0-alpha.1", default-features = false, path = "../finality-tracker" } [dev-dependencies] -sp-io ={ version = "2.0.0-dev", path = "../../primitives/io" } +sp-io ={ version = "2.0.0-alpha.1", path = "../../primitives/io" } [features] default = ["std"] diff --git a/frame/identity/Cargo.toml b/frame/identity/Cargo.toml index f275dba069e..b40537f7d2b 100644 --- a/frame/identity/Cargo.toml +++ b/frame/identity/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-identity" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -11,16 +11,16 @@ repository = "https://github.com/paritytech/substrate/" serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } enumflags2 = { version = "0.6.2" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -frame-benchmarking = { version = "2.0.0-dev", default-features = false, path = "../benchmarking" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +frame-benchmarking = { version = "2.0.0-alpha.1", default-features = false, path = "../benchmarking" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-dev", path = "../balances" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } [features] default = ["std"] diff --git a/frame/im-online/Cargo.toml b/frame/im-online/Cargo.toml index d04b2f47a33..269182f4585 100644 --- a/frame/im-online/Cargo.toml +++ b/frame/im-online/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-im-online" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,18 +8,18 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../../primitives/application-crypto" } -pallet-authorship = { version = "2.0.0-dev", default-features = false, path = "../authorship" } +sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/application-crypto" } +pallet-authorship = { version = "2.0.0-alpha.1", default-features = false, path = "../authorship" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } -pallet-session = { version = "2.0.0-dev", default-features = false, path = "../session" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0-dev", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +pallet-session = { version = "2.0.0-alpha.1", default-features = false, path = "../session" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } [features] default = ["std", "pallet-session/historical"] diff --git a/frame/indices/Cargo.toml b/frame/indices/Cargo.toml index b02b96fc3bd..a12ca831761 100644 --- a/frame/indices/Cargo.toml +++ b/frame/indices/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-indices" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,16 +10,16 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-keyring = { version = "2.0.0-dev", optional = true, path = "../../primitives/keyring" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-keyring = { version = "2.0.0-alpha.1", optional = true, path = "../../primitives/keyring" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } [dev-dependencies] -pallet-balances = { version = "2.0.0-dev", path = "../balances" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } [features] default = ["std"] diff --git a/frame/membership/Cargo.toml b/frame/membership/Cargo.toml index 2e3356950b1..4a66a2b04f6 100644 --- a/frame/membership/Cargo.toml +++ b/frame/membership/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-membership" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,14 +10,14 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } [dev-dependencies] -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/metadata/Cargo.toml b/frame/metadata/Cargo.toml index 512898879ab..9b53faed20c 100644 --- a/frame/metadata/Cargo.toml +++ b/frame/metadata/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-metadata" -version = "11.0.0-dev" +version = "11.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,8 +10,8 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/nicks/Cargo.toml b/frame/nicks/Cargo.toml index eedbaccfe56..ae3249368d5 100644 --- a/frame/nicks/Cargo.toml +++ b/frame/nicks/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-nicks" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,15 +10,15 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-dev", path = "../balances" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } [features] default = ["std"] diff --git a/frame/offences/Cargo.toml b/frame/offences/Cargo.toml index 1c244a74135..f8301ed4888 100644 --- a/frame/offences/Cargo.toml +++ b/frame/offences/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-offences" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,18 +8,18 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -pallet-balances = { version = "2.0.0-dev", default-features = false, path = "../balances" } +pallet-balances = { version = "2.0.0-alpha.1", default-features = false, path = "../balances" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0-dev", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } [dev-dependencies] -sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-io = { version = "2.0.0-alpha.1", path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/randomness-collective-flip/Cargo.toml b/frame/randomness-collective-flip/Cargo.toml index d8bac86ab48..dc7e4c18fde 100644 --- a/frame/randomness-collective-flip/Cargo.toml +++ b/frame/randomness-collective-flip/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-randomness-collective-flip" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,14 +10,14 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] safe-mix = { version = "1.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } [dev-dependencies] -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-io = { version = "2.0.0-alpha.1", path = "../../primitives/io" } [features] default = ["std"] diff --git a/frame/recovery/Cargo.toml b/frame/recovery/Cargo.toml index 13a74dcdcb2..bab55baca03 100644 --- a/frame/recovery/Cargo.toml +++ b/frame/recovery/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-recovery" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -11,15 +11,15 @@ repository = "https://github.com/paritytech/substrate/" serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } enumflags2 = { version = "0.6.2" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-dev", path = "../balances" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } [features] default = ["std"] diff --git a/frame/scored-pool/Cargo.toml b/frame/scored-pool/Cargo.toml index b8ee128df6b..106f47a253b 100644 --- a/frame/scored-pool/Cargo.toml +++ b/frame/scored-pool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-scored-pool" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,15 +10,15 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } [dev-dependencies] -pallet-balances = { version = "2.0.0-dev", path = "../balances" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/session/Cargo.toml b/frame/session/Cargo.toml index bee544f99af..e09a268adb8 100644 --- a/frame/session/Cargo.toml +++ b/frame/session/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-session" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,19 +10,19 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0-dev", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } -pallet-timestamp = { version = "2.0.0-dev", default-features = false, path = "../timestamp" } -sp-trie = { optional = true, path = "../../primitives/trie", default-features = false , version = "2.0.0-dev"} -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +pallet-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../timestamp" } +sp-trie = { optional = true, path = "../../primitives/trie", default-features = false , version = "2.0.0-alpha.1"} +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} impl-trait-for-tuples = "0.1.3" [dev-dependencies] -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sp-application-crypto = { version = "2.0.0-dev", path = "../../primitives/application-crypto" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-application-crypto = { version = "2.0.0-alpha.1", path = "../../primitives/application-crypto" } lazy_static = "1.4.0" [features] diff --git a/frame/society/Cargo.toml b/frame/society/Cargo.toml index 248820b522b..99c63422421 100644 --- a/frame/society/Cargo.toml +++ b/frame/society/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-society" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,16 +10,16 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } rand_chacha = { version = "0.2", default-features = false } [dev-dependencies] -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-dev", path = "../balances" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } [features] default = ["std"] diff --git a/frame/staking/Cargo.toml b/frame/staking/Cargo.toml index 7eb7772054c..57786962973 100644 --- a/frame/staking/Cargo.toml +++ b/frame/staking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-staking" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,23 +10,23 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-keyring = { version = "2.0.0-dev", optional = true, path = "../../primitives/keyring" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-phragmen = { version = "2.0.0-dev", default-features = false, path = "../../primitives/phragmen" } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0-dev", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } -pallet-session = { version = "2.0.0-dev", features = ["historical"], path = "../session", default-features = false } -pallet-authorship = { version = "2.0.0-dev", default-features = false, path = "../authorship" } +sp-keyring = { version = "2.0.0-alpha.1", optional = true, path = "../../primitives/keyring" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-phragmen = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/phragmen" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +pallet-session = { version = "2.0.0-alpha.1", features = ["historical"], path = "../session", default-features = false } +pallet-authorship = { version = "2.0.0-alpha.1", default-features = false, path = "../authorship" } [dev-dependencies] -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-dev", path = "../balances" } -pallet-timestamp = { version = "2.0.0-dev", path = "../timestamp" } -pallet-staking-reward-curve = { version = "2.0.0-dev", path = "../staking/reward-curve" } -substrate-test-utils = { version = "2.0.0-dev", path = "../../test-utils" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } +pallet-timestamp = { version = "2.0.0-alpha.1", path = "../timestamp" } +pallet-staking-reward-curve = { version = "2.0.0-alpha.1", path = "../staking/reward-curve" } +substrate-test-utils = { version = "2.0.0-alpha.1", path = "../../test-utils" } [features] migrate = [] diff --git a/frame/staking/reward-curve/Cargo.toml b/frame/staking/reward-curve/Cargo.toml index 95567f167fa..e414d544dab 100644 --- a/frame/staking/reward-curve/Cargo.toml +++ b/frame/staking/reward-curve/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-staking-reward-curve" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -17,4 +17,4 @@ proc-macro2 = "1.0.6" proc-macro-crate = "0.1.4" [dev-dependencies] -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } diff --git a/frame/sudo/Cargo.toml b/frame/sudo/Cargo.toml index 979d58ee4e0..fa2797d2f6d 100644 --- a/frame/sudo/Cargo.toml +++ b/frame/sudo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-sudo" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,14 +10,14 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/support/Cargo.toml b/frame/support/Cargo.toml index 08c81ba5efc..e26cd64d525 100644 --- a/frame/support/Cargo.toml +++ b/frame/support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-support" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -11,24 +11,24 @@ repository = "https://github.com/paritytech/substrate/" log = "0.4" serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] } -frame-metadata = { version = "11.0.0-dev", default-features = false, path = "../metadata" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } -sp-arithmetic = { version = "2.0.0-dev", default-features = false, path = "../../primitives/arithmetic" } -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } -frame-support-procedural = { version = "2.0.0-dev", path = "./procedural" } +frame-metadata = { version = "11.0.0-alpha.1", default-features = false, path = "../metadata" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-arithmetic = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/arithmetic" } +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } +frame-support-procedural = { version = "2.0.0-alpha.1", path = "./procedural" } paste = "0.1.6" once_cell = { version = "1", default-features = false, optional = true } -sp-state-machine = { version = "0.8.0-dev", optional = true, path = "../../primitives/state-machine" } +sp-state-machine = { version = "0.8.0-alpha.1", optional = true, path = "../../primitives/state-machine" } bitmask = { version = "0.5.0", default-features = false } impl-trait-for-tuples = "0.1.3" tracing = { version = "0.1.10", optional = true } [dev-dependencies] pretty_assertions = "0.6.1" -frame-system = { version = "2.0.0-dev", path = "../system" } +frame-system = { version = "2.0.0-alpha.1", path = "../system" } [features] default = ["std"] diff --git a/frame/support/procedural/Cargo.toml b/frame/support/procedural/Cargo.toml index 965f964b2d5..4b39cf8ed42 100644 --- a/frame/support/procedural/Cargo.toml +++ b/frame/support/procedural/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-support-procedural" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -11,7 +11,7 @@ repository = "https://github.com/paritytech/substrate/" proc-macro = true [dependencies] -frame-support-procedural-tools = { version = "2.0.0-dev", path = "./tools" } +frame-support-procedural-tools = { version = "2.0.0-alpha.1", path = "./tools" } proc-macro2 = "1.0.6" quote = "1.0.2" syn = { version = "1.0.7", features = ["full"] } diff --git a/frame/support/procedural/tools/Cargo.toml b/frame/support/procedural/tools/Cargo.toml index c1f56fecc7b..1c3a0f60d52 100644 --- a/frame/support/procedural/tools/Cargo.toml +++ b/frame/support/procedural/tools/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-support-procedural-tools" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,7 +8,7 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -frame-support-procedural-tools-derive = { version = "2.0.0-dev", path = "./derive" } +frame-support-procedural-tools-derive = { version = "2.0.0-alpha.1", path = "./derive" } proc-macro2 = "1.0.6" quote = "1.0.2" syn = { version = "1.0.7", features = ["full", "visit"] } diff --git a/frame/support/procedural/tools/derive/Cargo.toml b/frame/support/procedural/tools/derive/Cargo.toml index 6eee6d3186f..98b9d797020 100644 --- a/frame/support/procedural/tools/derive/Cargo.toml +++ b/frame/support/procedural/tools/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-support-procedural-tools-derive" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/support/test/Cargo.toml b/frame/support/test/Cargo.toml index df66918a2e8..594d4379fde 100644 --- a/frame/support/test/Cargo.toml +++ b/frame/support/test/Cargo.toml @@ -11,12 +11,12 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-io ={ path = "../../../primitives/io", default-features = false , version = "2.0.0-dev"} -sp-state-machine = { version = "0.8.0-dev", optional = true, path = "../../../primitives/state-machine" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../" } -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/inherents" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/runtime" } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../../primitives/core" } +sp-io ={ path = "../../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} +sp-state-machine = { version = "0.8.0-alpha.1", optional = true, path = "../../../primitives/state-machine" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../" } +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/inherents" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/core" } trybuild = "1.0.17" pretty_assertions = "0.6.1" diff --git a/frame/system/Cargo.toml b/frame/system/Cargo.toml index 0c779e5d34e..e3a347c5883 100644 --- a/frame/system/Cargo.toml +++ b/frame/system/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-system" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,17 +10,17 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-dev"} -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-version = { version = "2.0.0-dev", default-features = false, path = "../../primitives/version" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-version = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/version" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } impl-trait-for-tuples = "0.1.3" [dev-dependencies] criterion = "0.2.11" -sp-externalities = { version = "0.8.0-dev", path = "../../primitives/externalities" } +sp-externalities = { version = "0.8.0-alpha.1", path = "../../primitives/externalities" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } [features] diff --git a/frame/system/rpc/runtime-api/Cargo.toml b/frame/system/rpc/runtime-api/Cargo.toml index 1d1ed8da47e..99aa57eaf37 100644 --- a/frame/system/rpc/runtime-api/Cargo.toml +++ b/frame/system/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-system-rpc-runtime-api" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,7 +8,7 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0-dev", default-features = false, path = "../../../../primitives/api" } +sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../../../primitives/api" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } [features] diff --git a/frame/timestamp/Cargo.toml b/frame/timestamp/Cargo.toml index 136036b3074..a6f3da7ea4f 100644 --- a/frame/timestamp/Cargo.toml +++ b/frame/timestamp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-timestamp" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,19 +10,19 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } -frame-benchmarking = { version = "2.0.0-dev", default-features = false, path = "../benchmarking" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } -sp-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../primitives/timestamp" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } +frame-benchmarking = { version = "2.0.0-alpha.1", default-features = false, path = "../benchmarking" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/timestamp" } impl-trait-for-tuples = "0.1.3" [dev-dependencies] -sp-io ={ version = "2.0.0-dev", path = "../../primitives/io" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-io ={ version = "2.0.0-alpha.1", path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/transaction-payment/Cargo.toml b/frame/transaction-payment/Cargo.toml index f989a7e3395..d60dbdaaf6d 100644 --- a/frame/transaction-payment/Cargo.toml +++ b/frame/transaction-payment/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-transaction-payment" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -9,16 +9,16 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } -pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-dev", default-features = false, path = "./rpc/runtime-api" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-alpha.1", default-features = false, path = "./rpc/runtime-api" } [dev-dependencies] -sp-io = { version = "2.0.0-dev", path = "../../primitives/io" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-dev", path = "../balances" } +sp-io = { version = "2.0.0-alpha.1", path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } [features] default = ["std"] diff --git a/frame/transaction-payment/rpc/Cargo.toml b/frame/transaction-payment/rpc/Cargo.toml index c8f3aa2776b..689d3642cd6 100644 --- a/frame/transaction-payment/rpc/Cargo.toml +++ b/frame/transaction-payment/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-transaction-payment-rpc" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -12,10 +12,10 @@ codec = { package = "parity-scale-codec", version = "1.0.0" } jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } -sp-rpc = { version = "2.0.0-dev", path = "../../../primitives/rpc" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-rpc = { version = "2.0.0-alpha.1", path = "../../../primitives/rpc" } serde = { version = "1.0.101", features = ["derive"] } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } -sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } -pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-dev", path = "./runtime-api" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } +pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-alpha.1", path = "./runtime-api" } diff --git a/frame/transaction-payment/rpc/runtime-api/Cargo.toml b/frame/transaction-payment/rpc/runtime-api/Cargo.toml index f42ffabbefe..0b2dce0f55b 100644 --- a/frame/transaction-payment/rpc/runtime-api/Cargo.toml +++ b/frame/transaction-payment/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-transaction-payment-rpc-runtime-api" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -9,11 +9,11 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-api = { version = "2.0.0-dev", default-features = false, path = "../../../../primitives/api" } +sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../../../primitives/api" } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../../../primitives/std" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../../../primitives/runtime" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../../../support" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../../../support" } [dev-dependencies] serde_json = "1.0.41" diff --git a/frame/treasury/Cargo.toml b/frame/treasury/Cargo.toml index cac17bd8ad6..2da2104e1c9 100644 --- a/frame/treasury/Cargo.toml +++ b/frame/treasury/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-treasury" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,15 +10,15 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } -pallet-balances = { version = "2.0.0-dev", default-features = false, path = "../balances" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +pallet-balances = { version = "2.0.0-alpha.1", default-features = false, path = "../balances" } [dev-dependencies] -sp-io ={ version = "2.0.0-dev", path = "../../primitives/io" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } +sp-io ={ version = "2.0.0-alpha.1", path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/utility/Cargo.toml b/frame/utility/Cargo.toml index 3514a397394..3aec9fc8685 100644 --- a/frame/utility/Cargo.toml +++ b/frame/utility/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-utility" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,16 +10,16 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } [dev-dependencies] -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-dev", path = "../balances" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } [features] default = ["std"] diff --git a/frame/vesting/Cargo.toml b/frame/vesting/Cargo.toml index f1bf0812deb..76fec97201c 100644 --- a/frame/vesting/Cargo.toml +++ b/frame/vesting/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-vesting" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -11,16 +11,16 @@ repository = "https://github.com/paritytech/substrate/" serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } enumflags2 = { version = "0.6.2" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-dev", path = "../balances" } -sp-storage = { version = "2.0.0-dev", path = "../../primitives/storage" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } +sp-storage = { version = "2.0.0-alpha.1", path = "../../primitives/storage" } hex-literal = "0.2.1" [features] diff --git a/primitives/allocator/Cargo.toml b/primitives/allocator/Cargo.toml index c122931850b..90c7d922388 100644 --- a/primitives/allocator/Cargo.toml +++ b/primitives/allocator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-allocator" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,9 +8,9 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-std = { version = "2.0.0-dev", path = "../std", default-features = false } -sp-core = { version = "2.0.0-dev", path = "../core", default-features = false } -sp-wasm-interface = { version = "2.0.0-dev", path = "../wasm-interface", default-features = false } +sp-std = { version = "2.0.0-alpha.1", path = "../std", default-features = false } +sp-core = { version = "2.0.0-alpha.1", path = "../core", default-features = false } +sp-wasm-interface = { version = "2.0.0-alpha.1", path = "../wasm-interface", default-features = false } log = { version = "0.4.8", optional = true } derive_more = { version = "0.99.2", optional = true } diff --git a/primitives/api/Cargo.toml b/primitives/api/Cargo.toml index 503dedc34d8..165d05f0283 100644 --- a/primitives/api/Cargo.toml +++ b/primitives/api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-api" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -9,12 +9,12 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-api-proc-macro = { version = "2.0.0-dev", path = "proc-macro" } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } -sp-version = { version = "2.0.0-dev", default-features = false, path = "../version" } -sp-state-machine = { version = "0.8.0-dev", optional = true, path = "../../primitives/state-machine" } +sp-api-proc-macro = { version = "2.0.0-alpha.1", path = "proc-macro" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } +sp-version = { version = "2.0.0-alpha.1", default-features = false, path = "../version" } +sp-state-machine = { version = "0.8.0-alpha.1", optional = true, path = "../../primitives/state-machine" } hash-db = { version = "0.15.2", optional = true } [dev-dependencies] diff --git a/primitives/api/proc-macro/Cargo.toml b/primitives/api/proc-macro/Cargo.toml index f9a56842ad6..0a659c626ba 100644 --- a/primitives/api/proc-macro/Cargo.toml +++ b/primitives/api/proc-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-api-proc-macro" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/api/test/Cargo.toml b/primitives/api/test/Cargo.toml index f94f97d2e7a..aa538754a75 100644 --- a/primitives/api/test/Cargo.toml +++ b/primitives/api/test/Cargo.toml @@ -9,14 +9,14 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0-dev", path = "../" } +sp-api = { version = "2.0.0-alpha.1", path = "../" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } -sp-version = { version = "2.0.0-dev", path = "../../version" } -sp-runtime = { version = "2.0.0-dev", path = "../../runtime" } -sp-blockchain = { version = "2.0.0-dev", path = "../../blockchain" } -sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" } +sp-version = { version = "2.0.0-alpha.1", path = "../../version" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../runtime" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../blockchain" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-state-machine = { version = "0.8.0-dev", path = "../../../primitives/state-machine" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../../../primitives/state-machine" } trybuild = "1.0.17" rustversion = "1.0.0" diff --git a/primitives/application-crypto/Cargo.toml b/primitives/application-crypto/Cargo.toml index 4459389dc6a..f8d36e4db8a 100644 --- a/primitives/application-crypto/Cargo.toml +++ b/primitives/application-crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-application-crypto" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" description = "Provides facilities for generating application specific crypto wrapper types." @@ -9,11 +9,11 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } [features] default = [ "std" ] diff --git a/primitives/application-crypto/test/Cargo.toml b/primitives/application-crypto/test/Cargo.toml index cc2fd0abd27..ab84cdd0a67 100644 --- a/primitives/application-crypto/test/Cargo.toml +++ b/primitives/application-crypto/test/Cargo.toml @@ -10,8 +10,8 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../core" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../core" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } -sp-runtime = { version = "2.0.0-dev", path = "../../runtime" } -sp-api = { version = "2.0.0-dev", path = "../../api" } -sp-application-crypto = { version = "2.0.0-dev", path = "../" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../runtime" } +sp-api = { version = "2.0.0-alpha.1", path = "../../api" } +sp-application-crypto = { version = "2.0.0-alpha.1", path = "../" } diff --git a/primitives/arithmetic/Cargo.toml b/primitives/arithmetic/Cargo.toml index f327d091f63..e8d73f595d1 100644 --- a/primitives/arithmetic/Cargo.toml +++ b/primitives/arithmetic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-arithmetic" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -11,9 +11,9 @@ repository = "https://github.com/paritytech/substrate/" codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } integer-sqrt = "0.1.2" num-traits = { version = "0.2.8", default-features = false } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-debug-derive = { version = "2.0.0-dev", default-features = false, path = "../../primitives/debug-derive" } +sp-debug-derive = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/debug-derive" } [dev-dependencies] primitive-types = "0.6.2" diff --git a/primitives/authority-discovery/Cargo.toml b/primitives/authority-discovery/Cargo.toml index 765f3a14c4d..d5800bc5664 100644 --- a/primitives/authority-discovery/Cargo.toml +++ b/primitives/authority-discovery/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-authority-discovery" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] description = "Authority discovery primitives" edition = "2018" @@ -9,11 +9,11 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../application-crypto" } +sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../application-crypto" } codec = { package = "parity-scale-codec", default-features = false, version = "1.0.3" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } -sp-api = { version = "2.0.0-dev", default-features = false, path = "../api" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../api" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } [features] default = ["std"] diff --git a/primitives/authorship/Cargo.toml b/primitives/authorship/Cargo.toml index 8bf4e935a20..bc4840278a0 100644 --- a/primitives/authorship/Cargo.toml +++ b/primitives/authorship/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-authorship" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] description = "Authorship primitives" edition = "2018" @@ -9,9 +9,9 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../inherents" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../inherents" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } [features] diff --git a/primitives/block-builder/Cargo.toml b/primitives/block-builder/Cargo.toml index c8f6c864498..cf6f7654fcc 100644 --- a/primitives/block-builder/Cargo.toml +++ b/primitives/block-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-block-builder" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,11 +8,11 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } -sp-api = { version = "2.0.0-dev", default-features = false, path = "../api" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } +sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../api" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false } -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../inherents" } +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../inherents" } [features] default = [ "std" ] diff --git a/primitives/blockchain/Cargo.toml b/primitives/blockchain/Cargo.toml index afaca88fe56..19cdcf1481f 100644 --- a/primitives/blockchain/Cargo.toml +++ b/primitives/blockchain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-blockchain" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -13,7 +13,7 @@ lru = "0.4.0" parking_lot = "0.10.0" derive_more = "0.99.2" codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-consensus = { version = "0.8.0-dev", path = "../consensus/common" } -sp-runtime = { version = "2.0.0-dev", path = "../runtime" } -sp-block-builder = { version = "2.0.0-dev", path = "../block-builder" } -sp-state-machine = { version = "0.8.0-dev", path = "../state-machine" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../consensus/common" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../runtime" } +sp-block-builder = { version = "2.0.0-alpha.1", path = "../block-builder" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../state-machine" } diff --git a/primitives/consensus/aura/Cargo.toml b/primitives/consensus/aura/Cargo.toml index 55311ccf7e0..a4372c85ec7 100644 --- a/primitives/consensus/aura/Cargo.toml +++ b/primitives/consensus/aura/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus-aura" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] description = "Primitives for Aura consensus" edition = "2018" @@ -9,13 +9,13 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../../application-crypto" } +sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../../application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../std" } -sp-api = { version = "2.0.0-dev", default-features = false, path = "../../api" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../runtime" } -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../inherents" } -sp-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../timestamp" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../std" } +sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../api" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../runtime" } +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../inherents" } +sp-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../timestamp" } [features] default = ["std"] diff --git a/primitives/consensus/babe/Cargo.toml b/primitives/consensus/babe/Cargo.toml index e0941f58c73..52a344dd7f7 100644 --- a/primitives/consensus/babe/Cargo.toml +++ b/primitives/consensus/babe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus-babe" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] description = "Primitives for BABE consensus" edition = "2018" @@ -9,15 +9,15 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../../application-crypto" } +sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../../application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../std" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../std" } schnorrkel = { version = "0.8.5", features = ["preaudit_deprecated"], optional = true } -sp-api = { version = "2.0.0-dev", default-features = false, path = "../../api" } -sp-consensus = { version = "0.8.0-dev", optional = true, path = "../common" } -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../inherents" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../runtime" } -sp-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../timestamp" } +sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../api" } +sp-consensus = { version = "0.8.0-alpha.1", optional = true, path = "../common" } +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../inherents" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../runtime" } +sp-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../timestamp" } [features] default = ["std"] diff --git a/primitives/consensus/common/Cargo.toml b/primitives/consensus/common/Cargo.toml index 56901983fd2..3f9fc17fa3d 100644 --- a/primitives/consensus/common/Cargo.toml +++ b/primitives/consensus/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] description = "Common utilities for substrate consensus" edition = "2018" @@ -12,15 +12,15 @@ repository = "https://github.com/paritytech/substrate/" derive_more = "0.99.2" libp2p = { version = "0.16.1", default-features = false } log = "0.4.8" -sp-core = { path= "../../core" , version = "2.0.0-dev"} -sp-inherents = { version = "2.0.0-dev", path = "../../inherents" } -sp-state-machine = { version = "0.8.0-dev", path = "../../../primitives/state-machine" } +sp-core = { path= "../../core" , version = "2.0.0-alpha.1"} +sp-inherents = { version = "2.0.0-alpha.1", path = "../../inherents" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../../../primitives/state-machine" } futures = { version = "0.3.1", features = ["thread-pool"] } futures-timer = "3.0.1" futures-diagnose = "1.0" -sp-std = { version = "2.0.0-dev", path = "../../std" } -sp-version = { version = "2.0.0-dev", path = "../../version" } -sp-runtime = { version = "2.0.0-dev", path = "../../runtime" } +sp-std = { version = "2.0.0-alpha.1", path = "../../std" } +sp-version = { version = "2.0.0-alpha.1", path = "../../version" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../runtime" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } parking_lot = "0.10.0" serde = { version = "1.0", features = ["derive"] } diff --git a/primitives/consensus/pow/Cargo.toml b/primitives/consensus/pow/Cargo.toml index 25b7f01a80e..2e1ab504d97 100644 --- a/primitives/consensus/pow/Cargo.toml +++ b/primitives/consensus/pow/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus-pow" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] description = "Primitives for Aura consensus" edition = "2018" @@ -9,10 +9,10 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0-dev", default-features = false, path = "../../api" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../std" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../runtime" } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../core" } +sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../api" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../runtime" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../core" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } [features] diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index 1241c277dde..174c4e806af 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-core" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,7 +8,7 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } rustc-hex = { version = "2.0.1", default-features = false } log = { version = "0.4.8", default-features = false } @@ -28,9 +28,9 @@ num-traits = { version = "0.2.8", default-features = false } zeroize = { version = "1.0.0", default-features = false } lazy_static = { version = "1.4.0", default-features = false, optional = true } parking_lot = { version = "0.10.0", optional = true } -sp-debug-derive = { version = "2.0.0-dev", path = "../debug-derive" } -sp-externalities = { version = "0.8.0-dev", optional = true, path = "../externalities" } -sp-storage = { version = "2.0.0-dev", default-features = false, path = "../storage" } +sp-debug-derive = { version = "2.0.0-alpha.1", path = "../debug-derive" } +sp-externalities = { version = "0.8.0-alpha.1", optional = true, path = "../externalities" } +sp-storage = { version = "2.0.0-alpha.1", default-features = false, path = "../storage" } libsecp256k1 = { version = "0.3.2", default-features = false, features = ["hmac"] } parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } @@ -43,10 +43,10 @@ sha2 = { version = "0.8.0", default-features = false, optional = true } hex = { version = "0.4", default-features = false, optional = true } twox-hash = { version = "1.5.0", default-features = false, optional = true } -sp-runtime-interface = { version = "2.0.0-dev", default-features = false, path = "../runtime-interface" } +sp-runtime-interface = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime-interface" } [dev-dependencies] -sp-serializer = { version = "2.0.0-dev", path = "../serializer" } +sp-serializer = { version = "2.0.0-alpha.1", path = "../serializer" } pretty_assertions = "0.6.1" hex-literal = "0.2.1" rand = "0.7.2" diff --git a/primitives/debug-derive/Cargo.toml b/primitives/debug-derive/Cargo.toml index 248b5d449d3..98d77580138 100644 --- a/primitives/debug-derive/Cargo.toml +++ b/primitives/debug-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-debug-derive" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/externalities/Cargo.toml b/primitives/externalities/Cargo.toml index 7a8f20a048f..9044d7b01e3 100644 --- a/primitives/externalities/Cargo.toml +++ b/primitives/externalities/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-externalities" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" @@ -8,6 +8,6 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-storage = { version = "2.0.0-dev", path = "../storage" } -sp-std = { version = "2.0.0-dev", path = "../std" } +sp-storage = { version = "2.0.0-alpha.1", path = "../storage" } +sp-std = { version = "2.0.0-alpha.1", path = "../std" } environmental = { version = "1.1.1" } diff --git a/primitives/finality-grandpa/Cargo.toml b/primitives/finality-grandpa/Cargo.toml index 62ac64eb0cd..cd621c78319 100644 --- a/primitives/finality-grandpa/Cargo.toml +++ b/primitives/finality-grandpa/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-finality-grandpa" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,12 +8,12 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../application-crypto" } +sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-api = { version = "2.0.0-dev", default-features = false, path = "../api" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } +sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../api" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } [features] default = ["std"] diff --git a/primitives/finality-tracker/Cargo.toml b/primitives/finality-tracker/Cargo.toml index 99e471cac1b..e9321cc1a09 100644 --- a/primitives/finality-tracker/Cargo.toml +++ b/primitives/finality-tracker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-finality-tracker" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -9,8 +9,8 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } [features] default = ["std"] diff --git a/primitives/inherents/Cargo.toml b/primitives/inherents/Cargo.toml index bd315c33cdb..aa403693153 100644 --- a/primitives/inherents/Cargo.toml +++ b/primitives/inherents/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-inherents" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -9,8 +9,8 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] parking_lot = { version = "0.10.0", optional = true } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] } derive_more = { version = "0.99.2", optional = true } diff --git a/primitives/io/Cargo.toml b/primitives/io/Cargo.toml index 7d61398b81e..05a051e0624 100644 --- a/primitives/io/Cargo.toml +++ b/primitives/io/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-io" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,14 +10,14 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false } hash-db = { version = "0.15.2", default-features = false } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } libsecp256k1 = { version = "0.3.4", optional = true } -sp-state-machine = { version = "0.8.0-dev", optional = true, path = "../../primitives/state-machine" } -sp-wasm-interface = { version = "2.0.0-dev", path = "../../primitives/wasm-interface", default-features = false } -sp-runtime-interface = { version = "2.0.0-dev", default-features = false, path = "../runtime-interface" } -sp-trie = { version = "2.0.0-dev", optional = true, path = "../../primitives/trie" } -sp-externalities = { version = "0.8.0-dev", optional = true, path = "../externalities" } +sp-state-machine = { version = "0.8.0-alpha.1", optional = true, path = "../../primitives/state-machine" } +sp-wasm-interface = { version = "2.0.0-alpha.1", path = "../../primitives/wasm-interface", default-features = false } +sp-runtime-interface = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime-interface" } +sp-trie = { version = "2.0.0-alpha.1", optional = true, path = "../../primitives/trie" } +sp-externalities = { version = "0.8.0-alpha.1", optional = true, path = "../externalities" } log = { version = "0.4.8", optional = true } [features] diff --git a/primitives/keyring/Cargo.toml b/primitives/keyring/Cargo.toml index d712fcdf8eb..46793cd5e1e 100644 --- a/primitives/keyring/Cargo.toml +++ b/primitives/keyring/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-keyring" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,7 +8,7 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-core = { version = "2.0.0-dev", path = "../core" } -sp-runtime = { version = "2.0.0-dev", path = "../runtime" } +sp-core = { version = "2.0.0-alpha.1", path = "../core" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../runtime" } lazy_static = "1.4.0" strum = { version = "0.16.0", features = ["derive"] } diff --git a/primitives/offchain/Cargo.toml b/primitives/offchain/Cargo.toml index 70e1cffacfe..78f3071bf00 100644 --- a/primitives/offchain/Cargo.toml +++ b/primitives/offchain/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate offchain workers primitives" name = "sp-offchain" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" @@ -9,8 +9,8 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0-dev", default-features = false, path = "../api" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } +sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../api" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } [features] default = ["std"] diff --git a/primitives/panic-handler/Cargo.toml b/primitives/panic-handler/Cargo.toml index d29f2238e74..2f63f32aca6 100644 --- a/primitives/panic-handler/Cargo.toml +++ b/primitives/panic-handler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-panic-handler" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] description = "Substrate panic handler." edition = "2018" diff --git a/primitives/phragmen/Cargo.toml b/primitives/phragmen/Cargo.toml index 28f4cce9018..ec0bdce2e40 100644 --- a/primitives/phragmen/Cargo.toml +++ b/primitives/phragmen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-phragmen" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -9,12 +9,12 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } [dev-dependencies] -substrate-test-utils = { version = "2.0.0-dev", path = "../../test-utils" } -sp-io ={ version = "2.0.0-dev", path = "../../primitives/io" } +substrate-test-utils = { version = "2.0.0-alpha.1", path = "../../test-utils" } +sp-io ={ version = "2.0.0-alpha.1", path = "../../primitives/io" } rand = "0.7.2" [features] diff --git a/primitives/rpc/Cargo.toml b/primitives/rpc/Cargo.toml index 1f464e81a8f..322100bc2d7 100644 --- a/primitives/rpc/Cargo.toml +++ b/primitives/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-rpc" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", features = ["derive"] } -sp-core = { version = "2.0.0-dev", path = "../core" } +sp-core = { version = "2.0.0-alpha.1", path = "../core" } [dev-dependencies] serde_json = "1.0.41" diff --git a/primitives/runtime-interface/Cargo.toml b/primitives/runtime-interface/Cargo.toml index b1547fe6520..c4071138071 100644 --- a/primitives/runtime-interface/Cargo.toml +++ b/primitives/runtime-interface/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-runtime-interface" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,19 +8,19 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-wasm-interface = { version = "2.0.0-dev", path = "../wasm-interface", default-features = false } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } -sp-runtime-interface-proc-macro = { version = "2.0.0-dev", path = "proc-macro" } -sp-externalities = { version = "0.8.0-dev", optional = true, path = "../externalities" } +sp-wasm-interface = { version = "2.0.0-alpha.1", path = "../wasm-interface", default-features = false } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-runtime-interface-proc-macro = { version = "2.0.0-alpha.1", path = "proc-macro" } +sp-externalities = { version = "0.8.0-alpha.1", optional = true, path = "../externalities" } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false } static_assertions = "1.0.0" primitive-types = { version = "0.6.2", default-features = false } [dev-dependencies] sp-runtime-interface-test-wasm = { version = "2.0.0-dev", path = "test-wasm" } -sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } -sp-core = { version = "2.0.0-dev", path = "../core" } -sp-io = { version = "2.0.0-dev", path = "../io" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } +sp-core = { version = "2.0.0-alpha.1", path = "../core" } +sp-io = { version = "2.0.0-alpha.1", path = "../io" } rustversion = "1.0.0" trybuild = "1.0.17" diff --git a/primitives/runtime-interface/proc-macro/Cargo.toml b/primitives/runtime-interface/proc-macro/Cargo.toml index fe5a132aac5..844ea0a7492 100644 --- a/primitives/runtime-interface/proc-macro/Cargo.toml +++ b/primitives/runtime-interface/proc-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-runtime-interface-proc-macro" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/runtime-interface/test-wasm/Cargo.toml b/primitives/runtime-interface/test-wasm/Cargo.toml index e07adb01952..849237b90b9 100644 --- a/primitives/runtime-interface/test-wasm/Cargo.toml +++ b/primitives/runtime-interface/test-wasm/Cargo.toml @@ -10,10 +10,10 @@ repository = "https://github.com/paritytech/substrate/" publish = false [dependencies] -sp-runtime-interface = { version = "2.0.0-dev", default-features = false, path = "../" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../io" } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../core" } +sp-runtime-interface = { version = "2.0.0-alpha.1", default-features = false, path = "../" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../io" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../core" } [build-dependencies] wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" } diff --git a/primitives/runtime-interface/test/Cargo.toml b/primitives/runtime-interface/test/Cargo.toml index 34c5a7ac5f7..1215748370e 100644 --- a/primitives/runtime-interface/test/Cargo.toml +++ b/primitives/runtime-interface/test/Cargo.toml @@ -9,9 +9,9 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-runtime-interface = { version = "2.0.0-dev", path = "../" } -sc-executor = { version = "0.8.0-dev", path = "../../../client/executor" } +sp-runtime-interface = { version = "2.0.0-alpha.1", path = "../" } +sc-executor = { version = "0.8.0-alpha.1", path = "../../../client/executor" } sp-runtime-interface-test-wasm = { version = "2.0.0-dev", path = "../test-wasm" } -sp-state-machine = { version = "0.8.0-dev", path = "../../../primitives/state-machine" } -sp-core = { version = "2.0.0-dev", path = "../../core" } -sp-io = { version = "2.0.0-dev", path = "../../io" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../../../primitives/state-machine" } +sp-core = { version = "2.0.0-alpha.1", path = "../../core" } +sp-io = { version = "2.0.0-alpha.1", path = "../../io" } diff --git a/primitives/runtime/Cargo.toml b/primitives/runtime/Cargo.toml index 29736af6e53..ff73aa377d5 100644 --- a/primitives/runtime/Cargo.toml +++ b/primitives/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-runtime" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,16 +10,16 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } -sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../application-crypto" } -sp-arithmetic = { version = "2.0.0-dev", default-features = false, path = "../arithmetic" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../io" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } +sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../application-crypto" } +sp-arithmetic = { version = "2.0.0-alpha.1", default-features = false, path = "../arithmetic" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../io" } log = { version = "0.4.8", optional = true } paste = "0.1.6" rand = { version = "0.7.2", optional = true } impl-trait-for-tuples = "0.1.3" -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../inherents" } +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../inherents" } parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } [dev-dependencies] diff --git a/primitives/sandbox/Cargo.toml b/primitives/sandbox/Cargo.toml index e09bdb8e006..2bdd7d221c6 100755 --- a/primitives/sandbox/Cargo.toml +++ b/primitives/sandbox/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-sandbox" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -9,10 +9,10 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] wasmi = { version = "0.6.2", optional = true } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } -sp-io = { version = "2.0.0-dev", default-features = false, path = "../io" } -sp-wasm-interface = { version = "2.0.0-dev", default-features = false, path = "../wasm-interface" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../io" } +sp-wasm-interface = { version = "2.0.0-alpha.1", default-features = false, path = "../wasm-interface" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } [dev-dependencies] diff --git a/primitives/serializer/Cargo.toml b/primitives/serializer/Cargo.toml index b172c1439b2..4d784a27bbc 100644 --- a/primitives/serializer/Cargo.toml +++ b/primitives/serializer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-serializer" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/session/Cargo.toml b/primitives/session/Cargo.toml index a395b44e81e..9042b17630b 100644 --- a/primitives/session/Cargo.toml +++ b/primitives/session/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-session" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,10 +8,10 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0-dev", default-features = false, path = "../api" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } -sp-runtime = { version = "2.0.0-dev", optional = true, path = "../runtime" } +sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../api" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } +sp-runtime = { version = "2.0.0-alpha.1", optional = true, path = "../runtime" } [features] default = [ "std" ] diff --git a/primitives/staking/Cargo.toml b/primitives/staking/Cargo.toml index 60945cbf970..688c95e49d2 100644 --- a/primitives/staking/Cargo.toml +++ b/primitives/staking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-staking" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -9,8 +9,8 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } [features] default = ["std"] diff --git a/primitives/state-machine/Cargo.toml b/primitives/state-machine/Cargo.toml index 9c682982041..7ddb3160f7e 100644 --- a/primitives/state-machine/Cargo.toml +++ b/primitives/state-machine/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-state-machine" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] description = "Substrate State Machine" edition = "2018" @@ -14,13 +14,13 @@ parking_lot = "0.10.0" hash-db = "0.15.2" trie-db = "0.20.0" trie-root = "0.16.0" -sp-trie = { version = "2.0.0-dev", path = "../trie" } -sp-core = { version = "2.0.0-dev", path = "../core" } -sp-panic-handler = { version = "2.0.0-dev", path = "../panic-handler" } +sp-trie = { version = "2.0.0-alpha.1", path = "../trie" } +sp-core = { version = "2.0.0-alpha.1", path = "../core" } +sp-panic-handler = { version = "2.0.0-alpha.1", path = "../panic-handler" } codec = { package = "parity-scale-codec", version = "1.0.0" } num-traits = "0.2.8" rand = "0.7.2" -sp-externalities = { version = "0.8.0-dev", path = "../externalities" } +sp-externalities = { version = "0.8.0-alpha.1", path = "../externalities" } [dev-dependencies] hex-literal = "0.2.1" diff --git a/primitives/std/Cargo.toml b/primitives/std/Cargo.toml index 4314281b3b7..e698c978a8c 100644 --- a/primitives/std/Cargo.toml +++ b/primitives/std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-std" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/storage/Cargo.toml b/primitives/storage/Cargo.toml index 27c9f991922..c84eb4c52c2 100644 --- a/primitives/storage/Cargo.toml +++ b/primitives/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-storage" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" description = "Storage related primitives" @@ -9,10 +9,10 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } serde = { version = "1.0.101", optional = true, features = ["derive"] } impl-serde = { version = "0.2.3", optional = true } -sp-debug-derive = { version = "2.0.0-dev", path = "../debug-derive" } +sp-debug-derive = { version = "2.0.0-alpha.1", path = "../debug-derive" } [features] default = [ "std" ] diff --git a/primitives/test-primitives/Cargo.toml b/primitives/test-primitives/Cargo.toml index 99d070013e5..83e92957ed7 100644 --- a/primitives/test-primitives/Cargo.toml +++ b/primitives/test-primitives/Cargo.toml @@ -9,11 +9,11 @@ repository = "https://github.com/paritytech/substrate/" publish = false [dependencies] -sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../application-crypto" } +sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } [features] diff --git a/primitives/timestamp/Cargo.toml b/primitives/timestamp/Cargo.toml index 1b97f53437f..82c5ab8f1b4 100644 --- a/primitives/timestamp/Cargo.toml +++ b/primitives/timestamp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-timestamp" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,11 +8,11 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0-dev", default-features = false, path = "../api" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } +sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../api" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../inherents" } +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../inherents" } impl-trait-for-tuples = "0.1.3" wasm-timer = "0.2" diff --git a/primitives/transaction-pool/Cargo.toml b/primitives/transaction-pool/Cargo.toml index 747cd3472cc..3cafd8f6796 100644 --- a/primitives/transaction-pool/Cargo.toml +++ b/primitives/transaction-pool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-transaction-pool" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -13,8 +13,8 @@ derive_more = { version = "0.99.2", optional = true } futures = { version = "0.3.1", optional = true } log = { version = "0.4.8", optional = true } serde = { version = "1.0.101", features = ["derive"], optional = true} -sp-api = { version = "2.0.0-dev", default-features = false, path = "../api" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } +sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../api" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } [features] default = [ "std" ] diff --git a/primitives/trie/Cargo.toml b/primitives/trie/Cargo.toml index 6aab0f290b2..c448275eb0d 100644 --- a/primitives/trie/Cargo.toml +++ b/primitives/trie/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-trie" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] description = "Patricia trie stuff using a parity-scale-codec node format" repository = "https://github.com/paritytech/substrate/" @@ -14,12 +14,12 @@ harness = false [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } hash-db = { version = "0.15.2", default-features = false } trie-db = { version = "0.20.0", default-features = false } trie-root = { version = "0.16.0", default-features = false } memory-db = { version = "0.19.0", default-features = false } -sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" } +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } [dev-dependencies] trie-bench = "0.20.0" diff --git a/primitives/version/Cargo.toml b/primitives/version/Cargo.toml index 4cd65cd0446..128ff399602 100644 --- a/primitives/version/Cargo.toml +++ b/primitives/version/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-version" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -11,8 +11,8 @@ repository = "https://github.com/paritytech/substrate/" impl-serde = { version = "0.2.3", optional = true } serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../std" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../runtime" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } [features] default = ["std"] diff --git a/primitives/wasm-interface/Cargo.toml b/primitives/wasm-interface/Cargo.toml index 5d477ff9557..f05f1a0bfb1 100644 --- a/primitives/wasm-interface/Cargo.toml +++ b/primitives/wasm-interface/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-wasm-interface" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -10,7 +10,7 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] wasmi = { version = "0.6.2", optional = true } impl-trait-for-tuples = "0.1.2" -sp-std = { version = "2.0.0-dev", path = "../std", default-features = false } +sp-std = { version = "2.0.0-alpha.1", path = "../std", default-features = false } codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false, features = ["derive"] } [features] diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml index 54511bd9e44..d7664f1e126 100644 --- a/test-utils/Cargo.toml +++ b/test-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-test-utils" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/test-utils/client/Cargo.toml b/test-utils/client/Cargo.toml index 99511f051be..3b677b08bef 100644 --- a/test-utils/client/Cargo.toml +++ b/test-utils/client/Cargo.toml @@ -9,16 +9,16 @@ repository = "https://github.com/paritytech/substrate/" publish = false [dependencies] -sc-client-api = { version = "2.0.0-dev", path = "../../client/api" } -sc-client = { version = "0.8.0-dev", path = "../../client/" } -sc-client-db = { version = "0.8.0-dev", features = ["test-helpers"], path = "../../client/db" } -sp-consensus = { version = "0.8.0-dev", path = "../../primitives/consensus/common" } -sc-executor = { version = "0.8.0-dev", path = "../../client/executor" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../../client/api" } +sc-client = { version = "0.8.0-alpha.1", path = "../../client/" } +sc-client-db = { version = "0.8.0-alpha.1", features = ["test-helpers"], path = "../../client/db" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } +sc-executor = { version = "0.8.0-alpha.1", path = "../../client/executor" } futures = "0.3.1" hash-db = "0.15.2" -sp-keyring = { version = "2.0.0-dev", path = "../../primitives/keyring" } +sp-keyring = { version = "2.0.0-alpha.1", path = "../../primitives/keyring" } codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-core = { version = "2.0.0-dev", path = "../../primitives/core" } -sp-runtime = { version = "2.0.0-dev", path = "../../primitives/runtime" } -sp-blockchain = { version = "2.0.0-dev", path = "../../primitives/blockchain" } -sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } +sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } diff --git a/test-utils/runtime/Cargo.toml b/test-utils/runtime/Cargo.toml index 993e44685c9..339aafa6e98 100644 --- a/test-utils/runtime/Cargo.toml +++ b/test-utils/runtime/Cargo.toml @@ -10,42 +10,42 @@ repository = "https://github.com/paritytech/substrate/" publish = false [dependencies] -sp-application-crypto = { version = "2.0.0-dev", default-features = false, path = "../../primitives/application-crypto" } -sp-consensus-aura = { version = "0.8.0-dev", default-features = false, path = "../../primitives/consensus/aura" } -sp-consensus-babe = { version = "0.8.0-dev", default-features = false, path = "../../primitives/consensus/babe" } -sp-block-builder = { version = "2.0.0-dev", default-features = false, path = "../../primitives/block-builder" } +sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/application-crypto" } +sp-consensus-aura = { version = "0.8.0-alpha.1", default-features = false, path = "../../primitives/consensus/aura" } +sp-consensus-babe = { version = "0.8.0-alpha.1", default-features = false, path = "../../primitives/consensus/babe" } +sp-block-builder = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/block-builder" } cfg-if = "0.1.10" codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -frame-executive = { version = "2.0.0-dev", default-features = false, path = "../../frame/executive" } -sp-inherents = { version = "2.0.0-dev", default-features = false, path = "../../primitives/inherents" } -sp-keyring = { version = "2.0.0-dev", optional = true, path = "../../primitives/keyring" } +frame-executive = { version = "2.0.0-alpha.1", default-features = false, path = "../../frame/executive" } +sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } +sp-keyring = { version = "2.0.0-alpha.1", optional = true, path = "../../primitives/keyring" } log = { version = "0.4.8", optional = true } memory-db = { version = "0.19.0", default-features = false } -sp-offchain = { path = "../../primitives/offchain", default-features = false, version = "2.0.0-dev"} -sp-core = { version = "2.0.0-dev", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0-dev", default-features = false, path = "../../primitives/std" } -sp-runtime-interface = { path = "../../primitives/runtime-interface", default-features = false, version = "2.0.0-dev"} -sp-io = { version = "2.0.0-dev", default-features = false, path = "../../primitives/io" } -frame-support = { version = "2.0.0-dev", default-features = false, path = "../../frame/support" } -sp-version = { version = "2.0.0-dev", default-features = false, path = "../../primitives/version" } +sp-offchain = { path = "../../primitives/offchain", default-features = false, version = "2.0.0-alpha.1"} +sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-runtime-interface = { path = "../../primitives/runtime-interface", default-features = false, version = "2.0.0-alpha.1"} +sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../../frame/support" } +sp-version = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/version" } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-session = { version = "2.0.0-dev", default-features = false, path = "../../primitives/session" } -sp-api = { version = "2.0.0-dev", default-features = false, path = "../../primitives/api" } -sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" } -pallet-babe = { version = "2.0.0-dev", default-features = false, path = "../../frame/babe" } -frame-system = { version = "2.0.0-dev", default-features = false, path = "../../frame/system" } -frame-system-rpc-runtime-api = { version = "2.0.0-dev", default-features = false, path = "../../frame/system/rpc/runtime-api" } -pallet-timestamp = { version = "2.0.0-dev", default-features = false, path = "../../frame/timestamp" } -sc-client = { version = "0.8.0-dev", optional = true, path = "../../client" } -sp-trie = { version = "2.0.0-dev", default-features = false, path = "../../primitives/trie" } -sp-transaction-pool = { version = "2.0.0-dev", default-features = false, path = "../../primitives/transaction-pool" } +sp-session = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/session" } +sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/api" } +sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +pallet-babe = { version = "2.0.0-alpha.1", default-features = false, path = "../../frame/babe" } +frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../../frame/system" } +frame-system-rpc-runtime-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../frame/system/rpc/runtime-api" } +pallet-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../frame/timestamp" } +sc-client = { version = "0.8.0-alpha.1", optional = true, path = "../../client" } +sp-trie = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/trie" } +sp-transaction-pool = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/transaction-pool" } trie-db = { version = "0.20.0", default-features = false } parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } [dev-dependencies] -sc-executor = { version = "0.8.0-dev", path = "../../client/executor" } +sc-executor = { version = "0.8.0-alpha.1", path = "../../client/executor" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "./client" } -sp-state-machine = { version = "0.8.0-dev", path = "../../primitives/state-machine" } +sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } [build-dependencies] wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../utils/wasm-builder-runner" } diff --git a/test-utils/runtime/client/Cargo.toml b/test-utils/runtime/client/Cargo.toml index 3911bea7839..135eaa9b81d 100644 --- a/test-utils/runtime/client/Cargo.toml +++ b/test-utils/runtime/client/Cargo.toml @@ -9,14 +9,14 @@ repository = "https://github.com/paritytech/substrate/" publish = false [dependencies] -sc-block-builder = { version = "0.8.0-dev", path = "../../../client/block-builder" } +sc-block-builder = { version = "0.8.0-alpha.1", path = "../../../client/block-builder" } substrate-test-client = { version = "2.0.0-dev", path = "../../client" } -sp-core = { version = "2.0.0-dev", path = "../../../primitives/core" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } substrate-test-runtime = { version = "2.0.0-dev", path = "../../runtime" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -sp-api = { version = "2.0.0-dev", path = "../../../primitives/api" } -sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } codec = { package = "parity-scale-codec", version = "1.0.0" } -sc-client-api = { version = "2.0.0-dev", path = "../../../client/api" } -sc-client = { version = "0.8.0-dev", path = "../../../client/" } +sc-client-api = { version = "2.0.0-alpha.1", path = "../../../client/api" } +sc-client = { version = "0.8.0-alpha.1", path = "../../../client/" } futures = "0.3.1" diff --git a/test-utils/runtime/transaction-pool/Cargo.toml b/test-utils/runtime/transaction-pool/Cargo.toml index 8b5e34be88a..c18337ddeb7 100644 --- a/test-utils/runtime/transaction-pool/Cargo.toml +++ b/test-utils/runtime/transaction-pool/Cargo.toml @@ -12,9 +12,9 @@ publish = false substrate-test-runtime-client = { version = "2.0.0-dev", path = "../client" } parking_lot = "0.10.0" codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } -sp-transaction-pool = { version = "2.0.0-dev", path = "../../../primitives/transaction-pool" } -sc-transaction-graph = { version = "2.0.0-dev", path = "../../../client/transaction-pool/graph" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../primitives/transaction-pool" } +sc-transaction-graph = { version = "2.0.0-alpha.1", path = "../../../client/transaction-pool/graph" } futures = { version = "0.3.1", features = ["compat"] } derive_more = "0.99.2" diff --git a/utils/browser/Cargo.toml b/utils/browser/Cargo.toml index bd513b8a173..c6bb74857be 100644 --- a/utils/browser/Cargo.toml +++ b/utils/browser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "browser-utils" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" authors = ["Parity Technologies "] description = "Utilities for creating a browser light-client." edition = "2018" @@ -19,10 +19,10 @@ js-sys = "0.3.34" wasm-bindgen = "0.2.57" wasm-bindgen-futures = "0.4.7" kvdb-web = "0.4" -sc-informant = { version = "0.8.0-dev", path = "../../client/informant" } -sc-service = { version = "0.8.0-dev", path = "../../client/service", default-features = false } -sc-network = { path = "../../client/network" , version = "0.8.0-dev"} -sc-chain-spec = { path = "../../client/chain-spec" , version = "2.0.0-dev"} +sc-informant = { version = "0.8.0-alpha.1", path = "../../client/informant" } +sc-service = { version = "0.8.0-alpha.1", path = "../../client/service", default-features = false } +sc-network = { path = "../../client/network" , version = "0.8.0-alpha.1"} +sc-chain-spec = { path = "../../client/chain-spec" , version = "2.0.0-alpha.1"} # Imported just for the `no_cc` feature clear_on_drop = { version = "0.2.3", features = ["no_cc"] } diff --git a/utils/build-script-utils/Cargo.toml b/utils/build-script-utils/Cargo.toml index d41b85a982f..e590e8ac1b8 100644 --- a/utils/build-script-utils/Cargo.toml +++ b/utils/build-script-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-build-script-utils" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/utils/fork-tree/Cargo.toml b/utils/fork-tree/Cargo.toml index be200007d52..2056cd98198 100644 --- a/utils/fork-tree/Cargo.toml +++ b/utils/fork-tree/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fork-tree" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/utils/frame/benchmarking-cli/Cargo.toml b/utils/frame/benchmarking-cli/Cargo.toml index 648b37933e7..5d83902bf0e 100644 --- a/utils/frame/benchmarking-cli/Cargo.toml +++ b/utils/frame/benchmarking-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-benchmarking-cli" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,12 +8,12 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -frame-benchmarking = { version = "2.0.0-dev", path = "../../../frame/benchmarking" } -sc-service = { version = "0.8.0-dev", path = "../../../client/service" } -sc-cli = { version = "0.8.0-dev", path = "../../../client/cli" } -sc-client = { version = "0.8.0-dev", path = "../../../client" } -sc-client-db = { version = "0.8.0-dev", path = "../../../client/db" } -sc-executor = { version = "0.8.0-dev", path = "../../../client/executor" } -sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" } +frame-benchmarking = { version = "2.0.0-alpha.1", path = "../../../frame/benchmarking" } +sc-service = { version = "0.8.0-alpha.1", path = "../../../client/service" } +sc-cli = { version = "0.8.0-alpha.1", path = "../../../client/cli" } +sc-client = { version = "0.8.0-alpha.1", path = "../../../client" } +sc-client-db = { version = "0.8.0-alpha.1", path = "../../../client/db" } +sc-executor = { version = "0.8.0-alpha.1", path = "../../../client/executor" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } structopt = "0.3.8" codec = { version = "1.1.2", package = "parity-scale-codec" } diff --git a/utils/frame/rpc/support/Cargo.toml b/utils/frame/rpc/support/Cargo.toml index 51f004489a1..01bdd5d73c9 100644 --- a/utils/frame/rpc/support/Cargo.toml +++ b/utils/frame/rpc/support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-frame-rpc-support" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies ", "Andrew Dirksen "] edition = "2018" license = "GPL-3.0" @@ -13,10 +13,10 @@ jsonrpc-client-transports = "14" jsonrpc-core = "14" codec = { package = "parity-scale-codec", version = "1" } serde = "1" -frame-support = { version = "2.0.0-dev", path = "../../../../frame/support" } -sp-storage = { version = "2.0.0-dev", path = "../../../../primitives/storage" } -sc-rpc-api = { version = "0.8.0-dev", path = "../../../../client/rpc-api" } +frame-support = { version = "2.0.0-alpha.1", path = "../../../../frame/support" } +sp-storage = { version = "2.0.0-alpha.1", path = "../../../../primitives/storage" } +sc-rpc-api = { version = "0.8.0-alpha.1", path = "../../../../client/rpc-api" } [dev-dependencies] -frame-system = { version = "2.0.0-dev", path = "../../../../frame/system" } +frame-system = { version = "2.0.0-alpha.1", path = "../../../../frame/system" } tokio = "0.1" diff --git a/utils/frame/rpc/system/Cargo.toml b/utils/frame/rpc/system/Cargo.toml index 88481ac8848..3bbb1994995 100644 --- a/utils/frame/rpc/system/Cargo.toml +++ b/utils/frame/rpc/system/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-frame-rpc-system" -version = "2.0.0-dev" +version = "2.0.0-alpha.1" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,7 +8,7 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-client = { version = "0.8.0-dev", path = "../../../../client/" } +sc-client = { version = "0.8.0-alpha.1", path = "../../../../client/" } codec = { package = "parity-scale-codec", version = "1.0.0" } futures = "0.3.1" jsonrpc-core = "14.0.3" @@ -16,14 +16,14 @@ jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" log = "0.4.8" serde = { version = "1.0.101", features = ["derive"] } -sp-runtime = { version = "2.0.0-dev", path = "../../../../primitives/runtime" } -sp-api = { version = "2.0.0-dev", path = "../../../../primitives/api" } -frame-system-rpc-runtime-api = { version = "2.0.0-dev", path = "../../../../frame/system/rpc/runtime-api" } -sp-core = { version = "2.0.0-dev", path = "../../../../primitives/core" } -sp-blockchain = { version = "2.0.0-dev", path = "../../../../primitives/blockchain" } -sp-transaction-pool = { version = "2.0.0-dev", path = "../../../../primitives/transaction-pool" } +sp-runtime = { version = "2.0.0-alpha.1", path = "../../../../primitives/runtime" } +sp-api = { version = "2.0.0-alpha.1", path = "../../../../primitives/api" } +frame-system-rpc-runtime-api = { version = "2.0.0-alpha.1", path = "../../../../frame/system/rpc/runtime-api" } +sp-core = { version = "2.0.0-alpha.1", path = "../../../../primitives/core" } +sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../../primitives/blockchain" } +sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../../primitives/transaction-pool" } [dev-dependencies] substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../../test-utils/runtime/client" } env_logger = "0.7.0" -sc-transaction-pool = { version = "2.0.0-dev", path = "../../../../client/transaction-pool" } +sc-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../../client/transaction-pool" } diff --git a/utils/prometheus/Cargo.toml b/utils/prometheus/Cargo.toml index 4c7ec546c8e..1ad32dfec50 100644 --- a/utils/prometheus/Cargo.toml +++ b/utils/prometheus/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Prometheus exporter server" name = "prometheus-exporter" -version = "0.8.0-dev" +version = "0.8.0-alpha.1" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" -- GitLab From 48150f24857e431ecb5066a2f60f59633eef915d Mon Sep 17 00:00:00 2001 From: Arkadiy Paronyan Date: Tue, 25 Feb 2020 22:17:42 +0100 Subject: [PATCH 042/106] Sync: validate block responses for required data (#5052) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Less verbose state-db logging * Validate block responses for block bodies * Update client/network/src/protocol.rs Co-Authored-By: Bastian Köcher * Added validation test * Disconnect on missing header as well * Typo Co-Authored-By: AndrĂ© Silva Co-authored-by: Bastian Köcher Co-authored-by: AndrĂ© Silva --- client/network/src/protocol.rs | 31 +++++++++++-- client/network/src/protocol/sync.rs | 2 +- client/network/test/src/lib.rs | 71 +++++++++++++++++++++++------ client/network/test/src/sync.rs | 21 +++++++++ client/state-db/src/lib.rs | 6 +-- client/state-db/src/noncanonical.rs | 4 +- 6 files changed, 111 insertions(+), 24 deletions(-) diff --git a/client/network/src/protocol.rs b/client/network/src/protocol.rs index dd8b5e6c28e..d344321e68d 100644 --- a/client/network/src/protocol.rs +++ b/client/network/src/protocol.rs @@ -131,6 +131,8 @@ mod rep { pub const BAD_PROTOCOL: Rep = Rep::new_fatal("Unsupported protocol"); /// Peer role does not match (e.g. light peer connecting to another light peer). pub const BAD_ROLE: Rep = Rep::new_fatal("Unsupported role"); + /// Peer response data does not have requested bits. + pub const BAD_RESPONSE: Rep = Rep::new(-(1 << 12), "Incomplete response"); } // Lock must always be taken in order declared here. @@ -701,12 +703,14 @@ impl Protocol { peer: PeerId, request: message::BlockRequest ) { - trace!(target: "sync", "BlockRequest {} from {}: from {:?} to {:?} max {:?}", + trace!(target: "sync", "BlockRequest {} from {}: from {:?} to {:?} max {:?} for {:?}", request.id, peer, request.from, request.to, - request.max); + request.max, + request.fields, + ); // sending block requests to the node that is unable to serve it is considered a bad behavior if !self.config.roles.is_full() { @@ -754,6 +758,11 @@ impl Protocol { message_queue: None, justification, }; + // Stop if we don't have requested block body + if get_body && block_data.body.is_none() { + trace!(target: "sync", "Missing data for block request."); + break; + } blocks.push(block_data); match request.direction { message::Direction::Ascending => id = BlockId::Number(number + One::one()), @@ -784,7 +793,7 @@ impl Protocol { request: message::BlockRequest, response: message::BlockResponse, ) -> CustomMessageOutcome { - let blocks_range = match ( + let blocks_range = || match ( response.blocks.first().and_then(|b| b.header.as_ref().map(|h| h.number())), response.blocks.last().and_then(|b| b.header.as_ref().map(|h| h.number())), ) { @@ -796,7 +805,7 @@ impl Protocol { response.id, peer, response.blocks.len(), - blocks_range + blocks_range(), ); if request.fields == message::BlockAttributes::JUSTIFICATION { @@ -811,6 +820,20 @@ impl Protocol { } } } else { + // Validate fields against the request. + if request.fields.contains(message::BlockAttributes::HEADER) && response.blocks.iter().any(|b| b.header.is_none()) { + self.behaviour.disconnect_peer(&peer); + self.peerset_handle.report_peer(peer, rep::BAD_RESPONSE); + trace!(target: "sync", "Missing header for a block"); + return CustomMessageOutcome::None + } + if request.fields.contains(message::BlockAttributes::BODY) && response.blocks.iter().any(|b| b.body.is_none()) { + self.behaviour.disconnect_peer(&peer); + self.peerset_handle.report_peer(peer, rep::BAD_RESPONSE); + trace!(target: "sync", "Missing body for a block"); + return CustomMessageOutcome::None + } + match self.sync.on_block_data(peer, Some(request), response) { Ok(sync::OnBlockData::Import(origin, blocks)) => CustomMessageOutcome::BlockImport(origin, blocks), diff --git a/client/network/src/protocol/sync.rs b/client/network/src/protocol/sync.rs index 0c5355ea21f..b1cd89155ef 100644 --- a/client/network/src/protocol/sync.rs +++ b/client/network/src/protocol/sync.rs @@ -751,7 +751,7 @@ impl ChainSync { | PeerSyncState::DownloadingFinalityProof(..) => Vec::new() } } else { - // When request.is_none() just accept blocks + // When request.is_none() this is a block announcement. Just accept blocks. blocks.into_iter().map(|b| { IncomingBlock { hash: b.hash, diff --git a/client/network/test/src/lib.rs b/client/network/test/src/lib.rs index 982e2ff5123..d09897e853e 100644 --- a/client/network/test/src/lib.rs +++ b/client/network/test/src/lib.rs @@ -237,7 +237,7 @@ impl Peer { where F: FnMut(BlockBuilder) -> Block { let best_hash = self.client.info().best_hash; - self.generate_blocks_at(BlockId::Hash(best_hash), count, origin, edit_block) + self.generate_blocks_at(BlockId::Hash(best_hash), count, origin, edit_block, false) } /// Add blocks to the peer -- edit the block before adding. The chain will @@ -247,7 +247,8 @@ impl Peer { at: BlockId, count: usize, origin: BlockOrigin, - mut edit_block: F + mut edit_block: F, + headers_only: bool, ) -> H256 where F: FnMut(BlockBuilder) -> Block { let full_client = self.client.as_full() .expect("blocks could only be generated by full clients"); @@ -272,7 +273,7 @@ impl Peer { origin, header.clone(), None, - Some(block.extrinsics) + if headers_only { None } else { Some(block.extrinsics) }, ).unwrap(); let cache = if let Some(cache) = cache { cache.into_iter().collect() @@ -294,28 +295,46 @@ impl Peer { self.push_blocks_at(BlockId::Hash(best_hash), count, with_tx) } + /// Push blocks to the peer (simplified: with or without a TX) + pub fn push_headers(&mut self, count: usize) -> H256 { + let best_hash = self.client.info().best_hash; + self.generate_tx_blocks_at(BlockId::Hash(best_hash), count, false, true) + } + /// Push blocks to the peer (simplified: with or without a TX) starting from /// given hash. pub fn push_blocks_at(&mut self, at: BlockId, count: usize, with_tx: bool) -> H256 { + self.generate_tx_blocks_at(at, count, with_tx, false) + } + + /// Push blocks/headers to the peer (simplified: with or without a TX) starting from + /// given hash. + fn generate_tx_blocks_at(&mut self, at: BlockId, count: usize, with_tx: bool, headers_only:bool) -> H256 { let mut nonce = 0; if with_tx { - self.generate_blocks_at(at, count, BlockOrigin::File, |mut builder| { - let transfer = Transfer { - from: AccountKeyring::Alice.into(), - to: AccountKeyring::Alice.into(), - amount: 1, - nonce, - }; - builder.push(transfer.into_signed_tx()).unwrap(); - nonce = nonce + 1; - builder.build().unwrap().block - }) + self.generate_blocks_at( + at, + count, + BlockOrigin::File, |mut builder| { + let transfer = Transfer { + from: AccountKeyring::Alice.into(), + to: AccountKeyring::Alice.into(), + amount: 1, + nonce, + }; + builder.push(transfer.into_signed_tx()).unwrap(); + nonce = nonce + 1; + builder.build().unwrap().block + }, + headers_only + ) } else { self.generate_blocks_at( at, count, BlockOrigin::File, |builder| builder.build().unwrap().block, + headers_only, ) } } @@ -748,6 +767,23 @@ pub trait TestNetFactory: Sized { Async::Ready(()) } + /// Polls the testnet until theres' no activiy of any kind. + /// + /// Must be executed in a task context. + fn poll_until_idle(&mut self) -> Async<()> { + self.poll(); + + for peer in self.peers().iter() { + if peer.is_major_syncing() || peer.network.num_queued_blocks() != 0 { + return Async::NotReady + } + if peer.network.num_sync_requests() != 0 { + return Async::NotReady + } + } + Async::Ready(()) + } + /// Blocks the current thread until we are sync'ed. /// /// Calls `poll_until_sync` repeatedly with the runtime passed as parameter. @@ -755,6 +791,13 @@ pub trait TestNetFactory: Sized { runtime.block_on(futures::future::poll_fn::<(), (), _>(|| Ok(self.poll_until_sync()))).unwrap(); } + /// Blocks the current thread until there are no pending packets. + /// + /// Calls `poll_until_idle` repeatedly with the runtime passed as parameter. + fn block_until_idle(&mut self, runtime: &mut tokio::runtime::current_thread::Runtime) { + runtime.block_on(futures::future::poll_fn::<(), (), _>(|| Ok(self.poll_until_idle()))).unwrap(); + } + /// Polls the testnet. Processes all the pending actions and returns `NotReady`. fn poll(&mut self) { self.mut_peers(|peers| { diff --git a/client/network/test/src/sync.rs b/client/network/test/src/sync.rs index 210a4fb38bb..2094ddae60c 100644 --- a/client/network/test/src/sync.rs +++ b/client/network/test/src/sync.rs @@ -660,3 +660,24 @@ fn does_not_sync_announced_old_best_block() { })).unwrap(); assert!(!net.peer(1).is_major_syncing()); } + +#[test] +fn full_sync_requires_block_body() { + // Check that we don't sync headers-only in full mode. + let _ = ::env_logger::try_init(); + let mut runtime = current_thread::Runtime::new().unwrap(); + let mut net = TestNet::new(2); + + net.peer(0).push_headers(1); + // Wait for nodes to connect + runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { + net.poll(); + if net.peer(0).num_peers() == 0 || net.peer(1).num_peers() == 0 { + Ok(Async::NotReady) + } else { + Ok(Async::Ready(())) + } + })).unwrap(); + net.block_until_idle(&mut runtime); + assert_eq!(net.peer(1).client.info().best_number, 0); +} diff --git a/client/state-db/src/lib.rs b/client/state-db/src/lib.rs index 0eab640de84..f670e4f35f3 100644 --- a/client/state-db/src/lib.rs +++ b/client/state-db/src/lib.rs @@ -340,7 +340,7 @@ impl StateDbSync { { let refs = self.pinned.entry(hash.clone()).or_default(); if *refs == 0 { - trace!(target: "state-db", "Pinned block: {:?}", hash); + trace!(target: "state-db-pin", "Pinned block: {:?}", hash); self.non_canonical.pin(hash); } *refs += 1; @@ -357,11 +357,11 @@ impl StateDbSync { Entry::Occupied(mut entry) => { *entry.get_mut() -= 1; if *entry.get() == 0 { - trace!(target: "state-db", "Unpinned block: {:?}", hash); + trace!(target: "state-db-pin", "Unpinned block: {:?}", hash); entry.remove(); self.non_canonical.unpin(hash); } else { - trace!(target: "state-db", "Releasing reference for {:?}", hash); + trace!(target: "state-db-pin", "Releasing reference for {:?}", hash); } }, Entry::Vacant(_) => {}, diff --git a/client/state-db/src/noncanonical.rs b/client/state-db/src/noncanonical.rs index db2f58fa898..de7294d770a 100644 --- a/client/state-db/src/noncanonical.rs +++ b/client/state-db/src/noncanonical.rs @@ -436,7 +436,7 @@ impl NonCanonicalOverlay { while let Some(hash) = parent { let refs = self.pinned.entry(hash.clone()).or_default(); if *refs == 0 { - trace!(target: "state-db", "Pinned non-canon block: {:?}", hash); + trace!(target: "state-db-pin", "Pinned non-canon block: {:?}", hash); } *refs += 1; parent = self.parents.get(hash); @@ -455,7 +455,7 @@ impl NonCanonicalOverlay { if *entry.get() == 0 { entry.remove(); if let Some(inserted) = self.pinned_insertions.remove(&hash) { - trace!(target: "state-db", "Discarding unpinned non-canon block: {:?}", hash); + trace!(target: "state-db-pin", "Discarding unpinned non-canon block: {:?}", hash); discard_values(&mut self.values, inserted); self.parents.remove(&hash); } -- GitLab From 7fff6cb70e2d61b3136b0d51611472a58194fdf3 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Wed, 26 Feb 2020 12:11:32 +0100 Subject: [PATCH 043/106] Make these chainspecs fields private (#5031) --- client/chain-spec/src/chain_spec.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/client/chain-spec/src/chain_spec.rs b/client/chain-spec/src/chain_spec.rs index ab9c851bdde..a7e5738fc4b 100644 --- a/client/chain-spec/src/chain_spec.rs +++ b/client/chain-spec/src/chain_spec.rs @@ -117,8 +117,8 @@ struct ChildRawStorage { #[serde(deny_unknown_fields)] /// Storage content for genesis block. struct RawGenesis { - pub top: GenesisStorage, - pub children: HashMap, + top: GenesisStorage, + children: HashMap, } #[derive(Serialize, Deserialize)] @@ -134,14 +134,14 @@ enum Genesis { #[serde(rename_all = "camelCase")] #[serde(deny_unknown_fields)] struct ClientSpec { - pub name: String, - pub id: String, - pub boot_nodes: Vec, - pub telemetry_endpoints: Option, - pub protocol_id: Option, - pub properties: Option, + name: String, + id: String, + boot_nodes: Vec, + telemetry_endpoints: Option, + protocol_id: Option, + properties: Option, #[serde(flatten)] - pub extensions: E, + extensions: E, // Never used, left only for backward compatibility. consensus_engine: (), #[serde(skip_serializing)] -- GitLab From 78224bd0100570009b65ba3d878ed0e3f84e129a Mon Sep 17 00:00:00 2001 From: Chevdor Date: Wed, 26 Feb 2020 12:12:39 +0100 Subject: [PATCH 044/106] Fix dockerfile (#5059) --- .maintain/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.maintain/Dockerfile b/.maintain/Dockerfile index 7cba85c544a..56bfc7a2cc4 100644 --- a/.maintain/Dockerfile +++ b/.maintain/Dockerfile @@ -1,7 +1,7 @@ # Note: We don't use Alpine and its packaged Rust/Cargo because they're too often out of date, # preventing them from being used to build Substrate/Polkadot. -FROM phusion/baseimage:0.10.2 as builder +FROM phusion/baseimage:0.11 as builder LABEL maintainer="chevdor@gmail.com" LABEL description="This is the build stage for Substrate. Here we create the binary." @@ -26,7 +26,7 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ # ===== SECOND STAGE ====== -FROM phusion/baseimage:0.10.2 +FROM phusion/baseimage:0.11 LABEL maintainer="chevdor@gmail.com" LABEL description="This is the 2nd stage: a very small image where we copy the Substrate binary." ARG PROFILE=release -- GitLab From 4d61dc7a3bfe0daeb227a3d6129d4b809414245a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Wed, 26 Feb 2020 12:14:07 +0100 Subject: [PATCH 045/106] Adds documentation for `wipe` and `commit` (#5053) * Adds documentation for `wipe` and `commit` This adds documentation to `wipe` and `commit` of `Externalities`. Besides that it removes the default implementation that would just panic and requires that all implementers of the trait implement the functions. * Update primitives/externalities/src/lib.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- primitives/externalities/src/lib.rs | 20 ++++++++++++++------ primitives/state-machine/src/basic.rs | 4 ++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/primitives/externalities/src/lib.rs b/primitives/externalities/src/lib.rs index 431e449846c..fa0f9e4454d 100644 --- a/primitives/externalities/src/lib.rs +++ b/primitives/externalities/src/lib.rs @@ -203,13 +203,21 @@ pub trait Externalities: ExtensionStore { /// Returns the SCALE encoded hash. fn storage_changes_root(&mut self, parent: &[u8]) -> Result>, ()>; - fn wipe(&mut self) { - unimplemented!() - } + /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + /// Benchmarking related functionality and shouldn't be used anywhere else! + /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + /// + /// Wipes all changes from caches and the database. + /// + /// The state will be reset to genesis. + fn wipe(&mut self); - fn commit(&mut self) { - unimplemented!() - } + /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + /// Benchmarking related functionality and shouldn't be used anywhere else! + /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + /// + /// Commits all changes to the database and clears all caches. + fn commit(&mut self); } /// Extension for the [`Externalities`] trait. diff --git a/primitives/state-machine/src/basic.rs b/primitives/state-machine/src/basic.rs index d905657737a..966648bc824 100644 --- a/primitives/state-machine/src/basic.rs +++ b/primitives/state-machine/src/basic.rs @@ -298,6 +298,10 @@ impl Externalities for BasicExternalities { fn storage_changes_root(&mut self, _parent: &[u8]) -> Result>, ()> { Ok(None) } + + fn wipe(&mut self) {} + + fn commit(&mut self) {} } impl sp_externalities::ExtensionStore for BasicExternalities { -- GitLab From bad1280e9f8a020661ebf14c63e0fd7df07e3918 Mon Sep 17 00:00:00 2001 From: Denis Pisarev Date: Wed, 26 Feb 2020 12:41:39 +0100 Subject: [PATCH 046/106] Fix the issue with `trybuild`'s `ui` tests (#4992) * repro ui bug * fix the tests * test with the new image * test without CARGO_HOME * test without fixes * test again * fix trybuild old versions * bump CArgo.lock * fix trybuild newest versions * bump Cargo.lock * trying on the latest image * bump Cargo.lock * run with the old image * ci will be green on the image from 2020-02-19 [skip ci] * bump Cargo.lock --- Cargo.lock | 97 +++++++++++++------------ primitives/runtime-interface/Cargo.toml | 2 +- 2 files changed, 51 insertions(+), 48 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b49fdbaf9e0..53e2a5663b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -432,7 +432,7 @@ dependencies = [ "console_log", "futures 0.1.29", "futures 0.3.4", - "futures-timer 3.0.2", + "futures-timer 3.0.1", "js-sys", "kvdb-web", "libp2p", @@ -994,9 +994,9 @@ dependencies = [ [[package]] name = "csv-core" -version = "0.1.10" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +checksum = "9b5cadb6b25c77aeff80ba701712494213f4a8418fcda2ee11b6560c3ad0bf4c" dependencies = [ "memchr", ] @@ -1074,9 +1074,9 @@ checksum = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" [[package]] name = "derive_more" -version = "0.99.3" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a806e96c59a76a5ba6e18735b6cf833344671e61e7863f2edb5c518ea2cac95c" +checksum = "2159be042979966de68315bce7034bb000c775f22e3e834e1c52ff78f041cae8" dependencies = [ "proc-macro2", "quote", @@ -1776,9 +1776,9 @@ checksum = "a1de7508b218029b0f01662ed8f61b1c964b3ae99d6f25462d0f55a595109df6" [[package]] name = "futures-timer" -version = "3.0.2" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "3de1a2b2a2a33d9e60e17980b60ee061eeaae96a5abe9121db0fdb9af167a1c5" dependencies = [ "gloo-timers", "send_wrapper 0.4.0", @@ -2023,18 +2023,18 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2c55f143919fbc0bc77e427fe2d74cf23786d7c1875666f2fde3ac3c659bb67" +checksum = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772" dependencies = [ "libc", ] [[package]] name = "hex" -version = "0.4.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" +checksum = "76cdda6bf525062a0c9e8f14ee2b37935c86b8efb6c8b69b3c83dfb518a914af" [[package]] name = "hex-literal" @@ -2670,7 +2670,7 @@ dependencies = [ "ed25519-dalek", "fnv", "futures 0.3.4", - "futures-timer 3.0.2", + "futures-timer 3.0.1", "lazy_static", "libsecp256k1", "log 0.4.8", @@ -2967,7 +2967,7 @@ checksum = "f9e80ad4e3535345f3d666554ce347d3100453775611c05c60786bf9a1747a10" dependencies = [ "async-std", "futures 0.3.4", - "futures-timer 3.0.2", + "futures-timer 3.0.1", "get_if_addrs", "ipnet", "libp2p-core", @@ -3151,6 +3151,9 @@ name = "memchr" version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" +dependencies = [ + "libc", +] [[package]] name = "memoffset" @@ -4921,9 +4924,9 @@ dependencies = [ [[package]] name = "proc-macro-error" -version = "0.4.9" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052b3c9af39c7e5e94245f820530487d19eb285faedcb40e0c3275132293f242" +checksum = "875077759af22fa20b610ad4471d8155b321c89c3f2785526c9839b099be4e0a" dependencies = [ "proc-macro-error-attr", "proc-macro2", @@ -4934,9 +4937,9 @@ dependencies = [ [[package]] name = "proc-macro-error-attr" -version = "0.4.9" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d175bef481c7902e63e3165627123fff3502f06ac043d3ef42d08c1246da9253" +checksum = "c5717d9fa2664351a01ed73ba5ef6df09c01a521cb42cb65a061432a826f3c7a" dependencies = [ "proc-macro2", "quote", @@ -5582,7 +5585,7 @@ dependencies = [ "derive_more", "env_logger 0.7.1", "futures 0.3.4", - "futures-timer 3.0.2", + "futures-timer 3.0.1", "libp2p", "log 0.4.8", "parity-scale-codec", @@ -5812,7 +5815,7 @@ dependencies = [ "env_logger 0.7.1", "futures 0.1.29", "futures 0.3.4", - "futures-timer 3.0.2", + "futures-timer 3.0.1", "log 0.4.8", "parity-scale-codec", "parking_lot 0.10.0", @@ -5852,7 +5855,7 @@ dependencies = [ "fork-tree", "futures 0.1.29", "futures 0.3.4", - "futures-timer 3.0.2", + "futures-timer 3.0.1", "log 0.4.8", "merlin", "num-bigint", @@ -5984,7 +5987,7 @@ name = "sc-consensus-slots" version = "0.8.0-alpha.1" dependencies = [ "futures 0.3.4", - "futures-timer 3.0.2", + "futures-timer 3.0.1", "log 0.4.8", "parity-scale-codec", "parking_lot 0.10.0", @@ -6103,7 +6106,7 @@ dependencies = [ "fork-tree", "futures 0.1.29", "futures 0.3.4", - "futures-timer 3.0.2", + "futures-timer 3.0.1", "log 0.4.8", "parity-scale-codec", "parking_lot 0.10.0", @@ -6180,7 +6183,7 @@ dependencies = [ "fnv", "fork-tree", "futures 0.3.4", - "futures-timer 3.0.2", + "futures-timer 3.0.1", "futures_codec", "libp2p", "linked-hash-map", @@ -6228,7 +6231,7 @@ name = "sc-network-gossip" version = "0.8.0-alpha.1" dependencies = [ "futures 0.3.4", - "futures-timer 3.0.2", + "futures-timer 3.0.1", "libp2p", "log 0.4.8", "lru", @@ -6245,7 +6248,7 @@ dependencies = [ "env_logger 0.7.1", "futures 0.1.29", "futures 0.3.4", - "futures-timer 3.0.2", + "futures-timer 3.0.1", "libp2p", "log 0.4.8", "parking_lot 0.10.0", @@ -6273,7 +6276,7 @@ dependencies = [ "env_logger 0.7.1", "fnv", "futures 0.3.4", - "futures-timer 3.0.2", + "futures-timer 3.0.1", "hyper 0.13.2", "hyper-rustls", "log 0.4.8", @@ -6403,7 +6406,7 @@ dependencies = [ "futures 0.1.29", "futures 0.3.4", "futures-diagnose", - "futures-timer 3.0.2", + "futures-timer 3.0.1", "lazy_static", "log 0.4.8", "parity-multiaddr 0.5.0", @@ -6484,7 +6487,7 @@ version = "2.0.0-alpha.1" dependencies = [ "bytes 0.5.4", "futures 0.3.4", - "futures-timer 3.0.2", + "futures-timer 3.0.1", "libp2p", "log 0.4.8", "parking_lot 0.10.0", @@ -6590,9 +6593,9 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" [[package]] name = "scroll" @@ -6710,9 +6713,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.48" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" +checksum = "15913895b61e0be854afd32fd4163fcd2a3df34142cf2cb961b310ce694cbf90" dependencies = [ "itoa", "ryu", @@ -7042,7 +7045,7 @@ dependencies = [ "derive_more", "futures 0.3.4", "futures-diagnose", - "futures-timer 3.0.2", + "futures-timer 3.0.1", "libp2p", "log 0.4.8", "parity-scale-codec", @@ -7896,18 +7899,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.11" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee14bf8e6767ab4c687c9e8bc003879e042a96fd67a3ba5934eadb6536bef4db" +checksum = "205684fd018ca14432b12cce6ea3d46763311a571c3d294e71ba3f01adcf1aad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.11" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7b51e1fbc44b5a0840be594fbc0f960be09050f2617e61e6aa43bef97cd3ef4" +checksum = "57e4d2e50ca050ed44fb58309bdce3efa79948f84f9993ad1978de5eebdce5a7" dependencies = [ "proc-macro2", "quote", @@ -8782,9 +8785,9 @@ checksum = "073da89bf1c84db000dd68ce660c1b4a08e3a2d28fd1e3394ab9e7abdde4a0f8" [[package]] name = "wasmparser" -version = "0.51.2" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a40d24f114a3f24b459ec292019220cff6388673b4a2c0a11483665b599ef15c" +checksum = "9e41b27a1677fe28c115de49efca55dabb14f7fece2c32947ffb9b1064fe5bd4" [[package]] name = "wasmtime" @@ -8800,7 +8803,7 @@ dependencies = [ "region", "rustc-demangle", "target-lexicon", - "wasmparser 0.51.2", + "wasmparser 0.51.1", "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", @@ -8820,7 +8823,7 @@ dependencies = [ "more-asserts", "target-lexicon", "thiserror", - "wasmparser 0.51.2", + "wasmparser 0.51.1", "wasmtime-environ", ] @@ -8848,7 +8851,7 @@ dependencies = [ "sha2", "thiserror", "toml", - "wasmparser 0.51.2", + "wasmparser 0.51.1", "winapi 0.3.8", "zstd", ] @@ -8870,7 +8873,7 @@ dependencies = [ "region", "target-lexicon", "thiserror", - "wasmparser 0.51.2", + "wasmparser 0.51.1", "wasmtime-debug", "wasmtime-environ", "wasmtime-runtime", @@ -8898,18 +8901,18 @@ dependencies = [ [[package]] name = "wast" -version = "8.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9df3d716118a503b2f6bbb6ff46b21997ab0cc167b01de7a188e45e4b01e8d" +checksum = "12a729d076deb29c8509fa71f2d427729f9394f9496844ed8fcab152f35d163d" dependencies = [ "leb128", ] [[package]] name = "wat" -version = "1.0.9" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a927b35badc29c97d97e82689eef7f72fc936d884b3391804c1bb6cd2bdccbb" +checksum = "5795e34a4b39893653dec97e644fac85c31398e0ce1abecc48967aac83d9e8ce" dependencies = [ "wast", ] diff --git a/primitives/runtime-interface/Cargo.toml b/primitives/runtime-interface/Cargo.toml index c4071138071..7235d63fb55 100644 --- a/primitives/runtime-interface/Cargo.toml +++ b/primitives/runtime-interface/Cargo.toml @@ -22,7 +22,7 @@ sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-m sp-core = { version = "2.0.0-alpha.1", path = "../core" } sp-io = { version = "2.0.0-alpha.1", path = "../io" } rustversion = "1.0.0" -trybuild = "1.0.17" +trybuild = "1.0.23" [features] default = [ "std" ] -- GitLab From 0f4f9d769ef0e35c9bd7a36f2726b220df833037 Mon Sep 17 00:00:00 2001 From: s3krit Date: Wed, 26 Feb 2020 14:36:02 +0100 Subject: [PATCH 047/106] Activate publishing of draft releases... (#5062) * Activate publishing of draft releases... ... And fix the message sending (missing parameter). * publish_draft_release.sh now checks latest... ... release on github rather than just a tag --- .maintain/gitlab/lib.sh | 8 ++++++++ .maintain/gitlab/publish_draft_release.sh | 8 +++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.maintain/gitlab/lib.sh b/.maintain/gitlab/lib.sh index bc0e06a6d46..c8b2d73e609 100755 --- a/.maintain/gitlab/lib.sh +++ b/.maintain/gitlab/lib.sh @@ -14,6 +14,14 @@ sanitised_git_logs(){ sed 's/^/* /g' } +# Returns the last published release on github +# repo: 'organization/repo' +# Usage: last_github_release "$repo" +last_github_release(){ + curl -H "Authorization: token $GITHUB_RELEASE_TOKEN" \ + -s "$api_base/$1/releases/latest" | jq '.tag_name' +} + # Checks whether a tag on github has been verified # repo: 'organization/repo' # tagver: 'v1.2.3' diff --git a/.maintain/gitlab/publish_draft_release.sh b/.maintain/gitlab/publish_draft_release.sh index 8566827a099..4f73575f5bb 100755 --- a/.maintain/gitlab/publish_draft_release.sh +++ b/.maintain/gitlab/publish_draft_release.sh @@ -11,7 +11,9 @@ labels=( ) version="$CI_COMMIT_TAG" -last_version=$(git tag -l | sort -V | grep -B 1 -x "$version" | head -n 1) + +# Note that this is not the last *tagged* version, but the last *published* version +last_version=$(last_github_release 'paritytech/substrate') echo "[+] Version: $version; Previous version: $last_version" all_changes="$(sanitised_git_logs "$last_version" "$version")" @@ -39,7 +41,7 @@ $labelled_changes" echo "[+] Release text generated: " echo "$release_text" -exit + echo "[+] Pushing release to github" # Create release on github release_name="Substrate $version" @@ -79,6 +81,6 @@ formatted_msg_body=$(cat < Date: Thu, 27 Feb 2020 03:19:53 +1300 Subject: [PATCH 048/106] Fix/div by zero (#5041) * Handle gas_price being zero separately * Bump spec_version * Add a unit & integration tests for gas price = 0 --- bin/node/runtime/src/lib.rs | 4 ++-- frame/contracts/src/gas.rs | 26 ++++++++++++++++++++++++-- frame/contracts/src/tests.rs | 16 ++++++++++++++++ 3 files changed, 42 insertions(+), 4 deletions(-) diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index 980f033024d..730a983a438 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -81,8 +81,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 225, - impl_version: 1, + spec_version: 226, + impl_version: 0, apis: RUNTIME_API_VERSIONS, }; diff --git a/frame/contracts/src/gas.rs b/frame/contracts/src/gas.rs index c8572daaa43..362f15f3aae 100644 --- a/frame/contracts/src/gas.rs +++ b/frame/contracts/src/gas.rs @@ -250,7 +250,11 @@ pub fn refund_unused_gas( pub fn approx_gas_for_balance(gas_price: Balance, balance: Balance) -> Gas where Balance: AtLeast32Bit { - (balance / gas_price).saturated_into::() + if gas_price.is_zero() { + Zero::zero() + } else { + (balance / gas_price).saturated_into::() + } } /// A simple utility macro that helps to match against a @@ -294,7 +298,7 @@ macro_rules! match_tokens { #[cfg(test)] mod tests { use super::{GasMeter, Token}; - use crate::tests::Test; + use crate::{tests::Test, gas::approx_gas_for_balance}; /// A trivial token that charges the specified number of gas units. #[derive(Copy, Clone, PartialEq, Eq, Debug)] @@ -382,4 +386,22 @@ mod tests { let mut gas_meter = GasMeter::::with_limit(25, 10); assert!(!gas_meter.charge(&(), SimpleToken(25)).is_out_of_gas()); } + + // A unit test for `fn approx_gas_for_balance()`, and makes + // sure setting gas_price 0 does not cause `div by zero` error. + #[test] + fn approx_gas_for_balance_works() { + let tests = vec![ + (approx_gas_for_balance(0_u64, 123), 0), + (approx_gas_for_balance(0_u64, 456), 0), + (approx_gas_for_balance(1_u64, 123), 123), + (approx_gas_for_balance(1_u64, 456), 456), + (approx_gas_for_balance(100_u64, 900), 9), + (approx_gas_for_balance(123_u64, 900), 7), + ]; + + for (lhs, rhs) in tests { + assert_eq!(lhs, rhs); + } + } } diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index e775998a3a5..51da3e8d1ff 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -2079,6 +2079,22 @@ fn deploy_and_call_other_contract() { }); } +#[test] +fn deploy_works_without_gas_price() { + let (wasm, code_hash) = compile_module::(CODE_GET_RUNTIME_STORAGE).unwrap(); + ExtBuilder::default().existential_deposit(50).gas_price(0).build().execute_with(|| { + Balances::deposit_creating(&ALICE, 1_000_000); + assert_ok!(Contracts::put_code(Origin::signed(ALICE), 100_000, wasm)); + assert_ok!(Contracts::instantiate( + Origin::signed(ALICE), + 100, + 100_000, + code_hash.into(), + vec![], + )); + }); +} + const CODE_SELF_DESTRUCT: &str = r#" (module (import "env" "ext_scratch_size" (func $ext_scratch_size (result i32))) -- GitLab From 2afecf81ee19b8a6edb364b419190ea47c4a4a31 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Thu, 27 Feb 2020 00:22:44 +0100 Subject: [PATCH 049/106] set missing metadata fields, prepping alpha.2 (#5067) * setting first batch of descriptions * fix what I just broke * next batch * and pallets, too * last batch * set cargo.lock * keep'em dev-deps * bump version to alpha.2 --- Cargo.lock | 298 +++++++++--------- bin/node-template/node/Cargo.toml | 38 +-- bin/node-template/pallets/template/Cargo.toml | 16 +- bin/node-template/runtime/Cargo.toml | 48 +-- bin/node/cli/Cargo.toml | 108 +++---- bin/node/executor/Cargo.toml | 46 +-- bin/node/inspect/Cargo.toml | 14 +- bin/node/primitives/Cargo.toml | 8 +- bin/node/rpc-client/Cargo.toml | 6 +- bin/node/rpc/Cargo.toml | 34 +- bin/node/runtime/Cargo.toml | 104 +++--- bin/node/testing/Cargo.toml | 66 ++-- bin/node/transaction-factory/Cargo.toml | 22 +- bin/utils/chain-spec-builder/Cargo.toml | 8 +- bin/utils/subkey/Cargo.toml | 18 +- client/Cargo.toml | 37 +-- client/api/Cargo.toml | 35 +- client/authority-discovery/Cargo.toml | 21 +- client/basic-authorship/Cargo.toml | 27 +- client/block-builder/Cargo.toml | 20 +- client/chain-spec/Cargo.toml | 13 +- client/chain-spec/derive/Cargo.toml | 3 +- client/cli/Cargo.toml | 28 +- client/consensus/aura/Cargo.toml | 44 +-- client/consensus/babe/Cargo.toml | 54 ++-- client/consensus/babe/rpc/Cargo.toml | 24 +- client/consensus/epochs/Cargo.toml | 10 +- client/consensus/manual-seal/Cargo.toml | 20 +- client/consensus/pow/Cargo.toml | 22 +- client/consensus/slots/Cargo.toml | 20 +- client/consensus/uncles/Cargo.toml | 14 +- client/db/Cargo.toml | 25 +- client/executor/Cargo.toml | 30 +- client/executor/common/Cargo.toml | 14 +- client/executor/runtime-test/Cargo.toml | 12 +- client/executor/wasmi/Cargo.toml | 14 +- client/executor/wasmtime/Cargo.toml | 13 +- client/finality-grandpa/Cargo.toml | 45 +-- client/informant/Cargo.toml | 12 +- client/keystore/Cargo.toml | 9 +- client/network-gossip/Cargo.toml | 8 +- client/network/Cargo.toml | 28 +- client/network/test/Cargo.toml | 18 +- client/offchain/Cargo.toml | 22 +- client/peerset/Cargo.toml | 4 +- client/rpc-api/Cargo.toml | 13 +- client/rpc-servers/Cargo.toml | 5 +- client/rpc/Cargo.toml | 39 +-- client/service/Cargo.toml | 55 ++-- client/service/test/Cargo.toml | 14 +- client/state-db/Cargo.toml | 5 +- client/telemetry/Cargo.toml | 4 +- client/tracing/Cargo.toml | 5 +- client/transaction-pool/Cargo.toml | 19 +- client/transaction-pool/graph/Cargo.toml | 11 +- frame/assets/Cargo.toml | 15 +- frame/aura/Cargo.toml | 27 +- frame/authority-discovery/Cargo.toml | 23 +- frame/authorship/Cargo.toml | 18 +- frame/babe/Cargo.toml | 29 +- frame/balances/Cargo.toml | 19 +- frame/benchmarking/Cargo.toml | 11 +- frame/collective/Cargo.toml | 17 +- frame/contracts/Cargo.toml | 25 +- frame/contracts/common/Cargo.toml | 7 +- frame/contracts/rpc/Cargo.toml | 17 +- frame/contracts/rpc/runtime-api/Cargo.toml | 11 +- frame/democracy/Cargo.toml | 19 +- frame/elections-phragmen/Cargo.toml | 21 +- frame/elections/Cargo.toml | 17 +- frame/evm/Cargo.toml | 19 +- frame/example-offchain-worker/Cargo.toml | 15 +- frame/example/Cargo.toml | 17 +- frame/executive/Cargo.toml | 21 +- frame/finality-tracker/Cargo.toml | 21 +- frame/generic-asset/Cargo.toml | 15 +- frame/grandpa/Cargo.toml | 23 +- frame/identity/Cargo.toml | 19 +- frame/im-online/Cargo.toml | 23 +- frame/indices/Cargo.toml | 19 +- frame/membership/Cargo.toml | 15 +- frame/metadata/Cargo.toml | 7 +- frame/nicks/Cargo.toml | 17 +- frame/offences/Cargo.toml | 19 +- frame/randomness-collective-flip/Cargo.toml | 15 +- frame/recovery/Cargo.toml | 17 +- frame/scored-pool/Cargo.toml | 17 +- frame/session/Cargo.toml | 23 +- frame/society/Cargo.toml | 17 +- frame/staking/Cargo.toml | 33 +- frame/staking/reward-curve/Cargo.toml | 5 +- frame/sudo/Cargo.toml | 15 +- frame/support/Cargo.toml | 23 +- frame/support/procedural/Cargo.toml | 5 +- frame/support/procedural/tools/Cargo.toml | 5 +- .../procedural/tools/derive/Cargo.toml | 3 +- frame/support/test/Cargo.toml | 12 +- frame/system/Cargo.toml | 17 +- frame/system/rpc/runtime-api/Cargo.toml | 5 +- frame/timestamp/Cargo.toml | 25 +- frame/transaction-payment/Cargo.toml | 19 +- frame/transaction-payment/rpc/Cargo.toml | 15 +- .../rpc/runtime-api/Cargo.toml | 11 +- frame/treasury/Cargo.toml | 17 +- frame/utility/Cargo.toml | 19 +- frame/vesting/Cargo.toml | 19 +- primitives/allocator/Cargo.toml | 10 +- primitives/api/Cargo.toml | 15 +- primitives/api/proc-macro/Cargo.toml | 5 +- primitives/api/test/Cargo.toml | 12 +- primitives/application-crypto/Cargo.toml | 10 +- primitives/application-crypto/test/Cargo.toml | 8 +- primitives/arithmetic/Cargo.toml | 9 +- primitives/authority-discovery/Cargo.toml | 10 +- primitives/authorship/Cargo.toml | 8 +- primitives/block-builder/Cargo.toml | 11 +- primitives/blockchain/Cargo.toml | 13 +- primitives/consensus/aura/Cargo.toml | 14 +- primitives/consensus/babe/Cargo.toml | 16 +- primitives/consensus/common/Cargo.toml | 18 +- primitives/consensus/pow/Cargo.toml | 10 +- primitives/core/Cargo.toml | 16 +- primitives/debug-derive/Cargo.toml | 4 +- primitives/externalities/Cargo.toml | 8 +- primitives/finality-grandpa/Cargo.toml | 13 +- primitives/finality-tracker/Cargo.toml | 7 +- primitives/inherents/Cargo.toml | 9 +- primitives/io/Cargo.toml | 19 +- primitives/keyring/Cargo.toml | 9 +- primitives/offchain/Cargo.toml | 6 +- primitives/panic-handler/Cargo.toml | 5 +- primitives/phragmen/Cargo.toml | 11 +- primitives/rpc/Cargo.toml | 5 +- primitives/runtime-interface/Cargo.toml | 18 +- .../runtime-interface/proc-macro/Cargo.toml | 4 +- .../runtime-interface/test-wasm/Cargo.toml | 8 +- primitives/runtime-interface/test/Cargo.toml | 10 +- primitives/runtime/Cargo.toml | 17 +- primitives/sandbox/Cargo.toml | 11 +- primitives/serializer/Cargo.toml | 4 +- primitives/session/Cargo.toml | 11 +- primitives/staking/Cargo.toml | 7 +- primitives/state-machine/Cargo.toml | 11 +- primitives/std/Cargo.toml | 5 +- primitives/storage/Cargo.toml | 7 +- primitives/test-primitives/Cargo.toml | 6 +- primitives/timestamp/Cargo.toml | 11 +- primitives/transaction-pool/Cargo.toml | 9 +- primitives/trie/Cargo.toml | 7 +- primitives/version/Cargo.toml | 9 +- primitives/wasm-interface/Cargo.toml | 6 +- test-utils/Cargo.toml | 2 +- test-utils/client/Cargo.toml | 20 +- test-utils/runtime/Cargo.toml | 52 +-- test-utils/runtime/client/Cargo.toml | 14 +- .../runtime/transaction-pool/Cargo.toml | 8 +- utils/browser/Cargo.toml | 10 +- utils/build-script-utils/Cargo.toml | 3 +- utils/fork-tree/Cargo.toml | 4 +- utils/frame/benchmarking-cli/Cargo.toml | 17 +- utils/frame/rpc/support/Cargo.toml | 11 +- utils/frame/rpc/system/Cargo.toml | 19 +- utils/prometheus/Cargo.toml | 2 +- 163 files changed, 1643 insertions(+), 1474 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 53e2a5663b0..757b9ad0800 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -424,7 +424,7 @@ dependencies = [ [[package]] name = "browser-utils" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "chrono", "clear_on_drop", @@ -598,7 +598,7 @@ dependencies = [ [[package]] name = "chain-spec-builder" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "ansi_term 0.12.1", "node-cli", @@ -1442,14 +1442,14 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "parity-scale-codec", ] [[package]] name = "frame-benchmarking" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "parity-scale-codec", "sp-api", @@ -1460,7 +1460,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-benchmarking", "parity-scale-codec", @@ -1475,7 +1475,7 @@ dependencies = [ [[package]] name = "frame-executive" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -1493,7 +1493,7 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "11.0.0-alpha.1" +version = "11.0.0-alpha.2" dependencies = [ "parity-scale-codec", "serde", @@ -1503,7 +1503,7 @@ dependencies = [ [[package]] name = "frame-support" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "bitmask", "frame-metadata", @@ -1528,7 +1528,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support-procedural-tools", "proc-macro2", @@ -1538,7 +1538,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -1549,7 +1549,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "proc-macro2", "quote", @@ -1574,7 +1574,7 @@ dependencies = [ [[package]] name = "frame-system" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "criterion 0.2.11", "frame-support", @@ -1592,7 +1592,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "parity-scale-codec", "sp-api", @@ -3345,7 +3345,7 @@ dependencies = [ [[package]] name = "node-cli" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "assert_cmd", "browser-utils", @@ -3416,7 +3416,7 @@ dependencies = [ [[package]] name = "node-executor" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "criterion 0.3.1", "frame-benchmarking", @@ -3449,7 +3449,7 @@ dependencies = [ [[package]] name = "node-inspect" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "derive_more", "log 0.4.8", @@ -3465,7 +3465,7 @@ dependencies = [ [[package]] name = "node-primitives" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "pretty_assertions", "sp-core", @@ -3475,7 +3475,7 @@ dependencies = [ [[package]] name = "node-rpc" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "jsonrpc-core", "node-primitives", @@ -3498,7 +3498,7 @@ dependencies = [ [[package]] name = "node-rpc-client" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "env_logger 0.7.1", "futures 0.1.29", @@ -3511,7 +3511,7 @@ dependencies = [ [[package]] name = "node-runtime" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-benchmarking", "frame-executive", @@ -3573,7 +3573,7 @@ dependencies = [ [[package]] name = "node-template" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "futures 0.3.4", "log 0.4.8", @@ -3601,7 +3601,7 @@ dependencies = [ [[package]] name = "node-template-runtime" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-executive", "frame-support", @@ -3633,7 +3633,7 @@ dependencies = [ [[package]] name = "node-testing" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "criterion 0.3.1", "frame-support", @@ -3678,7 +3678,7 @@ dependencies = [ [[package]] name = "node-transaction-factory" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "log 0.4.8", "parity-scale-codec", @@ -3852,7 +3852,7 @@ dependencies = [ [[package]] name = "pallet-assets" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -3866,7 +3866,7 @@ dependencies = [ [[package]] name = "pallet-aura" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -3888,7 +3888,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -3906,7 +3906,7 @@ dependencies = [ [[package]] name = "pallet-authorship" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -3922,7 +3922,7 @@ dependencies = [ [[package]] name = "pallet-babe" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -3947,7 +3947,7 @@ dependencies = [ [[package]] name = "pallet-balances" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-benchmarking", "frame-support", @@ -3963,7 +3963,7 @@ dependencies = [ [[package]] name = "pallet-collective" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -3979,7 +3979,7 @@ dependencies = [ [[package]] name = "pallet-contracts" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "assert_matches", "frame-support", @@ -4004,7 +4004,7 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -4013,7 +4013,7 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4032,7 +4032,7 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc-runtime-api" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "pallet-contracts-primitives", "parity-scale-codec", @@ -4043,7 +4043,7 @@ dependencies = [ [[package]] name = "pallet-democracy" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4060,7 +4060,7 @@ dependencies = [ [[package]] name = "pallet-elections" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4076,7 +4076,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4094,7 +4094,7 @@ dependencies = [ [[package]] name = "pallet-evm" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "evm", "frame-support", @@ -4114,7 +4114,7 @@ dependencies = [ [[package]] name = "pallet-example" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4129,7 +4129,7 @@ dependencies = [ [[package]] name = "pallet-example-offchain-worker" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4144,7 +4144,7 @@ dependencies = [ [[package]] name = "pallet-finality-tracker" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4161,7 +4161,7 @@ dependencies = [ [[package]] name = "pallet-generic-asset" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4175,7 +4175,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4193,7 +4193,7 @@ dependencies = [ [[package]] name = "pallet-identity" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4210,7 +4210,7 @@ dependencies = [ [[package]] name = "pallet-im-online" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4228,7 +4228,7 @@ dependencies = [ [[package]] name = "pallet-indices" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4244,7 +4244,7 @@ dependencies = [ [[package]] name = "pallet-membership" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4258,7 +4258,7 @@ dependencies = [ [[package]] name = "pallet-nicks" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4273,7 +4273,7 @@ dependencies = [ [[package]] name = "pallet-offences" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4289,7 +4289,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4303,7 +4303,7 @@ dependencies = [ [[package]] name = "pallet-recovery" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "enumflags2", "frame-support", @@ -4319,7 +4319,7 @@ dependencies = [ [[package]] name = "pallet-scored-pool" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4334,7 +4334,7 @@ dependencies = [ [[package]] name = "pallet-session" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4354,7 +4354,7 @@ dependencies = [ [[package]] name = "pallet-society" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4370,7 +4370,7 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4393,7 +4393,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -4404,7 +4404,7 @@ dependencies = [ [[package]] name = "pallet-sudo" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4418,7 +4418,7 @@ dependencies = [ [[package]] name = "pallet-template" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4431,7 +4431,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-benchmarking", "frame-support", @@ -4449,7 +4449,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4464,7 +4464,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4481,7 +4481,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "parity-scale-codec", @@ -4494,7 +4494,7 @@ dependencies = [ [[package]] name = "pallet-treasury" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4509,7 +4509,7 @@ dependencies = [ [[package]] name = "pallet-utility" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -4524,7 +4524,7 @@ dependencies = [ [[package]] name = "pallet-vesting" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "enumflags2", "frame-support", @@ -4990,7 +4990,7 @@ dependencies = [ [[package]] name = "prometheus-exporter" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "async-std", "derive_more", @@ -5579,7 +5579,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "bytes 0.5.4", "derive_more", @@ -5608,7 +5608,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "futures 0.3.4", "log 0.4.8", @@ -5632,7 +5632,7 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -5647,7 +5647,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "impl-trait-for-tuples", "sc-chain-spec-derive", @@ -5661,7 +5661,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5671,7 +5671,7 @@ dependencies = [ [[package]] name = "sc-cli" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "ansi_term 0.12.1", "app_dirs", @@ -5710,7 +5710,7 @@ dependencies = [ [[package]] name = "sc-client" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "derive_more", "env_logger 0.7.1", @@ -5747,7 +5747,7 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "derive_more", "fnv", @@ -5778,7 +5778,7 @@ dependencies = [ [[package]] name = "sc-client-db" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "env_logger 0.7.1", "hash-db", @@ -5809,7 +5809,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "derive_more", "env_logger 0.7.1", @@ -5848,7 +5848,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "derive_more", "env_logger 0.7.1", @@ -5899,7 +5899,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "derive_more", "futures 0.3.4", @@ -5924,7 +5924,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "fork-tree", "parity-scale-codec", @@ -5936,7 +5936,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "derive_more", "env_logger 0.7.1", @@ -5964,7 +5964,7 @@ dependencies = [ [[package]] name = "sc-consensus-pow" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "derive_more", "futures 0.3.4", @@ -5984,7 +5984,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "futures 0.3.4", "futures-timer 3.0.1", @@ -6005,7 +6005,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "log 0.4.8", "sc-client-api", @@ -6018,7 +6018,7 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "assert_matches", "derive_more", @@ -6051,7 +6051,7 @@ dependencies = [ [[package]] name = "sc-executor-common" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "derive_more", "log 0.4.8", @@ -6066,7 +6066,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "log 0.4.8", "parity-scale-codec", @@ -6081,7 +6081,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "assert_matches", "log 0.4.8", @@ -6098,7 +6098,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "assert_matches", "env_logger 0.7.1", @@ -6139,7 +6139,7 @@ dependencies = [ [[package]] name = "sc-informant" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "ansi_term 0.12.1", "futures 0.3.4", @@ -6155,7 +6155,7 @@ dependencies = [ [[package]] name = "sc-keystore" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "derive_more", "hex", @@ -6170,7 +6170,7 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "assert_matches", "async-std", @@ -6228,7 +6228,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "futures 0.3.4", "futures-timer 3.0.1", @@ -6270,7 +6270,7 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "bytes 0.5.4", "env_logger 0.7.1", @@ -6301,7 +6301,7 @@ dependencies = [ [[package]] name = "sc-peerset" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "futures 0.3.4", "libp2p", @@ -6313,7 +6313,7 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "assert_matches", "futures 0.1.29", @@ -6350,7 +6350,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "derive_more", "futures 0.3.4", @@ -6372,7 +6372,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "jsonrpc-core", "jsonrpc-http-server", @@ -6399,7 +6399,7 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "derive_more", "exit-future", @@ -6472,7 +6472,7 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "env_logger 0.7.1", "log 0.4.8", @@ -6483,7 +6483,7 @@ dependencies = [ [[package]] name = "sc-telemetry" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "bytes 0.5.4", "futures 0.3.4", @@ -6504,7 +6504,7 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "erased-serde", "log 0.4.8", @@ -6519,7 +6519,7 @@ dependencies = [ [[package]] name = "sc-transaction-graph" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "assert_matches", "criterion 0.3.1", @@ -6541,7 +6541,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "derive_more", "futures 0.3.4", @@ -6902,7 +6902,7 @@ checksum = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" [[package]] name = "sp-allocator" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "derive_more", "log 0.4.8", @@ -6913,7 +6913,7 @@ dependencies = [ [[package]] name = "sp-api" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "hash-db", "parity-scale-codec", @@ -6928,7 +6928,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "blake2-rfc", "proc-macro-crate", @@ -6956,7 +6956,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "parity-scale-codec", "serde", @@ -6978,7 +6978,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "criterion 0.3.1", "integer-sqrt", @@ -6993,7 +6993,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "parity-scale-codec", "sp-api", @@ -7004,7 +7004,7 @@ dependencies = [ [[package]] name = "sp-authorship" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -7014,7 +7014,7 @@ dependencies = [ [[package]] name = "sp-block-builder" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "parity-scale-codec", "sp-api", @@ -7025,7 +7025,7 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "derive_more", "log 0.4.8", @@ -7040,7 +7040,7 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "derive_more", "futures 0.3.4", @@ -7062,7 +7062,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "parity-scale-codec", "sp-api", @@ -7075,7 +7075,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -7090,7 +7090,7 @@ dependencies = [ [[package]] name = "sp-consensus-pow" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "parity-scale-codec", "sp-api", @@ -7101,7 +7101,7 @@ dependencies = [ [[package]] name = "sp-core" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "base58", "blake2-rfc", @@ -7145,7 +7145,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "proc-macro2", "quote", @@ -7154,7 +7154,7 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "environmental", "sp-std", @@ -7163,7 +7163,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "parity-scale-codec", "serde", @@ -7175,7 +7175,7 @@ dependencies = [ [[package]] name = "sp-finality-tracker" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -7184,7 +7184,7 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "derive_more", "parity-scale-codec", @@ -7195,7 +7195,7 @@ dependencies = [ [[package]] name = "sp-io" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "hash-db", "libsecp256k1", @@ -7212,7 +7212,7 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "lazy_static", "sp-core", @@ -7222,7 +7222,7 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "sp-api", "sp-runtime", @@ -7230,7 +7230,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "backtrace", "log 0.4.8", @@ -7238,7 +7238,7 @@ dependencies = [ [[package]] name = "sp-phragmen" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "rand 0.7.3", "serde", @@ -7250,7 +7250,7 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "serde", "serde_json", @@ -7259,7 +7259,7 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "impl-trait-for-tuples", "log 0.4.8", @@ -7279,7 +7279,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "parity-scale-codec", "primitive-types", @@ -7298,7 +7298,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "Inflector", "proc-macro-crate", @@ -7332,7 +7332,7 @@ dependencies = [ [[package]] name = "sp-sandbox" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "assert_matches", "parity-scale-codec", @@ -7346,7 +7346,7 @@ dependencies = [ [[package]] name = "sp-serializer" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "serde", "serde_json", @@ -7354,7 +7354,7 @@ dependencies = [ [[package]] name = "sp-session" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "sp-api", "sp-core", @@ -7364,7 +7364,7 @@ dependencies = [ [[package]] name = "sp-staking" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -7373,7 +7373,7 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" dependencies = [ "hash-db", "hex-literal", @@ -7392,11 +7392,11 @@ dependencies = [ [[package]] name = "sp-std" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" [[package]] name = "sp-storage" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "impl-serde 0.2.3", "serde", @@ -7418,7 +7418,7 @@ dependencies = [ [[package]] name = "sp-timestamp" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7431,7 +7431,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "derive_more", "futures 0.3.4", @@ -7444,7 +7444,7 @@ dependencies = [ [[package]] name = "sp-trie" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "criterion 0.2.11", "hash-db", @@ -7461,7 +7461,7 @@ dependencies = [ [[package]] name = "sp-version" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "impl-serde 0.2.3", "parity-scale-codec", @@ -7472,7 +7472,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7578,7 +7578,7 @@ dependencies = [ [[package]] name = "subkey" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "clap", "derive_more", @@ -7620,11 +7620,11 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" [[package]] name = "substrate-frame-rpc-support" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "frame-support", "frame-system", @@ -7640,7 +7640,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" dependencies = [ "env_logger 0.7.1", "frame-system-rpc-runtime-api", @@ -7755,7 +7755,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" [[package]] name = "substrate-wasm-builder" diff --git a/bin/node-template/node/Cargo.toml b/bin/node-template/node/Cargo.toml index 4933b778db1..42dcc8ac501 100644 --- a/bin/node-template/node/Cargo.toml +++ b/bin/node-template/node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-template" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Anonymous"] edition = "2018" license = "Unlicense" @@ -16,25 +16,25 @@ futures = "0.3.1" log = "0.4.8" structopt = "0.3.8" -sc-cli = { version = "0.8.0-alpha.1", path = "../../../client/cli" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sc-executor = { version = "0.8.0-alpha.1", path = "../../../client/executor" } -sc-service = { version = "0.8.0-alpha.1", path = "../../../client/service" } -sp-inherents = { version = "2.0.0-alpha.1", path = "../../../primitives/inherents" } -sc-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../client/transaction-pool" } -sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../primitives/transaction-pool" } -sc-network = { version = "0.8.0-alpha.1", path = "../../../client/network" } -sc-consensus-aura = { version = "0.8.0-alpha.1", path = "../../../client/consensus/aura" } -sp-consensus-aura = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/aura" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } -grandpa = { version = "0.8.0-alpha.1", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" } -grandpa-primitives = { version = "2.0.0-alpha.1", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" } -sc-client = { version = "0.8.0-alpha.1", path = "../../../client/" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -sc-basic-authorship = { path = "../../../client/basic-authorship" , version = "0.8.0-alpha.1"} +sc-cli = { version = "0.8.0-alpha.2", path = "../../../client/cli" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sc-executor = { version = "0.8.0-alpha.2", path = "../../../client/executor" } +sc-service = { version = "0.8.0-alpha.2", path = "../../../client/service" } +sp-inherents = { version = "2.0.0-alpha.2", path = "../../../primitives/inherents" } +sc-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../client/transaction-pool" } +sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../primitives/transaction-pool" } +sc-network = { version = "0.8.0-alpha.2", path = "../../../client/network" } +sc-consensus-aura = { version = "0.8.0-alpha.2", path = "../../../client/consensus/aura" } +sp-consensus-aura = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/aura" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } +grandpa = { version = "0.8.0-alpha.2", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" } +grandpa-primitives = { version = "2.0.0-alpha.2", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" } +sc-client = { version = "0.8.0-alpha.2", path = "../../../client/" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +sc-basic-authorship = { path = "../../../client/basic-authorship" , version = "0.8.0-alpha.2"} -node-template-runtime = { version = "2.0.0-alpha.1", path = "../runtime" } +node-template-runtime = { version = "2.0.0-alpha.2", path = "../runtime" } [build-dependencies] vergen = "3.0.4" -build-script-utils = { version = "2.0.0-alpha.1", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } +build-script-utils = { version = "2.0.0-alpha.2", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } diff --git a/bin/node-template/pallets/template/Cargo.toml b/bin/node-template/pallets/template/Cargo.toml index bd08787f1aa..93e13c5505b 100644 --- a/bin/node-template/pallets/template/Cargo.toml +++ b/bin/node-template/pallets/template/Cargo.toml @@ -2,9 +2,11 @@ authors = ['Anonymous'] edition = '2018' name = 'pallet-template' -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" +license = "Unlicense" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME pallet template" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } @@ -12,30 +14,30 @@ safe-mix = { default-features = false, version = '1.0.0' } [dependencies.frame-support] default-features = false -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" path = "../../../../frame/support" [dependencies.system] default-features = false package = 'frame-system' -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" path = "../../../../frame/system" - [dev-dependencies.sp-core] default-features = false -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" path = "../../../../primitives/core" [dev-dependencies.sp-io] default-features = false -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" path = "../../../../primitives/io" [dev-dependencies.sp-runtime] default-features = false -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" path = "../../../../primitives/runtime" + [features] default = ['std'] std = [ diff --git a/bin/node-template/runtime/Cargo.toml b/bin/node-template/runtime/Cargo.toml index 049953ecead..e6b14f1a501 100644 --- a/bin/node-template/runtime/Cargo.toml +++ b/bin/node-template/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-template-runtime" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Anonymous"] edition = "2018" license = "Unlicense" @@ -10,31 +10,31 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -aura = { version = "2.0.0-alpha.1", default-features = false, package = "pallet-aura", path = "../../../frame/aura" } -balances = { version = "2.0.0-alpha.1", default-features = false, package = "pallet-balances", path = "../../../frame/balances" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/support" } -grandpa = { version = "2.0.0-alpha.1", default-features = false, package = "pallet-grandpa", path = "../../../frame/grandpa" } -randomness-collective-flip = { version = "2.0.0-alpha.1", default-features = false, package = "pallet-randomness-collective-flip", path = "../../../frame/randomness-collective-flip" } -sudo = { version = "2.0.0-alpha.1", default-features = false, package = "pallet-sudo", path = "../../../frame/sudo" } -system = { version = "2.0.0-alpha.1", default-features = false, package = "frame-system", path = "../../../frame/system" } -timestamp = { version = "2.0.0-alpha.1", default-features = false, package = "pallet-timestamp", path = "../../../frame/timestamp" } -transaction-payment = { version = "2.0.0-alpha.1", default-features = false, package = "pallet-transaction-payment", path = "../../../frame/transaction-payment" } -frame-executive = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/executive" } +aura = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-aura", path = "../../../frame/aura" } +balances = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-balances", path = "../../../frame/balances" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/support" } +grandpa = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-grandpa", path = "../../../frame/grandpa" } +randomness-collective-flip = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-randomness-collective-flip", path = "../../../frame/randomness-collective-flip" } +sudo = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-sudo", path = "../../../frame/sudo" } +system = { version = "2.0.0-alpha.2", default-features = false, package = "frame-system", path = "../../../frame/system" } +timestamp = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-timestamp", path = "../../../frame/timestamp" } +transaction-payment = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-transaction-payment", path = "../../../frame/transaction-payment" } +frame-executive = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/executive" } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/api" } -sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0-alpha.1"} -sp-consensus-aura = { version = "0.8.0-alpha.1", default-features = false, path = "../../../primitives/consensus/aura" } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/core" } -sp-inherents = { path = "../../../primitives/inherents", default-features = false, version = "2.0.0-alpha.1"} -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/io" } -sp-offchain = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/offchain" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/runtime" } -sp-session = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/session" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/std" } -sp-transaction-pool = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/transaction-pool" } -sp-version = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/version" } +sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/api" } +sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0-alpha.2"} +sp-consensus-aura = { version = "0.8.0-alpha.2", default-features = false, path = "../../../primitives/consensus/aura" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/core" } +sp-inherents = { path = "../../../primitives/inherents", default-features = false, version = "2.0.0-alpha.2"} +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/io" } +sp-offchain = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/offchain" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/runtime" } +sp-session = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/session" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/std" } +sp-transaction-pool = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/transaction-pool" } +sp-version = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/version" } -template = { version = "2.0.0-alpha.1", default-features = false, path = "../pallets/template", package = "pallet-template" } +template = { version = "2.0.0-alpha.2", default-features = false, path = "../pallets/template", package = "pallet-template" } [build-dependencies] wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" } diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml index 1aa49414bdd..ca3665cf184 100644 --- a/bin/node/cli/Cargo.toml +++ b/bin/node/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-cli" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] description = "Substrate node implementation in Rust." build = "build.rs" @@ -42,68 +42,68 @@ structopt = { version = "0.3.8", optional = true } tracing = "0.1.10" # primitives -sp-authority-discovery = { version = "2.0.0-alpha.1", path = "../../../primitives/authority-discovery" } -sp-consensus-babe = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/babe" } -grandpa-primitives = { version = "2.0.0-alpha.1", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -sp-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/timestamp" } -sp-finality-tracker = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/finality-tracker" } -sp-inherents = { version = "2.0.0-alpha.1", path = "../../../primitives/inherents" } -sp-keyring = { version = "2.0.0-alpha.1", path = "../../../primitives/keyring" } -sp-io = { version = "2.0.0-alpha.1", path = "../../../primitives/io" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } +sp-authority-discovery = { version = "2.0.0-alpha.2", path = "../../../primitives/authority-discovery" } +sp-consensus-babe = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/babe" } +grandpa-primitives = { version = "2.0.0-alpha.2", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +sp-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/timestamp" } +sp-finality-tracker = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/finality-tracker" } +sp-inherents = { version = "2.0.0-alpha.2", path = "../../../primitives/inherents" } +sp-keyring = { version = "2.0.0-alpha.2", path = "../../../primitives/keyring" } +sp-io = { version = "2.0.0-alpha.2", path = "../../../primitives/io" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } # client dependencies -sc-client-api = { version = "2.0.0-alpha.1", path = "../../../client/api" } -sc-client = { version = "0.8.0-alpha.1", path = "../../../client/" } -sc-chain-spec = { version = "2.0.0-alpha.1", path = "../../../client/chain-spec" } -sc-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../client/transaction-pool" } -sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../primitives/transaction-pool" } -sc-network = { version = "0.8.0-alpha.1", path = "../../../client/network" } -sc-consensus-babe = { version = "0.8.0-alpha.1", path = "../../../client/consensus/babe" } -grandpa = { version = "0.8.0-alpha.1", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" } -sc-client-db = { version = "0.8.0-alpha.1", default-features = false, path = "../../../client/db" } -sc-offchain = { version = "2.0.0-alpha.1", path = "../../../client/offchain" } -sc-rpc = { version = "2.0.0-alpha.1", path = "../../../client/rpc" } -sc-basic-authorship = { version = "0.8.0-alpha.1", path = "../../../client/basic-authorship" } -sc-service = { version = "0.8.0-alpha.1", default-features = false, path = "../../../client/service" } -sc-tracing = { version = "2.0.0-alpha.1", path = "../../../client/tracing" } -sc-telemetry = { version = "2.0.0-alpha.1", path = "../../../client/telemetry" } -sc-authority-discovery = { version = "0.8.0-alpha.1", path = "../../../client/authority-discovery" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api" } +sc-client = { version = "0.8.0-alpha.2", path = "../../../client/" } +sc-chain-spec = { version = "2.0.0-alpha.2", path = "../../../client/chain-spec" } +sc-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../client/transaction-pool" } +sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../primitives/transaction-pool" } +sc-network = { version = "0.8.0-alpha.2", path = "../../../client/network" } +sc-consensus-babe = { version = "0.8.0-alpha.2", path = "../../../client/consensus/babe" } +grandpa = { version = "0.8.0-alpha.2", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" } +sc-client-db = { version = "0.8.0-alpha.2", default-features = false, path = "../../../client/db" } +sc-offchain = { version = "2.0.0-alpha.2", path = "../../../client/offchain" } +sc-rpc = { version = "2.0.0-alpha.2", path = "../../../client/rpc" } +sc-basic-authorship = { version = "0.8.0-alpha.2", path = "../../../client/basic-authorship" } +sc-service = { version = "0.8.0-alpha.2", default-features = false, path = "../../../client/service" } +sc-tracing = { version = "2.0.0-alpha.2", path = "../../../client/tracing" } +sc-telemetry = { version = "2.0.0-alpha.2", path = "../../../client/telemetry" } +sc-authority-discovery = { version = "0.8.0-alpha.2", path = "../../../client/authority-discovery" } # frame dependencies -pallet-indices = { version = "2.0.0-alpha.1", path = "../../../frame/indices" } -pallet-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/timestamp" } -pallet-contracts = { version = "2.0.0-alpha.1", path = "../../../frame/contracts" } -frame-system = { version = "2.0.0-alpha.1", path = "../../../frame/system" } -pallet-balances = { version = "2.0.0-alpha.1", path = "../../../frame/balances" } -pallet-transaction-payment = { version = "2.0.0-alpha.1", path = "../../../frame/transaction-payment" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/support" } -pallet-im-online = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/im-online" } -pallet-authority-discovery = { version = "2.0.0-alpha.1", path = "../../../frame/authority-discovery" } +pallet-indices = { version = "2.0.0-alpha.2", path = "../../../frame/indices" } +pallet-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/timestamp" } +pallet-contracts = { version = "2.0.0-alpha.2", path = "../../../frame/contracts" } +frame-system = { version = "2.0.0-alpha.2", path = "../../../frame/system" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../../../frame/balances" } +pallet-transaction-payment = { version = "2.0.0-alpha.2", path = "../../../frame/transaction-payment" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/support" } +pallet-im-online = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/im-online" } +pallet-authority-discovery = { version = "2.0.0-alpha.2", path = "../../../frame/authority-discovery" } # node-specific dependencies -node-runtime = { version = "2.0.0-alpha.1", path = "../runtime" } -node-rpc = { version = "2.0.0-alpha.1", path = "../rpc" } -node-primitives = { version = "2.0.0-alpha.1", path = "../primitives" } -node-executor = { version = "2.0.0-alpha.1", path = "../executor" } +node-runtime = { version = "2.0.0-alpha.2", path = "../runtime" } +node-rpc = { version = "2.0.0-alpha.2", path = "../rpc" } +node-primitives = { version = "2.0.0-alpha.2", path = "../primitives" } +node-executor = { version = "2.0.0-alpha.2", path = "../executor" } # CLI-specific dependencies -sc-cli = { version = "0.8.0-alpha.1", optional = true, path = "../../../client/cli" } -frame-benchmarking-cli = { version = "2.0.0-alpha.1", optional = true, path = "../../../utils/frame/benchmarking-cli" } -node-transaction-factory = { version = "0.8.0-alpha.1", optional = true, path = "../transaction-factory" } -node-inspect = { version = "0.8.0-alpha.1", optional = true, path = "../inspect" } +sc-cli = { version = "0.8.0-alpha.2", optional = true, path = "../../../client/cli" } +frame-benchmarking-cli = { version = "2.0.0-alpha.2", optional = true, path = "../../../utils/frame/benchmarking-cli" } +node-transaction-factory = { version = "0.8.0-alpha.2", optional = true, path = "../transaction-factory" } +node-inspect = { version = "0.8.0-alpha.2", optional = true, path = "../inspect" } # WASM-specific dependencies wasm-bindgen = { version = "0.2.57", optional = true } wasm-bindgen-futures = { version = "0.4.7", optional = true } -browser-utils = { path = "../../../utils/browser", optional = true , version = "0.8.0-alpha.1"} +browser-utils = { path = "../../../utils/browser", optional = true , version = "0.8.0-alpha.2"} [dev-dependencies] -sc-keystore = { version = "2.0.0-alpha.1", path = "../../../client/keystore" } -sc-consensus-babe = { version = "0.8.0-alpha.1", features = ["test-helpers"], path = "../../../client/consensus/babe" } -sc-consensus-epochs = { version = "0.8.0-alpha.1", path = "../../../client/consensus/epochs" } +sc-keystore = { version = "2.0.0-alpha.2", path = "../../../client/keystore" } +sc-consensus-babe = { version = "0.8.0-alpha.2", features = ["test-helpers"], path = "../../../client/consensus/babe" } +sc-consensus-epochs = { version = "0.8.0-alpha.2", path = "../../../client/consensus/epochs" } sc-service-test = { version = "2.0.0-dev", path = "../../../client/service/test" } futures = "0.3.1" tempfile = "3.1.0" @@ -112,14 +112,14 @@ nix = "0.17" serde_json = "1.0" [build-dependencies] -build-script-utils = { version = "2.0.0-alpha.1", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } +build-script-utils = { version = "2.0.0-alpha.2", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } structopt = { version = "0.3.8", optional = true } -node-transaction-factory = { version = "0.8.0-alpha.1", optional = true, path = "../transaction-factory" } -node-inspect = { version = "0.8.0-alpha.1", optional = true, path = "../inspect" } -frame-benchmarking-cli = { version = "2.0.0-alpha.1", optional = true, path = "../../../utils/frame/benchmarking-cli" } +node-transaction-factory = { version = "0.8.0-alpha.2", optional = true, path = "../transaction-factory" } +node-inspect = { version = "0.8.0-alpha.2", optional = true, path = "../inspect" } +frame-benchmarking-cli = { version = "2.0.0-alpha.2", optional = true, path = "../../../utils/frame/benchmarking-cli" } [build-dependencies.sc-cli] -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" package = "sc-cli" path = "../../../client/cli" optional = true diff --git a/bin/node/executor/Cargo.toml b/bin/node/executor/Cargo.toml index a4eacbb822b..94bd13954a4 100644 --- a/bin/node/executor/Cargo.toml +++ b/bin/node/executor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-executor" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] description = "Substrate node implementation in Rust." edition = "2018" @@ -10,32 +10,32 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0" } -node-primitives = { version = "2.0.0-alpha.1", path = "../primitives" } -node-runtime = { version = "2.0.0-alpha.1", path = "../runtime" } -sc-executor = { version = "0.8.0-alpha.1", path = "../../../client/executor" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-io = { version = "2.0.0-alpha.1", path = "../../../primitives/io" } -sp-state-machine = { version = "0.8.0-alpha.1", path = "../../../primitives/state-machine" } -sp-trie = { version = "2.0.0-alpha.1", path = "../../../primitives/trie" } +node-primitives = { version = "2.0.0-alpha.2", path = "../primitives" } +node-runtime = { version = "2.0.0-alpha.2", path = "../runtime" } +sc-executor = { version = "0.8.0-alpha.2", path = "../../../client/executor" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-io = { version = "2.0.0-alpha.2", path = "../../../primitives/io" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../../../primitives/state-machine" } +sp-trie = { version = "2.0.0-alpha.2", path = "../../../primitives/trie" } trie-root = "0.16.0" -frame-benchmarking = { version = "2.0.0-alpha.1", path = "../../../frame/benchmarking" } +frame-benchmarking = { version = "2.0.0-alpha.2", path = "../../../frame/benchmarking" } [dev-dependencies] criterion = "0.3.0" -frame-support = { version = "2.0.0-alpha.1", path = "../../../frame/support" } -frame-system = { version = "2.0.0-alpha.1", path = "../../../frame/system" } -node-testing = { version = "2.0.0-alpha.1", path = "../testing" } -pallet-balances = { version = "2.0.0-alpha.1", path = "../../../frame/balances" } -pallet-contracts = { version = "2.0.0-alpha.1", path = "../../../frame/contracts" } -pallet-grandpa = { version = "2.0.0-alpha.1", path = "../../../frame/grandpa" } -pallet-im-online = { version = "2.0.0-alpha.1", path = "../../../frame/im-online" } -pallet-indices = { version = "2.0.0-alpha.1", path = "../../../frame/indices" } -pallet-session = { version = "2.0.0-alpha.1", path = "../../../frame/session" } -pallet-timestamp = { version = "2.0.0-alpha.1", path = "../../../frame/timestamp" } -pallet-transaction-payment = { version = "2.0.0-alpha.1", path = "../../../frame/transaction-payment" } -pallet-treasury = { version = "2.0.0-alpha.1", path = "../../../frame/treasury" } -sp-application-crypto = { version = "2.0.0-alpha.1", path = "../../../primitives/application-crypto" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.2", path = "../../../frame/support" } +frame-system = { version = "2.0.0-alpha.2", path = "../../../frame/system" } +node-testing = { version = "2.0.0-alpha.2", path = "../testing" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../../../frame/balances" } +pallet-contracts = { version = "2.0.0-alpha.2", path = "../../../frame/contracts" } +pallet-grandpa = { version = "2.0.0-alpha.2", path = "../../../frame/grandpa" } +pallet-im-online = { version = "2.0.0-alpha.2", path = "../../../frame/im-online" } +pallet-indices = { version = "2.0.0-alpha.2", path = "../../../frame/indices" } +pallet-session = { version = "2.0.0-alpha.2", path = "../../../frame/session" } +pallet-timestamp = { version = "2.0.0-alpha.2", path = "../../../frame/timestamp" } +pallet-transaction-payment = { version = "2.0.0-alpha.2", path = "../../../frame/transaction-payment" } +pallet-treasury = { version = "2.0.0-alpha.2", path = "../../../frame/treasury" } +sp-application-crypto = { version = "2.0.0-alpha.2", path = "../../../primitives/application-crypto" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } substrate-test-client = { version = "2.0.0-dev", path = "../../../test-utils/client" } wabt = "0.9.2" diff --git a/bin/node/inspect/Cargo.toml b/bin/node/inspect/Cargo.toml index 353daf7a4f2..218c38d0af9 100644 --- a/bin/node/inspect/Cargo.toml +++ b/bin/node/inspect/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-inspect" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -11,10 +11,10 @@ repository = "https://github.com/paritytech/substrate/" codec = { package = "parity-scale-codec", version = "1.0.0" } derive_more = "0.99" log = "0.4.8" -sc-cli = { version = "0.8.0-alpha.1", path = "../../../client/cli" } -sc-client-api = { version = "2.0.0-alpha.1", path = "../../../client/api" } -sc-service = { version = "0.8.0-alpha.1", default-features = false, path = "../../../client/service" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sc-cli = { version = "0.8.0-alpha.2", path = "../../../client/cli" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api" } +sc-service = { version = "0.8.0-alpha.2", default-features = false, path = "../../../client/service" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } structopt = "0.3.8" diff --git a/bin/node/primitives/Cargo.toml b/bin/node/primitives/Cargo.toml index d82fc49059d..0e053c90413 100644 --- a/bin/node/primitives/Cargo.toml +++ b/bin/node/primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-primitives" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,11 +8,11 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/runtime" } [dev-dependencies] -sp-serializer = { version = "2.0.0-alpha.1", path = "../../../primitives/serializer" } +sp-serializer = { version = "2.0.0-alpha.2", path = "../../../primitives/serializer" } pretty_assertions = "0.6.1" [features] diff --git a/bin/node/rpc-client/Cargo.toml b/bin/node/rpc-client/Cargo.toml index 029f79695a5..d5d5dd90d8e 100644 --- a/bin/node/rpc-client/Cargo.toml +++ b/bin/node/rpc-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-rpc-client" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -13,5 +13,5 @@ futures = "0.1.29" hyper = "0.12.35" jsonrpc-core-client = { version = "14.0.3", features = ["http", "ws"] } log = "0.4.8" -node-primitives = { version = "2.0.0-alpha.1", path = "../primitives" } -sc-rpc = { version = "2.0.0-alpha.1", path = "../../../client/rpc" } +node-primitives = { version = "2.0.0-alpha.2", path = "../primitives" } +sc-rpc = { version = "2.0.0-alpha.2", path = "../../../client/rpc" } diff --git a/bin/node/rpc/Cargo.toml b/bin/node/rpc/Cargo.toml index 88dd8b7e826..28143b3bc36 100644 --- a/bin/node/rpc/Cargo.toml +++ b/bin/node/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-rpc" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,20 +8,20 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-client = { version = "0.8.0-alpha.1", path = "../../../client/" } +sc-client = { version = "0.8.0-alpha.2", path = "../../../client/" } jsonrpc-core = "14.0.3" -node-primitives = { version = "2.0.0-alpha.1", path = "../primitives" } -node-runtime = { version = "2.0.0-alpha.1", path = "../runtime" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } -pallet-contracts-rpc = { version = "0.8.0-alpha.1", path = "../../../frame/contracts/rpc/" } -pallet-transaction-payment-rpc = { version = "2.0.0-alpha.1", path = "../../../frame/transaction-payment/rpc/" } -substrate-frame-rpc-system = { version = "2.0.0-alpha.1", path = "../../../utils/frame/rpc/system" } -sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../primitives/transaction-pool" } -sc-consensus-babe = { version = "0.8.0-alpha.1", path = "../../../client/consensus/babe" } -sc-consensus-babe-rpc = { version = "0.8.0-alpha.1", path = "../../../client/consensus/babe/rpc" } -sp-consensus-babe = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/babe" } -sc-keystore = { version = "2.0.0-alpha.1", path = "../../../client/keystore" } -sc-consensus-epochs = { version = "0.8.0-alpha.1", path = "../../../client/consensus/epochs" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } +node-primitives = { version = "2.0.0-alpha.2", path = "../primitives" } +node-runtime = { version = "2.0.0-alpha.2", path = "../runtime" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +sp-api = { version = "2.0.0-alpha.2", path = "../../../primitives/api" } +pallet-contracts-rpc = { version = "0.8.0-alpha.2", path = "../../../frame/contracts/rpc/" } +pallet-transaction-payment-rpc = { version = "2.0.0-alpha.2", path = "../../../frame/transaction-payment/rpc/" } +substrate-frame-rpc-system = { version = "2.0.0-alpha.2", path = "../../../utils/frame/rpc/system" } +sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../primitives/transaction-pool" } +sc-consensus-babe = { version = "0.8.0-alpha.2", path = "../../../client/consensus/babe" } +sc-consensus-babe-rpc = { version = "0.8.0-alpha.2", path = "../../../client/consensus/babe/rpc" } +sp-consensus-babe = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/babe" } +sc-keystore = { version = "2.0.0-alpha.2", path = "../../../client/keystore" } +sc-consensus-epochs = { version = "0.8.0-alpha.2", path = "../../../client/consensus/epochs" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } diff --git a/bin/node/runtime/Cargo.toml b/bin/node/runtime/Cargo.toml index 6e2fd1fdb39..4151f45b8e2 100644 --- a/bin/node/runtime/Cargo.toml +++ b/bin/node/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-runtime" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" @@ -17,64 +17,64 @@ rustc-hex = { version = "2.0", optional = true } serde = { version = "1.0.102", optional = true } # primitives -sp-authority-discovery = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/authority-discovery" } -sp-consensus-babe = { version = "0.8.0-alpha.1", default-features = false, path = "../../../primitives/consensus/babe" } -sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0-alpha.1"} -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/inherents" } -node-primitives = { version = "2.0.0-alpha.1", default-features = false, path = "../primitives" } -sp-offchain = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/offchain" } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/core" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/std" } -sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/api" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/runtime" } -sp-staking = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/staking" } -sp-keyring = { version = "2.0.0-alpha.1", optional = true, path = "../../../primitives/keyring" } -sp-session = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/session" } -sp-transaction-pool = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/transaction-pool" } -sp-version = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/version" } +sp-authority-discovery = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/authority-discovery" } +sp-consensus-babe = { version = "0.8.0-alpha.2", default-features = false, path = "../../../primitives/consensus/babe" } +sp-block-builder = { path = "../../../primitives/block-builder", default-features = false, version = "2.0.0-alpha.2"} +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/inherents" } +node-primitives = { version = "2.0.0-alpha.2", default-features = false, path = "../primitives" } +sp-offchain = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/offchain" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/core" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/std" } +sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/api" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/runtime" } +sp-staking = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/staking" } +sp-keyring = { version = "2.0.0-alpha.2", optional = true, path = "../../../primitives/keyring" } +sp-session = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/session" } +sp-transaction-pool = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/transaction-pool" } +sp-version = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/version" } # frame dependencies -frame-executive = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/executive" } -frame-benchmarking = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/benchmarking" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/system" } -frame-system-rpc-runtime-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/system/rpc/runtime-api/" } -pallet-authority-discovery = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/authority-discovery" } -pallet-authorship = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/authorship" } -pallet-babe = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/babe" } -pallet-balances = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/balances" } -pallet-collective = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/collective" } -pallet-contracts = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/contracts" } -pallet-contracts-primitives = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/contracts/common/" } -pallet-contracts-rpc-runtime-api = { version = "0.8.0-alpha.1", default-features = false, path = "../../../frame/contracts/rpc/runtime-api/" } -pallet-democracy = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/democracy" } -pallet-elections-phragmen = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/elections-phragmen" } -pallet-finality-tracker = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/finality-tracker" } -pallet-grandpa = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/grandpa" } -pallet-im-online = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/im-online" } -pallet-indices = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/indices" } -pallet-identity = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/identity" } -pallet-membership = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/membership" } -pallet-offences = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/offences" } -pallet-randomness-collective-flip = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/randomness-collective-flip" } -pallet-recovery = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/recovery" } -pallet-session = { version = "2.0.0-alpha.1", features = ["historical"], path = "../../../frame/session", default-features = false } -pallet-staking = { version = "2.0.0-alpha.1", features = ["migrate"], path = "../../../frame/staking", default-features = false } -pallet-staking-reward-curve = { version = "2.0.0-alpha.1", path = "../../../frame/staking/reward-curve" } -pallet-sudo = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/sudo" } -pallet-society = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/society" } -pallet-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/timestamp" } -pallet-treasury = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/treasury" } -pallet-utility = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/utility" } -pallet-transaction-payment = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/transaction-payment" } -pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/transaction-payment/rpc/runtime-api/" } -pallet-vesting = { version = "2.0.0-alpha.1", default-features = false, path = "../../../frame/vesting" } +frame-executive = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/executive" } +frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/benchmarking" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/system" } +frame-system-rpc-runtime-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/system/rpc/runtime-api/" } +pallet-authority-discovery = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/authority-discovery" } +pallet-authorship = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/authorship" } +pallet-babe = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/babe" } +pallet-balances = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/balances" } +pallet-collective = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/collective" } +pallet-contracts = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/contracts" } +pallet-contracts-primitives = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/contracts/common/" } +pallet-contracts-rpc-runtime-api = { version = "0.8.0-alpha.2", default-features = false, path = "../../../frame/contracts/rpc/runtime-api/" } +pallet-democracy = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/democracy" } +pallet-elections-phragmen = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/elections-phragmen" } +pallet-finality-tracker = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/finality-tracker" } +pallet-grandpa = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/grandpa" } +pallet-im-online = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/im-online" } +pallet-indices = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/indices" } +pallet-identity = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/identity" } +pallet-membership = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/membership" } +pallet-offences = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/offences" } +pallet-randomness-collective-flip = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/randomness-collective-flip" } +pallet-recovery = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/recovery" } +pallet-session = { version = "2.0.0-alpha.2", features = ["historical"], path = "../../../frame/session", default-features = false } +pallet-staking = { version = "2.0.0-alpha.2", features = ["migrate"], path = "../../../frame/staking", default-features = false } +pallet-staking-reward-curve = { version = "2.0.0-alpha.2", path = "../../../frame/staking/reward-curve" } +pallet-sudo = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/sudo" } +pallet-society = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/society" } +pallet-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/timestamp" } +pallet-treasury = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/treasury" } +pallet-utility = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/utility" } +pallet-transaction-payment = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/transaction-payment" } +pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/transaction-payment/rpc/runtime-api/" } +pallet-vesting = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/vesting" } [build-dependencies] wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" } [dev-dependencies] -sp-io = { version = "2.0.0-alpha.1", path = "../../../primitives/io" } +sp-io = { version = "2.0.0-alpha.2", path = "../../../primitives/io" } [features] default = ["std"] diff --git a/bin/node/testing/Cargo.toml b/bin/node/testing/Cargo.toml index 0187fc83be2..3e8a4c4d1fe 100644 --- a/bin/node/testing/Cargo.toml +++ b/bin/node/testing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-testing" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] description = "Test utilities for Substrate node." edition = "2018" @@ -10,47 +10,47 @@ repository = "https://github.com/paritytech/substrate/" publish = true [dependencies] -pallet-balances = { version = "2.0.0-alpha.1", path = "../../../frame/balances" } -sc-client = { version = "0.8.0-alpha.1", path = "../../../client/" } -sc-client-db = { version = "0.8.0-alpha.1", path = "../../../client/db/", features = ["kvdb-rocksdb"] } -sc-client-api = { version = "2.0.0-alpha.1", path = "../../../client/api/" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../../../frame/balances" } +sc-client = { version = "0.8.0-alpha.2", path = "../../../client/" } +sc-client-db = { version = "0.8.0-alpha.2", path = "../../../client/db/", features = ["kvdb-rocksdb"] } +sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api/" } codec = { package = "parity-scale-codec", version = "1.0.0" } -pallet-contracts = { version = "2.0.0-alpha.1", path = "../../../frame/contracts" } -pallet-grandpa = { version = "2.0.0-alpha.1", path = "../../../frame/grandpa" } -pallet-indices = { version = "2.0.0-alpha.1", path = "../../../frame/indices" } -sp-keyring = { version = "2.0.0-alpha.1", path = "../../../primitives/keyring" } -node-executor = { version = "2.0.0-alpha.1", path = "../executor" } -node-primitives = { version = "2.0.0-alpha.1", path = "../primitives" } -node-runtime = { version = "2.0.0-alpha.1", path = "../runtime" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-io = { version = "2.0.0-alpha.1", path = "../../../primitives/io" } -frame-support = { version = "2.0.0-alpha.1", path = "../../../frame/support" } -pallet-session = { version = "2.0.0-alpha.1", path = "../../../frame/session" } -pallet-society = { version = "2.0.0-alpha.1", path = "../../../frame/society" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -pallet-staking = { version = "2.0.0-alpha.1", path = "../../../frame/staking" } -sc-executor = { version = "0.8.0-alpha.1", path = "../../../client/executor", features = ["wasmtime"] } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } -frame-system = { version = "2.0.0-alpha.1", path = "../../../frame/system" } +pallet-contracts = { version = "2.0.0-alpha.2", path = "../../../frame/contracts" } +pallet-grandpa = { version = "2.0.0-alpha.2", path = "../../../frame/grandpa" } +pallet-indices = { version = "2.0.0-alpha.2", path = "../../../frame/indices" } +sp-keyring = { version = "2.0.0-alpha.2", path = "../../../primitives/keyring" } +node-executor = { version = "2.0.0-alpha.2", path = "../executor" } +node-primitives = { version = "2.0.0-alpha.2", path = "../primitives" } +node-runtime = { version = "2.0.0-alpha.2", path = "../runtime" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-io = { version = "2.0.0-alpha.2", path = "../../../primitives/io" } +frame-support = { version = "2.0.0-alpha.2", path = "../../../frame/support" } +pallet-session = { version = "2.0.0-alpha.2", path = "../../../frame/session" } +pallet-society = { version = "2.0.0-alpha.2", path = "../../../frame/society" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +pallet-staking = { version = "2.0.0-alpha.2", path = "../../../frame/staking" } +sc-executor = { version = "0.8.0-alpha.2", path = "../../../client/executor", features = ["wasmtime"] } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } +frame-system = { version = "2.0.0-alpha.2", path = "../../../frame/system" } substrate-test-client = { version = "2.0.0-dev", path = "../../../test-utils/client" } -pallet-timestamp = { version = "2.0.0-alpha.1", path = "../../../frame/timestamp" } -pallet-transaction-payment = { version = "2.0.0-alpha.1", path = "../../../frame/transaction-payment" } -pallet-treasury = { version = "2.0.0-alpha.1", path = "../../../frame/treasury" } +pallet-timestamp = { version = "2.0.0-alpha.2", path = "../../../frame/timestamp" } +pallet-transaction-payment = { version = "2.0.0-alpha.2", path = "../../../frame/transaction-payment" } +pallet-treasury = { version = "2.0.0-alpha.2", path = "../../../frame/treasury" } wabt = "0.9.2" -sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } -sp-finality-tracker = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/finality-tracker" } -sp-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/timestamp" } -sp-block-builder = { version = "2.0.0-alpha.1", path = "../../../primitives/block-builder" } -sp-inherents = { version = "2.0.0-alpha.1", path = "../../../primitives/inherents" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } +sp-api = { version = "2.0.0-alpha.2", path = "../../../primitives/api" } +sp-finality-tracker = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/finality-tracker" } +sp-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/timestamp" } +sp-block-builder = { version = "2.0.0-alpha.2", path = "../../../primitives/block-builder" } +sp-inherents = { version = "2.0.0-alpha.2", path = "../../../primitives/inherents" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } log = "0.4.8" tempfile = "3.1.0" fs_extra = "1" [dev-dependencies] criterion = "0.3.0" -sc-cli = { version = "0.8.0-alpha.1", path = "../../../client/cli" } -sc-service = { version = "0.8.0-alpha.1", path = "../../../client/service", features = ["rocksdb"] } +sc-cli = { version = "0.8.0-alpha.2", path = "../../../client/cli" } +sc-service = { version = "0.8.0-alpha.2", path = "../../../client/service", features = ["rocksdb"] } [[bench]] name = "import" diff --git a/bin/node/transaction-factory/Cargo.toml b/bin/node/transaction-factory/Cargo.toml index b73f5b65824..8a033ad4c13 100644 --- a/bin/node/transaction-factory/Cargo.toml +++ b/bin/node/transaction-factory/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-transaction-factory" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -8,15 +8,15 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-block-builder = { version = "2.0.0-alpha.1", path = "../../../primitives/block-builder" } -sc-cli = { version = "0.8.0-alpha.1", path = "../../../client/cli" } -sc-client-api = { version = "2.0.0-alpha.1", path = "../../../client/api" } -sc-client = { version = "0.8.0-alpha.1", path = "../../../client" } +sp-block-builder = { version = "2.0.0-alpha.2", path = "../../../primitives/block-builder" } +sc-cli = { version = "0.8.0-alpha.2", path = "../../../client/cli" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api" } +sc-client = { version = "0.8.0-alpha.2", path = "../../../client" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } log = "0.4.8" -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -sc-service = { version = "0.8.0-alpha.1", path = "../../../client/service" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-api = { version = "2.0.0-alpha.2", path = "../../../primitives/api" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +sc-service = { version = "0.8.0-alpha.2", path = "../../../client/service" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } diff --git a/bin/utils/chain-spec-builder/Cargo.toml b/bin/utils/chain-spec-builder/Cargo.toml index 328bc5e064a..22924f88528 100644 --- a/bin/utils/chain-spec-builder/Cargo.toml +++ b/bin/utils/chain-spec-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chain-spec-builder" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" @@ -10,8 +10,8 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] ansi_term = "0.12.1" -sc-keystore = { version = "2.0.0-alpha.1", path = "../../../client/keystore" } -node-cli = { version = "2.0.0-alpha.1", path = "../../node/cli" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sc-keystore = { version = "2.0.0-alpha.2", path = "../../../client/keystore" } +node-cli = { version = "2.0.0-alpha.2", path = "../../node/cli" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } rand = "0.7.2" structopt = "0.3.8" diff --git a/bin/utils/subkey/Cargo.toml b/bin/utils/subkey/Cargo.toml index 49a57d7de02..a6c239c6d75 100644 --- a/bin/utils/subkey/Cargo.toml +++ b/bin/utils/subkey/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subkey" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" @@ -9,10 +9,10 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] futures = "0.1.29" -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -node-runtime = { version = "2.0.0-alpha.1", path = "../../node/runtime" } -node-primitives = { version = "2.0.0-alpha.1", path = "../../node/primitives" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +node-runtime = { version = "2.0.0-alpha.2", path = "../../node/runtime" } +node-primitives = { version = "2.0.0-alpha.2", path = "../../node/primitives" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } rand = "0.7.2" clap = "2.33.0" tiny-bip39 = "0.7" @@ -21,13 +21,13 @@ substrate-bip39 = "0.3.1" hex = "0.4.0" hex-literal = "0.2.1" codec = { package = "parity-scale-codec", version = "1.0.0" } -frame-system = { version = "2.0.0-alpha.1", path = "../../../frame/system" } -pallet-balances = { version = "2.0.0-alpha.1", path = "../../../frame/balances" } -pallet-transaction-payment = { version = "2.0.0-alpha.1", path = "../../../frame/transaction-payment" } +frame-system = { version = "2.0.0-alpha.2", path = "../../../frame/system" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../../../frame/balances" } +pallet-transaction-payment = { version = "2.0.0-alpha.2", path = "../../../frame/transaction-payment" } rpassword = "4.0.1" itertools = "0.8.2" derive_more = { version = "0.99.2" } -sc-rpc = { version = "2.0.0-alpha.1", path = "../../../client/rpc" } +sc-rpc = { version = "2.0.0-alpha.2", path = "../../../client/rpc" } jsonrpc-core-client = { version = "14.0.3", features = ["http"] } hyper = "0.12.35" libp2p = "0.16.1" diff --git a/client/Cargo.toml b/client/Cargo.toml index 0ae03b56ef4..09fa6a2aaf2 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -1,38 +1,39 @@ [package] name = "sc-client" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate Client and associated logic." [dependencies] -sc-block-builder = { version = "0.8.0-alpha.1", path = "block-builder" } -sc-client-api = { version = "2.0.0-alpha.1", path = "api" } +sc-block-builder = { version = "0.8.0-alpha.2", path = "block-builder" } +sc-client-api = { version = "2.0.0-alpha.2", path = "api" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -sp-consensus = { version = "0.8.0-alpha.1", path = "../primitives/consensus/common" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../primitives/consensus/common" } derive_more = { version = "0.99.2" } -sc-executor = { version = "0.8.0-alpha.1", path = "executor" } -sp-externalities = { version = "0.8.0-alpha.1", path = "../primitives/externalities" } +sc-executor = { version = "0.8.0-alpha.2", path = "executor" } +sp-externalities = { version = "0.8.0-alpha.2", path = "../primitives/externalities" } fnv = { version = "1.0.6" } futures = { version = "0.3.1", features = ["compat"] } hash-db = { version = "0.15.2" } hex-literal = { version = "0.2.1" } -sp-inherents = { version = "2.0.0-alpha.1", path = "../primitives/inherents" } -sp-keyring = { version = "2.0.0-alpha.1", path = "../primitives/keyring" } +sp-inherents = { version = "2.0.0-alpha.2", path = "../primitives/inherents" } +sp-keyring = { version = "2.0.0-alpha.2", path = "../primitives/keyring" } kvdb = "0.4.0" log = { version = "0.4.8" } parking_lot = "0.10.0" -sp-core = { version = "2.0.0-alpha.1", path = "../primitives/core" } -sp-std = { version = "2.0.0-alpha.1", path = "../primitives/std" } -sp-version = { version = "2.0.0-alpha.1", path = "../primitives/version" } -sp-api = { version = "2.0.0-alpha.1", path = "../primitives/api" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../primitives/runtime" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../primitives/blockchain" } -sp-state-machine = { version = "0.8.0-alpha.1", path = "../primitives/state-machine" } -sc-telemetry = { version = "2.0.0-alpha.1", path = "telemetry" } -sp-trie = { version = "2.0.0-alpha.1", path = "../primitives/trie" } +sp-core = { version = "2.0.0-alpha.2", path = "../primitives/core" } +sp-std = { version = "2.0.0-alpha.2", path = "../primitives/std" } +sp-version = { version = "2.0.0-alpha.2", path = "../primitives/version" } +sp-api = { version = "2.0.0-alpha.2", path = "../primitives/api" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../primitives/runtime" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../primitives/blockchain" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../primitives/state-machine" } +sc-telemetry = { version = "2.0.0-alpha.2", path = "telemetry" } +sp-trie = { version = "2.0.0-alpha.2", path = "../primitives/trie" } tracing = "0.1.10" [dev-dependencies] @@ -40,4 +41,4 @@ env_logger = "0.7.0" tempfile = "3.1.0" substrate-test-runtime-client = { version = "2.0.0-dev", path = "../test-utils/runtime/client" } kvdb-memorydb = "0.4.0" -sp-panic-handler = { version = "2.0.0-alpha.1", path = "../primitives/panic-handler" } +sp-panic-handler = { version = "2.0.0-alpha.2", path = "../primitives/panic-handler" } diff --git a/client/api/Cargo.toml b/client/api/Cargo.toml index 6256a99bb88..f1d3478c472 100644 --- a/client/api/Cargo.toml +++ b/client/api/Cargo.toml @@ -1,37 +1,40 @@ [package] name = "sc-client-api" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate client interfaces." +documentation = "https://docs.rs/sc-client-api" + [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/common" } derive_more = { version = "0.99.2" } -sc-executor = { version = "0.8.0-alpha.1", path = "../executor" } -sp-externalities = { version = "0.8.0-alpha.1", path = "../../primitives/externalities" } +sc-executor = { version = "0.8.0-alpha.2", path = "../executor" } +sp-externalities = { version = "0.8.0-alpha.2", path = "../../primitives/externalities" } fnv = { version = "1.0.6" } futures = { version = "0.3.1" } hash-db = { version = "0.15.2", default-features = false } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" } hex-literal = { version = "0.2.1" } -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } -sp-keyring = { version = "2.0.0-alpha.1", path = "../../primitives/keyring" } +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/inherents" } +sp-keyring = { version = "2.0.0-alpha.2", path = "../../primitives/keyring" } kvdb = "0.4.0" log = { version = "0.4.8" } parking_lot = "0.10.0" -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-version = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/version" } -sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } -sc-telemetry = { version = "2.0.0-alpha.1", path = "../telemetry" } -sp-trie = { version = "2.0.0-alpha.1", path = "../../primitives/trie" } -sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../primitives/transaction-pool" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-version = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/version" } +sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../../primitives/state-machine" } +sc-telemetry = { version = "2.0.0-alpha.2", path = "../telemetry" } +sp-trie = { version = "2.0.0-alpha.2", path = "../../primitives/trie" } +sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../primitives/transaction-pool" } [dev-dependencies] sp-test-primitives = { version = "2.0.0-dev", path = "../../primitives/test-primitives" } diff --git a/client/authority-discovery/Cargo.toml b/client/authority-discovery/Cargo.toml index 95e0d78240e..a262730d600 100644 --- a/client/authority-discovery/Cargo.toml +++ b/client/authority-discovery/Cargo.toml @@ -1,12 +1,13 @@ [package] name = "sc-authority-discovery" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate authority discovery." [build-dependencies] prost-build = "0.6.1" @@ -21,18 +22,18 @@ libp2p = { version = "0.16.1", default-features = false, features = ["secp256k1" log = "0.4.8" prost = "0.6.1" rand = "0.7.2" -sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } -sc-keystore = { version = "2.0.0-alpha.1", path = "../keystore" } -sc-network = { version = "0.8.0-alpha.1", path = "../network" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } +sc-keystore = { version = "2.0.0-alpha.2", path = "../keystore" } +sc-network = { version = "0.8.0-alpha.2", path = "../network" } serde_json = "1.0.41" -sp-authority-discovery = { version = "2.0.0-alpha.1", path = "../../primitives/authority-discovery" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } -sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } +sp-authority-discovery = { version = "2.0.0-alpha.2", path = "../../primitives/authority-discovery" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } +sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api" } [dev-dependencies] env_logger = "0.7.0" quickcheck = "0.9.0" -sc-peerset = { version = "2.0.0-alpha.1", path = "../peerset" } +sc-peerset = { version = "2.0.0-alpha.2", path = "../peerset" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client"} diff --git a/client/basic-authorship/Cargo.toml b/client/basic-authorship/Cargo.toml index 971279297ac..c3fb8799bba 100644 --- a/client/basic-authorship/Cargo.toml +++ b/client/basic-authorship/Cargo.toml @@ -1,30 +1,31 @@ [package] name = "sc-basic-authorship" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Basic implementation of block-authoring logic." [dependencies] log = "0.4.8" futures = "0.3.1" codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } -sc-client = { version = "0.8.0-alpha.1", path = "../" } -sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } -sp-inherents = { version = "2.0.0-alpha.1", path = "../../primitives/inherents" } -sc-telemetry = { version = "2.0.0-alpha.1", path = "../telemetry" } -sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../primitives/transaction-pool" } -sc-block-builder = { version = "0.8.0-alpha.1", path = "../block-builder" } +sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" } +sc-client = { version = "0.8.0-alpha.2", path = "../" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/common" } +sp-inherents = { version = "2.0.0-alpha.2", path = "../../primitives/inherents" } +sc-telemetry = { version = "2.0.0-alpha.2", path = "../telemetry" } +sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../primitives/transaction-pool" } +sc-block-builder = { version = "0.8.0-alpha.2", path = "../block-builder" } tokio-executor = { version = "0.2.0-alpha.6", features = ["blocking"] } [dev-dependencies] -sc-transaction-pool = { version = "2.0.0-alpha.1", path = "../../client/transaction-pool" } +sc-transaction-pool = { version = "2.0.0-alpha.2", path = "../../client/transaction-pool" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } parking_lot = "0.10.0" diff --git a/client/block-builder/Cargo.toml b/client/block-builder/Cargo.toml index 94b7640d2f5..ee8c1c8ae05 100644 --- a/client/block-builder/Cargo.toml +++ b/client/block-builder/Cargo.toml @@ -1,19 +1,21 @@ [package] name = "sc-block-builder" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate block builder" + [dependencies] -sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } -sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -sp-block-builder = { version = "2.0.0-alpha.1", path = "../../primitives/block-builder" } -sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../../primitives/state-machine" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } +sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/common" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sp-block-builder = { version = "2.0.0-alpha.2", path = "../../primitives/block-builder" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } codec = { package = "parity-scale-codec", version = "1.0.6", features = ["derive"] } diff --git a/client/chain-spec/Cargo.toml b/client/chain-spec/Cargo.toml index e1fc4fbc20c..4f6e4be6a1f 100644 --- a/client/chain-spec/Cargo.toml +++ b/client/chain-spec/Cargo.toml @@ -1,18 +1,19 @@ [package] name = "sc-chain-spec" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate chain configurations." [dependencies] -sc-chain-spec-derive = { version = "2.0.0-alpha.1", path = "./derive" } +sc-chain-spec-derive = { version = "2.0.0-alpha.2", path = "./derive" } impl-trait-for-tuples = "0.1.3" -sc-network = { version = "0.8.0-alpha.1", path = "../network" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sc-network = { version = "0.8.0-alpha.2", path = "../network" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } serde = { version = "1.0.101", features = ["derive"] } serde_json = "1.0.41" -sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } -sc-telemetry = { version = "2.0.0-alpha.1", path = "../telemetry" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } +sc-telemetry = { version = "2.0.0-alpha.2", path = "../telemetry" } diff --git a/client/chain-spec/derive/Cargo.toml b/client/chain-spec/derive/Cargo.toml index 61fe7e9df0e..77532f92615 100644 --- a/client/chain-spec/derive/Cargo.toml +++ b/client/chain-spec/derive/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "sc-chain-spec-derive" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Macros to derive chain spec extension traits implementation." [lib] proc-macro = true diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index 9c724296389..4066e1136b9 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-cli" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] description = "Substrate CLI interface." edition = "2018" @@ -23,21 +23,21 @@ tokio = { version = "0.2.9", features = [ "signal", "rt-core", "rt-threaded" ] } futures = "0.3.1" fdlimit = "0.1.1" serde_json = "1.0.41" -sc-informant = { version = "0.8.0-alpha.1", path = "../informant" } -sp-panic-handler = { version = "2.0.0-alpha.1", path = "../../primitives/panic-handler" } -sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } -sc-network = { version = "0.8.0-alpha.1", path = "../network" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -sc-service = { version = "0.8.0-alpha.1", default-features = false, path = "../service" } -sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } -sc-telemetry = { version = "2.0.0-alpha.1", path = "../telemetry" } -prometheus-exporter = { path = "../../utils/prometheus" , version = "0.8.0-alpha.1"} -sp-keyring = { version = "2.0.0-alpha.1", path = "../../primitives/keyring" } +sc-informant = { version = "0.8.0-alpha.2", path = "../informant" } +sp-panic-handler = { version = "2.0.0-alpha.2", path = "../../primitives/panic-handler" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" } +sc-network = { version = "0.8.0-alpha.2", path = "../network" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sc-service = { version = "0.8.0-alpha.2", default-features = false, path = "../service" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../../primitives/state-machine" } +sc-telemetry = { version = "2.0.0-alpha.2", path = "../telemetry" } +prometheus-exporter = { path = "../../utils/prometheus" , version = "0.8.0-alpha.2"} +sp-keyring = { version = "2.0.0-alpha.2", path = "../../primitives/keyring" } names = "0.11.0" structopt = "0.3.8" -sc-tracing = { version = "2.0.0-alpha.1", path = "../tracing" } +sc-tracing = { version = "2.0.0-alpha.2", path = "../tracing" } chrono = "0.4.10" parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } diff --git a/client/consensus/aura/Cargo.toml b/client/consensus/aura/Cargo.toml index 420b0e30053..41b1f4c460b 100644 --- a/client/consensus/aura/Cargo.toml +++ b/client/consensus/aura/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-aura" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] description = "Aura consensus algorithm for substrate" edition = "2018" @@ -9,36 +9,36 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0-alpha.1", path = "../../../primitives/application-crypto" } -sp-consensus-aura = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/aura" } -sp-block-builder = { version = "2.0.0-alpha.1", path = "../../../primitives/block-builder" } -sc-client = { version = "0.8.0-alpha.1", path = "../../" } -sc-client-api = { version = "2.0.0-alpha.1", path = "../../api" } +sp-application-crypto = { version = "2.0.0-alpha.2", path = "../../../primitives/application-crypto" } +sp-consensus-aura = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/aura" } +sp-block-builder = { version = "2.0.0-alpha.2", path = "../../../primitives/block-builder" } +sc-client = { version = "0.8.0-alpha.2", path = "../../" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../../api" } codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } derive_more = "0.99.2" futures = "0.3.1" futures-timer = "3.0.1" -sp-inherents = { version = "2.0.0-alpha.1", path = "../../../primitives/inherents" } -sc-keystore = { version = "2.0.0-alpha.1", path = "../../keystore" } +sp-inherents = { version = "2.0.0-alpha.2", path = "../../../primitives/inherents" } +sc-keystore = { version = "2.0.0-alpha.2", path = "../../keystore" } log = "0.4.8" parking_lot = "0.10.0" -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } -sp-io = { version = "2.0.0-alpha.1", path = "../../../primitives/io" } -sp-version = { version = "2.0.0-alpha.1", path = "../../../primitives/version" } -sc-consensus-slots = { version = "0.8.0-alpha.1", path = "../slots" } -sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -sp-timestamp = { version = "2.0.0-alpha.1", path = "../../../primitives/timestamp" } -sc-telemetry = { version = "2.0.0-alpha.1", path = "../../telemetry" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } +sp-io = { version = "2.0.0-alpha.2", path = "../../../primitives/io" } +sp-version = { version = "2.0.0-alpha.2", path = "../../../primitives/version" } +sc-consensus-slots = { version = "0.8.0-alpha.2", path = "../slots" } +sp-api = { version = "2.0.0-alpha.2", path = "../../../primitives/api" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +sp-timestamp = { version = "2.0.0-alpha.2", path = "../../../primitives/timestamp" } +sc-telemetry = { version = "2.0.0-alpha.2", path = "../../telemetry" } [dev-dependencies] -sp-keyring = { version = "2.0.0-alpha.1", path = "../../../primitives/keyring" } -sc-executor = { version = "0.8.0-alpha.1", path = "../../executor" } -sc-network = { version = "0.8.0-alpha.1", path = "../../network" } +sp-keyring = { version = "2.0.0-alpha.2", path = "../../../primitives/keyring" } +sc-executor = { version = "0.8.0-alpha.2", path = "../../executor" } +sc-network = { version = "0.8.0-alpha.2", path = "../../network" } sc-network-test = { version = "0.8.0-dev", path = "../../network/test" } -sc-service = { version = "0.8.0-alpha.1", path = "../../service" } +sc-service = { version = "0.8.0-alpha.2", path = "../../service" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } tokio = "0.1.22" env_logger = "0.7.0" diff --git a/client/consensus/babe/Cargo.toml b/client/consensus/babe/Cargo.toml index a05723539a5..4ccd0064330 100644 --- a/client/consensus/babe/Cargo.toml +++ b/client/consensus/babe/Cargo.toml @@ -1,39 +1,41 @@ [package] name = "sc-consensus-babe" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] description = "BABE consensus algorithm for substrate" edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +documentation = "https://docs.rs/sc-consensus-babe" + [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -sp-consensus-babe = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/babe" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-application-crypto = { version = "2.0.0-alpha.1", path = "../../../primitives/application-crypto" } +sp-consensus-babe = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/babe" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-application-crypto = { version = "2.0.0-alpha.2", path = "../../../primitives/application-crypto" } num-bigint = "0.2.3" num-rational = "0.2.2" num-traits = "0.2.8" serde = { version = "1.0.104", features = ["derive"] } -sp-version = { version = "2.0.0-alpha.1", path = "../../../primitives/version" } -sp-io = { version = "2.0.0-alpha.1", path = "../../../primitives/io" } -sp-inherents = { version = "2.0.0-alpha.1", path = "../../../primitives/inherents" } -sp-timestamp = { version = "2.0.0-alpha.1", path = "../../../primitives/timestamp" } -sc-telemetry = { version = "2.0.0-alpha.1", path = "../../telemetry" } -sc-keystore = { version = "2.0.0-alpha.1", path = "../../keystore" } -sc-client-api = { version = "2.0.0-alpha.1", path = "../../api" } -sc-client = { version = "0.8.0-alpha.1", path = "../../" } -sc-consensus-epochs = { version = "0.8.0-alpha.1", path = "../epochs" } -sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } -sp-block-builder = { version = "2.0.0-alpha.1", path = "../../../primitives/block-builder" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } -sc-consensus-uncles = { version = "0.8.0-alpha.1", path = "../uncles" } -sc-consensus-slots = { version = "0.8.0-alpha.1", path = "../slots" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -fork-tree = { version = "2.0.0-alpha.1", path = "../../../utils/fork-tree" } +sp-version = { version = "2.0.0-alpha.2", path = "../../../primitives/version" } +sp-io = { version = "2.0.0-alpha.2", path = "../../../primitives/io" } +sp-inherents = { version = "2.0.0-alpha.2", path = "../../../primitives/inherents" } +sp-timestamp = { version = "2.0.0-alpha.2", path = "../../../primitives/timestamp" } +sc-telemetry = { version = "2.0.0-alpha.2", path = "../../telemetry" } +sc-keystore = { version = "2.0.0-alpha.2", path = "../../keystore" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../../api" } +sc-client = { version = "0.8.0-alpha.2", path = "../../" } +sc-consensus-epochs = { version = "0.8.0-alpha.2", path = "../epochs" } +sp-api = { version = "2.0.0-alpha.2", path = "../../../primitives/api" } +sp-block-builder = { version = "2.0.0-alpha.2", path = "../../../primitives/block-builder" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } +sc-consensus-uncles = { version = "0.8.0-alpha.2", path = "../uncles" } +sc-consensus-slots = { version = "0.8.0-alpha.2", path = "../slots" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +fork-tree = { version = "2.0.0-alpha.2", path = "../../../utils/fork-tree" } futures = "0.3.1" futures-timer = "3.0.1" parking_lot = "0.10.0" @@ -45,13 +47,13 @@ pdqselect = "0.1.0" derive_more = "0.99.2" [dev-dependencies] -sp-keyring = { version = "2.0.0-alpha.1", path = "../../../primitives/keyring" } -sc-executor = { version = "0.8.0-alpha.1", path = "../../executor" } -sc-network = { version = "0.8.0-alpha.1", path = "../../network" } +sp-keyring = { version = "2.0.0-alpha.2", path = "../../../primitives/keyring" } +sc-executor = { version = "0.8.0-alpha.2", path = "../../executor" } +sc-network = { version = "0.8.0-alpha.2", path = "../../network" } sc-network-test = { version = "0.8.0-dev", path = "../../network/test" } -sc-service = { version = "0.8.0-alpha.1", path = "../../service" } +sc-service = { version = "0.8.0-alpha.2", path = "../../service" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } -sc-block-builder = { version = "0.8.0-alpha.1", path = "../../block-builder" } +sc-block-builder = { version = "0.8.0-alpha.2", path = "../../block-builder" } tokio = "0.1.22" env_logger = "0.7.0" tempfile = "3.1.0" diff --git a/client/consensus/babe/rpc/Cargo.toml b/client/consensus/babe/rpc/Cargo.toml index a2d367df5c0..11a8b282112 100644 --- a/client/consensus/babe/rpc/Cargo.toml +++ b/client/consensus/babe/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-babe-rpc" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] description = "RPC extensions for the BABE consensus algorithm" edition = "2018" @@ -9,24 +9,24 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-consensus-babe = { version = "0.8.0-alpha.1", path = "../" } +sc-consensus-babe = { version = "0.8.0-alpha.2", path = "../" } jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" -sp-consensus-babe = { version = "0.8.0-alpha.1", path = "../../../../primitives/consensus/babe" } +sp-consensus-babe = { version = "0.8.0-alpha.2", path = "../../../../primitives/consensus/babe" } serde = { version = "1.0.104", features=["derive"] } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../../primitives/blockchain" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../../primitives/runtime" } -sc-consensus-epochs = { version = "0.8.0-alpha.1", path = "../../epochs" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../../primitives/runtime" } +sc-consensus-epochs = { version = "0.8.0-alpha.2", path = "../../epochs" } futures = "0.3.1" derive_more = "0.99.2" -sp-api = { version = "2.0.0-alpha.1", path = "../../../../primitives/api" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../../../primitives/consensus/common" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../../primitives/core" } -sc-keystore = { version = "2.0.0-alpha.1", path = "../../../keystore" } +sp-api = { version = "2.0.0-alpha.2", path = "../../../../primitives/api" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../../../primitives/consensus/common" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../../primitives/core" } +sc-keystore = { version = "2.0.0-alpha.2", path = "../../../keystore" } [dev-dependencies] substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../../test-utils/runtime/client" } -sp-application-crypto = { version = "2.0.0-alpha.1", path = "../../../../primitives/application-crypto" } -sp-keyring = { version = "2.0.0-alpha.1", path = "../../../../primitives/keyring" } +sp-application-crypto = { version = "2.0.0-alpha.2", path = "../../../../primitives/application-crypto" } +sp-keyring = { version = "2.0.0-alpha.2", path = "../../../../primitives/keyring" } tempfile = "3.1.0" diff --git a/client/consensus/epochs/Cargo.toml b/client/consensus/epochs/Cargo.toml index 8fc7d813036..48a14ea5052 100644 --- a/client/consensus/epochs/Cargo.toml +++ b/client/consensus/epochs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-epochs" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] description = "Generic epochs-based utilities for consensus" edition = "2018" @@ -11,7 +11,7 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } parking_lot = "0.10.0" -fork-tree = { version = "2.0.0-alpha.1", path = "../../../utils/fork-tree" } -sp-runtime = { path = "../../../primitives/runtime" , version = "2.0.0-alpha.1"} -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } -sc-client-api = { path = "../../api" , version = "2.0.0-alpha.1"} +fork-tree = { version = "2.0.0-alpha.2", path = "../../../utils/fork-tree" } +sp-runtime = { path = "../../../primitives/runtime" , version = "2.0.0-alpha.2"} +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } +sc-client-api = { path = "../../api" , version = "2.0.0-alpha.2"} diff --git a/client/consensus/manual-seal/Cargo.toml b/client/consensus/manual-seal/Cargo.toml index f432523a43d..0ae7ddbd64e 100644 --- a/client/consensus/manual-seal/Cargo.toml +++ b/client/consensus/manual-seal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-manual-seal" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] description = "Manual sealing engine for Substrate" edition = "2018" @@ -18,17 +18,17 @@ log = "0.4.8" parking_lot = "0.10.0" serde = { version = "1.0", features=["derive"] } -sc-client = { path = "../../../client" , version = "0.8.0-alpha.1"} -sc-client-api = { path = "../../../client/api" , version = "2.0.0-alpha.1"} -sc-transaction-pool = { path = "../../transaction-pool" , version = "2.0.0-alpha.1"} -sp-blockchain = { path = "../../../primitives/blockchain" , version = "2.0.0-alpha.1"} -sp-consensus = { package = "sp-consensus", path = "../../../primitives/consensus/common" , version = "0.8.0-alpha.1"} -sp-inherents = { path = "../../../primitives/inherents" , version = "2.0.0-alpha.1"} -sp-runtime = { path = "../../../primitives/runtime" , version = "2.0.0-alpha.1"} -sp-transaction-pool = { path = "../../../primitives/transaction-pool" , version = "2.0.0-alpha.1"} +sc-client = { path = "../../../client" , version = "0.8.0-alpha.2"} +sc-client-api = { path = "../../../client/api" , version = "2.0.0-alpha.2"} +sc-transaction-pool = { path = "../../transaction-pool" , version = "2.0.0-alpha.2"} +sp-blockchain = { path = "../../../primitives/blockchain" , version = "2.0.0-alpha.2"} +sp-consensus = { package = "sp-consensus", path = "../../../primitives/consensus/common" , version = "0.8.0-alpha.2"} +sp-inherents = { path = "../../../primitives/inherents" , version = "2.0.0-alpha.2"} +sp-runtime = { path = "../../../primitives/runtime" , version = "2.0.0-alpha.2"} +sp-transaction-pool = { path = "../../../primitives/transaction-pool" , version = "2.0.0-alpha.2"} [dev-dependencies] -sc-basic-authorship = { path = "../../basic-authorship" , version = "0.8.0-alpha.1"} +sc-basic-authorship = { path = "../../basic-authorship" , version = "0.8.0-alpha.2"} substrate-test-runtime-client = { path = "../../../test-utils/runtime/client" , version = "2.0.0-dev"} substrate-test-runtime-transaction-pool = { path = "../../../test-utils/runtime/transaction-pool" , version = "2.0.0-dev"} tokio = { version = "0.2", features = ["rt-core", "macros"] } diff --git a/client/consensus/pow/Cargo.toml b/client/consensus/pow/Cargo.toml index d3e0be60f4d..dd834e83269 100644 --- a/client/consensus/pow/Cargo.toml +++ b/client/consensus/pow/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-pow" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] description = "PoW consensus algorithm for substrate" edition = "2018" @@ -10,16 +10,16 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } -sc-client-api = { version = "2.0.0-alpha.1", path = "../../api" } -sp-block-builder = { version = "2.0.0-alpha.1", path = "../../../primitives/block-builder" } -sp-inherents = { version = "2.0.0-alpha.1", path = "../../../primitives/inherents" } -sp-consensus-pow = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/pow" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +sp-api = { version = "2.0.0-alpha.2", path = "../../../primitives/api" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../../api" } +sp-block-builder = { version = "2.0.0-alpha.2", path = "../../../primitives/block-builder" } +sp-inherents = { version = "2.0.0-alpha.2", path = "../../../primitives/inherents" } +sp-consensus-pow = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/pow" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } log = "0.4.8" futures = { version = "0.3.1", features = ["compat"] } -sp-timestamp = { version = "2.0.0-alpha.1", path = "../../../primitives/timestamp" } +sp-timestamp = { version = "2.0.0-alpha.2", path = "../../../primitives/timestamp" } derive_more = "0.99.2" diff --git a/client/consensus/slots/Cargo.toml b/client/consensus/slots/Cargo.toml index 87422a8c6c9..a626e2f179d 100644 --- a/client/consensus/slots/Cargo.toml +++ b/client/consensus/slots/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-slots" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] description = "Generic slots-based utilities for consensus" edition = "2018" @@ -11,15 +11,15 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0" } -sc-client-api = { version = "2.0.0-alpha.1", path = "../../api" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -sp-state-machine = { version = "0.8.0-alpha.1", path = "../../../primitives/state-machine" } -sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } -sc-telemetry = { version = "2.0.0-alpha.1", path = "../../telemetry" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } -sp-inherents = { version = "2.0.0-alpha.1", path = "../../../primitives/inherents" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../../api" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../../../primitives/state-machine" } +sp-api = { version = "2.0.0-alpha.2", path = "../../../primitives/api" } +sc-telemetry = { version = "2.0.0-alpha.2", path = "../../telemetry" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } +sp-inherents = { version = "2.0.0-alpha.2", path = "../../../primitives/inherents" } futures = "0.3.1" futures-timer = "3.0.1" parking_lot = "0.10.0" diff --git a/client/consensus/uncles/Cargo.toml b/client/consensus/uncles/Cargo.toml index f263cd21710..2c40e539289 100644 --- a/client/consensus/uncles/Cargo.toml +++ b/client/consensus/uncles/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-uncles" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] description = "Generic uncle inclusion utilities for consensus" edition = "2018" @@ -9,10 +9,10 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-client-api = { version = "2.0.0-alpha.1", path = "../../api" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -sp-authorship = { version = "2.0.0-alpha.1", path = "../../../primitives/authorship" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } -sp-inherents = { version = "2.0.0-alpha.1", path = "../../../primitives/inherents" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../../api" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +sp-authorship = { version = "2.0.0-alpha.2", path = "../../../primitives/authorship" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } +sp-inherents = { version = "2.0.0-alpha.2", path = "../../../primitives/inherents" } log = "0.4.8" diff --git a/client/db/Cargo.toml b/client/db/Cargo.toml index 6446608d35f..f6b65fdc3c6 100644 --- a/client/db/Cargo.toml +++ b/client/db/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "sc-client-db" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Client backend that uses RocksDB database as storage." [dependencies] parking_lot = "0.10.0" @@ -19,19 +20,19 @@ hash-db = "0.15.2" parity-util-mem = { version = "0.5.1", default-features = false, features = ["std"] } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } -sc-client = { version = "0.8.0-alpha.1", path = "../" } -sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } -sc-executor = { version = "0.8.0-alpha.1", path = "../executor" } -sc-state-db = { version = "0.8.0-alpha.1", path = "../state-db" } -sp-trie = { version = "2.0.0-alpha.1", path = "../../primitives/trie" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } +sc-client = { version = "0.8.0-alpha.2", path = "../" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../../primitives/state-machine" } +sc-executor = { version = "0.8.0-alpha.2", path = "../executor" } +sc-state-db = { version = "0.8.0-alpha.2", path = "../state-db" } +sp-trie = { version = "2.0.0-alpha.2", path = "../../primitives/trie" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/common" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" } [dev-dependencies] -sp-keyring = { version = "2.0.0-alpha.1", path = "../../primitives/keyring" } +sp-keyring = { version = "2.0.0-alpha.2", path = "../../primitives/keyring" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } env_logger = "0.7.0" quickcheck = "0.9" diff --git a/client/executor/Cargo.toml b/client/executor/Cargo.toml index 559a2d8b929..9bc6ef910ff 100644 --- a/client/executor/Cargo.toml +++ b/client/executor/Cargo.toml @@ -1,30 +1,32 @@ [package] name = "sc-executor" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "A crate that provides means of executing/dispatching calls into the runtime." +documentation = "https://docs.rs/sc-executor" [dependencies] derive_more = "0.99.2" codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-io = { version = "2.0.0-alpha.1", path = "../../primitives/io" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -sp-trie = { version = "2.0.0-alpha.1", path = "../../primitives/trie" } -sp-serializer = { version = "2.0.0-alpha.1", path = "../../primitives/serializer" } -sp-version = { version = "2.0.0-alpha.1", path = "../../primitives/version" } -sp-panic-handler = { version = "2.0.0-alpha.1", path = "../../primitives/panic-handler" } +sp-io = { version = "2.0.0-alpha.2", path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sp-trie = { version = "2.0.0-alpha.2", path = "../../primitives/trie" } +sp-serializer = { version = "2.0.0-alpha.2", path = "../../primitives/serializer" } +sp-version = { version = "2.0.0-alpha.2", path = "../../primitives/version" } +sp-panic-handler = { version = "2.0.0-alpha.2", path = "../../primitives/panic-handler" } wasmi = "0.6.2" parity-wasm = "0.41.0" lazy_static = "1.4.0" -sp-wasm-interface = { version = "2.0.0-alpha.1", path = "../../primitives/wasm-interface" } -sp-runtime-interface = { version = "2.0.0-alpha.1", path = "../../primitives/runtime-interface" } -sp-externalities = { version = "0.8.0-alpha.1", path = "../../primitives/externalities" } -sc-executor-common = { version = "0.8.0-alpha.1", path = "common" } -sc-executor-wasmi = { version = "0.8.0-alpha.1", path = "wasmi" } -sc-executor-wasmtime = { version = "0.8.0-alpha.1", path = "wasmtime", optional = true } +sp-wasm-interface = { version = "2.0.0-alpha.2", path = "../../primitives/wasm-interface" } +sp-runtime-interface = { version = "2.0.0-alpha.2", path = "../../primitives/runtime-interface" } +sp-externalities = { version = "0.8.0-alpha.2", path = "../../primitives/externalities" } +sc-executor-common = { version = "0.8.0-alpha.2", path = "common" } +sc-executor-wasmi = { version = "0.8.0-alpha.2", path = "wasmi" } +sc-executor-wasmtime = { version = "0.8.0-alpha.2", path = "wasmtime", optional = true } parking_lot = "0.10.0" log = "0.4.8" libsecp256k1 = "0.3.4" @@ -35,7 +37,7 @@ wabt = "0.9.2" hex-literal = "0.2.1" sc-runtime-test = { version = "2.0.0-dev", path = "runtime-test" } substrate-test-runtime = { version = "2.0.0-dev", path = "../../test-utils/runtime" } -sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../../primitives/state-machine" } test-case = "0.3.3" [features] diff --git a/client/executor/common/Cargo.toml b/client/executor/common/Cargo.toml index 474b05bcccf..9b3e39b6db6 100644 --- a/client/executor/common/Cargo.toml +++ b/client/executor/common/Cargo.toml @@ -1,22 +1,24 @@ [package] name = "sc-executor-common" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "A set of common definitions that are needed for defining execution engines." +documentation = "https://docs.rs/sc-executor-common/" [dependencies] log = "0.4.8" derive_more = "0.99.2" codec = { package = "parity-scale-codec", version = "1.0.0" } wasmi = "0.6.2" -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-allocator = { version = "2.0.0-alpha.1", path = "../../../primitives/allocator" } -sp-wasm-interface = { version = "2.0.0-alpha.1", path = "../../../primitives/wasm-interface" } -sp-runtime-interface = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime-interface" } -sp-serializer = { version = "2.0.0-alpha.1", path = "../../../primitives/serializer" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-allocator = { version = "2.0.0-alpha.2", path = "../../../primitives/allocator" } +sp-wasm-interface = { version = "2.0.0-alpha.2", path = "../../../primitives/wasm-interface" } +sp-runtime-interface = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime-interface" } +sp-serializer = { version = "2.0.0-alpha.2", path = "../../../primitives/serializer" } [features] default = [] diff --git a/client/executor/runtime-test/Cargo.toml b/client/executor/runtime-test/Cargo.toml index 6964f7d1126..ad7c44718d2 100644 --- a/client/executor/runtime-test/Cargo.toml +++ b/client/executor/runtime-test/Cargo.toml @@ -10,12 +10,12 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/io" } -sp-sandbox = { version = "0.8.0-alpha.1", default-features = false, path = "../../../primitives/sandbox" } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/runtime" } -sp-allocator = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/allocator" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/io" } +sp-sandbox = { version = "0.8.0-alpha.2", default-features = false, path = "../../../primitives/sandbox" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/runtime" } +sp-allocator = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/allocator" } [build-dependencies] wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" } diff --git a/client/executor/wasmi/Cargo.toml b/client/executor/wasmi/Cargo.toml index da9c4cb598a..ff52d537af6 100644 --- a/client/executor/wasmi/Cargo.toml +++ b/client/executor/wasmi/Cargo.toml @@ -1,19 +1,21 @@ [package] name = "sc-executor-wasmi" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "This crate provides an implementation of `WasmRuntime` that is baked by wasmi." +documentation = "https://docs.rs/sc-execturo-wasmi" [dependencies] log = "0.4.8" wasmi = "0.6.2" parity-wasm = "0.41.0" codec = { package = "parity-scale-codec", version = "1.0.0" } -sc-executor-common = { version = "0.8.0-alpha.1", path = "../common" } -sp-wasm-interface = { version = "2.0.0-alpha.1", path = "../../../primitives/wasm-interface" } -sp-runtime-interface = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime-interface" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-allocator = { version = "2.0.0-alpha.1", path = "../../../primitives/allocator" } +sc-executor-common = { version = "0.8.0-alpha.2", path = "../common" } +sp-wasm-interface = { version = "2.0.0-alpha.2", path = "../../../primitives/wasm-interface" } +sp-runtime-interface = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime-interface" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-allocator = { version = "2.0.0-alpha.2", path = "../../../primitives/allocator" } diff --git a/client/executor/wasmtime/Cargo.toml b/client/executor/wasmtime/Cargo.toml index 709da352530..f823d28ebf7 100644 --- a/client/executor/wasmtime/Cargo.toml +++ b/client/executor/wasmtime/Cargo.toml @@ -1,22 +1,23 @@ [package] name = "sc-executor-wasmtime" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Defines a `WasmRuntime` that uses the Wasmtime JIT to execute." [dependencies] log = "0.4.8" wasmi = "0.6.2" parity-wasm = "0.41.0" codec = { package = "parity-scale-codec", version = "1.0.0" } -sc-executor-common = { version = "0.8.0-alpha.1", path = "../common" } -sp-wasm-interface = { version = "2.0.0-alpha.1", path = "../../../primitives/wasm-interface" } -sp-runtime-interface = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime-interface" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-allocator = { version = "2.0.0-alpha.1", path = "../../../primitives/allocator" } +sc-executor-common = { version = "0.8.0-alpha.2", path = "../common" } +sp-wasm-interface = { version = "2.0.0-alpha.2", path = "../../../primitives/wasm-interface" } +sp-runtime-interface = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime-interface" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-allocator = { version = "2.0.0-alpha.2", path = "../../../primitives/allocator" } wasmtime = "0.11" diff --git a/client/finality-grandpa/Cargo.toml b/client/finality-grandpa/Cargo.toml index 733e5415b82..51c52ddf6e5 100644 --- a/client/finality-grandpa/Cargo.toml +++ b/client/finality-grandpa/Cargo.toml @@ -1,14 +1,17 @@ [package] name = "sc-finality-grandpa" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Integration of the GRANDPA finality gadget into substrate." +documentation = "https://docs.rs/sc-finality-grandpa" + [dependencies] -fork-tree = { version = "2.0.0-alpha.1", path = "../../utils/fork-tree" } +fork-tree = { version = "2.0.0-alpha.2", path = "../../utils/fork-tree" } futures = "0.3.1" futures-timer = "3.0.1" log = "0.4.8" @@ -16,34 +19,34 @@ parking_lot = "0.10.0" rand = "0.7.2" assert_matches = "1.3.0" parity-scale-codec = { version = "1.0.0", features = ["derive"] } -sp-arithmetic = { version = "2.0.0-alpha.1", path = "../../primitives/arithmetic" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -sc-telemetry = { version = "2.0.0-alpha.1", path = "../telemetry" } -sc-keystore = { version = "2.0.0-alpha.1", path = "../keystore" } +sp-arithmetic = { version = "2.0.0-alpha.2", path = "../../primitives/arithmetic" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/common" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sc-telemetry = { version = "2.0.0-alpha.2", path = "../telemetry" } +sc-keystore = { version = "2.0.0-alpha.2", path = "../keystore" } serde_json = "1.0.41" -sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } -sc-client = { version = "0.8.0-alpha.1", path = "../" } -sp-inherents = { version = "2.0.0-alpha.1", path = "../../primitives/inherents" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } -sc-network = { version = "0.8.0-alpha.1", path = "../network" } -sc-network-gossip = { version = "0.8.0-alpha.1", path = "../network-gossip" } -sp-finality-tracker = { version = "2.0.0-alpha.1", path = "../../primitives/finality-tracker" } -sp-finality-grandpa = { version = "2.0.0-alpha.1", path = "../../primitives/finality-grandpa" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } +sc-client = { version = "0.8.0-alpha.2", path = "../" } +sp-inherents = { version = "2.0.0-alpha.2", path = "../../primitives/inherents" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" } +sc-network = { version = "0.8.0-alpha.2", path = "../network" } +sc-network-gossip = { version = "0.8.0-alpha.2", path = "../network-gossip" } +sp-finality-tracker = { version = "2.0.0-alpha.2", path = "../../primitives/finality-tracker" } +sp-finality-grandpa = { version = "2.0.0-alpha.2", path = "../../primitives/finality-grandpa" } finality-grandpa = { version = "0.11.1", features = ["derive-codec"] } pin-project = "0.4.6" [dev-dependencies] finality-grandpa = { version = "0.11.1", features = ["derive-codec", "test-helpers"] } -sc-network = { version = "0.8.0-alpha.1", path = "../network" } +sc-network = { version = "0.8.0-alpha.2", path = "../network" } sc-network-test = { version = "0.8.0-dev", path = "../network/test" } -sp-keyring = { version = "2.0.0-alpha.1", path = "../../primitives/keyring" } +sp-keyring = { version = "2.0.0-alpha.2", path = "../../primitives/keyring" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } -sp-consensus-babe = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/babe" } -sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } +sp-consensus-babe = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/babe" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../../primitives/state-machine" } env_logger = "0.7.0" tokio = "0.1.22" tempfile = "3.1.0" -sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } +sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api" } futures01 = { package = "futures", version = "0.1.29" } diff --git a/client/informant/Cargo.toml b/client/informant/Cargo.toml index c7a6c084325..a7dc6fa70a2 100644 --- a/client/informant/Cargo.toml +++ b/client/informant/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-informant" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] description = "Substrate informant." edition = "2018" @@ -14,8 +14,8 @@ futures = "0.3.1" log = "0.4.8" parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } wasm-timer = "0.2" -sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } -sc-network = { version = "0.8.0-alpha.1", path = "../network" } -sc-service = { version = "0.8.0-alpha.1", default-features = false, path = "../service" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } +sc-network = { version = "0.8.0-alpha.2", path = "../network" } +sc-service = { version = "0.8.0-alpha.2", default-features = false, path = "../service" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } diff --git a/client/keystore/Cargo.toml b/client/keystore/Cargo.toml index d96b2db69ac..13d72746ba8 100644 --- a/client/keystore/Cargo.toml +++ b/client/keystore/Cargo.toml @@ -1,16 +1,19 @@ [package] name = "sc-keystore" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Keystore (and session key management) for ed25519 based chains like Polkadot." +documentation = "https://docs.rs/sc-keystore" + [dependencies] derive_more = "0.99.2" -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -sp-application-crypto = { version = "2.0.0-alpha.1", path = "../../primitives/application-crypto" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sp-application-crypto = { version = "2.0.0-alpha.2", path = "../../primitives/application-crypto" } hex = "0.4.0" rand = "0.7.2" serde_json = "1.0.41" diff --git a/client/network-gossip/Cargo.toml b/client/network-gossip/Cargo.toml index e42306c340e..b69cf334e9f 100644 --- a/client/network-gossip/Cargo.toml +++ b/client/network-gossip/Cargo.toml @@ -1,12 +1,14 @@ [package] description = "Gossiping for the Substrate network protocol" name = "sc-network-gossip" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +documentation = "https://docs.rs/sc-network-gossip" + [dependencies] futures = "0.3.1" @@ -15,6 +17,6 @@ libp2p = { version = "0.16.1", default-features = false, features = ["libp2p-web log = "0.4.8" lru = "0.4.3" parking_lot = "0.10.0" -sc-network = { version = "0.8.0-alpha.1", path = "../network" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } +sc-network = { version = "0.8.0-alpha.2", path = "../network" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } wasm-timer = "0.2" diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index 2d50146653a..44664b2a267 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -1,12 +1,14 @@ [package] description = "Substrate network protocol" name = "sc-network" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +documentation = "https://docs.rs/sc-network" + [build-dependencies] prost-build = "0.6.1" @@ -19,7 +21,7 @@ derive_more = "0.99.2" either = "1.5.3" erased-serde = "0.3.9" fnv = "1.0.6" -fork-tree = { version = "2.0.0-alpha.1", path = "../../utils/fork-tree" } +fork-tree = { version = "2.0.0-alpha.2", path = "../../utils/fork-tree" } futures = "0.3.1" futures_codec = "0.3.3" futures-timer = "3.0.1" @@ -34,22 +36,22 @@ parking_lot = "0.10.0" prost = "0.6.1" rand = "0.7.2" rustc-hex = "2.0.1" -sc-block-builder = { version = "0.8.0-alpha.1", path = "../block-builder" } -sc-client = { version = "0.8.0-alpha.1", path = "../" } -sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } -sc-peerset = { version = "2.0.0-alpha.1", path = "../peerset" } +sc-block-builder = { version = "0.8.0-alpha.2", path = "../block-builder" } +sc-client = { version = "0.8.0-alpha.2", path = "../" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } +sc-peerset = { version = "2.0.0-alpha.2", path = "../peerset" } pin-project = "0.4.6" serde = { version = "1.0.101", features = ["derive"] } serde_json = "1.0.41" slog = { version = "2.5.2", features = ["nested-values"] } slog_derive = "0.2.0" smallvec = "0.6.10" -sp-arithmetic = { version = "2.0.0-alpha.1", path = "../../primitives/arithmetic" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } -sp-consensus-babe = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/babe" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } +sp-arithmetic = { version = "2.0.0-alpha.2", path = "../../primitives/arithmetic" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/common" } +sp-consensus-babe = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/babe" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } thiserror = "1" unsigned-varint = { version = "0.3.1", features = ["futures", "futures-codec"] } void = "1.0.2" @@ -61,7 +63,7 @@ assert_matches = "1.3" env_logger = "0.7.0" quickcheck = "0.9.0" rand = "0.7.2" -sp-keyring = { version = "2.0.0-alpha.1", path = "../../primitives/keyring" } +sp-keyring = { version = "2.0.0-alpha.2", path = "../../primitives/keyring" } sp-test-primitives = { version = "2.0.0-dev", path = "../../primitives/test-primitives" } substrate-test-runtime = { version = "2.0.0-dev", path = "../../test-utils/runtime" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } diff --git a/client/network/test/Cargo.toml b/client/network/test/Cargo.toml index cd9258cc08b..54265f1736c 100644 --- a/client/network/test/Cargo.toml +++ b/client/network/test/Cargo.toml @@ -10,7 +10,7 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sc-network = { version = "0.8.0-alpha.1", path = "../" } +sc-network = { version = "0.8.0-alpha.2", path = "../" } log = "0.4.8" parking_lot = "0.10.0" futures = "0.1.29" @@ -18,14 +18,14 @@ futures03 = { package = "futures", version = "0.3.1", features = ["compat"] } futures-timer = "3.0.1" rand = "0.7.2" libp2p = { version = "0.16.1", default-features = false, features = ["libp2p-websocket"] } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } -sc-client = { version = "0.8.0-alpha.1", path = "../../" } -sc-client-api = { version = "2.0.0-alpha.1", path = "../../api" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sc-block-builder = { version = "0.8.0-alpha.1", path = "../../block-builder" } -sp-consensus-babe = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/babe" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } +sc-client = { version = "0.8.0-alpha.2", path = "../../" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../../api" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sc-block-builder = { version = "0.8.0-alpha.2", path = "../../block-builder" } +sp-consensus-babe = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/babe" } env_logger = "0.7.0" substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } substrate-test-runtime = { version = "2.0.0-dev", path = "../../../test-utils/runtime" } diff --git a/client/offchain/Cargo.toml b/client/offchain/Cargo.toml index ba7cee68112..066be726e88 100644 --- a/client/offchain/Cargo.toml +++ b/client/offchain/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate offchain workers" name = "sc-offchain" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" @@ -10,34 +10,34 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] bytes = "0.5" -sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } -sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } +sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api" } fnv = "1.0.6" futures = "0.3.1" futures-timer = "3.0.1" log = "0.4.8" threadpool = "1.7" num_cpus = "1.10" -sp-offchain = { version = "2.0.0-alpha.1", path = "../../primitives/offchain" } +sp-offchain = { version = "2.0.0-alpha.2", path = "../../primitives/offchain" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } parking_lot = "0.10.0" -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } rand = "0.7.2" -sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } -sc-network = { version = "0.8.0-alpha.1", path = "../network" } -sc-keystore = { version = "2.0.0-alpha.1", path = "../keystore" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } +sc-network = { version = "0.8.0-alpha.2", path = "../network" } +sc-keystore = { version = "2.0.0-alpha.2", path = "../keystore" } [target.'cfg(not(target_os = "unknown"))'.dependencies] hyper = "0.13.2" hyper-rustls = "0.19" [dev-dependencies] -sc-client-db = { version = "0.8.0-alpha.1", default-features = true, path = "../db/" } +sc-client-db = { version = "0.8.0-alpha.2", default-features = true, path = "../db/" } env_logger = "0.7.0" substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } tokio = "0.2" -sc-transaction-pool = { version = "2.0.0-alpha.1", path = "../../client/transaction-pool" } -sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../primitives/transaction-pool" } +sc-transaction-pool = { version = "2.0.0-alpha.2", path = "../../client/transaction-pool" } +sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../primitives/transaction-pool" } [features] default = [] diff --git a/client/peerset/Cargo.toml b/client/peerset/Cargo.toml index 2ba10466fb5..382a1e0b247 100644 --- a/client/peerset/Cargo.toml +++ b/client/peerset/Cargo.toml @@ -3,10 +3,12 @@ description = "Connectivity manager based on reputation" homepage = "http://parity.io" license = "GPL-3.0" name = "sc-peerset" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" repository = "https://github.com/paritytech/substrate/" +documentation = "https://docs.rs/sc-peerset" + [dependencies] futures = "0.3.1" diff --git a/client/rpc-api/Cargo.toml b/client/rpc-api/Cargo.toml index 7ab70df55cc..3fb6afb4745 100644 --- a/client/rpc-api/Cargo.toml +++ b/client/rpc-api/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "sc-rpc-api" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate RPC interfaces." [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0" } @@ -17,10 +18,10 @@ jsonrpc-derive = "14.0.3" jsonrpc-pubsub = "14.0.3" log = "0.4.8" parking_lot = "0.10.0" -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -sp-version = { version = "2.0.0-alpha.1", path = "../../primitives/version" } -sp-runtime = { path = "../../primitives/runtime" , version = "2.0.0-alpha.1"} +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sp-version = { version = "2.0.0-alpha.2", path = "../../primitives/version" } +sp-runtime = { path = "../../primitives/runtime" , version = "2.0.0-alpha.2"} serde = { version = "1.0.101", features = ["derive"] } serde_json = "1.0.41" -sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../primitives/transaction-pool" } -sp-rpc = { version = "2.0.0-alpha.1", path = "../../primitives/rpc" } +sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../primitives/transaction-pool" } +sp-rpc = { version = "2.0.0-alpha.2", path = "../../primitives/rpc" } diff --git a/client/rpc-servers/Cargo.toml b/client/rpc-servers/Cargo.toml index 1bec566f52b..e2ccff65e60 100644 --- a/client/rpc-servers/Cargo.toml +++ b/client/rpc-servers/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "sc-rpc-server" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate RPC servers." [dependencies] jsonrpc-core = "14.0.3" @@ -13,7 +14,7 @@ pubsub = { package = "jsonrpc-pubsub", version = "14.0.3" } log = "0.4.8" serde = "1.0.101" serde_json = "1.0.41" -sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } [target.'cfg(not(target_os = "unknown"))'.dependencies] http = { package = "jsonrpc-http-server", version = "14.0.3" } diff --git a/client/rpc/Cargo.toml b/client/rpc/Cargo.toml index d4f618f0064..3fb0360601a 100644 --- a/client/rpc/Cargo.toml +++ b/client/rpc/Cargo.toml @@ -1,43 +1,44 @@ [package] name = "sc-rpc" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate Client RPC" [dependencies] -sc-rpc-api = { version = "0.8.0-alpha.1", path = "../rpc-api" } -sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } -sc-client = { version = "0.8.0-alpha.1", path = "../" } -sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } +sc-rpc-api = { version = "0.8.0-alpha.2", path = "../rpc-api" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } +sc-client = { version = "0.8.0-alpha.2", path = "../" } +sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api" } codec = { package = "parity-scale-codec", version = "1.0.0" } futures = { version = "0.3.1", features = ["compat"] } jsonrpc-pubsub = "14.0.3" log = "0.4.8" -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } rpc = { package = "jsonrpc-core", version = "14.0.3" } -sp-version = { version = "2.0.0-alpha.1", path = "../../primitives/version" } +sp-version = { version = "2.0.0-alpha.2", path = "../../primitives/version" } serde_json = "1.0.41" -sp-session = { version = "2.0.0-alpha.1", path = "../../primitives/session" } -sp-offchain = { version = "2.0.0-alpha.1", path = "../../primitives/offchain" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } -sp-rpc = { version = "2.0.0-alpha.1", path = "../../primitives/rpc" } -sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } -sc-executor = { version = "0.8.0-alpha.1", path = "../executor" } -sc-keystore = { version = "2.0.0-alpha.1", path = "../keystore" } -sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../primitives/transaction-pool" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } +sp-session = { version = "2.0.0-alpha.2", path = "../../primitives/session" } +sp-offchain = { version = "2.0.0-alpha.2", path = "../../primitives/offchain" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } +sp-rpc = { version = "2.0.0-alpha.2", path = "../../primitives/rpc" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../../primitives/state-machine" } +sc-executor = { version = "0.8.0-alpha.2", path = "../executor" } +sc-keystore = { version = "2.0.0-alpha.2", path = "../keystore" } +sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../primitives/transaction-pool" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" } hash-db = { version = "0.15.2", default-features = false } parking_lot = "0.10.0" [dev-dependencies] assert_matches = "1.3.0" futures01 = { package = "futures", version = "0.1.29" } -sc-network = { version = "0.8.0-alpha.1", path = "../network" } +sc-network = { version = "0.8.0-alpha.2", path = "../network" } rustc-hex = "2.0.1" -sp-io = { version = "2.0.0-alpha.1", path = "../../primitives/io" } +sp-io = { version = "2.0.0-alpha.2", path = "../../primitives/io" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } tokio = "0.1.22" -sc-transaction-pool = { version = "2.0.0-alpha.1", path = "../transaction-pool" } +sc-transaction-pool = { version = "2.0.0-alpha.2", path = "../transaction-pool" } diff --git a/client/service/Cargo.toml b/client/service/Cargo.toml index 53c7739b09c..462b77bcb05 100644 --- a/client/service/Cargo.toml +++ b/client/service/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "sc-service" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate service. Starts a thread that spins up the network, client, and extrinsic pool. Manages communication between them." [features] default = ["rocksdb"] @@ -32,37 +33,37 @@ serde = "1.0.101" serde_json = "1.0.41" sysinfo = "0.9.5" target_info = "0.1.0" -sc-keystore = { version = "2.0.0-alpha.1", path = "../keystore" } -sp-io = { version = "2.0.0-alpha.1", path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -sp-session = { version = "2.0.0-alpha.1", path = "../../primitives/session" } -sp-application-crypto = { version = "2.0.0-alpha.1", path = "../../primitives/application-crypto" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } -sc-network = { version = "0.8.0-alpha.1", path = "../network" } -sc-chain-spec = { version = "2.0.0-alpha.1", path = "../chain-spec" } -sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } -sc-client = { version = "0.8.0-alpha.1", path = "../" } -sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } -sc-client-db = { version = "0.8.0-alpha.1", path = "../db" } +sc-keystore = { version = "2.0.0-alpha.2", path = "../keystore" } +sp-io = { version = "2.0.0-alpha.2", path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sp-session = { version = "2.0.0-alpha.2", path = "../../primitives/session" } +sp-application-crypto = { version = "2.0.0-alpha.2", path = "../../primitives/application-crypto" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/common" } +sc-network = { version = "0.8.0-alpha.2", path = "../network" } +sc-chain-spec = { version = "2.0.0-alpha.2", path = "../chain-spec" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } +sc-client = { version = "0.8.0-alpha.2", path = "../" } +sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api" } +sc-client-db = { version = "0.8.0-alpha.2", path = "../db" } codec = { package = "parity-scale-codec", version = "1.0.0" } -sc-executor = { version = "0.8.0-alpha.1", path = "../executor" } -sc-transaction-pool = { version = "2.0.0-alpha.1", path = "../transaction-pool" } -sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../primitives/transaction-pool" } -sc-rpc-server = { version = "2.0.0-alpha.1", path = "../rpc-servers" } -sc-rpc = { version = "2.0.0-alpha.1", path = "../rpc" } -sc-telemetry = { version = "2.0.0-alpha.1", path = "../telemetry" } -sc-offchain = { version = "2.0.0-alpha.1", path = "../offchain" } +sc-executor = { version = "0.8.0-alpha.2", path = "../executor" } +sc-transaction-pool = { version = "2.0.0-alpha.2", path = "../transaction-pool" } +sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../primitives/transaction-pool" } +sc-rpc-server = { version = "2.0.0-alpha.2", path = "../rpc-servers" } +sc-rpc = { version = "2.0.0-alpha.2", path = "../rpc" } +sc-telemetry = { version = "2.0.0-alpha.2", path = "../telemetry" } +sc-offchain = { version = "2.0.0-alpha.2", path = "../offchain" } parity-multiaddr = { package = "parity-multiaddr", version = "0.5.0" } -prometheus-exporter = { path = "../../utils/prometheus" , version = "0.8.0-alpha.1"} -sc-tracing = { version = "2.0.0-alpha.1", path = "../tracing" } +prometheus-exporter = { path = "../../utils/prometheus" , version = "0.8.0-alpha.2"} +sc-tracing = { version = "2.0.0-alpha.2", path = "../tracing" } tracing = "0.1.10" parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } [dev-dependencies] substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } -sp-consensus-babe = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/babe" } -grandpa = { version = "0.8.0-alpha.1", package = "sc-finality-grandpa", path = "../finality-grandpa" } -grandpa-primitives = { version = "2.0.0-alpha.1", package = "sp-finality-grandpa", path = "../../primitives/finality-grandpa" } +sp-consensus-babe = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/babe" } +grandpa = { version = "0.8.0-alpha.2", package = "sc-finality-grandpa", path = "../finality-grandpa" } +grandpa-primitives = { version = "2.0.0-alpha.2", package = "sp-finality-grandpa", path = "../../primitives/finality-grandpa" } tokio = { version = "0.2", features = ["rt-core"] } diff --git a/client/service/test/Cargo.toml b/client/service/test/Cargo.toml index 80683ab89e7..f27f8803300 100644 --- a/client/service/test/Cargo.toml +++ b/client/service/test/Cargo.toml @@ -16,10 +16,10 @@ log = "0.4.8" env_logger = "0.7.0" fdlimit = "0.1.1" futures = { version = "0.3.1", features = ["compat"] } -sc-service = { version = "0.8.0-alpha.1", default-features = false, path = "../../service" } -sc-network = { version = "0.8.0-alpha.1", path = "../../network" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } -sc-client = { version = "0.8.0-alpha.1", path = "../../" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../primitives/transaction-pool" } +sc-service = { version = "0.8.0-alpha.2", default-features = false, path = "../../service" } +sc-network = { version = "0.8.0-alpha.2", path = "../../network" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } +sc-client = { version = "0.8.0-alpha.2", path = "../../" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../primitives/transaction-pool" } diff --git a/client/state-db/Cargo.toml b/client/state-db/Cargo.toml index 84ab2621629..3f1c4b0cf62 100644 --- a/client/state-db/Cargo.toml +++ b/client/state-db/Cargo.toml @@ -1,16 +1,17 @@ [package] name = "sc-state-db" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "State database maintenance. Handles canonicalization and pruning in the database." [dependencies] parking_lot = "0.10.0" log = "0.4.8" -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } [dev-dependencies] diff --git a/client/telemetry/Cargo.toml b/client/telemetry/Cargo.toml index 7ba8abafba5..2b209e5284a 100644 --- a/client/telemetry/Cargo.toml +++ b/client/telemetry/Cargo.toml @@ -1,12 +1,14 @@ [package] name = "sc-telemetry" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] description = "Telemetry utils" edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +documentation = "https://docs.rs/sc-telemetry" + [dependencies] bytes = "0.5" diff --git a/client/tracing/Cargo.toml b/client/tracing/Cargo.toml index e508c728f3e..7201248a6ab 100644 --- a/client/tracing/Cargo.toml +++ b/client/tracing/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "sc-tracing" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Instrumentation implementation for substrate." [dependencies] erased-serde = "0.3.9" @@ -16,7 +17,7 @@ serde_json = "1.0.41" slog = { version = "2.5.2", features = ["nested-values"] } tracing-core = "0.1.7" -sc-telemetry = { version = "2.0.0-alpha.1", path = "../telemetry" } +sc-telemetry = { version = "2.0.0-alpha.2", path = "../telemetry" } [dev-dependencies] tracing = "0.1.10" diff --git a/client/transaction-pool/Cargo.toml b/client/transaction-pool/Cargo.toml index 025fcec8818..e3170d585eb 100644 --- a/client/transaction-pool/Cargo.toml +++ b/client/transaction-pool/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "sc-transaction-pool" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate transaction pool implementation." [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0" } @@ -15,17 +16,17 @@ futures-diagnose = "1.0" log = "0.4.8" parking_lot = "0.10.0" wasm-timer = "0.2" -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } -sc-transaction-graph = { version = "2.0.0-alpha.1", path = "./graph" } -sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../primitives/transaction-pool" } -sc-client-api = { version = "2.0.0-alpha.1", path = "../api" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } +sc-transaction-graph = { version = "2.0.0-alpha.2", path = "./graph" } +sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../primitives/transaction-pool" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" } futures-timer = "2.0" parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } [dev-dependencies] -sp-keyring = { version = "2.0.0-alpha.1", path = "../../primitives/keyring" } +sp-keyring = { version = "2.0.0-alpha.2", path = "../../primitives/keyring" } substrate-test-runtime-transaction-pool = { version = "2.0.0-dev", path = "../../test-utils/runtime/transaction-pool" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } diff --git a/client/transaction-pool/graph/Cargo.toml b/client/transaction-pool/graph/Cargo.toml index ba290dc6168..6b790921928 100644 --- a/client/transaction-pool/graph/Cargo.toml +++ b/client/transaction-pool/graph/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "sc-transaction-graph" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Generic Transaction Pool" [dependencies] derive_more = "0.99.2" @@ -14,10 +15,10 @@ log = "0.4.8" parking_lot = "0.10.0" serde = { version = "1.0.101", features = ["derive"] } wasm-timer = "0.2" -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../primitives/transaction-pool" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../primitives/transaction-pool" } parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } linked-hash-map = "0.5.2" diff --git a/frame/assets/Cargo.toml b/frame/assets/Cargo.toml index f9121d9d02d..89f9a188870 100644 --- a/frame/assets/Cargo.toml +++ b/frame/assets/Cargo.toml @@ -1,26 +1,27 @@ [package] name = "pallet-assets" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME asset management pallet" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } # Needed for various traits. In our case, `OnFinalize`. -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } # Needed for type-safe access to storage DB. -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } # `system` module provides us with all sorts of useful stuff and macros depend on it being around. -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -sp-std = { version = "2.0.0-alpha.1", path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.2", path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", path = "../../primitives/io" } [features] default = ["std"] diff --git a/frame/aura/Cargo.toml b/frame/aura/Cargo.toml index 8e2da7547c8..8a0bb4c094a 100644 --- a/frame/aura/Cargo.toml +++ b/frame/aura/Cargo.toml @@ -1,27 +1,28 @@ [package] name = "pallet-aura" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME AURA consensus pallet" [dependencies] -sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/application-crypto" } +sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/inherents" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } -pallet-session = { version = "2.0.0-alpha.1", default-features = false, path = "../session" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -sp-consensus-aura = { path = "../../primitives/consensus/aura", default-features = false, version = "0.8.0-alpha.1"} -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } -sp-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/timestamp" } -pallet-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../timestamp" } +pallet-session = { version = "2.0.0-alpha.2", default-features = false, path = "../session" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.2"} +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +sp-consensus-aura = { path = "../../primitives/consensus/aura", default-features = false, version = "0.8.0-alpha.2"} +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } +sp-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/timestamp" } +pallet-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../timestamp" } [dev-dependencies] diff --git a/frame/authority-discovery/Cargo.toml b/frame/authority-discovery/Cargo.toml index 7d79bf20f31..4d2a6642e3b 100644 --- a/frame/authority-discovery/Cargo.toml +++ b/frame/authority-discovery/Cargo.toml @@ -1,27 +1,28 @@ [package] name = "pallet-authority-discovery" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME pallet for authority discovery" [dependencies] -sp-authority-discovery = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/authority-discovery" } -sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/application-crypto" } +sp-authority-discovery = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/authority-discovery" } +sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -pallet-session = { version = "2.0.0-alpha.1", features = ["historical" ], path = "../session", default-features = false } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +pallet-session = { version = "2.0.0-alpha.2", features = ["historical" ], path = "../session", default-features = false } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [dev-dependencies] -sp-staking = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/staking" } +sp-staking = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/staking" } [features] default = ["std"] diff --git a/frame/authorship/Cargo.toml b/frame/authorship/Cargo.toml index f1d4c734a28..ff91917af9a 100644 --- a/frame/authorship/Cargo.toml +++ b/frame/authorship/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-authorship" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" description = "Block and Uncle Author tracking for the FRAME" authors = ["Parity Technologies "] edition = "2018" @@ -9,15 +9,15 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } -sp-authorship = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/authorship" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/inherents" } +sp-authorship = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/authorship" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.2"} impl-trait-for-tuples = "0.1.3" [features] diff --git a/frame/babe/Cargo.toml b/frame/babe/Cargo.toml index 88e32d6a074..ce769275c91 100644 --- a/frame/babe/Cargo.toml +++ b/frame/babe/Cargo.toml @@ -1,33 +1,34 @@ [package] name = "pallet-babe" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Consensus extension module for BABE consensus. Collects on-chain randomness from VRF outputs and manages epoch transitions." [dependencies] hex-literal = "0.2.1" codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true } -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } -pallet-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../timestamp" } -sp-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/timestamp" } -pallet-session = { version = "2.0.0-alpha.1", default-features = false, path = "../session" } -sp-consensus-babe = { version = "0.8.0-alpha.1", default-features = false, path = "../../primitives/consensus/babe" } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/inherents" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } +pallet-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../timestamp" } +sp-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/timestamp" } +pallet-session = { version = "2.0.0-alpha.2", default-features = false, path = "../session" } +sp-consensus-babe = { version = "0.8.0-alpha.2", default-features = false, path = "../../primitives/consensus/babe" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.2"} [dev-dependencies] lazy_static = "1.4.0" parking_lot = "0.10.0" -sp-version = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/version" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-version = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/version" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } substrate-test-runtime = { version = "2.0.0-dev", path = "../../test-utils/runtime" } [features] diff --git a/frame/balances/Cargo.toml b/frame/balances/Cargo.toml index 4356b43e614..bc8c1a23c30 100644 --- a/frame/balances/Cargo.toml +++ b/frame/balances/Cargo.toml @@ -1,25 +1,26 @@ [package] name = "pallet-balances" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME pallet to manage balances" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -frame-benchmarking = { version = "2.0.0-alpha.1", default-features = false, path = "../benchmarking" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../benchmarking" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -pallet-transaction-payment = { version = "2.0.0-alpha.1", path = "../transaction-payment" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +pallet-transaction-payment = { version = "2.0.0-alpha.2", path = "../transaction-payment" } [features] default = ["std"] diff --git a/frame/benchmarking/Cargo.toml b/frame/benchmarking/Cargo.toml index 72395d5cb14..810d6361ddc 100644 --- a/frame/benchmarking/Cargo.toml +++ b/frame/benchmarking/Cargo.toml @@ -1,18 +1,19 @@ [package] name = "frame-benchmarking" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Macro for benchmarking a FRAME runtime." [dependencies] codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false } -sp-api = { version = "2.0.0-alpha.1", path = "../../primitives/api", default-features = false } -sp-runtime-interface = { version = "2.0.0-alpha.1", path = "../../primitives/runtime-interface", default-features = false } -sp-std = { version = "2.0.0-alpha.1", path = "../../primitives/std", default-features = false } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} +sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api", default-features = false } +sp-runtime-interface = { version = "2.0.0-alpha.2", path = "../../primitives/runtime-interface", default-features = false } +sp-std = { version = "2.0.0-alpha.2", path = "../../primitives/std", default-features = false } +sp-io = { path = "../../primitives/io", default-features = false, version = "2.0.0-alpha.2" } [features] default = [ "std" ] diff --git a/frame/collective/Cargo.toml b/frame/collective/Cargo.toml index ca2f3203d5a..14d926827df 100644 --- a/frame/collective/Cargo.toml +++ b/frame/collective/Cargo.toml @@ -1,25 +1,26 @@ [package] name = "pallet-collective" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Collective system: Members of a set of account IDs can make their collective feelings known through dispatched calls from one of two specialized origins." [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [dev-dependencies] hex-literal = "0.2.1" -pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../balances" } [features] default = ["std"] diff --git a/frame/contracts/Cargo.toml b/frame/contracts/Cargo.toml index 6feaf59f573..89e93e725f4 100644 --- a/frame/contracts/Cargo.toml +++ b/frame/contracts/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "pallet-contracts" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME pallet for WASM contracts" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } @@ -13,22 +14,22 @@ pwasm-utils = { version = "0.12.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } parity-wasm = { version = "0.41.0", default-features = false } wasmi-validation = { version = "0.3.0", default-features = false } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-sandbox = { version = "0.8.0-alpha.1", default-features = false, path = "../../primitives/sandbox" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } -pallet-contracts-primitives = { version = "2.0.0-alpha.1", default-features = false, path = "common" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-sandbox = { version = "0.8.0-alpha.2", default-features = false, path = "../../primitives/sandbox" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } +pallet-contracts-primitives = { version = "2.0.0-alpha.2", default-features = false, path = "common" } [dev-dependencies] wabt = "0.9.2" assert_matches = "1.3.0" hex-literal = "0.2.1" -pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } -pallet-timestamp = { version = "2.0.0-alpha.1", path = "../timestamp" } -pallet-randomness-collective-flip = { version = "2.0.0-alpha.1", path = "../randomness-collective-flip" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../balances" } +pallet-timestamp = { version = "2.0.0-alpha.2", path = "../timestamp" } +pallet-randomness-collective-flip = { version = "2.0.0-alpha.2", path = "../randomness-collective-flip" } [features] default = ["std"] diff --git a/frame/contracts/common/Cargo.toml b/frame/contracts/common/Cargo.toml index 03a03038d81..753e79c19e4 100644 --- a/frame/contracts/common/Cargo.toml +++ b/frame/contracts/common/Cargo.toml @@ -1,17 +1,18 @@ [package] name = "pallet-contracts-primitives" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "A crate that hosts a common definitions that are relevant for the pallet-contracts." [dependencies] # This crate should not rely on any of the frame primitives. codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/std" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/runtime" } [features] default = ["std"] diff --git a/frame/contracts/rpc/Cargo.toml b/frame/contracts/rpc/Cargo.toml index b91e17e608a..c026ee6cdd1 100644 --- a/frame/contracts/rpc/Cargo.toml +++ b/frame/contracts/rpc/Cargo.toml @@ -1,25 +1,26 @@ [package] name = "pallet-contracts-rpc" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Node-specific RPC methods for interaction with contracts." [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0" } jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-rpc = { version = "2.0.0-alpha.1", path = "../../../primitives/rpc" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-rpc = { version = "2.0.0-alpha.2", path = "../../../primitives/rpc" } serde = { version = "1.0.101", features = ["derive"] } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } -pallet-contracts-primitives = { version = "2.0.0-alpha.1", path = "../common" } -pallet-contracts-rpc-runtime-api = { version = "0.8.0-alpha.1", path = "./runtime-api" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +sp-api = { version = "2.0.0-alpha.2", path = "../../../primitives/api" } +pallet-contracts-primitives = { version = "2.0.0-alpha.2", path = "../common" } +pallet-contracts-rpc-runtime-api = { version = "0.8.0-alpha.2", path = "./runtime-api" } [dev-dependencies] serde_json = "1.0.41" diff --git a/frame/contracts/rpc/runtime-api/Cargo.toml b/frame/contracts/rpc/runtime-api/Cargo.toml index c84ab739df1..96d3a8116d0 100644 --- a/frame/contracts/rpc/runtime-api/Cargo.toml +++ b/frame/contracts/rpc/runtime-api/Cargo.toml @@ -1,18 +1,19 @@ [package] name = "pallet-contracts-rpc-runtime-api" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Runtime API definition required by Contracts RPC extensions." [dependencies] -sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../../../primitives/api" } +sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../../../primitives/api" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../../../primitives/std" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../../../primitives/runtime" } -pallet-contracts-primitives = { version = "2.0.0-alpha.1", default-features = false, path = "../../common" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../../../primitives/runtime" } +pallet-contracts-primitives = { version = "2.0.0-alpha.2", default-features = false, path = "../../common" } [features] default = ["std"] diff --git a/frame/democracy/Cargo.toml b/frame/democracy/Cargo.toml index 512a4676cb1..e62e7a45d9c 100644 --- a/frame/democracy/Cargo.toml +++ b/frame/democracy/Cargo.toml @@ -1,25 +1,26 @@ [package] name = "pallet-democracy" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME pallet for democracy" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } -sp-storage = { version = "2.0.0-alpha.1", path = "../../primitives/storage" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../balances" } +sp-storage = { version = "2.0.0-alpha.2", path = "../../primitives/storage" } hex-literal = "0.2.1" [features] diff --git a/frame/elections-phragmen/Cargo.toml b/frame/elections-phragmen/Cargo.toml index 882185bdcea..80be82ff2c5 100644 --- a/frame/elections-phragmen/Cargo.toml +++ b/frame/elections-phragmen/Cargo.toml @@ -1,26 +1,27 @@ [package] name = "pallet-elections-phragmen" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME election pallet for PHRAGMEN" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-phragmen = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/phragmen" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-phragmen = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/phragmen" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } [dev-dependencies] -sp-io = { version = "2.0.0-alpha.1", path = "../../primitives/io" } +sp-io = { version = "2.0.0-alpha.2", path = "../../primitives/io" } hex-literal = "0.2.1" -pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -substrate-test-utils = { version = "2.0.0-alpha.1", path = "../../test-utils" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../balances" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +substrate-test-utils = { version = "2.0.0-alpha.2", path = "../../test-utils" } serde = { version = "1.0.101" } [features] diff --git a/frame/elections/Cargo.toml b/frame/elections/Cargo.toml index 38eec0dc244..81e128da31f 100644 --- a/frame/elections/Cargo.toml +++ b/frame/elections/Cargo.toml @@ -1,25 +1,26 @@ [package] name = "pallet-elections" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME pallet for elections" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [dev-dependencies] hex-literal = "0.2.1" -pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../balances" } [features] default = ["std"] diff --git a/frame/evm/Cargo.toml b/frame/evm/Cargo.toml index d521b87270a..649d6b778f7 100644 --- a/frame/evm/Cargo.toml +++ b/frame/evm/Cargo.toml @@ -1,23 +1,24 @@ [package] name = "pallet-evm" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME EVM contracts pallet" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } -pallet-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../timestamp" } -pallet-balances = { version = "2.0.0-alpha.1", default-features = false, path = "../balances" } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } +pallet-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../timestamp" } +pallet-balances = { version = "2.0.0-alpha.2", default-features = false, path = "../balances" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } primitive-types = { version = "0.6.2", default-features = false, features = ["rlp"] } rlp = { version = "0.4", default-features = false } evm = { version = "0.15", default-features = false } diff --git a/frame/example-offchain-worker/Cargo.toml b/frame/example-offchain-worker/Cargo.toml index b10d9cb3906..132ef779be5 100644 --- a/frame/example-offchain-worker/Cargo.toml +++ b/frame/example-offchain-worker/Cargo.toml @@ -1,21 +1,22 @@ [package] name = "pallet-example-offchain-worker" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "Unlicense" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME example pallet for offchain worker" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } serde = { version = "1.0.101", optional = true } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } serde_json = { version = "1.0.46", default-features = false, features = ["alloc"] } [features] diff --git a/frame/example/Cargo.toml b/frame/example/Cargo.toml index bb6625e8925..00621704540 100644 --- a/frame/example/Cargo.toml +++ b/frame/example/Cargo.toml @@ -1,24 +1,25 @@ [package] name = "pallet-example" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "Unlicense" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME example pallet" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } -pallet-balances = { version = "2.0.0-alpha.1", default-features = false, path = "../balances" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } +pallet-balances = { version = "2.0.0-alpha.2", default-features = false, path = "../balances" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } [dev-dependencies] -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/executive/Cargo.toml b/frame/executive/Cargo.toml index 8e959983601..63908edba27 100644 --- a/frame/executive/Cargo.toml +++ b/frame/executive/Cargo.toml @@ -1,27 +1,28 @@ [package] name = "frame-executive" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME executives engine" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } serde = { version = "1.0.101", optional = true } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.2"} +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } [dev-dependencies] hex-literal = "0.2.1" -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -pallet-indices = { version = "2.0.0-alpha.1", path = "../indices" } -pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } -pallet-transaction-payment = { version = "2.0.0-alpha.1", path = "../transaction-payment" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +pallet-indices = { version = "2.0.0-alpha.2", path = "../indices" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../balances" } +pallet-transaction-payment = { version = "2.0.0-alpha.2", path = "../transaction-payment" } [features] default = ["std"] diff --git a/frame/finality-tracker/Cargo.toml b/frame/finality-tracker/Cargo.toml index e9c661ebe65..5ca1bd28a52 100644 --- a/frame/finality-tracker/Cargo.toml +++ b/frame/finality-tracker/Cargo.toml @@ -1,26 +1,29 @@ [package] name = "pallet-finality-tracker" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME Pallet that tracks the last finalized block, as perceived by block authors." +documentation = "https://docs.rs/pallet-finality-tracker" + [dependencies] serde = { version = "1.0.101", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-finality-tracker = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/finality-tracker" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/inherents" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-finality-tracker = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/finality-tracker" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } impl-trait-for-tuples = "0.1.3" [dev-dependencies] -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } [features] default = ["std"] diff --git a/frame/generic-asset/Cargo.toml b/frame/generic-asset/Cargo.toml index ba79a8c13b2..5e48bc8ad7b 100644 --- a/frame/generic-asset/Cargo.toml +++ b/frame/generic-asset/Cargo.toml @@ -1,23 +1,24 @@ [package] name = "pallet-generic-asset" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Centrality Developers "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME pallet for generic asset management" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [dev-dependencies] -sp-io ={ version = "2.0.0-alpha.1", path = "../../primitives/io" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-io ={ version = "2.0.0-alpha.2", path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/grandpa/Cargo.toml b/frame/grandpa/Cargo.toml index a50e3beb322..f458a59a2cb 100644 --- a/frame/grandpa/Cargo.toml +++ b/frame/grandpa/Cargo.toml @@ -1,27 +1,28 @@ [package] name = "pallet-grandpa" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME pallet for GRANDPA finality gadget" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } -sp-finality-grandpa = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/finality-grandpa" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } -pallet-session = { version = "2.0.0-alpha.1", default-features = false, path = "../session" } -pallet-finality-tracker = { version = "2.0.0-alpha.1", default-features = false, path = "../finality-tracker" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } +sp-finality-grandpa = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/finality-grandpa" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } +pallet-session = { version = "2.0.0-alpha.2", default-features = false, path = "../session" } +pallet-finality-tracker = { version = "2.0.0-alpha.2", default-features = false, path = "../finality-tracker" } [dev-dependencies] -sp-io ={ version = "2.0.0-alpha.1", path = "../../primitives/io" } +sp-io ={ version = "2.0.0-alpha.2", path = "../../primitives/io" } [features] default = ["std"] diff --git a/frame/identity/Cargo.toml b/frame/identity/Cargo.toml index b40537f7d2b..0cbeb2772bb 100644 --- a/frame/identity/Cargo.toml +++ b/frame/identity/Cargo.toml @@ -1,26 +1,27 @@ [package] name = "pallet-identity" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME identity management pallet" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } enumflags2 = { version = "0.6.2" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -frame-benchmarking = { version = "2.0.0-alpha.1", default-features = false, path = "../benchmarking" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../benchmarking" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../balances" } [features] default = ["std"] diff --git a/frame/im-online/Cargo.toml b/frame/im-online/Cargo.toml index 269182f4585..e1c35af54c4 100644 --- a/frame/im-online/Cargo.toml +++ b/frame/im-online/Cargo.toml @@ -1,25 +1,26 @@ [package] name = "pallet-im-online" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME's I'm online pallet" [dependencies] -sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/application-crypto" } -pallet-authorship = { version = "2.0.0-alpha.1", default-features = false, path = "../authorship" } +sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/application-crypto" } +pallet-authorship = { version = "2.0.0-alpha.2", default-features = false, path = "../authorship" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } -pallet-session = { version = "2.0.0-alpha.1", default-features = false, path = "../session" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +pallet-session = { version = "2.0.0-alpha.2", default-features = false, path = "../session" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [features] default = ["std", "pallet-session/historical"] diff --git a/frame/indices/Cargo.toml b/frame/indices/Cargo.toml index a12ca831761..341b2722dc8 100644 --- a/frame/indices/Cargo.toml +++ b/frame/indices/Cargo.toml @@ -1,25 +1,26 @@ [package] name = "pallet-indices" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME indices management pallet" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-keyring = { version = "2.0.0-alpha.1", optional = true, path = "../../primitives/keyring" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-keyring = { version = "2.0.0-alpha.2", optional = true, path = "../../primitives/keyring" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [dev-dependencies] -pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../balances" } [features] default = ["std"] diff --git a/frame/membership/Cargo.toml b/frame/membership/Cargo.toml index 4a66a2b04f6..0d89a8038c0 100644 --- a/frame/membership/Cargo.toml +++ b/frame/membership/Cargo.toml @@ -1,23 +1,24 @@ [package] name = "pallet-membership" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME membership management pallet" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } [dev-dependencies] -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/metadata/Cargo.toml b/frame/metadata/Cargo.toml index 9b53faed20c..2d3160ac014 100644 --- a/frame/metadata/Cargo.toml +++ b/frame/metadata/Cargo.toml @@ -1,17 +1,18 @@ [package] name = "frame-metadata" -version = "11.0.0-alpha.1" +version = "11.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Decodable variant of the RuntimeMetadata." [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/nicks/Cargo.toml b/frame/nicks/Cargo.toml index ae3249368d5..44d9ee4a559 100644 --- a/frame/nicks/Cargo.toml +++ b/frame/nicks/Cargo.toml @@ -1,24 +1,25 @@ [package] name = "pallet-nicks" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME pallet for nick management" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../balances" } [features] default = ["std"] diff --git a/frame/offences/Cargo.toml b/frame/offences/Cargo.toml index f8301ed4888..458bfd05555 100644 --- a/frame/offences/Cargo.toml +++ b/frame/offences/Cargo.toml @@ -1,25 +1,26 @@ [package] name = "pallet-offences" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME offences pallet" [dependencies] -pallet-balances = { version = "2.0.0-alpha.1", default-features = false, path = "../balances" } +pallet-balances = { version = "2.0.0-alpha.2", default-features = false, path = "../balances" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [dev-dependencies] -sp-io = { version = "2.0.0-alpha.1", path = "../../primitives/io" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-io = { version = "2.0.0-alpha.2", path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/randomness-collective-flip/Cargo.toml b/frame/randomness-collective-flip/Cargo.toml index dc7e4c18fde..de369b7b88b 100644 --- a/frame/randomness-collective-flip/Cargo.toml +++ b/frame/randomness-collective-flip/Cargo.toml @@ -1,23 +1,24 @@ [package] name = "pallet-randomness-collective-flip" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME randomness collective flip pallet" [dependencies] safe-mix = { version = "1.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } [dev-dependencies] -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -sp-io = { version = "2.0.0-alpha.1", path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sp-io = { version = "2.0.0-alpha.2", path = "../../primitives/io" } [features] default = ["std"] diff --git a/frame/recovery/Cargo.toml b/frame/recovery/Cargo.toml index bab55baca03..efeb349f06b 100644 --- a/frame/recovery/Cargo.toml +++ b/frame/recovery/Cargo.toml @@ -1,25 +1,26 @@ [package] name = "pallet-recovery" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME account recovery pallet" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } enumflags2 = { version = "0.6.2" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../balances" } [features] default = ["std"] diff --git a/frame/scored-pool/Cargo.toml b/frame/scored-pool/Cargo.toml index 106f47a253b..36efebd7b48 100644 --- a/frame/scored-pool/Cargo.toml +++ b/frame/scored-pool/Cargo.toml @@ -1,24 +1,25 @@ [package] name = "pallet-scored-pool" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME pallet for scored pools" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [dev-dependencies] -pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../balances" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/session/Cargo.toml b/frame/session/Cargo.toml index e09a268adb8..5d2b3b5fa8c 100644 --- a/frame/session/Cargo.toml +++ b/frame/session/Cargo.toml @@ -1,28 +1,29 @@ [package] name = "pallet-session" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME sessions pallet" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } -pallet-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../timestamp" } -sp-trie = { optional = true, path = "../../primitives/trie", default-features = false , version = "2.0.0-alpha.1"} -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } +pallet-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../timestamp" } +sp-trie = { optional = true, path = "../../primitives/trie", default-features = false , version = "2.0.0-alpha.2"} +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.2"} impl-trait-for-tuples = "0.1.3" [dev-dependencies] -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -sp-application-crypto = { version = "2.0.0-alpha.1", path = "../../primitives/application-crypto" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sp-application-crypto = { version = "2.0.0-alpha.2", path = "../../primitives/application-crypto" } lazy_static = "1.4.0" [features] diff --git a/frame/society/Cargo.toml b/frame/society/Cargo.toml index 99c63422421..ef27acb1cb5 100644 --- a/frame/society/Cargo.toml +++ b/frame/society/Cargo.toml @@ -1,25 +1,26 @@ [package] name = "pallet-society" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME society pallet" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.2"} +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } rand_chacha = { version = "0.2", default-features = false } [dev-dependencies] -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../balances" } [features] default = ["std"] diff --git a/frame/staking/Cargo.toml b/frame/staking/Cargo.toml index 57786962973..47316765266 100644 --- a/frame/staking/Cargo.toml +++ b/frame/staking/Cargo.toml @@ -1,32 +1,33 @@ [package] name = "pallet-staking" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME pallet staking" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-keyring = { version = "2.0.0-alpha.1", optional = true, path = "../../primitives/keyring" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-phragmen = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/phragmen" } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-staking = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/staking" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } -pallet-session = { version = "2.0.0-alpha.1", features = ["historical"], path = "../session", default-features = false } -pallet-authorship = { version = "2.0.0-alpha.1", default-features = false, path = "../authorship" } +sp-keyring = { version = "2.0.0-alpha.2", optional = true, path = "../../primitives/keyring" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-phragmen = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/phragmen" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.2"} +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-staking = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/staking" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } +pallet-session = { version = "2.0.0-alpha.2", features = ["historical"], path = "../session", default-features = false } +pallet-authorship = { version = "2.0.0-alpha.2", default-features = false, path = "../authorship" } [dev-dependencies] -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } -pallet-timestamp = { version = "2.0.0-alpha.1", path = "../timestamp" } -pallet-staking-reward-curve = { version = "2.0.0-alpha.1", path = "../staking/reward-curve" } -substrate-test-utils = { version = "2.0.0-alpha.1", path = "../../test-utils" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../balances" } +pallet-timestamp = { version = "2.0.0-alpha.2", path = "../timestamp" } +pallet-staking-reward-curve = { version = "2.0.0-alpha.2", path = "../staking/reward-curve" } +substrate-test-utils = { version = "2.0.0-alpha.2", path = "../../test-utils" } [features] migrate = [] diff --git a/frame/staking/reward-curve/Cargo.toml b/frame/staking/reward-curve/Cargo.toml index e414d544dab..0b727cbcf58 100644 --- a/frame/staking/reward-curve/Cargo.toml +++ b/frame/staking/reward-curve/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "pallet-staking-reward-curve" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Reward Curve for FRAME staking pallet" [lib] proc-macro = true @@ -17,4 +18,4 @@ proc-macro2 = "1.0.6" proc-macro-crate = "0.1.4" [dev-dependencies] -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } diff --git a/frame/sudo/Cargo.toml b/frame/sudo/Cargo.toml index fa2797d2f6d..3360653c25c 100644 --- a/frame/sudo/Cargo.toml +++ b/frame/sudo/Cargo.toml @@ -1,23 +1,24 @@ [package] name = "pallet-sudo" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME pallet for sudo" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/support/Cargo.toml b/frame/support/Cargo.toml index e26cd64d525..c1328021755 100644 --- a/frame/support/Cargo.toml +++ b/frame/support/Cargo.toml @@ -1,34 +1,35 @@ [package] name = "frame-support" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Support code for the runtime." [dependencies] log = "0.4" serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] } -frame-metadata = { version = "11.0.0-alpha.1", default-features = false, path = "../metadata" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } -sp-arithmetic = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/arithmetic" } -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } -frame-support-procedural = { version = "2.0.0-alpha.1", path = "./procedural" } +frame-metadata = { version = "11.0.0-alpha.2", default-features = false, path = "../metadata" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.2"} +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } +sp-arithmetic = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/arithmetic" } +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/inherents" } +frame-support-procedural = { version = "2.0.0-alpha.2", path = "./procedural" } paste = "0.1.6" once_cell = { version = "1", default-features = false, optional = true } -sp-state-machine = { version = "0.8.0-alpha.1", optional = true, path = "../../primitives/state-machine" } +sp-state-machine = { version = "0.8.0-alpha.2", optional = true, path = "../../primitives/state-machine" } bitmask = { version = "0.5.0", default-features = false } impl-trait-for-tuples = "0.1.3" tracing = { version = "0.1.10", optional = true } [dev-dependencies] pretty_assertions = "0.6.1" -frame-system = { version = "2.0.0-alpha.1", path = "../system" } +frame-system = { version = "2.0.0-alpha.2", path = "../system" } [features] default = ["std"] diff --git a/frame/support/procedural/Cargo.toml b/frame/support/procedural/Cargo.toml index 4b39cf8ed42..39b7e175eee 100644 --- a/frame/support/procedural/Cargo.toml +++ b/frame/support/procedural/Cargo.toml @@ -1,17 +1,18 @@ [package] name = "frame-support-procedural" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Proc macro of Support code for the runtime." [lib] proc-macro = true [dependencies] -frame-support-procedural-tools = { version = "2.0.0-alpha.1", path = "./tools" } +frame-support-procedural-tools = { version = "2.0.0-alpha.2", path = "./tools" } proc-macro2 = "1.0.6" quote = "1.0.2" syn = { version = "1.0.7", features = ["full"] } diff --git a/frame/support/procedural/tools/Cargo.toml b/frame/support/procedural/tools/Cargo.toml index 1c3a0f60d52..da107c024fe 100644 --- a/frame/support/procedural/tools/Cargo.toml +++ b/frame/support/procedural/tools/Cargo.toml @@ -1,14 +1,15 @@ [package] name = "frame-support-procedural-tools" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Proc macro helpers for procedural macros" [dependencies] -frame-support-procedural-tools-derive = { version = "2.0.0-alpha.1", path = "./derive" } +frame-support-procedural-tools-derive = { version = "2.0.0-alpha.2", path = "./derive" } proc-macro2 = "1.0.6" quote = "1.0.2" syn = { version = "1.0.7", features = ["full", "visit"] } diff --git a/frame/support/procedural/tools/derive/Cargo.toml b/frame/support/procedural/tools/derive/Cargo.toml index 98b9d797020..e95aa1d6900 100644 --- a/frame/support/procedural/tools/derive/Cargo.toml +++ b/frame/support/procedural/tools/derive/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "frame-support-procedural-tools-derive" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Use to derive parsing for parsing struct." [lib] proc-macro = true diff --git a/frame/support/test/Cargo.toml b/frame/support/test/Cargo.toml index 594d4379fde..9d706644081 100644 --- a/frame/support/test/Cargo.toml +++ b/frame/support/test/Cargo.toml @@ -11,12 +11,12 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-io ={ path = "../../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} -sp-state-machine = { version = "0.8.0-alpha.1", optional = true, path = "../../../primitives/state-machine" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../" } -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/inherents" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/runtime" } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../../primitives/core" } +sp-io ={ path = "../../../primitives/io", default-features = false , version = "2.0.0-alpha.2"} +sp-state-machine = { version = "0.8.0-alpha.2", optional = true, path = "../../../primitives/state-machine" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../" } +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/inherents" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/runtime" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/core" } trybuild = "1.0.17" pretty_assertions = "0.6.1" diff --git a/frame/system/Cargo.toml b/frame/system/Cargo.toml index e3a347c5883..b75e0385043 100644 --- a/frame/system/Cargo.toml +++ b/frame/system/Cargo.toml @@ -1,26 +1,27 @@ [package] name = "frame-system" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME system module" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.1"} -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-version = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/version" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io = { path = "../../primitives/io", default-features = false, version = "2.0.0-alpha.2" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-version = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/version" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } impl-trait-for-tuples = "0.1.3" [dev-dependencies] criterion = "0.2.11" -sp-externalities = { version = "0.8.0-alpha.1", path = "../../primitives/externalities" } +sp-externalities = { version = "0.8.0-alpha.2", path = "../../primitives/externalities" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-utils/runtime/client" } [features] diff --git a/frame/system/rpc/runtime-api/Cargo.toml b/frame/system/rpc/runtime-api/Cargo.toml index 99aa57eaf37..88df5ea3b8e 100644 --- a/frame/system/rpc/runtime-api/Cargo.toml +++ b/frame/system/rpc/runtime-api/Cargo.toml @@ -1,14 +1,15 @@ [package] name = "frame-system-rpc-runtime-api" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Runtime API definition required by System RPC extensions." [dependencies] -sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../../../primitives/api" } +sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../../../primitives/api" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } [features] diff --git a/frame/timestamp/Cargo.toml b/frame/timestamp/Cargo.toml index a6f3da7ea4f..fe73b081b01 100644 --- a/frame/timestamp/Cargo.toml +++ b/frame/timestamp/Cargo.toml @@ -1,28 +1,31 @@ [package] name = "pallet-timestamp" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME Timestamp Module" +documentation = "https://docs.rs/pallet-timestamp" + [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } -frame-benchmarking = { version = "2.0.0-alpha.1", default-features = false, path = "../benchmarking" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } -sp-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/timestamp" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/inherents" } +frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../benchmarking" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } +sp-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/timestamp" } impl-trait-for-tuples = "0.1.3" [dev-dependencies] -sp-io ={ version = "2.0.0-alpha.1", path = "../../primitives/io" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-io ={ version = "2.0.0-alpha.2", path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/transaction-payment/Cargo.toml b/frame/transaction-payment/Cargo.toml index d60dbdaaf6d..b92a22ecde0 100644 --- a/frame/transaction-payment/Cargo.toml +++ b/frame/transaction-payment/Cargo.toml @@ -1,24 +1,25 @@ [package] name = "pallet-transaction-payment" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME pallet to manage transaction payments" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } -pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-alpha.1", default-features = false, path = "./rpc/runtime-api" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } +pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-alpha.2", default-features = false, path = "./rpc/runtime-api" } [dev-dependencies] -sp-io = { version = "2.0.0-alpha.1", path = "../../primitives/io" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } +sp-io = { version = "2.0.0-alpha.2", path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../balances" } [features] default = ["std"] diff --git a/frame/transaction-payment/rpc/Cargo.toml b/frame/transaction-payment/rpc/Cargo.toml index 689d3642cd6..677b85b5fb3 100644 --- a/frame/transaction-payment/rpc/Cargo.toml +++ b/frame/transaction-payment/rpc/Cargo.toml @@ -1,21 +1,22 @@ [package] name = "pallet-transaction-payment-rpc" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "RPC interface for the transaction payment module." [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0" } jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } -sp-rpc = { version = "2.0.0-alpha.1", path = "../../../primitives/rpc" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } +sp-rpc = { version = "2.0.0-alpha.2", path = "../../../primitives/rpc" } serde = { version = "1.0.101", features = ["derive"] } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } -pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-alpha.1", path = "./runtime-api" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +sp-api = { version = "2.0.0-alpha.2", path = "../../../primitives/api" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } +pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0-alpha.2", path = "./runtime-api" } diff --git a/frame/transaction-payment/rpc/runtime-api/Cargo.toml b/frame/transaction-payment/rpc/runtime-api/Cargo.toml index 0b2dce0f55b..1a5f5fc35f3 100644 --- a/frame/transaction-payment/rpc/runtime-api/Cargo.toml +++ b/frame/transaction-payment/rpc/runtime-api/Cargo.toml @@ -1,19 +1,20 @@ [package] name = "pallet-transaction-payment-rpc-runtime-api" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "RPC runtime API for transaction payment FRAME pallet" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../../../primitives/api" } +sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../../../primitives/api" } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../../../primitives/std" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../../../primitives/runtime" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../../../support" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../../../support" } [dev-dependencies] serde_json = "1.0.41" diff --git a/frame/treasury/Cargo.toml b/frame/treasury/Cargo.toml index 2da2104e1c9..c47a87fb569 100644 --- a/frame/treasury/Cargo.toml +++ b/frame/treasury/Cargo.toml @@ -1,24 +1,25 @@ [package] name = "pallet-treasury" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME pallet to manage treasury" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } -pallet-balances = { version = "2.0.0-alpha.1", default-features = false, path = "../balances" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } +pallet-balances = { version = "2.0.0-alpha.2", default-features = false, path = "../balances" } [dev-dependencies] -sp-io ={ version = "2.0.0-alpha.1", path = "../../primitives/io" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } +sp-io ={ version = "2.0.0-alpha.2", path = "../../primitives/io" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } [features] default = ["std"] diff --git a/frame/utility/Cargo.toml b/frame/utility/Cargo.toml index 3aec9fc8685..68d621861ce 100644 --- a/frame/utility/Cargo.toml +++ b/frame/utility/Cargo.toml @@ -1,25 +1,26 @@ [package] name = "pallet-utility" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME utilities pallet" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } [dev-dependencies] -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../balances" } [features] default = ["std"] diff --git a/frame/vesting/Cargo.toml b/frame/vesting/Cargo.toml index 76fec97201c..ff16007acea 100644 --- a/frame/vesting/Cargo.toml +++ b/frame/vesting/Cargo.toml @@ -1,26 +1,27 @@ [package] name = "pallet-vesting" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME pallet for manage vesting" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } enumflags2 = { version = "0.6.2" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../support" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../system" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [dev-dependencies] -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -pallet-balances = { version = "2.0.0-alpha.1", path = "../balances" } -sp-storage = { version = "2.0.0-alpha.1", path = "../../primitives/storage" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +pallet-balances = { version = "2.0.0-alpha.2", path = "../balances" } +sp-storage = { version = "2.0.0-alpha.2", path = "../../primitives/storage" } hex-literal = "0.2.1" [features] diff --git a/primitives/allocator/Cargo.toml b/primitives/allocator/Cargo.toml index 90c7d922388..af977ed2406 100644 --- a/primitives/allocator/Cargo.toml +++ b/primitives/allocator/Cargo.toml @@ -1,16 +1,18 @@ [package] name = "sp-allocator" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Collection of allocator implementations." +documentation = "https://docs.rs/sp-allocator" [dependencies] -sp-std = { version = "2.0.0-alpha.1", path = "../std", default-features = false } -sp-core = { version = "2.0.0-alpha.1", path = "../core", default-features = false } -sp-wasm-interface = { version = "2.0.0-alpha.1", path = "../wasm-interface", default-features = false } +sp-std = { version = "2.0.0-alpha.2", path = "../std", default-features = false } +sp-core = { version = "2.0.0-alpha.2", path = "../core", default-features = false } +sp-wasm-interface = { version = "2.0.0-alpha.2", path = "../wasm-interface", default-features = false } log = { version = "0.4.8", optional = true } derive_more = { version = "0.99.2", optional = true } diff --git a/primitives/api/Cargo.toml b/primitives/api/Cargo.toml index 165d05f0283..6a985b4f485 100644 --- a/primitives/api/Cargo.toml +++ b/primitives/api/Cargo.toml @@ -1,20 +1,21 @@ [package] name = "sp-api" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate runtime api primitives" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-api-proc-macro = { version = "2.0.0-alpha.1", path = "proc-macro" } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } -sp-version = { version = "2.0.0-alpha.1", default-features = false, path = "../version" } -sp-state-machine = { version = "0.8.0-alpha.1", optional = true, path = "../../primitives/state-machine" } +sp-api-proc-macro = { version = "2.0.0-alpha.2", path = "proc-macro" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../core" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } +sp-version = { version = "2.0.0-alpha.2", default-features = false, path = "../version" } +sp-state-machine = { version = "0.8.0-alpha.2", optional = true, path = "../../primitives/state-machine" } hash-db = { version = "0.15.2", optional = true } [dev-dependencies] diff --git a/primitives/api/proc-macro/Cargo.toml b/primitives/api/proc-macro/Cargo.toml index 0a659c626ba..8e9bf11917b 100644 --- a/primitives/api/proc-macro/Cargo.toml +++ b/primitives/api/proc-macro/Cargo.toml @@ -1,11 +1,14 @@ [package] name = "sp-api-proc-macro" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Macros for declaring and implementing runtime apis." +documentation = "https://docs.rs/sp-api-proc-macro" + [lib] proc-macro = true diff --git a/primitives/api/test/Cargo.toml b/primitives/api/test/Cargo.toml index aa538754a75..7b018199a55 100644 --- a/primitives/api/test/Cargo.toml +++ b/primitives/api/test/Cargo.toml @@ -9,14 +9,14 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0-alpha.1", path = "../" } +sp-api = { version = "2.0.0-alpha.2", path = "../" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } -sp-version = { version = "2.0.0-alpha.1", path = "../../version" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../runtime" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../blockchain" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../../primitives/consensus/common" } +sp-version = { version = "2.0.0-alpha.2", path = "../../version" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../runtime" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../blockchain" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-state-machine = { version = "0.8.0-alpha.1", path = "../../../primitives/state-machine" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../../../primitives/state-machine" } trybuild = "1.0.17" rustversion = "1.0.0" diff --git a/primitives/application-crypto/Cargo.toml b/primitives/application-crypto/Cargo.toml index f8d36e4db8a..630012ba708 100644 --- a/primitives/application-crypto/Cargo.toml +++ b/primitives/application-crypto/Cargo.toml @@ -1,19 +1,21 @@ [package] name = "sp-application-crypto" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" description = "Provides facilities for generating application specific crypto wrapper types." license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +documentation = "https://docs.rs/sp-application-crypto" + [dependencies] -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../core" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } [features] default = [ "std" ] diff --git a/primitives/application-crypto/test/Cargo.toml b/primitives/application-crypto/test/Cargo.toml index ab84cdd0a67..0ed5355ce2d 100644 --- a/primitives/application-crypto/test/Cargo.toml +++ b/primitives/application-crypto/test/Cargo.toml @@ -10,8 +10,8 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../core" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../core" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../runtime" } -sp-api = { version = "2.0.0-alpha.1", path = "../../api" } -sp-application-crypto = { version = "2.0.0-alpha.1", path = "../" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../runtime" } +sp-api = { version = "2.0.0-alpha.2", path = "../../api" } +sp-application-crypto = { version = "2.0.0-alpha.2", path = "../" } diff --git a/primitives/arithmetic/Cargo.toml b/primitives/arithmetic/Cargo.toml index e8d73f595d1..cfaaa2ebe33 100644 --- a/primitives/arithmetic/Cargo.toml +++ b/primitives/arithmetic/Cargo.toml @@ -1,19 +1,22 @@ [package] name = "sp-arithmetic" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Minimal fixed point arithmetic primitives and types for runtime." +documentation = "https://docs.rs/sp-arithmetic" + [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } integer-sqrt = "0.1.2" num-traits = { version = "0.2.8", default-features = false } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-debug-derive = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/debug-derive" } +sp-debug-derive = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/debug-derive" } [dev-dependencies] primitive-types = "0.6.2" diff --git a/primitives/authority-discovery/Cargo.toml b/primitives/authority-discovery/Cargo.toml index d5800bc5664..d7093940447 100644 --- a/primitives/authority-discovery/Cargo.toml +++ b/primitives/authority-discovery/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-authority-discovery" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] description = "Authority discovery primitives" edition = "2018" @@ -9,11 +9,11 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../application-crypto" } +sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../application-crypto" } codec = { package = "parity-scale-codec", default-features = false, version = "1.0.3" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } -sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../api" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } +sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../api" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } [features] default = ["std"] diff --git a/primitives/authorship/Cargo.toml b/primitives/authorship/Cargo.toml index bc4840278a0..e131393ff10 100644 --- a/primitives/authorship/Cargo.toml +++ b/primitives/authorship/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-authorship" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] description = "Authorship primitives" edition = "2018" @@ -9,9 +9,9 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../inherents" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../inherents" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } [features] diff --git a/primitives/block-builder/Cargo.toml b/primitives/block-builder/Cargo.toml index cf6f7654fcc..1e1a23fd6eb 100644 --- a/primitives/block-builder/Cargo.toml +++ b/primitives/block-builder/Cargo.toml @@ -1,18 +1,19 @@ [package] name = "sp-block-builder" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "The block builder runtime api." [dependencies] -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } -sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../api" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } +sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../api" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false } -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../inherents" } +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../inherents" } [features] default = [ "std" ] diff --git a/primitives/blockchain/Cargo.toml b/primitives/blockchain/Cargo.toml index 19cdcf1481f..cdd31ad1af1 100644 --- a/primitives/blockchain/Cargo.toml +++ b/primitives/blockchain/Cargo.toml @@ -1,11 +1,14 @@ [package] name = "sp-blockchain" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate blockchain traits and primitives." +documentation = "https://docs.rs/sp-blockchain" + [dependencies] log = "0.4.8" @@ -13,7 +16,7 @@ lru = "0.4.0" parking_lot = "0.10.0" derive_more = "0.99.2" codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-consensus = { version = "0.8.0-alpha.1", path = "../consensus/common" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../runtime" } -sp-block-builder = { version = "2.0.0-alpha.1", path = "../block-builder" } -sp-state-machine = { version = "0.8.0-alpha.1", path = "../state-machine" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../consensus/common" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../runtime" } +sp-block-builder = { version = "2.0.0-alpha.2", path = "../block-builder" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../state-machine" } diff --git a/primitives/consensus/aura/Cargo.toml b/primitives/consensus/aura/Cargo.toml index a4372c85ec7..e2800a528a2 100644 --- a/primitives/consensus/aura/Cargo.toml +++ b/primitives/consensus/aura/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus-aura" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] description = "Primitives for Aura consensus" edition = "2018" @@ -9,13 +9,13 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../../application-crypto" } +sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../../application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../std" } -sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../api" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../runtime" } -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../inherents" } -sp-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../timestamp" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../std" } +sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../api" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../runtime" } +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../inherents" } +sp-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../timestamp" } [features] default = ["std"] diff --git a/primitives/consensus/babe/Cargo.toml b/primitives/consensus/babe/Cargo.toml index 52a344dd7f7..ddc76cc634e 100644 --- a/primitives/consensus/babe/Cargo.toml +++ b/primitives/consensus/babe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus-babe" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] description = "Primitives for BABE consensus" edition = "2018" @@ -9,15 +9,15 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../../application-crypto" } +sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../../application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../std" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../std" } schnorrkel = { version = "0.8.5", features = ["preaudit_deprecated"], optional = true } -sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../api" } -sp-consensus = { version = "0.8.0-alpha.1", optional = true, path = "../common" } -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../inherents" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../runtime" } -sp-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../timestamp" } +sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../api" } +sp-consensus = { version = "0.8.0-alpha.2", optional = true, path = "../common" } +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../inherents" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../runtime" } +sp-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../timestamp" } [features] default = ["std"] diff --git a/primitives/consensus/common/Cargo.toml b/primitives/consensus/common/Cargo.toml index 3f9fc17fa3d..8e5ddad32d0 100644 --- a/primitives/consensus/common/Cargo.toml +++ b/primitives/consensus/common/Cargo.toml @@ -1,26 +1,28 @@ [package] name = "sp-consensus" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] -description = "Common utilities for substrate consensus" edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Common utilities for building and using consensus engines in substrate." +documentation = "https://docs.rs/sp-consensus/" + [dependencies] derive_more = "0.99.2" libp2p = { version = "0.16.1", default-features = false } log = "0.4.8" -sp-core = { path= "../../core" , version = "2.0.0-alpha.1"} -sp-inherents = { version = "2.0.0-alpha.1", path = "../../inherents" } -sp-state-machine = { version = "0.8.0-alpha.1", path = "../../../primitives/state-machine" } +sp-core = { path= "../../core" , version = "2.0.0-alpha.2"} +sp-inherents = { version = "2.0.0-alpha.2", path = "../../inherents" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../../../primitives/state-machine" } futures = { version = "0.3.1", features = ["thread-pool"] } futures-timer = "3.0.1" futures-diagnose = "1.0" -sp-std = { version = "2.0.0-alpha.1", path = "../../std" } -sp-version = { version = "2.0.0-alpha.1", path = "../../version" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../runtime" } +sp-std = { version = "2.0.0-alpha.2", path = "../../std" } +sp-version = { version = "2.0.0-alpha.2", path = "../../version" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../runtime" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } parking_lot = "0.10.0" serde = { version = "1.0", features = ["derive"] } diff --git a/primitives/consensus/pow/Cargo.toml b/primitives/consensus/pow/Cargo.toml index 2e1ab504d97..7a8965a4318 100644 --- a/primitives/consensus/pow/Cargo.toml +++ b/primitives/consensus/pow/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus-pow" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] description = "Primitives for Aura consensus" edition = "2018" @@ -9,10 +9,10 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../api" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../std" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../runtime" } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../core" } +sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../api" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../runtime" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../core" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } [features] diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index 174c4e806af..27efd587d4b 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -1,14 +1,16 @@ [package] name = "sp-core" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Shareable Substrate types." +documentation = "https://docs.rs/sp-core" [dependencies] -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } rustc-hex = { version = "2.0.1", default-features = false } log = { version = "0.4.8", default-features = false } @@ -28,9 +30,9 @@ num-traits = { version = "0.2.8", default-features = false } zeroize = { version = "1.0.0", default-features = false } lazy_static = { version = "1.4.0", default-features = false, optional = true } parking_lot = { version = "0.10.0", optional = true } -sp-debug-derive = { version = "2.0.0-alpha.1", path = "../debug-derive" } -sp-externalities = { version = "0.8.0-alpha.1", optional = true, path = "../externalities" } -sp-storage = { version = "2.0.0-alpha.1", default-features = false, path = "../storage" } +sp-debug-derive = { version = "2.0.0-alpha.2", path = "../debug-derive" } +sp-externalities = { version = "0.8.0-alpha.2", optional = true, path = "../externalities" } +sp-storage = { version = "2.0.0-alpha.2", default-features = false, path = "../storage" } libsecp256k1 = { version = "0.3.2", default-features = false, features = ["hmac"] } parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } @@ -43,10 +45,10 @@ sha2 = { version = "0.8.0", default-features = false, optional = true } hex = { version = "0.4", default-features = false, optional = true } twox-hash = { version = "1.5.0", default-features = false, optional = true } -sp-runtime-interface = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime-interface" } +sp-runtime-interface = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime-interface" } [dev-dependencies] -sp-serializer = { version = "2.0.0-alpha.1", path = "../serializer" } +sp-serializer = { version = "2.0.0-alpha.2", path = "../serializer" } pretty_assertions = "0.6.1" hex-literal = "0.2.1" rand = "0.7.2" diff --git a/primitives/debug-derive/Cargo.toml b/primitives/debug-derive/Cargo.toml index 98d77580138..1dfc980578d 100644 --- a/primitives/debug-derive/Cargo.toml +++ b/primitives/debug-derive/Cargo.toml @@ -1,11 +1,13 @@ [package] name = "sp-debug-derive" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Macros to derive runtime debug implementation." +documentation = "https://docs.rs/sp-debug-derive" [lib] proc-macro = true diff --git a/primitives/externalities/Cargo.toml b/primitives/externalities/Cargo.toml index 9044d7b01e3..4d654e0f947 100644 --- a/primitives/externalities/Cargo.toml +++ b/primitives/externalities/Cargo.toml @@ -1,13 +1,15 @@ [package] name = "sp-externalities" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate externalities abstraction" +documentation = "https://docs.rs/sp-externalities" [dependencies] -sp-storage = { version = "2.0.0-alpha.1", path = "../storage" } -sp-std = { version = "2.0.0-alpha.1", path = "../std" } +sp-storage = { version = "2.0.0-alpha.2", path = "../storage" } +sp-std = { version = "2.0.0-alpha.2", path = "../std" } environmental = { version = "1.1.1" } diff --git a/primitives/finality-grandpa/Cargo.toml b/primitives/finality-grandpa/Cargo.toml index cd621c78319..c24bb6e623e 100644 --- a/primitives/finality-grandpa/Cargo.toml +++ b/primitives/finality-grandpa/Cargo.toml @@ -1,19 +1,22 @@ [package] name = "sp-finality-grandpa" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Primitives for GRANDPA integration, suitable for WASM compilation." +documentation = "https://docs.rs/sp-finality-grandpa" + [dependencies] -sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../application-crypto" } +sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../api" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } +sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../api" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } [features] default = ["std"] diff --git a/primitives/finality-tracker/Cargo.toml b/primitives/finality-tracker/Cargo.toml index e9321cc1a09..2e8be7e1e5d 100644 --- a/primitives/finality-tracker/Cargo.toml +++ b/primitives/finality-tracker/Cargo.toml @@ -1,16 +1,17 @@ [package] name = "sp-finality-tracker" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME module that tracks the last finalized block, as perceived by block authors." [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/inherents" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } [features] default = ["std"] diff --git a/primitives/inherents/Cargo.toml b/primitives/inherents/Cargo.toml index aa403693153..3a65576d609 100644 --- a/primitives/inherents/Cargo.toml +++ b/primitives/inherents/Cargo.toml @@ -1,16 +1,19 @@ [package] name = "sp-inherents" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Provides types and traits for creating and checking inherents." +documentation = "https://docs.rs/sp-inherents" + [dependencies] parking_lot = { version = "0.10.0", optional = true } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../core" } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] } derive_more = { version = "0.99.2", optional = true } diff --git a/primitives/io/Cargo.toml b/primitives/io/Cargo.toml index 05a051e0624..ff58d03d985 100644 --- a/primitives/io/Cargo.toml +++ b/primitives/io/Cargo.toml @@ -1,23 +1,26 @@ [package] name = "sp-io" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "I/O for Substrate runtimes" +documentation = "https://docs.rs/sp-io" + [dependencies] codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false } hash-db = { version = "0.15.2", default-features = false } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../core" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } libsecp256k1 = { version = "0.3.4", optional = true } -sp-state-machine = { version = "0.8.0-alpha.1", optional = true, path = "../../primitives/state-machine" } -sp-wasm-interface = { version = "2.0.0-alpha.1", path = "../../primitives/wasm-interface", default-features = false } -sp-runtime-interface = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime-interface" } -sp-trie = { version = "2.0.0-alpha.1", optional = true, path = "../../primitives/trie" } -sp-externalities = { version = "0.8.0-alpha.1", optional = true, path = "../externalities" } +sp-state-machine = { version = "0.8.0-alpha.2", optional = true, path = "../../primitives/state-machine" } +sp-wasm-interface = { version = "2.0.0-alpha.2", path = "../../primitives/wasm-interface", default-features = false } +sp-runtime-interface = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime-interface" } +sp-trie = { version = "2.0.0-alpha.2", optional = true, path = "../../primitives/trie" } +sp-externalities = { version = "0.8.0-alpha.2", optional = true, path = "../externalities" } log = { version = "0.4.8", optional = true } [features] diff --git a/primitives/keyring/Cargo.toml b/primitives/keyring/Cargo.toml index 46793cd5e1e..9177c377016 100644 --- a/primitives/keyring/Cargo.toml +++ b/primitives/keyring/Cargo.toml @@ -1,14 +1,17 @@ [package] name = "sp-keyring" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Keyring support code for the runtime. A set of test accounts." +documentation = "https://docs.rs/sp-keyring" + [dependencies] -sp-core = { version = "2.0.0-alpha.1", path = "../core" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../runtime" } +sp-core = { version = "2.0.0-alpha.2", path = "../core" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../runtime" } lazy_static = "1.4.0" strum = { version = "0.16.0", features = ["derive"] } diff --git a/primitives/offchain/Cargo.toml b/primitives/offchain/Cargo.toml index 78f3071bf00..8e7853f6ea3 100644 --- a/primitives/offchain/Cargo.toml +++ b/primitives/offchain/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate offchain workers primitives" name = "sp-offchain" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" @@ -9,8 +9,8 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../api" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } +sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../api" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } [features] default = ["std"] diff --git a/primitives/panic-handler/Cargo.toml b/primitives/panic-handler/Cargo.toml index 2f63f32aca6..795aa240472 100644 --- a/primitives/panic-handler/Cargo.toml +++ b/primitives/panic-handler/Cargo.toml @@ -1,12 +1,13 @@ [package] name = "sp-panic-handler" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] -description = "Substrate panic handler." edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Custom panic hook with bug report link" +documentation = "https://docs.rs/sp-panic-handler" [dependencies] backtrace = "0.3.38" diff --git a/primitives/phragmen/Cargo.toml b/primitives/phragmen/Cargo.toml index ec0bdce2e40..23b872a15cc 100644 --- a/primitives/phragmen/Cargo.toml +++ b/primitives/phragmen/Cargo.toml @@ -1,20 +1,21 @@ [package] name = "sp-phragmen" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "PHRAGMENT primitives" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } [dev-dependencies] -substrate-test-utils = { version = "2.0.0-alpha.1", path = "../../test-utils" } -sp-io ={ version = "2.0.0-alpha.1", path = "../../primitives/io" } +substrate-test-utils = { version = "2.0.0-alpha.2", path = "../../test-utils" } +sp-io ={ version = "2.0.0-alpha.2", path = "../../primitives/io" } rand = "0.7.2" [features] diff --git a/primitives/rpc/Cargo.toml b/primitives/rpc/Cargo.toml index 322100bc2d7..96945526179 100644 --- a/primitives/rpc/Cargo.toml +++ b/primitives/rpc/Cargo.toml @@ -1,15 +1,16 @@ [package] name = "sp-rpc" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate RPC primitives and utilities." [dependencies] serde = { version = "1.0.101", features = ["derive"] } -sp-core = { version = "2.0.0-alpha.1", path = "../core" } +sp-core = { version = "2.0.0-alpha.2", path = "../core" } [dev-dependencies] serde_json = "1.0.41" diff --git a/primitives/runtime-interface/Cargo.toml b/primitives/runtime-interface/Cargo.toml index 7235d63fb55..d3b3e3120bb 100644 --- a/primitives/runtime-interface/Cargo.toml +++ b/primitives/runtime-interface/Cargo.toml @@ -1,26 +1,28 @@ [package] name = "sp-runtime-interface" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate runtime interface" +documentation = "https://docs.rs/sp-runtime-interface/" [dependencies] -sp-wasm-interface = { version = "2.0.0-alpha.1", path = "../wasm-interface", default-features = false } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } -sp-runtime-interface-proc-macro = { version = "2.0.0-alpha.1", path = "proc-macro" } -sp-externalities = { version = "0.8.0-alpha.1", optional = true, path = "../externalities" } +sp-wasm-interface = { version = "2.0.0-alpha.2", path = "../wasm-interface", default-features = false } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } +sp-runtime-interface-proc-macro = { version = "2.0.0-alpha.2", path = "proc-macro" } +sp-externalities = { version = "0.8.0-alpha.2", optional = true, path = "../externalities" } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false } static_assertions = "1.0.0" primitive-types = { version = "0.6.2", default-features = false } [dev-dependencies] sp-runtime-interface-test-wasm = { version = "2.0.0-dev", path = "test-wasm" } -sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } -sp-core = { version = "2.0.0-alpha.1", path = "../core" } -sp-io = { version = "2.0.0-alpha.1", path = "../io" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../../primitives/state-machine" } +sp-core = { version = "2.0.0-alpha.2", path = "../core" } +sp-io = { version = "2.0.0-alpha.2", path = "../io" } rustversion = "1.0.0" trybuild = "1.0.23" diff --git a/primitives/runtime-interface/proc-macro/Cargo.toml b/primitives/runtime-interface/proc-macro/Cargo.toml index 844ea0a7492..e925f4db2e3 100644 --- a/primitives/runtime-interface/proc-macro/Cargo.toml +++ b/primitives/runtime-interface/proc-macro/Cargo.toml @@ -1,11 +1,13 @@ [package] name = "sp-runtime-interface-proc-macro" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "This crate provides procedural macros for usage within the context of the Substrate runtime interface." +documentation = "https://docs.rs/sp-runtime-interface-proc-macro" [lib] proc-macro = true diff --git a/primitives/runtime-interface/test-wasm/Cargo.toml b/primitives/runtime-interface/test-wasm/Cargo.toml index 849237b90b9..b322e529d66 100644 --- a/primitives/runtime-interface/test-wasm/Cargo.toml +++ b/primitives/runtime-interface/test-wasm/Cargo.toml @@ -10,10 +10,10 @@ repository = "https://github.com/paritytech/substrate/" publish = false [dependencies] -sp-runtime-interface = { version = "2.0.0-alpha.1", default-features = false, path = "../" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../io" } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../core" } +sp-runtime-interface = { version = "2.0.0-alpha.2", default-features = false, path = "../" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../io" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../core" } [build-dependencies] wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../../utils/wasm-builder-runner" } diff --git a/primitives/runtime-interface/test/Cargo.toml b/primitives/runtime-interface/test/Cargo.toml index 1215748370e..66942725292 100644 --- a/primitives/runtime-interface/test/Cargo.toml +++ b/primitives/runtime-interface/test/Cargo.toml @@ -9,9 +9,9 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -sp-runtime-interface = { version = "2.0.0-alpha.1", path = "../" } -sc-executor = { version = "0.8.0-alpha.1", path = "../../../client/executor" } +sp-runtime-interface = { version = "2.0.0-alpha.2", path = "../" } +sc-executor = { version = "0.8.0-alpha.2", path = "../../../client/executor" } sp-runtime-interface-test-wasm = { version = "2.0.0-dev", path = "../test-wasm" } -sp-state-machine = { version = "0.8.0-alpha.1", path = "../../../primitives/state-machine" } -sp-core = { version = "2.0.0-alpha.1", path = "../../core" } -sp-io = { version = "2.0.0-alpha.1", path = "../../io" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../../../primitives/state-machine" } +sp-core = { version = "2.0.0-alpha.2", path = "../../core" } +sp-io = { version = "2.0.0-alpha.2", path = "../../io" } diff --git a/primitives/runtime/Cargo.toml b/primitives/runtime/Cargo.toml index ff73aa377d5..37e6060bd36 100644 --- a/primitives/runtime/Cargo.toml +++ b/primitives/runtime/Cargo.toml @@ -1,25 +1,28 @@ [package] name = "sp-runtime" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Runtime Modules shared primitive types." +documentation = "https://docs.rs/sp-runtime" + [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } -sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../application-crypto" } -sp-arithmetic = { version = "2.0.0-alpha.1", default-features = false, path = "../arithmetic" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../io" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../core" } +sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../application-crypto" } +sp-arithmetic = { version = "2.0.0-alpha.2", default-features = false, path = "../arithmetic" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../io" } log = { version = "0.4.8", optional = true } paste = "0.1.6" rand = { version = "0.7.2", optional = true } impl-trait-for-tuples = "0.1.3" -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../inherents" } +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../inherents" } parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } [dev-dependencies] diff --git a/primitives/sandbox/Cargo.toml b/primitives/sandbox/Cargo.toml index 2bdd7d221c6..aba1bdf2453 100755 --- a/primitives/sandbox/Cargo.toml +++ b/primitives/sandbox/Cargo.toml @@ -1,18 +1,19 @@ [package] name = "sp-sandbox" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "This crate provides means to instantiate and execute wasm modules." [dependencies] wasmi = { version = "0.6.2", optional = true } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../io" } -sp-wasm-interface = { version = "2.0.0-alpha.1", default-features = false, path = "../wasm-interface" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../core" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../io" } +sp-wasm-interface = { version = "2.0.0-alpha.2", default-features = false, path = "../wasm-interface" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } [dev-dependencies] diff --git a/primitives/serializer/Cargo.toml b/primitives/serializer/Cargo.toml index 4d784a27bbc..f71a4af678f 100644 --- a/primitives/serializer/Cargo.toml +++ b/primitives/serializer/Cargo.toml @@ -1,11 +1,13 @@ [package] name = "sp-serializer" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate customizable serde serializer." +documentation = "https://docs.rs/sp-serializer" [dependencies] serde = "1.0.101" diff --git a/primitives/session/Cargo.toml b/primitives/session/Cargo.toml index 9042b17630b..c644ec15189 100644 --- a/primitives/session/Cargo.toml +++ b/primitives/session/Cargo.toml @@ -1,17 +1,18 @@ [package] name = "sp-session" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Primitives for sessions" [dependencies] -sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../api" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } -sp-runtime = { version = "2.0.0-alpha.1", optional = true, path = "../runtime" } +sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../api" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../core" } +sp-runtime = { version = "2.0.0-alpha.2", optional = true, path = "../runtime" } [features] default = [ "std" ] diff --git a/primitives/staking/Cargo.toml b/primitives/staking/Cargo.toml index 688c95e49d2..39f6467d435 100644 --- a/primitives/staking/Cargo.toml +++ b/primitives/staking/Cargo.toml @@ -1,16 +1,17 @@ [package] name = "sp-staking" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "A crate which contains primitives that are useful for implementation that uses staking approaches in general. Definitions related to sessions, slashing, etc go here." [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } [features] default = ["std"] diff --git a/primitives/state-machine/Cargo.toml b/primitives/state-machine/Cargo.toml index 7ddb3160f7e..fed71d3edce 100644 --- a/primitives/state-machine/Cargo.toml +++ b/primitives/state-machine/Cargo.toml @@ -1,12 +1,13 @@ [package] name = "sp-state-machine" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] description = "Substrate State Machine" edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +documentation = "https://docs.rs/sp-state-machine" [dependencies] log = "0.4.8" @@ -14,13 +15,13 @@ parking_lot = "0.10.0" hash-db = "0.15.2" trie-db = "0.20.0" trie-root = "0.16.0" -sp-trie = { version = "2.0.0-alpha.1", path = "../trie" } -sp-core = { version = "2.0.0-alpha.1", path = "../core" } -sp-panic-handler = { version = "2.0.0-alpha.1", path = "../panic-handler" } +sp-trie = { version = "2.0.0-alpha.2", path = "../trie" } +sp-core = { version = "2.0.0-alpha.2", path = "../core" } +sp-panic-handler = { version = "2.0.0-alpha.2", path = "../panic-handler" } codec = { package = "parity-scale-codec", version = "1.0.0" } num-traits = "0.2.8" rand = "0.7.2" -sp-externalities = { version = "0.8.0-alpha.1", path = "../externalities" } +sp-externalities = { version = "0.8.0-alpha.2", path = "../externalities" } [dev-dependencies] hex-literal = "0.2.1" diff --git a/primitives/std/Cargo.toml b/primitives/std/Cargo.toml index e698c978a8c..6799540939c 100644 --- a/primitives/std/Cargo.toml +++ b/primitives/std/Cargo.toml @@ -1,12 +1,15 @@ [package] name = "sp-std" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Lowest-abstraction level for the Substrate runtime: just exports useful primitives from std or client/alloc to be used with any code that depends on the runtime." +documentation = "https://docs.rs/sp-std" + [features] default = ["std"] std = [] diff --git a/primitives/storage/Cargo.toml b/primitives/storage/Cargo.toml index c84eb4c52c2..863800bf15e 100644 --- a/primitives/storage/Cargo.toml +++ b/primitives/storage/Cargo.toml @@ -1,18 +1,19 @@ [package] name = "sp-storage" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" description = "Storage related primitives" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +documentation = "https://docs.rs/sp-storage/" [dependencies] -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } serde = { version = "1.0.101", optional = true, features = ["derive"] } impl-serde = { version = "0.2.3", optional = true } -sp-debug-derive = { version = "2.0.0-alpha.1", path = "../debug-derive" } +sp-debug-derive = { version = "2.0.0-alpha.2", path = "../debug-derive" } [features] default = [ "std" ] diff --git a/primitives/test-primitives/Cargo.toml b/primitives/test-primitives/Cargo.toml index 83e92957ed7..5c1bf0db0fc 100644 --- a/primitives/test-primitives/Cargo.toml +++ b/primitives/test-primitives/Cargo.toml @@ -9,11 +9,11 @@ repository = "https://github.com/paritytech/substrate/" publish = false [dependencies] -sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../application-crypto" } +sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../application-crypto" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../core" } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } [features] diff --git a/primitives/timestamp/Cargo.toml b/primitives/timestamp/Cargo.toml index 82c5ab8f1b4..790b6e95941 100644 --- a/primitives/timestamp/Cargo.toml +++ b/primitives/timestamp/Cargo.toml @@ -1,18 +1,19 @@ [package] name = "sp-timestamp" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate core types and inherents for timestamps." [dependencies] -sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../api" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } +sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../api" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../inherents" } +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../inherents" } impl-trait-for-tuples = "0.1.3" wasm-timer = "0.2" diff --git a/primitives/transaction-pool/Cargo.toml b/primitives/transaction-pool/Cargo.toml index 3cafd8f6796..30d60d94f1b 100644 --- a/primitives/transaction-pool/Cargo.toml +++ b/primitives/transaction-pool/Cargo.toml @@ -1,11 +1,14 @@ [package] name = "sp-transaction-pool" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Transaction pool primitives types & Runtime API." +documentation = "https://docs.rs/sp-transaction-pool" + [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", optional = true } @@ -13,8 +16,8 @@ derive_more = { version = "0.99.2", optional = true } futures = { version = "0.3.1", optional = true } log = { version = "0.4.8", optional = true } serde = { version = "1.0.101", features = ["derive"], optional = true} -sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../api" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } +sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../api" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } [features] default = [ "std" ] diff --git a/primitives/trie/Cargo.toml b/primitives/trie/Cargo.toml index c448275eb0d..451502618d2 100644 --- a/primitives/trie/Cargo.toml +++ b/primitives/trie/Cargo.toml @@ -1,12 +1,13 @@ [package] name = "sp-trie" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] description = "Patricia trie stuff using a parity-scale-codec node format" repository = "https://github.com/paritytech/substrate/" license = "GPL-3.0" edition = "2018" homepage = "https://substrate.dev" +documentation = "https://docs.rs/sp-trie" [[bench]] name = "bench" @@ -14,12 +15,12 @@ harness = false [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } hash-db = { version = "0.15.2", default-features = false } trie-db = { version = "0.20.0", default-features = false } trie-root = { version = "0.16.0", default-features = false } memory-db = { version = "0.19.0", default-features = false } -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../core" } +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../core" } [dev-dependencies] trie-bench = "0.20.0" diff --git a/primitives/version/Cargo.toml b/primitives/version/Cargo.toml index 128ff399602..2b3e64e5613 100644 --- a/primitives/version/Cargo.toml +++ b/primitives/version/Cargo.toml @@ -1,18 +1,21 @@ [package] name = "sp-version" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Version module for the Substrate runtime; Provides a function that returns the runtime version." +documentation = "https://docs.rs/sp-version" + [dependencies] impl-serde = { version = "0.2.3", optional = true } serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false, features = ["derive"] } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../std" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../runtime" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } [features] default = ["std"] diff --git a/primitives/wasm-interface/Cargo.toml b/primitives/wasm-interface/Cargo.toml index f05f1a0bfb1..230ebe96246 100644 --- a/primitives/wasm-interface/Cargo.toml +++ b/primitives/wasm-interface/Cargo.toml @@ -1,16 +1,18 @@ [package] name = "sp-wasm-interface" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Types and traits for interfacing between the host and the wasm runtime." +documentation = "https://docs.rs/sp-wasm-interface" [dependencies] wasmi = { version = "0.6.2", optional = true } impl-trait-for-tuples = "0.1.2" -sp-std = { version = "2.0.0-alpha.1", path = "../std", default-features = false } +sp-std = { version = "2.0.0-alpha.2", path = "../std", default-features = false } codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false, features = ["derive"] } [features] diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml index d7664f1e126..0fb86dd0670 100644 --- a/test-utils/Cargo.toml +++ b/test-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-test-utils" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/test-utils/client/Cargo.toml b/test-utils/client/Cargo.toml index 3b677b08bef..9b5763272c7 100644 --- a/test-utils/client/Cargo.toml +++ b/test-utils/client/Cargo.toml @@ -9,16 +9,16 @@ repository = "https://github.com/paritytech/substrate/" publish = false [dependencies] -sc-client-api = { version = "2.0.0-alpha.1", path = "../../client/api" } -sc-client = { version = "0.8.0-alpha.1", path = "../../client/" } -sc-client-db = { version = "0.8.0-alpha.1", features = ["test-helpers"], path = "../../client/db" } -sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } -sc-executor = { version = "0.8.0-alpha.1", path = "../../client/executor" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../../client/api" } +sc-client = { version = "0.8.0-alpha.2", path = "../../client/" } +sc-client-db = { version = "0.8.0-alpha.2", features = ["test-helpers"], path = "../../client/db" } +sp-consensus = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/common" } +sc-executor = { version = "0.8.0-alpha.2", path = "../../client/executor" } futures = "0.3.1" hash-db = "0.15.2" -sp-keyring = { version = "2.0.0-alpha.1", path = "../../primitives/keyring" } +sp-keyring = { version = "2.0.0-alpha.2", path = "../../primitives/keyring" } codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-core = { version = "2.0.0-alpha.1", path = "../../primitives/core" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../primitives/runtime" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../primitives/blockchain" } -sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } +sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../../primitives/state-machine" } diff --git a/test-utils/runtime/Cargo.toml b/test-utils/runtime/Cargo.toml index 339aafa6e98..57ee6c03586 100644 --- a/test-utils/runtime/Cargo.toml +++ b/test-utils/runtime/Cargo.toml @@ -10,42 +10,42 @@ repository = "https://github.com/paritytech/substrate/" publish = false [dependencies] -sp-application-crypto = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/application-crypto" } -sp-consensus-aura = { version = "0.8.0-alpha.1", default-features = false, path = "../../primitives/consensus/aura" } -sp-consensus-babe = { version = "0.8.0-alpha.1", default-features = false, path = "../../primitives/consensus/babe" } -sp-block-builder = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/block-builder" } +sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/application-crypto" } +sp-consensus-aura = { version = "0.8.0-alpha.2", default-features = false, path = "../../primitives/consensus/aura" } +sp-consensus-babe = { version = "0.8.0-alpha.2", default-features = false, path = "../../primitives/consensus/babe" } +sp-block-builder = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/block-builder" } cfg-if = "0.1.10" codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -frame-executive = { version = "2.0.0-alpha.1", default-features = false, path = "../../frame/executive" } -sp-inherents = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/inherents" } -sp-keyring = { version = "2.0.0-alpha.1", optional = true, path = "../../primitives/keyring" } +frame-executive = { version = "2.0.0-alpha.2", default-features = false, path = "../../frame/executive" } +sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/inherents" } +sp-keyring = { version = "2.0.0-alpha.2", optional = true, path = "../../primitives/keyring" } log = { version = "0.4.8", optional = true } memory-db = { version = "0.19.0", default-features = false } -sp-offchain = { path = "../../primitives/offchain", default-features = false, version = "2.0.0-alpha.1"} -sp-core = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/core" } -sp-std = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/std" } -sp-runtime-interface = { path = "../../primitives/runtime-interface", default-features = false, version = "2.0.0-alpha.1"} -sp-io = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/io" } -frame-support = { version = "2.0.0-alpha.1", default-features = false, path = "../../frame/support" } -sp-version = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/version" } +sp-offchain = { path = "../../primitives/offchain", default-features = false, version = "2.0.0-alpha.2"} +sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } +sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } +sp-runtime-interface = { path = "../../primitives/runtime-interface", default-features = false, version = "2.0.0-alpha.2"} +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../../frame/support" } +sp-version = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/version" } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sp-session = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/session" } -sp-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/api" } -sp-runtime = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/runtime" } -pallet-babe = { version = "2.0.0-alpha.1", default-features = false, path = "../../frame/babe" } -frame-system = { version = "2.0.0-alpha.1", default-features = false, path = "../../frame/system" } -frame-system-rpc-runtime-api = { version = "2.0.0-alpha.1", default-features = false, path = "../../frame/system/rpc/runtime-api" } -pallet-timestamp = { version = "2.0.0-alpha.1", default-features = false, path = "../../frame/timestamp" } -sc-client = { version = "0.8.0-alpha.1", optional = true, path = "../../client" } -sp-trie = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/trie" } -sp-transaction-pool = { version = "2.0.0-alpha.1", default-features = false, path = "../../primitives/transaction-pool" } +sp-session = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/session" } +sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/api" } +sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } +pallet-babe = { version = "2.0.0-alpha.2", default-features = false, path = "../../frame/babe" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../../frame/system" } +frame-system-rpc-runtime-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../frame/system/rpc/runtime-api" } +pallet-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../frame/timestamp" } +sc-client = { version = "0.8.0-alpha.2", optional = true, path = "../../client" } +sp-trie = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/trie" } +sp-transaction-pool = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/transaction-pool" } trie-db = { version = "0.20.0", default-features = false } parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } [dev-dependencies] -sc-executor = { version = "0.8.0-alpha.1", path = "../../client/executor" } +sc-executor = { version = "0.8.0-alpha.2", path = "../../client/executor" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "./client" } -sp-state-machine = { version = "0.8.0-alpha.1", path = "../../primitives/state-machine" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../../primitives/state-machine" } [build-dependencies] wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner", path = "../../utils/wasm-builder-runner" } diff --git a/test-utils/runtime/client/Cargo.toml b/test-utils/runtime/client/Cargo.toml index 135eaa9b81d..a6844d7ff9e 100644 --- a/test-utils/runtime/client/Cargo.toml +++ b/test-utils/runtime/client/Cargo.toml @@ -9,14 +9,14 @@ repository = "https://github.com/paritytech/substrate/" publish = false [dependencies] -sc-block-builder = { version = "0.8.0-alpha.1", path = "../../../client/block-builder" } +sc-block-builder = { version = "0.8.0-alpha.2", path = "../../../client/block-builder" } substrate-test-client = { version = "2.0.0-dev", path = "../../client" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../primitives/core" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } substrate-test-runtime = { version = "2.0.0-dev", path = "../../runtime" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -sp-api = { version = "2.0.0-alpha.1", path = "../../../primitives/api" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +sp-api = { version = "2.0.0-alpha.2", path = "../../../primitives/api" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } codec = { package = "parity-scale-codec", version = "1.0.0" } -sc-client-api = { version = "2.0.0-alpha.1", path = "../../../client/api" } -sc-client = { version = "0.8.0-alpha.1", path = "../../../client/" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api" } +sc-client = { version = "0.8.0-alpha.2", path = "../../../client/" } futures = "0.3.1" diff --git a/test-utils/runtime/transaction-pool/Cargo.toml b/test-utils/runtime/transaction-pool/Cargo.toml index c18337ddeb7..543b466a85d 100644 --- a/test-utils/runtime/transaction-pool/Cargo.toml +++ b/test-utils/runtime/transaction-pool/Cargo.toml @@ -12,9 +12,9 @@ publish = false substrate-test-runtime-client = { version = "2.0.0-dev", path = "../client" } parking_lot = "0.10.0" codec = { package = "parity-scale-codec", version = "1.0.0" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../primitives/blockchain" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } -sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../primitives/transaction-pool" } -sc-transaction-graph = { version = "2.0.0-alpha.1", path = "../../../client/transaction-pool/graph" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../primitives/transaction-pool" } +sc-transaction-graph = { version = "2.0.0-alpha.2", path = "../../../client/transaction-pool/graph" } futures = { version = "0.3.1", features = ["compat"] } derive_more = "0.99.2" diff --git a/utils/browser/Cargo.toml b/utils/browser/Cargo.toml index c6bb74857be..69df8c86018 100644 --- a/utils/browser/Cargo.toml +++ b/utils/browser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "browser-utils" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" authors = ["Parity Technologies "] description = "Utilities for creating a browser light-client." edition = "2018" @@ -19,10 +19,10 @@ js-sys = "0.3.34" wasm-bindgen = "0.2.57" wasm-bindgen-futures = "0.4.7" kvdb-web = "0.4" -sc-informant = { version = "0.8.0-alpha.1", path = "../../client/informant" } -sc-service = { version = "0.8.0-alpha.1", path = "../../client/service", default-features = false } -sc-network = { path = "../../client/network" , version = "0.8.0-alpha.1"} -sc-chain-spec = { path = "../../client/chain-spec" , version = "2.0.0-alpha.1"} +sc-informant = { version = "0.8.0-alpha.2", path = "../../client/informant" } +sc-service = { version = "0.8.0-alpha.2", path = "../../client/service", default-features = false } +sc-network = { path = "../../client/network" , version = "0.8.0-alpha.2"} +sc-chain-spec = { path = "../../client/chain-spec" , version = "2.0.0-alpha.2"} # Imported just for the `no_cc` feature clear_on_drop = { version = "0.2.3", features = ["no_cc"] } diff --git a/utils/build-script-utils/Cargo.toml b/utils/build-script-utils/Cargo.toml index e590e8ac1b8..a380cdbf8cb 100644 --- a/utils/build-script-utils/Cargo.toml +++ b/utils/build-script-utils/Cargo.toml @@ -1,10 +1,11 @@ [package] name = "substrate-build-script-utils" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Crate with utility functions for `build.rs` scripts." [dependencies] diff --git a/utils/fork-tree/Cargo.toml b/utils/fork-tree/Cargo.toml index 2056cd98198..57a89ad3d9d 100644 --- a/utils/fork-tree/Cargo.toml +++ b/utils/fork-tree/Cargo.toml @@ -1,11 +1,13 @@ [package] name = "fork-tree" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Utility library for managing tree-like ordered data with logic for pruning the tree while finalizing nodes." +documentation = "https://docs.rs/fork-tree" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } diff --git a/utils/frame/benchmarking-cli/Cargo.toml b/utils/frame/benchmarking-cli/Cargo.toml index 5d83902bf0e..9e9e59c0adb 100644 --- a/utils/frame/benchmarking-cli/Cargo.toml +++ b/utils/frame/benchmarking-cli/Cargo.toml @@ -1,19 +1,20 @@ [package] name = "frame-benchmarking-cli" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "CLI for benchmarking FRAME" [dependencies] -frame-benchmarking = { version = "2.0.0-alpha.1", path = "../../../frame/benchmarking" } -sc-service = { version = "0.8.0-alpha.1", path = "../../../client/service" } -sc-cli = { version = "0.8.0-alpha.1", path = "../../../client/cli" } -sc-client = { version = "0.8.0-alpha.1", path = "../../../client" } -sc-client-db = { version = "0.8.0-alpha.1", path = "../../../client/db" } -sc-executor = { version = "0.8.0-alpha.1", path = "../../../client/executor" } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../primitives/runtime" } +frame-benchmarking = { version = "2.0.0-alpha.2", path = "../../../frame/benchmarking" } +sc-service = { version = "0.8.0-alpha.2", path = "../../../client/service" } +sc-cli = { version = "0.8.0-alpha.2", path = "../../../client/cli" } +sc-client = { version = "0.8.0-alpha.2", path = "../../../client" } +sc-client-db = { version = "0.8.0-alpha.2", path = "../../../client/db" } +sc-executor = { version = "0.8.0-alpha.2", path = "../../../client/executor" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } structopt = "0.3.8" codec = { version = "1.1.2", package = "parity-scale-codec" } diff --git a/utils/frame/rpc/support/Cargo.toml b/utils/frame/rpc/support/Cargo.toml index 01bdd5d73c9..6b9a26b3995 100644 --- a/utils/frame/rpc/support/Cargo.toml +++ b/utils/frame/rpc/support/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "substrate-frame-rpc-support" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies ", "Andrew Dirksen "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "Substrate RPC for FRAME's support" [dependencies] futures = { version = "0.3.0", features = ["compat"] } @@ -13,10 +14,10 @@ jsonrpc-client-transports = "14" jsonrpc-core = "14" codec = { package = "parity-scale-codec", version = "1" } serde = "1" -frame-support = { version = "2.0.0-alpha.1", path = "../../../../frame/support" } -sp-storage = { version = "2.0.0-alpha.1", path = "../../../../primitives/storage" } -sc-rpc-api = { version = "0.8.0-alpha.1", path = "../../../../client/rpc-api" } +frame-support = { version = "2.0.0-alpha.2", path = "../../../../frame/support" } +sp-storage = { version = "2.0.0-alpha.2", path = "../../../../primitives/storage" } +sc-rpc-api = { version = "0.8.0-alpha.2", path = "../../../../client/rpc-api" } [dev-dependencies] -frame-system = { version = "2.0.0-alpha.1", path = "../../../../frame/system" } +frame-system = { version = "2.0.0-alpha.2", path = "../../../../frame/system" } tokio = "0.1" diff --git a/utils/frame/rpc/system/Cargo.toml b/utils/frame/rpc/system/Cargo.toml index 3bbb1994995..96399be6b86 100644 --- a/utils/frame/rpc/system/Cargo.toml +++ b/utils/frame/rpc/system/Cargo.toml @@ -1,14 +1,15 @@ [package] name = "substrate-frame-rpc-system" -version = "2.0.0-alpha.1" +version = "2.0.0-alpha.2" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" +description = "FRAME's system exposed over Substrate RPC" [dependencies] -sc-client = { version = "0.8.0-alpha.1", path = "../../../../client/" } +sc-client = { version = "0.8.0-alpha.2", path = "../../../../client/" } codec = { package = "parity-scale-codec", version = "1.0.0" } futures = "0.3.1" jsonrpc-core = "14.0.3" @@ -16,14 +17,14 @@ jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" log = "0.4.8" serde = { version = "1.0.101", features = ["derive"] } -sp-runtime = { version = "2.0.0-alpha.1", path = "../../../../primitives/runtime" } -sp-api = { version = "2.0.0-alpha.1", path = "../../../../primitives/api" } -frame-system-rpc-runtime-api = { version = "2.0.0-alpha.1", path = "../../../../frame/system/rpc/runtime-api" } -sp-core = { version = "2.0.0-alpha.1", path = "../../../../primitives/core" } -sp-blockchain = { version = "2.0.0-alpha.1", path = "../../../../primitives/blockchain" } -sp-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../../primitives/transaction-pool" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../../../primitives/runtime" } +sp-api = { version = "2.0.0-alpha.2", path = "../../../../primitives/api" } +frame-system-rpc-runtime-api = { version = "2.0.0-alpha.2", path = "../../../../frame/system/rpc/runtime-api" } +sp-core = { version = "2.0.0-alpha.2", path = "../../../../primitives/core" } +sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../../primitives/blockchain" } +sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../../primitives/transaction-pool" } [dev-dependencies] substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../../test-utils/runtime/client" } env_logger = "0.7.0" -sc-transaction-pool = { version = "2.0.0-alpha.1", path = "../../../../client/transaction-pool" } +sc-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../../client/transaction-pool" } diff --git a/utils/prometheus/Cargo.toml b/utils/prometheus/Cargo.toml index 1ad32dfec50..ccbb9bd07fe 100644 --- a/utils/prometheus/Cargo.toml +++ b/utils/prometheus/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Prometheus exporter server" name = "prometheus-exporter" -version = "0.8.0-alpha.1" +version = "0.8.0-alpha.2" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" -- GitLab From d81f60e729c928ec18782170e28ff85c274f00d5 Mon Sep 17 00:00:00 2001 From: Nikolay Volf Date: Thu, 27 Feb 2020 14:18:10 +0300 Subject: [PATCH 050/106] Fix revalidation not revalidating multiple times (#5065) --- client/transaction-pool/src/lib.rs | 1 + client/transaction-pool/src/revalidation.rs | 34 +++++++++++++++++++-- client/transaction-pool/src/testing/pool.rs | 28 +++++++++++++++++ 3 files changed, 61 insertions(+), 2 deletions(-) diff --git a/client/transaction-pool/src/lib.rs b/client/transaction-pool/src/lib.rs index a69323553fa..7ee73b862ad 100644 --- a/client/transaction-pool/src/lib.rs +++ b/client/transaction-pool/src/lib.rs @@ -16,6 +16,7 @@ //! Substrate transaction pool implementation. +#![recursion_limit="256"] #![warn(missing_docs)] #![warn(unused_extern_crates)] diff --git a/client/transaction-pool/src/revalidation.rs b/client/transaction-pool/src/revalidation.rs index dbf8a293542..b915f1fe719 100644 --- a/client/transaction-pool/src/revalidation.rs +++ b/client/transaction-pool/src/revalidation.rs @@ -113,7 +113,9 @@ async fn batch_revalidate( } pool.validated_pool().remove_invalid(&invalid_hashes); - pool.resubmit(revalidated); + if revalidated.len() > 0 { + pool.resubmit(revalidated); + } } impl RevalidationWorker { @@ -149,6 +151,7 @@ impl RevalidationWorker { } else { for xt in &to_queue { extrinsics.remove(xt); + self.members.remove(xt); } } left -= to_queue.len(); @@ -163,6 +166,10 @@ impl RevalidationWorker { queued_exts } + fn len(&self) -> usize { + self.block_ordered.iter().map(|b| b.1.len()).sum() + } + fn push(&mut self, worker_payload: WorkerPayload) { // we don't add something that already scheduled for revalidation let transactions = worker_payload.transactions; @@ -170,7 +177,15 @@ impl RevalidationWorker { for ext_hash in transactions { // we don't add something that already scheduled for revalidation - if self.members.contains_key(&ext_hash) { continue; } + if self.members.contains_key(&ext_hash) { + log::debug!( + target: "txpool", + "[{:?}] Skipped adding for revalidation: Already there.", + ext_hash, + ); + + continue; + } self.block_ordered.entry(block_number) .and_modify(|value| { value.insert(ext_hash.clone()); }) @@ -198,7 +213,18 @@ impl RevalidationWorker { futures::select! { _ = interval.next() => { let next_batch = this.prepare_batch(); + let batch_len = next_batch.len(); + batch_revalidate(this.pool.clone(), this.api.clone(), this.best_block, next_batch).await; + + if batch_len > 0 || this.len() > 0 { + log::debug!( + target: "txpool", + "Revalidated {} transactions. Left in the queue for revalidation: {}.", + batch_len, + this.len(), + ); + } }, workload = from_queue.next() => { match workload { @@ -264,6 +290,10 @@ where /// If queue configured without background worker, this will resolve after /// revalidation is actually done. pub async fn revalidate_later(&self, at: NumberFor, transactions: Vec>) { + if transactions.len() > 0 { + log::debug!(target: "txpool", "Added {} transactions to revalidation queue", transactions.len()); + } + if let Some(ref to_worker) = self.background { if let Err(e) = to_worker.unbounded_send(WorkerPayload { at, transactions }) { log::warn!(target: "txpool", "Failed to update background worker: {:?}", e); diff --git a/client/transaction-pool/src/testing/pool.rs b/client/transaction-pool/src/testing/pool.rs index 6984877eef4..d9f54ede94a 100644 --- a/client/transaction-pool/src/testing/pool.rs +++ b/client/transaction-pool/src/testing/pool.rs @@ -267,6 +267,34 @@ fn should_not_retain_invalid_hashes_from_retracted() { assert_eq!(pool.status().ready, 0); } +#[test] +fn should_revalidate_transaction_multiple_times() { + let xt = uxt(Alice, 209); + + let (pool, _guard) = maintained_pool(); + + block_on(pool.submit_one(&BlockId::number(0), xt.clone())).expect("1. Imported"); + assert_eq!(pool.status().ready, 1); + + pool.api.push_block(1, vec![xt.clone()]); + + // maintenance is in background + block_on(pool.maintain(block_event(1))); + block_on(futures_timer::Delay::new(BACKGROUND_REVALIDATION_INTERVAL*2)); + + block_on(pool.submit_one(&BlockId::number(0), xt.clone())).expect("1. Imported"); + assert_eq!(pool.status().ready, 1); + + pool.api.push_block(2, vec![]); + pool.api.add_invalid(&xt); + + // maintenance is in background + block_on(pool.maintain(block_event(2))); + block_on(futures_timer::Delay::new(BACKGROUND_REVALIDATION_INTERVAL*2)); + + assert_eq!(pool.status().ready, 0); +} + #[test] fn should_push_watchers_during_maintaince() { fn alice_uxt(nonce: u64) -> Extrinsic { -- GitLab From 6e6d06c33911151d6240c94ad5bfb30e177a4af1 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Thu, 27 Feb 2020 12:19:07 +0100 Subject: [PATCH 051/106] removes use of sc_client::Client from sc_finality_grandpa (#5030) * removes use of sc_client::Client from sc_finality_grandpa * code formatting * code formatting * removes use of sc_client::Client from sc_finality_grandpa --- bin/node-template/node/src/service.rs | 6 +- bin/node/cli/src/service.rs | 2 +- client/api/src/backend.rs | 9 ++ client/finality-grandpa/Cargo.toml | 3 +- client/finality-grandpa/src/environment.rs | 79 +++++------ client/finality-grandpa/src/import.rs | 87 ++++++------ client/finality-grandpa/src/justification.rs | 15 +-- client/finality-grandpa/src/lib.rs | 135 ++++++++++--------- client/finality-grandpa/src/light_import.rs | 128 ++++++++---------- client/finality-grandpa/src/observer.rs | 79 ++++++----- client/finality-grandpa/src/tests.rs | 7 +- client/src/client.rs | 90 ++++++++----- client/src/lib.rs | 2 +- 13 files changed, 333 insertions(+), 309 deletions(-) diff --git a/bin/node-template/node/src/service.rs b/bin/node-template/node/src/service.rs index 6298f194e4f..6e2a766dc1a 100644 --- a/bin/node-template/node/src/service.rs +++ b/bin/node-template/node/src/service.rs @@ -42,9 +42,7 @@ macro_rules! new_full_start { .ok_or_else(|| sc_service::Error::SelectChainRequired)?; let (grandpa_block_import, grandpa_link) = - grandpa::block_import::<_, _, _, node_template_runtime::RuntimeApi, _>( - client.clone(), &*client, select_chain - )?; + grandpa::block_import(client.clone(), &*client, select_chain)?; let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new( grandpa_block_import.clone(), client.clone(), @@ -202,7 +200,7 @@ pub fn new_light(config: Configuration) 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 = grandpa::light_block_import::<_, _, _, RuntimeApi>( + let grandpa_block_import = grandpa::light_block_import( client.clone(), backend, &*client.clone(), Arc::new(fetch_checker), )?; let finality_proof_import = grandpa_block_import.clone(); diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs index 70dd0521dec..90090cdf547 100644 --- a/bin/node/cli/src/service.rs +++ b/bin/node/cli/src/service.rs @@ -314,7 +314,7 @@ pub fn new_light(config: NodeConfiguration) 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 = grandpa::light_block_import::<_, _, _, RuntimeApi>( + let grandpa_block_import = grandpa::light_block_import( client.clone(), backend, &*client, diff --git a/client/api/src/backend.rs b/client/api/src/backend.rs index a389af5671b..c3e56e7f8b2 100644 --- a/client/api/src/backend.rs +++ b/client/api/src/backend.rs @@ -169,6 +169,15 @@ pub trait BlockImportOperation { fn mark_head(&mut self, id: BlockId) -> sp_blockchain::Result<()>; } +/// Interface for performing operations on the backend. +pub trait LockImportRun> { + /// Lock the import lock, and run operations inside. + fn lock_import_and_run(&self, f: F) -> Result + where + F: FnOnce(&mut ClientImportOperation) -> Result, + Err: From; +} + /// Finalize Facilities pub trait Finalizer> { /// Mark all blocks up to given as finalized in operation. diff --git a/client/finality-grandpa/Cargo.toml b/client/finality-grandpa/Cargo.toml index 51c52ddf6e5..f8774ea2836 100644 --- a/client/finality-grandpa/Cargo.toml +++ b/client/finality-grandpa/Cargo.toml @@ -21,8 +21,9 @@ assert_matches = "1.3.0" parity-scale-codec = { version = "1.0.0", features = ["derive"] } sp-arithmetic = { version = "2.0.0-alpha.2", path = "../../primitives/arithmetic" } sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } -sp-consensus = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/common" } +sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } +sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api" } sc-telemetry = { version = "2.0.0-alpha.2", path = "../telemetry" } sc-keystore = { version = "2.0.0-alpha.2", path = "../keystore" } serde_json = "1.0.41" diff --git a/client/finality-grandpa/src/environment.rs b/client/finality-grandpa/src/environment.rs index fd88113776c..dca1eab9932 100644 --- a/client/finality-grandpa/src/environment.rs +++ b/client/finality-grandpa/src/environment.rs @@ -25,18 +25,14 @@ use parity_scale_codec::{Decode, Encode}; use futures::prelude::*; use futures_timer::Delay; use parking_lot::RwLock; -use sp_blockchain::{HeaderBackend, Error as ClientError}; +use sp_blockchain::{HeaderBackend, Error as ClientError, HeaderMetadata}; +use std::marker::PhantomData; use sc_client_api::{ - BlockchainEvents, - backend::{AuxStore, Backend}, - Finalizer, - call_executor::CallExecutor, + backend::Backend, utils::is_descendent_of, }; -use sc_client::{ - apply_aux, Client, -}; +use sc_client::apply_aux; use finality_grandpa::{ BlockNumberOps, Equivocation, Error as GrandpaError, round::State as RoundState, voter, voter_set::VoterSet, @@ -377,8 +373,8 @@ impl SharedVoterSetState { } /// The environment we run GRANDPA in. -pub(crate) struct Environment, RA, SC, VR> { - pub(crate) client: Arc>, +pub(crate) struct Environment, SC, VR> { + pub(crate) client: Arc, pub(crate) select_chain: SC, pub(crate) voters: Arc>, pub(crate) config: Config, @@ -388,9 +384,10 @@ pub(crate) struct Environment, RA, SC, V pub(crate) set_id: SetId, pub(crate) voter_set_state: SharedVoterSetState, pub(crate) voting_rule: VR, + pub(crate) _phantom: PhantomData, } -impl, RA, SC, VR> Environment { +impl, SC, VR> Environment { /// Updates the voter set state using the given closure. The write lock is /// held during evaluation of the closure and the environment's voter set /// state is set to its result if successful. @@ -406,17 +403,16 @@ impl, RA, SC, VR> Environment +impl finality_grandpa::Chain> -for Environment +for Environment where Block: 'static, - B: Backend + 'static, - E: CallExecutor + Send + Sync, + BE: Backend, + C: crate::ClientForGrandpa, N: NetworkT + 'static + Send, SC: SelectChain + 'static, - VR: VotingRule>, - RA: Send + Sync, + VR: VotingRule, NumberFor: BlockNumberOps, { fn ancestry(&self, base: Block::Hash, block: Block::Hash) -> Result, GrandpaError> { @@ -432,7 +428,7 @@ where return None; } - let base_header = match self.client.header(&BlockId::Hash(block)).ok()? { + let base_header = match self.client.header(BlockId::Hash(block)).ok()? { Some(h) => h, None => { debug!(target: "afg", "Encountered error finding best chain containing {:?}: couldn't find base block", block); @@ -450,7 +446,7 @@ where match self.select_chain.finality_target(block, None) { Ok(Some(best_hash)) => { - let best_header = self.client.header(&BlockId::Hash(best_hash)).ok()? + let best_header = self.client.header(BlockId::Hash(best_hash)).ok()? .expect("Header known to exist after `finality_target` call; qed"); // check if our vote is currently being limited due to a pending change @@ -474,7 +470,7 @@ where break; } - target_header = self.client.header(&BlockId::Hash(*target_header.parent_hash())).ok()? + target_header = self.client.header(BlockId::Hash(*target_header.parent_hash())).ok()? .expect("Header known to exist after `finality_target` call; qed"); } @@ -519,17 +515,16 @@ where } -pub(crate) fn ancestry( - client: &Client, +pub(crate) fn ancestry( + client: &Arc, base: Block::Hash, block: Block::Hash, ) -> Result, GrandpaError> where - B: Backend, - E: CallExecutor, + Client: HeaderMetadata, { if base == block { return Err(GrandpaError::NotDescendent) } - let tree_route_res = sp_blockchain::tree_route(client, block, base); + let tree_route_res = sp_blockchain::tree_route(&**client, block, base); let tree_route = match tree_route_res { Ok(tree_route) => tree_route, @@ -550,19 +545,17 @@ pub(crate) fn ancestry( Ok(tree_route.retracted().iter().skip(1).map(|e| e.hash).collect()) } -impl +impl voter::Environment> -for Environment +for Environment where Block: 'static, - B: Backend + 'static, - E: CallExecutor + 'static + Send + Sync, + B: Backend, + C: crate::ClientForGrandpa + 'static, N: NetworkT + 'static + Send, - RA: 'static + Send + Sync, SC: SelectChain + 'static, - VR: VotingRule>, + VR: VotingRule, NumberFor: BlockNumberOps, - Client: AuxStore, { type Timer = Pin> + Send>>; type Id = AuthorityId; @@ -882,7 +875,7 @@ where commit: Commit, ) -> Result<(), Self::Error> { finalize_block( - &*self.client, + self.client.clone(), &self.authority_set, &self.consensus_changes, Some(self.config.justification_period.into()), @@ -940,8 +933,8 @@ impl From> for JustificationOrCommit< /// authority set change is enacted then a justification is created (if not /// given) and stored with the block when finalizing it. /// This method assumes that the block being finalized has already been imported. -pub(crate) fn finalize_block( - client: &Client, +pub(crate) fn finalize_block( + client: Arc, authority_set: &SharedAuthoritySet>, consensus_changes: &SharedConsensusChanges>, justification_period: Option>, @@ -949,16 +942,16 @@ pub(crate) fn finalize_block( number: NumberFor, justification_or_commit: JustificationOrCommit, ) -> Result<(), CommandOrError>> where - B: Backend, - E: CallExecutor + Send + Sync, - RA: Send + Sync, + Block: BlockT, + BE: Backend, + Client: crate::ClientForGrandpa, { // NOTE: lock must be held through writing to DB to avoid race. this lock // also implicitly synchronizes the check for last finalized number // below. let mut authority_set = authority_set.inner().write(); - let status = client.chain_info(); + let status = client.info(); if number <= status.finalized_number && client.hash(number)? == Some(hash) { // This can happen after a forced change (triggered by the finality tracker when finality is stalled), since // the voter will be restarted at the median last finalized block, which can be lower than the local best @@ -981,14 +974,14 @@ pub(crate) fn finalize_block( let mut consensus_changes = consensus_changes.lock(); let canon_at_height = |canon_number| { // "true" because the block is finalized - canonical_at_height(client, (hash, number), true, canon_number) + canonical_at_height(&*client, (hash, number), true, canon_number) }; let update_res: Result<_, Error> = client.lock_import_and_run(|import_op| { let status = authority_set.apply_standard_changes( hash, number, - &is_descendent_of::(client, None), + &is_descendent_of::(&*client, None), ).map_err(|e| Error::Safety(e.to_string()))?; // check if this is this is the first finalization of some consensus changes @@ -1031,7 +1024,7 @@ pub(crate) fn finalize_block( // finalization to remote nodes if !justification_required { if let Some(justification_period) = justification_period { - let last_finalized_number = client.chain_info().finalized_number; + let last_finalized_number = client.info().finalized_number; justification_required = (!last_finalized_number.is_zero() || number - last_finalized_number == justification_period) && (last_finalized_number / justification_period != number / justification_period); @@ -1040,7 +1033,7 @@ pub(crate) fn finalize_block( if justification_required { let justification = GrandpaJustification::from_commit( - client, + &client, round_number, commit, )?; diff --git a/client/finality-grandpa/src/import.rs b/client/finality-grandpa/src/import.rs index 2eb1b4a7c88..28a08339dcb 100644 --- a/client/finality-grandpa/src/import.rs +++ b/client/finality-grandpa/src/import.rs @@ -21,9 +21,10 @@ use parity_scale_codec::Encode; use futures::channel::mpsc; use parking_lot::RwLockWriteGuard; -use sp_blockchain::{HeaderBackend, BlockStatus, well_known_cache_keys}; -use sc_client_api::{backend::{TransactionFor, Backend}, CallExecutor, utils::is_descendent_of}; -use sc_client::Client; +use sp_blockchain::{BlockStatus, well_known_cache_keys}; +use sc_client_api::{backend::Backend, utils::is_descendent_of}; +use sp_api::{TransactionFor}; + use sp_consensus::{ BlockImport, Error as ConsensusError, BlockCheckParams, BlockImportParams, ImportResult, JustificationImport, @@ -41,6 +42,7 @@ use crate::authorities::{AuthoritySet, SharedAuthoritySet, DelayKind, PendingCha use crate::consensus_changes::SharedConsensusChanges; use crate::environment::finalize_block; use crate::justification::GrandpaJustification; +use std::marker::PhantomData; /// A block-import handler for GRANDPA. /// @@ -51,16 +53,17 @@ use crate::justification::GrandpaJustification; /// /// When using GRANDPA, the block import worker should be using this block import /// object. -pub struct GrandpaBlockImport { - inner: Arc>, +pub struct GrandpaBlockImport { + inner: Arc, select_chain: SC, authority_set: SharedAuthoritySet>, send_voter_commands: mpsc::UnboundedSender>>, consensus_changes: SharedConsensusChanges>, + _phantom: PhantomData, } -impl Clone for - GrandpaBlockImport +impl Clone for + GrandpaBlockImport { fn clone(&self) -> Self { GrandpaBlockImport { @@ -69,24 +72,24 @@ impl Clone for authority_set: self.authority_set.clone(), send_voter_commands: self.send_voter_commands.clone(), consensus_changes: self.consensus_changes.clone(), + _phantom: PhantomData, } } } -impl JustificationImport - for GrandpaBlockImport where +impl JustificationImport + for GrandpaBlockImport where NumberFor: finality_grandpa::BlockNumberOps, - B: Backend + 'static, - E: CallExecutor + 'static + Clone + Send + Sync, DigestFor: Encode, - RA: Send + Sync, + BE: Backend, + Client: crate::ClientForGrandpa, SC: SelectChain, { type Error = ConsensusError; fn on_start(&mut self) -> Vec<(Block::Hash, NumberFor)> { let mut out = Vec::new(); - let chain_info = self.inner.chain_info(); + let chain_info = self.inner.info(); // request justifications for all pending changes for which change blocks have already been imported let authorities = self.authority_set.inner().read(); @@ -105,7 +108,7 @@ impl JustificationImport }; if let Ok(Some(hash)) = effective_block_hash { - if let Ok(Some(header)) = self.inner.header(&BlockId::Hash(hash)) { + if let Ok(Some(header)) = self.inner.header(BlockId::Hash(hash)) { if *header.number() == pending_change.effective_number() { out.push((header.hash(), *header.number())); } @@ -123,7 +126,7 @@ impl JustificationImport number: NumberFor, justification: Justification, ) -> Result<(), Self::Error> { - self.import_justification(hash, number, justification, false) + GrandpaBlockImport::import_justification(self, hash, number, justification, false) } } @@ -200,14 +203,13 @@ fn find_forced_change(header: &B::Header) header.digest().convert_first(|l| l.try_to(id).and_then(filter_log)) } -impl - GrandpaBlockImport +impl + GrandpaBlockImport where NumberFor: finality_grandpa::BlockNumberOps, - B: Backend + 'static, - E: CallExecutor + 'static + Clone + Send + Sync, DigestFor: Encode, - RA: Send + Sync, + BE: Backend, + Client: crate::ClientForGrandpa, { // check for a new authority set change. fn check_new_change(&self, header: &Block::Header, hash: Block::Hash) @@ -235,11 +237,11 @@ where }) } - fn make_authorities_changes<'a>( - &'a self, - block: &mut BlockImportParams>, + fn make_authorities_changes( + &self, + block: &mut BlockImportParams>, hash: Block::Hash, - ) -> Result, ConsensusError> { + ) -> Result, ConsensusError> { // when we update the authorities, we need to hold the lock // until the block is written to prevent a race if we need to restore // the old authority set on error or panic. @@ -325,10 +327,10 @@ where // for the canon block the new authority set should start // with. we use the minimum between the median and the local // best finalized block. - let best_finalized_number = self.inner.chain_info().finalized_number; + let best_finalized_number = self.inner.info().finalized_number; let canon_number = best_finalized_number.min(median_last_finalized_number); let canon_hash = - self.inner.header(&BlockId::Number(canon_number)) + self.inner.header(BlockId::Number(canon_number)) .map_err(|e| ConsensusError::ClientImport(e.to_string()))? .expect("the given block number is less or equal than the current best finalized number; \ current best finalized number must exist in chain; qed.") @@ -380,18 +382,17 @@ where } } -impl BlockImport - for GrandpaBlockImport where +impl BlockImport + for GrandpaBlockImport where NumberFor: finality_grandpa::BlockNumberOps, - B: Backend + 'static, - E: CallExecutor + 'static + Clone + Send + Sync, DigestFor: Encode, - RA: Send + Sync, - for<'a> &'a Client: - BlockImport>, + BE: Backend, + Client: crate::ClientForGrandpa, + for<'a> &'a Client: + BlockImport>, { type Error = ConsensusError; - type Transaction = TransactionFor; + type Transaction = TransactionFor; fn import_block( &mut self, @@ -521,31 +522,31 @@ impl BlockImport } } -impl GrandpaBlockImport { +impl GrandpaBlockImport { pub(crate) fn new( - inner: Arc>, + inner: Arc, select_chain: SC, authority_set: SharedAuthoritySet>, send_voter_commands: mpsc::UnboundedSender>>, consensus_changes: SharedConsensusChanges>, - ) -> GrandpaBlockImport { + ) -> GrandpaBlockImport { GrandpaBlockImport { inner, select_chain, authority_set, send_voter_commands, consensus_changes, + _phantom: PhantomData, } } } -impl - GrandpaBlockImport +impl + GrandpaBlockImport where + BE: Backend, + Client: crate::ClientForGrandpa, NumberFor: finality_grandpa::BlockNumberOps, - B: Backend + 'static, - E: CallExecutor + 'static + Clone + Send + Sync, - RA: Send + Sync, { /// Import a block justification and finalize the block. @@ -572,7 +573,7 @@ where }; let result = finalize_block( - &*self.inner, + self.inner.clone(), &self.authority_set, &self.consensus_changes, None, diff --git a/client/finality-grandpa/src/justification.rs b/client/finality-grandpa/src/justification.rs index ad96956454f..084c0042ab1 100644 --- a/client/finality-grandpa/src/justification.rs +++ b/client/finality-grandpa/src/justification.rs @@ -15,10 +15,9 @@ // along with Substrate. If not, see . use std::collections::{HashMap, HashSet}; +use std::sync::Arc; -use sc_client::Client; -use sc_client_api::{CallExecutor, backend::Backend}; -use sp_blockchain::Error as ClientError; +use sp_blockchain::{Error as ClientError, HeaderBackend}; use parity_scale_codec::{Encode, Decode}; use finality_grandpa::voter_set::VoterSet; use finality_grandpa::{Error as GrandpaError}; @@ -47,14 +46,12 @@ pub struct GrandpaJustification { impl GrandpaJustification { /// Create a GRANDPA justification from the given commit. This method /// assumes the commit is valid and well-formed. - pub(crate) fn from_commit( - client: &Client, + pub(crate) fn from_commit( + client: &Arc, round: u64, commit: Commit, ) -> Result, Error> where - B: Backend, - E: CallExecutor + Send + Sync, - RA: Send + Sync, + C: HeaderBackend, { let mut votes_ancestries_hashes = HashSet::new(); let mut votes_ancestries = Vec::new(); @@ -69,7 +66,7 @@ impl GrandpaJustification { loop { if current_hash == commit.target_hash { break; } - match client.header(&BlockId::Hash(current_hash))? { + match client.header(BlockId::Hash(current_hash))? { Some(current_header) => { if *current_header.number() <= commit.target_number { return error(); diff --git a/client/finality-grandpa/src/lib.rs b/client/finality-grandpa/src/lib.rs index 650b59dfff6..887d30a70cd 100644 --- a/client/finality-grandpa/src/lib.rs +++ b/client/finality-grandpa/src/lib.rs @@ -56,15 +56,18 @@ use futures::prelude::*; use futures::StreamExt; use log::{debug, info}; use futures::channel::mpsc; -use sc_client_api::{BlockchainEvents, CallExecutor, backend::{AuxStore, Backend}, ExecutionStrategy}; -use sp_blockchain::{HeaderBackend, Error as ClientError}; +use sc_client_api::{ + LockImportRun, BlockchainEvents, CallExecutor, + backend::{AuxStore, Backend}, ExecutionStrategy, Finalizer, TransactionFor, +}; +use sp_blockchain::{HeaderBackend, Error as ClientError, HeaderMetadata}; use sc_client::Client; use parity_scale_codec::{Decode, Encode}; use sp_runtime::generic::BlockId; use sp_runtime::traits::{NumberFor, Block as BlockT, DigestFor, Zero}; use sc_keystore::KeyStorePtr; use sp_inherents::InherentDataProviders; -use sp_consensus::SelectChain; +use sp_consensus::{SelectChain, BlockImport}; use sp_core::Pair; use sc_telemetry::{telemetry, CONSENSUS_INFO, CONSENSUS_DEBUG}; use serde_json; @@ -109,6 +112,8 @@ use sp_finality_grandpa::{AuthorityList, AuthorityPair, AuthoritySignature, SetI // Re-export these two because it's just so damn convenient. pub use sp_finality_grandpa::{AuthorityId, ScheduledChange}; +use sp_api::ProvideRuntimeApi; +use std::marker::PhantomData; #[cfg(test)] mod tests; @@ -245,10 +250,8 @@ pub(crate) trait BlockStatus { fn block_number(&self, hash: Block::Hash) -> Result>, Error>; } -impl BlockStatus for Arc> where - B: Backend, - E: CallExecutor + Send + Sync, - RA: Send + Sync, +impl BlockStatus for Arc where + Client: HeaderBackend, NumberFor: BlockNumberOps, { fn block_number(&self, hash: Block::Hash) -> Result>, Error> { @@ -257,6 +260,29 @@ impl BlockStatus for Arc } } +/// A trait that includes all the client functionalities grandpa requires. +/// Ideally this would be a trait alias, we're not there yet. +/// tracking issue https://github.com/rust-lang/rust/issues/41517 +pub trait ClientForGrandpa: + LockImportRun + Finalizer + AuxStore + + HeaderMetadata + HeaderBackend + + BlockchainEvents + ProvideRuntimeApi + + BlockImport, Error = sp_consensus::Error> + where + BE: Backend, + Block: BlockT, +{} + +impl ClientForGrandpa for T + where + BE: Backend, + Block: BlockT, + T: LockImportRun + Finalizer + AuxStore + + HeaderMetadata + HeaderBackend + + BlockchainEvents + ProvideRuntimeApi + + BlockImport, Error = sp_consensus::Error>, +{} + /// Something that one can ask to do a block sync request. pub(crate) trait BlockSyncRequester { /// Notifies the sync service to try and sync the given block from the given @@ -348,8 +374,8 @@ impl fmt::Display for CommandOrError { } } -pub struct LinkHalf { - client: Arc>, +pub struct LinkHalf { + client: Arc, select_chain: SC, persistent_data: PersistentData, voter_commands_rx: mpsc::UnboundedReceiver>>, @@ -390,22 +416,20 @@ impl GenesisAuthoritySetProvider for Client( - client: Arc>, +pub fn block_import( + client: Arc, genesis_authorities_provider: &dyn GenesisAuthoritySetProvider, select_chain: SC, ) -> Result<( - GrandpaBlockImport, - LinkHalf + GrandpaBlockImport, + LinkHalf, ), ClientError> where - B: Backend + 'static, - E: CallExecutor + Send + Sync, - RA: Send + Sync, SC: SelectChain, - Client: AuxStore, + BE: Backend + 'static, + Client: ClientForGrandpa + 'static, { - let chain_info = client.chain_info(); + let chain_info = client.info(); let genesis_hash = chain_info.genesis_hash; let persistent_data = aux_schema::load_persistent( @@ -440,10 +464,10 @@ where )) } -fn global_communication( +fn global_communication( set_id: SetId, voters: &Arc>, - client: &Arc>, + client: Arc, network: &NetworkBridge, keystore: &Option, ) -> ( @@ -455,10 +479,9 @@ fn global_communication( Error = CommandOrError>, > + Unpin, ) where - B: Backend, - E: CallExecutor + Send + Sync, + BE: Backend + 'static, + C: ClientForGrandpa + 'static, N: NetworkT, - RA: Send + Sync, NumberFor: BlockNumberOps, { let is_voter = is_voter(voters, keystore).is_some(); @@ -487,20 +510,18 @@ fn global_communication( /// Register the finality tracker inherent data provider (which is used by /// GRANDPA), if not registered already. -fn register_finality_tracker_inherent_data_provider( - client: Arc>, +fn register_finality_tracker_inherent_data_provider( + client: Arc, inherent_data_providers: &InherentDataProviders, ) -> Result<(), sp_consensus::Error> where - B: Backend + 'static, - E: CallExecutor + Send + Sync + 'static, - RA: Send + Sync + 'static, + Client: HeaderBackend + 'static, { if !inherent_data_providers.has_provider(&sp_finality_tracker::INHERENT_IDENTIFIER) { inherent_data_providers .register_provider(sp_finality_tracker::InherentDataProvider::new(move || { #[allow(deprecated)] { - let info = client.chain_info(); + let info = client.info(); telemetry!(CONSENSUS_INFO; "afg.finalized"; "finalized_number" => ?info.finalized_number, "finalized_hash" => ?info.finalized_hash, @@ -515,11 +536,11 @@ fn register_finality_tracker_inherent_data_provider( } /// Parameters used to run Grandpa. -pub struct GrandpaParams { +pub struct GrandpaParams { /// Configuration for the GRANDPA service. pub config: Config, /// A link to the block import worker. - pub link: LinkHalf, + pub link: LinkHalf, /// The Network instance. pub network: N, /// The inherent data providers. @@ -534,20 +555,18 @@ pub struct GrandpaParams { /// Run a GRANDPA voter as a task. Provide configuration and a link to a /// block import worker that has already been instantiated with `block_import`. -pub fn run_grandpa_voter( - grandpa_params: GrandpaParams, +pub fn run_grandpa_voter( + grandpa_params: GrandpaParams, ) -> sp_blockchain::Result + Unpin + Send + 'static> where Block::Hash: Ord, - B: Backend + 'static, - E: CallExecutor + Send + Sync + 'static, + BE: Backend + 'static, N: NetworkT + Send + Sync + Clone + 'static, SC: SelectChain + 'static, - VR: VotingRule> + Clone + 'static, + VR: VotingRule + Clone + 'static, NumberFor: BlockNumberOps, DigestFor: Encode, - RA: Send + Sync + 'static, X: futures::Future + Clone + Send + Unpin + 'static, - Client: AuxStore, + C: ClientForGrandpa + 'static, { let GrandpaParams { mut config, @@ -629,27 +648,25 @@ pub fn run_grandpa_voter( /// Future that powers the voter. #[must_use] -struct VoterWork, RA, SC, VR> { +struct VoterWork, SC, VR> { voter: Pin>>> + Send>>, - env: Arc>, + env: Arc>, voter_commands_rx: mpsc::UnboundedReceiver>>, network: NetworkBridge, } -impl VoterWork +impl VoterWork where Block: BlockT, + B: Backend + 'static, + C: ClientForGrandpa + 'static, N: NetworkT + Sync, NumberFor: BlockNumberOps, - RA: 'static + Send + Sync, - E: CallExecutor + Send + Sync + 'static, - B: Backend + 'static, SC: SelectChain + 'static, - VR: VotingRule> + Clone + 'static, - Client: AuxStore, + VR: VotingRule + Clone + 'static, { fn new( - client: Arc>, + client: Arc, config: Config, network: NetworkBridge, select_chain: SC, @@ -670,6 +687,7 @@ where authority_set: persistent_data.authority_set.clone(), consensus_changes: persistent_data.consensus_changes.clone(), voter_set_state: persistent_data.set_state.clone(), + _phantom: PhantomData, }); let mut work = VoterWork { @@ -700,7 +718,7 @@ where "authority_id" => authority_id.to_string(), ); - let chain_info = self.env.client.chain_info(); + let chain_info = self.env.client.info(); telemetry!(CONSENSUS_INFO; "afg.authority_set"; "number" => ?chain_info.finalized_number, "hash" => ?chain_info.finalized_hash, @@ -724,7 +742,7 @@ where let global_comms = global_communication( self.env.set_id, &self.env.voters, - &self.env.client, + self.env.client.clone(), &self.env.network, &self.env.config.keystore, ); @@ -789,6 +807,7 @@ where consensus_changes: self.env.consensus_changes.clone(), network: self.env.network.clone(), voting_rule: self.env.voting_rule.clone(), + _phantom: PhantomData, }); self.rebuild_voter(); @@ -813,17 +832,15 @@ where } } -impl Future for VoterWork +impl Future for VoterWork where Block: BlockT, + B: Backend + 'static, N: NetworkT + Sync, NumberFor: BlockNumberOps, - RA: 'static + Send + Sync, - E: CallExecutor + Send + Sync + 'static, - B: Backend + 'static, SC: SelectChain + 'static, - VR: VotingRule> + Clone + 'static, - Client: AuxStore, + C: ClientForGrandpa + 'static, + VR: VotingRule + Clone + 'static, { type Output = Result<(), Error>; @@ -868,15 +885,13 @@ where /// discards all GRANDPA messages (otherwise, we end up banning nodes that send /// us a `Neighbor` message, since there is no registered gossip validator for /// the engine id defined in the message.) -pub fn setup_disabled_grandpa( - client: Arc>, +pub fn setup_disabled_grandpa( + client: Arc, inherent_data_providers: &InherentDataProviders, network: N, ) -> Result<(), sp_consensus::Error> where - B: Backend + 'static, - E: CallExecutor + Send + Sync + 'static, - RA: Send + Sync + 'static, N: NetworkT + Send + Clone + 'static, + Client: HeaderBackend + 'static, { register_finality_tracker_inherent_data_provider( client, diff --git a/client/finality-grandpa/src/light_import.rs b/client/finality-grandpa/src/light_import.rs index 0181a93f108..258ea81bd51 100644 --- a/client/finality-grandpa/src/light_import.rs +++ b/client/finality-grandpa/src/light_import.rs @@ -18,8 +18,7 @@ use std::collections::HashMap; use std::sync::Arc; use log::{info, trace, warn}; use parking_lot::RwLock; -use sc_client::Client; -use sc_client_api::{CallExecutor, backend::{AuxStore, Backend, Finalizer, TransactionFor}}; +use sc_client_api::backend::{AuxStore, Backend, Finalizer, TransactionFor}; use sp_blockchain::{HeaderBackend, Error as ClientError, well_known_cache_keys}; use parity_scale_codec::{Encode, Decode}; use sp_consensus::{ @@ -48,17 +47,15 @@ const LIGHT_AUTHORITY_SET_KEY: &[u8] = b"grandpa_voters"; const LIGHT_CONSENSUS_CHANGES_KEY: &[u8] = b"grandpa_consensus_changes"; /// Create light block importer. -pub fn light_block_import( - client: Arc>, - backend: Arc, +pub fn light_block_import( + client: Arc, + backend: Arc, genesis_authorities_provider: &dyn GenesisAuthoritySetProvider, authority_set_provider: Arc>, -) -> Result, ClientError> +) -> Result, ClientError> where - B: Backend + 'static, - E: CallExecutor + 'static + Clone + Send + Sync, - RA: Send + Sync, - Client: AuxStore, + BE: Backend, + Client: crate::ClientForGrandpa, { let info = client.info(); let import_data = load_aux_import_data( @@ -79,14 +76,14 @@ pub fn light_block_import( /// It is responsible for: /// - checking GRANDPA justifications; /// - fetching finality proofs for blocks that are enacting consensus changes. -pub struct GrandpaLightBlockImport { - client: Arc>, - backend: Arc, +pub struct GrandpaLightBlockImport { + client: Arc, + backend: Arc, authority_set_provider: Arc>, data: Arc>>, } -impl Clone for GrandpaLightBlockImport { +impl Clone for GrandpaLightBlockImport { fn clone(&self) -> Self { GrandpaLightBlockImport { client: self.client.clone(), @@ -111,27 +108,26 @@ struct LightAuthoritySet { authorities: AuthorityList, } -impl GrandpaLightBlockImport { +impl GrandpaLightBlockImport { /// Create finality proof request builder. pub fn create_finality_proof_request_builder(&self) -> BoxFinalityProofRequestBuilder { Box::new(GrandpaFinalityProofRequestBuilder(self.data.clone())) as _ } } -impl BlockImport - for GrandpaLightBlockImport where +impl BlockImport + for GrandpaLightBlockImport where NumberFor: finality_grandpa::BlockNumberOps, - B: Backend + 'static, - E: CallExecutor + 'static + Clone + Send + Sync, DigestFor: Encode, - RA: Send + Sync, - for<'a> &'a Client: - BlockImport> - + Finalizer + BE: Backend + 'static, + for<'a> &'a Client: + HeaderBackend + + BlockImport> + + Finalizer + AuxStore, { type Error = ConsensusError; - type Transaction = TransactionFor; + type Transaction = TransactionFor; fn import_block( &mut self, @@ -151,23 +147,22 @@ impl BlockImport } } -impl FinalityProofImport - for GrandpaLightBlockImport where +impl FinalityProofImport + for GrandpaLightBlockImport where NumberFor: finality_grandpa::BlockNumberOps, - B: Backend + 'static, - E: CallExecutor + 'static + Clone + Send + Sync, DigestFor: Encode, - RA: Send + Sync, - for<'a> &'a Client: - BlockImport> - + Finalizer + BE: Backend + 'static, + for<'a> &'a Client: + HeaderBackend + + BlockImport> + + Finalizer + AuxStore, { type Error = ConsensusError; fn on_start(&mut self) -> Vec<(Block::Hash, NumberFor)> { let mut out = Vec::new(); - let chain_info = self.client.chain_info(); + let chain_info = (&*self.client).info(); let data = self.data.read(); for (pending_number, pending_hash) in data.consensus_changes.pending_changes() { @@ -567,7 +562,7 @@ fn on_post_finalization_error(error: ClientError, value_type: &str) -> Consensus #[cfg(test)] pub mod tests { use super::*; - use sp_consensus::ForkChoiceStrategy; + use sp_consensus::{ForkChoiceStrategy, BlockImport}; use sp_finality_grandpa::AuthorityId; use sp_core::{H256, crypto::Public}; use substrate_test_runtime_client::sc_client::in_mem::Blockchain as InMemoryAuxStore; @@ -575,37 +570,36 @@ pub mod tests { use crate::tests::TestApi; use crate::finality_proof::tests::TestJustification; - pub struct NoJustificationsImport( - pub GrandpaLightBlockImport + pub struct NoJustificationsImport( + pub GrandpaLightBlockImport ); - impl Clone - for NoJustificationsImport where + impl Clone + for NoJustificationsImport where NumberFor: finality_grandpa::BlockNumberOps, - B: Backend + 'static, - E: CallExecutor + 'static + Clone + Send + Sync, DigestFor: Encode, - RA: Send + Sync, + BE: Backend + 'static, { fn clone(&self) -> Self { NoJustificationsImport(self.0.clone()) } } - impl BlockImport - for NoJustificationsImport where + impl BlockImport + for NoJustificationsImport where NumberFor: finality_grandpa::BlockNumberOps, - B: Backend + 'static, - E: CallExecutor + 'static + Clone + Send + Sync, DigestFor: Encode, - RA: Send + Sync, - for<'a> &'a Client: - BlockImport> - + Finalizer + BE: Backend + 'static, + for <'a > &'a Client: + HeaderBackend + + BlockImport> + + Finalizer + AuxStore, + GrandpaLightBlockImport: + BlockImport, Error = ConsensusError> { type Error = ConsensusError; - type Transaction = TransactionFor; + type Transaction = TransactionFor; fn import_block( &mut self, @@ -624,16 +618,15 @@ pub mod tests { } } - impl FinalityProofImport - for NoJustificationsImport where + impl FinalityProofImport + for NoJustificationsImport where NumberFor: finality_grandpa::BlockNumberOps, - B: Backend + 'static, - E: CallExecutor + 'static + Clone + Send + Sync, + BE: Backend + 'static, DigestFor: Encode, - RA: Send + Sync, - for<'a> &'a Client: - BlockImport> - + Finalizer + for <'a > &'a Client: + HeaderBackend + + BlockImport> + + Finalizer + AuxStore, { type Error = ConsensusError; @@ -654,19 +647,15 @@ pub mod tests { } /// Creates light block import that ignores justifications that came outside of finality proofs. - pub fn light_block_import_without_justifications( - client: Arc>, - backend: Arc, + pub fn light_block_import_without_justifications( + client: Arc, + backend: Arc, genesis_authorities_provider: &dyn GenesisAuthoritySetProvider, authority_set_provider: Arc>, - ) -> Result, ClientError> + ) -> Result, ClientError> where - B: Backend + 'static, - E: CallExecutor + 'static + Clone + Send + Sync, - RA: Send + Sync, - Client: BlockImport - + Finalizer - + AuxStore, + BE: Backend + 'static, + Client: crate::ClientForGrandpa, { light_block_import(client, backend, genesis_authorities_provider, authority_set_provider) .map(NoJustificationsImport) @@ -677,6 +666,7 @@ pub mod tests { justification: Option, ) -> ImportResult { let (client, _backend) = substrate_test_runtime_client::new_light(); + let client = Arc::new(client); let mut import_data = LightImportData { last_finalized: Default::default(), authority_set: LightAuthoritySet::genesis(vec![(AuthorityId::from_slice(&[1; 32]), 1)]), @@ -696,7 +686,7 @@ pub mod tests { block.fork_choice = Some(ForkChoiceStrategy::LongestChain); do_import_block::<_, _, _, TestJustification>( - &client, + &*client, &mut import_data, block, new_cache, diff --git a/client/finality-grandpa/src/observer.rs b/client/finality-grandpa/src/observer.rs index 8345a342099..f6cf1a8aa14 100644 --- a/client/finality-grandpa/src/observer.rs +++ b/client/finality-grandpa/src/observer.rs @@ -26,10 +26,9 @@ use finality_grandpa::{ use log::{debug, info, warn}; use sp_consensus::SelectChain; -use sc_client_api::{CallExecutor, backend::{Backend, AuxStore}}; -use sc_client::Client; +use sc_client_api::backend::Backend; use sp_runtime::traits::{NumberFor, Block as BlockT}; - +use sp_blockchain::HeaderMetadata; use crate::{ global_communication, CommandOrError, CommunicationIn, Config, environment, LinkHalf, Error, aux_schema::PersistentData, VoterCommand, VoterSetState, @@ -38,17 +37,21 @@ use crate::authorities::SharedAuthoritySet; use crate::communication::{Network as NetworkT, NetworkBridge}; use crate::consensus_changes::SharedConsensusChanges; use sp_finality_grandpa::AuthorityId; +use std::marker::{PhantomData, Unpin}; -struct ObserverChain<'a, Block: BlockT, B, E, RA>(&'a Client); +struct ObserverChain<'a, Block: BlockT, Client> { + client: &'a Arc, + _phantom: PhantomData, +} -impl<'a, Block: BlockT, B, E, RA> finality_grandpa::Chain> - for ObserverChain<'a, Block, B, E, RA> where - B: Backend, - E: CallExecutor, +impl<'a, Block, Client> finality_grandpa::Chain> + for ObserverChain<'a, Block, Client> where + Block: BlockT, + Client: HeaderMetadata, NumberFor: BlockNumberOps, { fn ancestry(&self, base: Block::Hash, block: Block::Hash) -> Result, GrandpaError> { - environment::ancestry(&self.0, base, block) + environment::ancestry(&self.client, base, block) } fn best_chain_containing(&self, _block: Block::Hash) -> Option<(Block::Hash, NumberFor)> { @@ -57,8 +60,8 @@ impl<'a, Block: BlockT, B, E, RA> finality_grandpa::Chain( - client: &Arc>, +fn grandpa_observer( + client: &Arc, authority_set: &SharedAuthoritySet>, consensus_changes: &SharedConsensusChanges>, voters: &Arc>, @@ -67,13 +70,12 @@ fn grandpa_observer( note_round: F, ) -> impl Future>>> where NumberFor: BlockNumberOps, - B: Backend, - E: CallExecutor + Send + Sync + 'static, - RA: Send + Sync, S: Stream< Item = Result, CommandOrError>>, >, F: Fn(u64), + BE: Backend, + Client: crate::ClientForGrandpa, { let authority_set = authority_set.clone(); let consensus_changes = consensus_changes.clone(); @@ -101,7 +103,7 @@ fn grandpa_observer( let validation_result = match finality_grandpa::validate_commit( &commit, &voters, - &ObserverChain(&*client), + &ObserverChain { client: &client, _phantom: PhantomData }, ) { Ok(r) => r, Err(e) => return future::err(e.into()), @@ -113,7 +115,7 @@ fn grandpa_observer( // commit is valid, finalize the block it targets match environment::finalize_block( - &client, + client.clone(), &authority_set, &consensus_changes, None, @@ -153,19 +155,17 @@ fn grandpa_observer( /// NOTE: this is currently not part of the crate's public API since we don't consider /// it stable enough to use on a live network. #[allow(unused)] -pub fn run_grandpa_observer( +pub fn run_grandpa_observer( config: Config, - link: LinkHalf, + link: LinkHalf, network: N, on_exit: impl futures::Future + Clone + Send + Unpin + 'static, ) -> sp_blockchain::Result + Unpin + Send + 'static> where - B: Backend + 'static, - E: CallExecutor + Send + Sync + 'static, + BE: Backend + Unpin + 'static, N: NetworkT + Send + Clone + 'static, SC: SelectChain + 'static, NumberFor: BlockNumberOps, - RA: Send + Sync + 'static, - Client: AuxStore, + Client: crate::ClientForGrandpa + 'static, { let LinkHalf { client, @@ -199,28 +199,27 @@ pub fn run_grandpa_observer( /// Future that powers the observer. #[must_use] -struct ObserverWork, E, Backend, RA> { +struct ObserverWork> { observer: Pin>>> + Send>>, - client: Arc>, + client: Arc, network: NetworkBridge, persistent_data: PersistentData, keystore: Option, voter_commands_rx: mpsc::UnboundedReceiver>>, + _phantom: PhantomData, } -impl ObserverWork +impl ObserverWork where B: BlockT, - N: NetworkT, + BE: Backend + 'static, + Client: crate::ClientForGrandpa + 'static, + Network: NetworkT, NumberFor: BlockNumberOps, - RA: 'static + Send + Sync, - E: CallExecutor + Send + Sync + 'static, - Bk: Backend + 'static, - Client: AuxStore, { fn new( - client: Arc>, - network: NetworkBridge, + client: Arc, + network: NetworkBridge, persistent_data: PersistentData, keystore: Option, voter_commands_rx: mpsc::UnboundedReceiver>>, @@ -235,6 +234,7 @@ where persistent_data, keystore, voter_commands_rx, + _phantom: PhantomData, }; work.rebuild_observer(); work @@ -251,12 +251,12 @@ where let (global_in, _) = global_communication( set_id, &voters, - &self.client, + self.client.clone(), &self.network, &self.keystore, ); - let last_finalized_number = self.client.chain_info().finalized_number; + let last_finalized_number = self.client.info().finalized_number; // NOTE: since we are not using `round_communication` we have to // manually note the round with the gossip validator, otherwise we won't @@ -324,15 +324,13 @@ where } } -impl Future for ObserverWork +impl Future for ObserverWork where B: BlockT, + BE: Backend + Unpin + 'static, + C: crate::ClientForGrandpa+ 'static, N: NetworkT, NumberFor: BlockNumberOps, - RA: 'static + Send + Sync, - E: CallExecutor + Send + Sync + 'static, - Bk: Backend + 'static, - Client: AuxStore, { type Output = Result<(), Error>; @@ -379,6 +377,7 @@ mod tests { use crate::{aux_schema, communication::tests::{Event, make_test_network}}; use substrate_test_runtime_client::{TestClientBuilder, TestClientBuilderExt}; use sc_network::PeerId; + use sp_blockchain::HeaderBackend as _; use futures::executor; @@ -406,7 +405,7 @@ mod tests { let persistent_data = aux_schema::load_persistent( &*backend, - client.chain_info().genesis_hash, + client.info().genesis_hash, 0, || Ok(vec![]), ).unwrap(); diff --git a/client/finality-grandpa/src/tests.rs b/client/finality-grandpa/src/tests.rs index 16b50ccb9f2..23c7ec9ba87 100644 --- a/client/finality-grandpa/src/tests.rs +++ b/client/finality-grandpa/src/tests.rs @@ -20,7 +20,7 @@ use super::*; use environment::HasVoted; use sc_network_test::{ Block, Hash, TestNetFactory, BlockImportAdapter, Peer, - PeersClient, PassThroughVerifier, + PeersClient, PassThroughVerifier, PeersFullClient, }; use sc_network::config::{ProtocolConfig, Roles, BoxFinalityProofRequestBuilder}; use parking_lot::Mutex; @@ -60,10 +60,8 @@ type PeerData = Mutex< Option< LinkHalf< - substrate_test_runtime_client::Backend, - substrate_test_runtime_client::Executor, Block, - substrate_test_runtime_client::runtime::RuntimeApi, + PeersFullClient, LongestChain > > @@ -1654,6 +1652,7 @@ fn grandpa_environment_respects_voting_rules() { voters: Arc::new(authority_set.current_authorities()), network, voting_rule, + _phantom: PhantomData, } }; diff --git a/client/src/client.rs b/client/src/client.rs index e9a8f1228c5..babbaaf7ef7 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -66,7 +66,7 @@ pub use sc_client_api::{ backend::{ self, BlockImportOperation, PrunableStateChangesTrieStorage, ClientImportOperation, Finalizer, ImportSummary, NewBlockState, - changes_tries_state_at_block, + LockImportRun, changes_tries_state_at_block, }, client::{ ImportNotifications, FinalityNotification, FinalityNotifications, BlockImportNotification, @@ -218,6 +218,61 @@ impl BlockOf for Client where type Type = Block; } +impl LockImportRun for Client + where + B: backend::Backend, + E: CallExecutor, + Block: BlockT, +{ + fn lock_import_and_run(&self, f: F) -> Result + where + F: FnOnce(&mut ClientImportOperation) -> Result, + Err: From, + { + let inner = || { + let _import_lock = self.backend.get_import_lock().write(); + + let mut op = ClientImportOperation { + op: self.backend.begin_operation()?, + notify_imported: None, + notify_finalized: Vec::new(), + }; + + let r = f(&mut op)?; + + let ClientImportOperation { op, notify_imported, notify_finalized } = op; + self.backend.commit_operation(op)?; + self.notify_finalized(notify_finalized)?; + + if let Some(notify_imported) = notify_imported { + self.notify_imported(notify_imported)?; + } + + Ok(r) + }; + + let result = inner(); + *self.importing_block.write() = None; + + result + } +} + +impl LockImportRun for &Client + where + Block: BlockT, + B: backend::Backend, + E: CallExecutor, +{ + fn lock_import_and_run(&self, f: F) -> Result + where + F: FnOnce(&mut ClientImportOperation) -> Result, + Err: From, + { + (**self).lock_import_and_run(f) + } +} + impl Client where B: backend::Backend, E: CallExecutor, @@ -835,39 +890,6 @@ impl Client where ) } - /// Lock the import lock, and run operations inside. - pub fn lock_import_and_run(&self, f: F) -> Result where - F: FnOnce(&mut ClientImportOperation) -> Result, - Err: From, - { - let inner = || { - let _import_lock = self.backend.get_import_lock().write(); - - let mut op = ClientImportOperation { - op: self.backend.begin_operation()?, - notify_imported: None, - notify_finalized: Vec::new(), - }; - - let r = f(&mut op)?; - - let ClientImportOperation { op, notify_imported, notify_finalized } = op; - self.backend.commit_operation(op)?; - self.notify_finalized(notify_finalized)?; - - if let Some(notify_imported) = notify_imported { - self.notify_imported(notify_imported)?; - } - - Ok(r) - }; - - let result = inner(); - *self.importing_block.write() = None; - - result - } - /// Apply a checked and validated block to an operation. If a justification is provided /// then `finalized` *must* be true. fn apply_block( diff --git a/client/src/lib.rs b/client/src/lib.rs index d97246d478c..1d279cabad4 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -98,7 +98,7 @@ pub use crate::{ client::{ new_with_backend, new_in_mem, - BlockBody, ImportNotifications, FinalityNotifications, BlockchainEvents, + BlockBody, ImportNotifications, FinalityNotifications, BlockchainEvents, LockImportRun, BlockImportNotification, Client, ClientInfo, ExecutionStrategies, FinalityNotification, LongestChain, BlockOf, ProvideUncles, BadBlocks, ForkBlocks, apply_aux, }, -- GitLab From 06fae63b0144eb0b50cc5ea515adf069ad1871ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Thu, 27 Feb 2020 13:38:55 +0100 Subject: [PATCH 052/106] Remove deprecated host functions (#5038) Sadly we need to keep one function `ext_blake2_256`. This function is manually defined in `sp-core`. --- .../executor/src/deprecated_host_interface.rs | 941 ------------------ client/executor/src/lib.rs | 3 - client/executor/src/native_executor.rs | 4 - client/executor/src/wasm_utils.rs | 173 ---- primitives/io/src/lib.rs | 51 + .../runtime-interface/test-wasm/src/lib.rs | 27 +- primitives/runtime-interface/test/src/lib.rs | 6 +- primitives/wasm-interface/src/lib.rs | 6 + 8 files changed, 72 insertions(+), 1139 deletions(-) delete mode 100644 client/executor/src/deprecated_host_interface.rs delete mode 100644 client/executor/src/wasm_utils.rs diff --git a/client/executor/src/deprecated_host_interface.rs b/client/executor/src/deprecated_host_interface.rs deleted file mode 100644 index 6ea0b11f5a9..00000000000 --- a/client/executor/src/deprecated_host_interface.rs +++ /dev/null @@ -1,941 +0,0 @@ -// Copyright 2017-2020 Parity Technologies (UK) Ltd. -// This file is part of Substrate. - -// Substrate is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Substrate is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Substrate. If not, see . - -//! Definition and implementation of the old and deprecated Substrate runtime interface for the host. - -use codec::Encode; -use std::{convert::TryFrom, str}; -use sp_core::{ - blake2_128, blake2_256, twox_64, twox_128, twox_256, ed25519, sr25519, keccak_256, Blake2Hasher, Pair, - crypto::KeyTypeId, offchain, -}; -use sp_trie::{TrieConfiguration, trie_types::Layout}; -use sp_wasm_interface::{ - Pointer, WordSize, WritePrimitive, ReadPrimitive, FunctionContext, Result as WResult, -}; - -#[cfg(feature="wasm-extern-trace")] -macro_rules! debug_trace { - ( $( $x:tt )* ) => ( trace!( $( $x )* ) ) -} - -#[cfg(not(feature="wasm-extern-trace"))] -macro_rules! debug_trace { - ( $( $x:tt )* ) => () -} - -/// The old and deprecated Substrate externals. These are still required for backwards compatibility -/// reasons. -pub struct SubstrateExternals; - -enum RecoverResult { - Invalid(u32), - Valid(secp256k1::PublicKey), -} - -fn secp256k1_recover( - context: &mut dyn FunctionContext, - msg_data: Pointer, - sig_data: Pointer, -) -> WResult { - let mut sig = [0u8; 65]; - context.read_memory_into(sig_data, &mut sig[..]) - .map_err(|_| "Invalid attempt to get signature in ext_secp256k1_ecdsa_recover")?; - let rs = match secp256k1::Signature::parse_slice(&sig[0..64]) { - Ok(rs) => rs, - _ => return Ok(RecoverResult::Invalid(1)), - }; - - let recovery_id = if sig[64] > 26 { sig[64] - 27 } else { sig[64] } as u8; - let v = match secp256k1::RecoveryId::parse(recovery_id) { - Ok(v) => v, - _ => return Ok(RecoverResult::Invalid(2)), - }; - - let mut msg = [0u8; 32]; - context.read_memory_into(msg_data, &mut msg[..]) - .map_err(|_| "Invalid attempt to get message in ext_secp256k1_ecdsa_recover")?; - - Ok(match secp256k1::recover(&secp256k1::Message::parse(&msg), &rs, &v) { - Ok(pubkey) => RecoverResult::Valid(pubkey), - Err(_) => RecoverResult::Invalid(3), - }) -} - -impl_wasm_host_interface! { - impl SubstrateExternals where context { - ext_malloc(size: WordSize) -> Pointer { - let r = context.allocate_memory(size)?; - debug_trace!(target: "sp-io", "malloc {} bytes at {:?}", size, r); - Ok(r) - } - - ext_free(addr: Pointer) { - context.deallocate_memory(addr)?; - debug_trace!(target: "sp-io", "free {:?}", addr); - Ok(()) - } - - ext_sandbox_instantiate( - dispatch_thunk_idx: u32, - wasm_ptr: Pointer, - wasm_len: WordSize, - imports_ptr: Pointer, - imports_len: WordSize, - state: u32, - ) -> u32 { - let wasm = context.read_memory(wasm_ptr, wasm_len) - .map_err(|_| "OOB while ext_sandbox_instantiate: wasm")?; - let raw_env_def = context.read_memory(imports_ptr, imports_len) - .map_err(|_| "OOB while ext_sandbox_instantiate: imports")?; - - context.sandbox().instance_new(dispatch_thunk_idx, &wasm, &raw_env_def, state) - } - - ext_sandbox_instance_teardown(instance_idx: u32) { - context.sandbox().instance_teardown(instance_idx) - } - - ext_sandbox_invoke( - instance_idx: u32, - export_ptr: Pointer, - export_len: WordSize, - args_ptr: Pointer, - args_len: WordSize, - return_val_ptr: Pointer, - return_val_len: WordSize, - state: u32, - ) -> u32 { - let export = context.read_memory(export_ptr, export_len) - .map_err(|_| "OOB while ext_sandbox_invoke: export") - .and_then(|b| - String::from_utf8(b) - .map_err(|_| "Export name should be a valid utf-8 sequence") - )?; - - // Deserialize arguments and convert them into wasmi types. - let serialized_args = context.read_memory(args_ptr, args_len) - .map_err(|_| "OOB while ext_sandbox_invoke: args")?; - - context.sandbox().invoke( - instance_idx, - &export, - &serialized_args, - return_val_ptr, - return_val_len, - state, - ) - } - - ext_sandbox_memory_new(initial: WordSize, maximum: WordSize) -> u32 { - context.sandbox().memory_new(initial, maximum) - } - - ext_sandbox_memory_get( - memory_idx: u32, - offset: WordSize, - buf_ptr: Pointer, - buf_len: WordSize, - ) -> u32 { - context.sandbox().memory_get(memory_idx, offset, buf_ptr, buf_len) - } - - ext_sandbox_memory_set( - memory_idx: u32, - offset: WordSize, - val_ptr: Pointer, - val_len: WordSize, - ) -> u32 { - context.sandbox().memory_set(memory_idx, offset, val_ptr, val_len) - } - - ext_sandbox_memory_teardown(memory_idx: u32) { - context.sandbox().memory_teardown(memory_idx) - } - - ext_print_utf8(utf8_data: Pointer, utf8_len: WordSize) { - if let Ok(utf8) = context.read_memory(utf8_data, utf8_len) { - sp_io::misc::print_utf8(&utf8); - } - Ok(()) - } - - ext_print_hex(data: Pointer, len: WordSize) { - if let Ok(hex) = context.read_memory(data, len) { - sp_io::misc::print_hex(&hex); - } - Ok(()) - } - - ext_print_num(number: u64) { - sp_io::misc::print_num(number); - Ok(()) - } - - ext_log( - level: u32, - target_data: Pointer, - target_len: WordSize, - message_data: Pointer, - message_len: WordSize, - ) { - let target = context.read_memory(target_data, target_len) - .map_err(|_| "Invalid attempt to determine target in ext_log")?; - let message = context.read_memory(message_data, message_len) - .map_err(|_| "Invalid attempt to determine message in ext_log")?; - - let target_str = std::str::from_utf8(&target) - .map_err(|_| "Target invalid utf8 in ext_log")?; - - sp_io::logging::log(level.into(), &target_str, &message); - Ok(()) - } - - ext_set_storage( - key_data: Pointer, - key_len: WordSize, - value_data: Pointer, - value_len: WordSize, - ) { - let key = context.read_memory(key_data, key_len) - .map_err(|_| "Invalid attempt to determine key in ext_set_storage")?; - let value = context.read_memory(value_data, value_len) - .map_err(|_| "Invalid attempt to determine value in ext_set_storage")?; - Ok(sp_io::storage::set(&key, &value)) - } - - ext_clear_storage(key_data: Pointer, key_len: WordSize) { - let key = context.read_memory(key_data, key_len) - .map_err(|_| "Invalid attempt to determine key in ext_clear_storage")?; - Ok(sp_io::storage::clear(&key)) - } - - ext_exists_storage(key_data: Pointer, key_len: WordSize) -> u32 { - let key = context.read_memory(key_data, key_len) - .map_err(|_| "Invalid attempt to determine key in ext_exists_storage")?; - Ok(if sp_io::storage::exists(&key) { 1 } else { 0 }) - } - - ext_clear_prefix(prefix_data: Pointer, prefix_len: WordSize) { - let prefix = context.read_memory(prefix_data, prefix_len) - .map_err(|_| "Invalid attempt to determine prefix in ext_clear_prefix")?; - Ok(sp_io::storage::clear_prefix(&prefix)) - } - - ext_get_allocated_storage( - key_data: Pointer, - key_len: WordSize, - written_out: Pointer, - ) -> Pointer { - let key = context.read_memory(key_data, key_len) - .map_err(|_| "Invalid attempt to determine key in ext_get_allocated_storage")?; - - if let Some(value) = sp_io::storage::get(&key) { - let offset = context.allocate_memory(value.len() as u32)?; - context.write_memory(offset, &value) - .map_err(|_| "Invalid attempt to set memory in ext_get_allocated_storage")?; - context.write_primitive(written_out, value.len() as u32) - .map_err(|_| "Invalid attempt to write written_out in ext_get_allocated_storage")?; - Ok(offset) - } else { - context.write_primitive(written_out, u32::max_value()) - .map_err(|_| "Invalid attempt to write failed written_out in ext_get_allocated_storage")?; - Ok(Pointer::null()) - } - } - - ext_get_storage_into( - key_data: Pointer, - key_len: WordSize, - value_data: Pointer, - value_len: WordSize, - value_offset: WordSize, - ) -> WordSize { - let key = context.read_memory(key_data, key_len) - .map_err(|_| "Invalid attempt to get key in ext_get_storage_into")?; - - if let Some(value) = sp_io::storage::get(&key) { - let data = &value[value.len().min(value_offset as usize)..]; - let written = std::cmp::min(value_len as usize, data.len()); - context.write_memory(value_data, &data[..written]) - .map_err(|_| "Invalid attempt to set value in ext_get_storage_into")?; - Ok(value.len() as u32) - } else { - Ok(u32::max_value()) - } - } - - ext_storage_root(result: Pointer) { - context.write_memory(result, sp_io::storage::root().as_ref()) - .map_err(|_| "Invalid attempt to set memory in ext_storage_root".into()) - } - - ext_storage_changes_root( - parent_hash_data: Pointer, - _len: WordSize, - result: Pointer, - ) -> u32 { - let mut parent_hash = [0u8; 32]; - context.read_memory_into(parent_hash_data, &mut parent_hash[..]) - .map_err(|_| "Invalid attempt to get parent_hash in ext_storage_changes_root")?; - - if let Some(r) = sp_io::storage::changes_root(&parent_hash) { - context.write_memory(result, &r[..]) - .map_err(|_| "Invalid attempt to set memory in ext_storage_changes_root")?; - Ok(1) - } else { - Ok(0) - } - } - - ext_blake2_256_enumerated_trie_root( - values_data: Pointer, - lens_data: Pointer, - lens_len: WordSize, - result: Pointer, - ) { - let values = (0..lens_len) - .map(|i| context.read_primitive(lens_data.offset(i).ok_or("Pointer overflow")?)) - .collect::, _>>()? - .into_iter() - .scan(0u32, |acc, v| { let o = *acc; *acc += v; Some((o, v)) }) - .map(|(offset, len)| - context.read_memory(values_data.offset(offset).ok_or("Pointer overflow")?, len) - .map_err(|_| - "Invalid attempt to get memory in ext_blake2_256_enumerated_trie_root" - ) - ) - .collect::, _>>()?; - let r = Layout::::ordered_trie_root(values.into_iter()); - context.write_memory(result, &r[..]) - .map_err(|_| "Invalid attempt to set memory in ext_blake2_256_enumerated_trie_root")?; - Ok(()) - } - - ext_chain_id() -> u64 { - Ok(sp_io::misc::chain_id()) - } - - ext_twox_64(data: Pointer, len: WordSize, out: Pointer) { - let result: [u8; 8] = if len == 0 { - let hashed = twox_64(&[0u8; 0]); - hashed - } else { - let key = context.read_memory(data, len) - .map_err(|_| "Invalid attempt to get key in ext_twox_64")?; - let hashed_key = twox_64(&key); - hashed_key - }; - - context.write_memory(out, &result) - .map_err(|_| "Invalid attempt to set result in ext_twox_64")?; - Ok(()) - } - - ext_twox_128(data: Pointer, len: WordSize, out: Pointer) { - let result: [u8; 16] = if len == 0 { - let hashed = twox_128(&[0u8; 0]); - hashed - } else { - let key = context.read_memory(data, len) - .map_err(|_| "Invalid attempt to get key in ext_twox_128")?; - let hashed_key = twox_128(&key); - hashed_key - }; - - context.write_memory(out, &result) - .map_err(|_| "Invalid attempt to set result in ext_twox_128")?; - Ok(()) - } - - ext_twox_256(data: Pointer, len: WordSize, out: Pointer) { - let result: [u8; 32] = if len == 0 { - twox_256(&[0u8; 0]) - } else { - let mem = context.read_memory(data, len) - .map_err(|_| "Invalid attempt to get data in ext_twox_256")?; - twox_256(&mem) - }; - context.write_memory(out, &result) - .map_err(|_| "Invalid attempt to set result in ext_twox_256")?; - Ok(()) - } - - ext_blake2_128(data: Pointer, len: WordSize, out: Pointer) { - let result: [u8; 16] = if len == 0 { - let hashed = blake2_128(&[0u8; 0]); - hashed - } else { - let key = context.read_memory(data, len) - .map_err(|_| "Invalid attempt to get key in ext_blake2_128")?; - let hashed_key = blake2_128(&key); - hashed_key - }; - - context.write_memory(out, &result) - .map_err(|_| "Invalid attempt to set result in ext_blake2_128")?; - Ok(()) - } - - ext_blake2_256(data: Pointer, len: WordSize, out: Pointer) { - let result: [u8; 32] = if len == 0 { - blake2_256(&[0u8; 0]) - } else { - let mem = context.read_memory(data, len) - .map_err(|_| "Invalid attempt to get data in ext_blake2_256")?; - blake2_256(&mem) - }; - context.write_memory(out, &result) - .map_err(|_| "Invalid attempt to set result in ext_blake2_256")?; - Ok(()) - } - - ext_keccak_256(data: Pointer, len: WordSize, out: Pointer) { - let result: [u8; 32] = if len == 0 { - keccak_256(&[0u8; 0]) - } else { - let mem = context.read_memory(data, len) - .map_err(|_| "Invalid attempt to get data in ext_keccak_256")?; - keccak_256(&mem) - }; - context.write_memory(out, &result) - .map_err(|_| "Invalid attempt to set result in ext_keccak_256")?; - Ok(()) - } - - ext_ed25519_public_keys(id_data: Pointer, result_len: Pointer) -> Pointer { - let mut id = [0u8; 4]; - context.read_memory_into(id_data, &mut id[..]) - .map_err(|_| "Invalid attempt to get id in ext_ed25519_public_keys")?; - let key_type = KeyTypeId(id); - - let keys = sp_io::crypto::ed25519_public_keys(key_type).encode(); - - let len = keys.len() as u32; - let offset = context.allocate_memory(len)?; - - context.write_memory(offset, keys.as_ref()) - .map_err(|_| "Invalid attempt to set memory in ext_ed25519_public_keys")?; - context.write_primitive(result_len, len) - .map_err(|_| "Invalid attempt to write result_len in ext_ed25519_public_keys")?; - - Ok(offset) - } - - ext_ed25519_verify( - msg_data: Pointer, - msg_len: WordSize, - sig_data: Pointer, - pubkey_data: Pointer, - ) -> u32 { - let mut sig = [0u8; 64]; - context.read_memory_into(sig_data, &mut sig[..]) - .map_err(|_| "Invalid attempt to get signature in ext_ed25519_verify")?; - let mut pubkey = [0u8; 32]; - context.read_memory_into(pubkey_data, &mut pubkey[..]) - .map_err(|_| "Invalid attempt to get pubkey in ext_ed25519_verify")?; - let msg = context.read_memory(msg_data, msg_len) - .map_err(|_| "Invalid attempt to get message in ext_ed25519_verify")?; - - Ok(if ed25519::Pair::verify_weak(&sig, &msg, &pubkey) { - 0 - } else { - 1 - }) - } - - ext_ed25519_generate( - id_data: Pointer, - seed: Pointer, - seed_len: WordSize, - out: Pointer, - ) { - let mut id = [0u8; 4]; - context.read_memory_into(id_data, &mut id[..]) - .map_err(|_| "Invalid attempt to get id in ext_ed25519_generate")?; - let key_type = KeyTypeId(id); - - let seed = if seed_len == 0 { - None - } else { - Some( - context.read_memory(seed, seed_len) - .map_err(|_| "Invalid attempt to get seed in ext_ed25519_generate")? - ) - }; - - let pubkey = sp_io::crypto::ed25519_generate(key_type, seed); - - context.write_memory(out, pubkey.as_ref()) - .map_err(|_| "Invalid attempt to set out in ext_ed25519_generate".into()) - } - - ext_ed25519_sign( - id_data: Pointer, - pubkey_data: Pointer, - msg_data: Pointer, - msg_len: WordSize, - out: Pointer, - ) -> u32 { - let mut id = [0u8; 4]; - context.read_memory_into(id_data, &mut id[..]) - .map_err(|_| "Invalid attempt to get id in ext_ed25519_sign")?; - let key_type = KeyTypeId(id); - - let mut pubkey = [0u8; 32]; - context.read_memory_into(pubkey_data, &mut pubkey[..]) - .map_err(|_| "Invalid attempt to get pubkey in ext_ed25519_sign")?; - - let msg = context.read_memory(msg_data, msg_len) - .map_err(|_| "Invalid attempt to get message in ext_ed25519_sign")?; - - let pub_key = ed25519::Public::try_from(pubkey.as_ref()) - .map_err(|_| "Invalid `ed25519` public key")?; - - let signature = sp_io::crypto::ed25519_sign(key_type, &pub_key, &msg); - - match signature { - Some(signature) => { - context.write_memory(out, signature.as_ref()) - .map_err(|_| "Invalid attempt to set out in ext_ed25519_sign")?; - Ok(0) - }, - None => Ok(1), - } - } - - ext_sr25519_public_keys(id_data: Pointer, result_len: Pointer) -> Pointer { - let mut id = [0u8; 4]; - context.read_memory_into(id_data, &mut id[..]) - .map_err(|_| "Invalid attempt to get id in ext_sr25519_public_keys")?; - let key_type = KeyTypeId(id); - - let keys = sp_io::crypto::sr25519_public_keys(key_type).encode(); - - let len = keys.len() as u32; - let offset = context.allocate_memory(len)?; - - context.write_memory(offset, keys.as_ref()) - .map_err(|_| "Invalid attempt to set memory in ext_sr25519_public_keys")?; - context.write_primitive(result_len, len) - .map_err(|_| "Invalid attempt to write result_len in ext_sr25519_public_keys")?; - - Ok(offset) - } - - ext_sr25519_verify( - msg_data: Pointer, - msg_len: WordSize, - sig_data: Pointer, - pubkey_data: Pointer, - ) -> u32 { - let mut sig = [0u8; 64]; - context.read_memory_into(sig_data, &mut sig[..]) - .map_err(|_| "Invalid attempt to get signature in ext_sr25519_verify")?; - let mut pubkey = [0u8; 32]; - context.read_memory_into(pubkey_data, &mut pubkey[..]) - .map_err(|_| "Invalid attempt to get pubkey in ext_sr25519_verify")?; - let msg = context.read_memory(msg_data, msg_len) - .map_err(|_| "Invalid attempt to get message in ext_sr25519_verify")?; - - Ok(if sr25519::Pair::verify_weak(&sig, &msg, &pubkey) { - 0 - } else { - 1 - }) - } - - ext_sr25519_generate( - id_data: Pointer, - seed: Pointer, - seed_len: WordSize, - out: Pointer, - ) { - let mut id = [0u8; 4]; - context.read_memory_into(id_data, &mut id[..]) - .map_err(|_| "Invalid attempt to get id in ext_sr25519_generate")?; - let key_type = KeyTypeId(id); - let seed = if seed_len == 0 { - None - } else { - Some( - context.read_memory(seed, seed_len) - .map_err(|_| "Invalid attempt to get seed in ext_sr25519_generate")? - ) - }; - - let pubkey = sp_io::crypto::sr25519_generate(key_type, seed); - - context.write_memory(out, pubkey.as_ref()) - .map_err(|_| "Invalid attempt to set out in ext_sr25519_generate".into()) - } - - ext_sr25519_sign( - id_data: Pointer, - pubkey_data: Pointer, - msg_data: Pointer, - msg_len: WordSize, - out: Pointer, - ) -> u32 { - let mut id = [0u8; 4]; - context.read_memory_into(id_data, &mut id[..]) - .map_err(|_| "Invalid attempt to get id in ext_sr25519_sign")?; - let key_type = KeyTypeId(id); - - let mut pubkey = [0u8; 32]; - context.read_memory_into(pubkey_data, &mut pubkey[..]) - .map_err(|_| "Invalid attempt to get pubkey in ext_sr25519_sign")?; - - let msg = context.read_memory(msg_data, msg_len) - .map_err(|_| "Invalid attempt to get message in ext_sr25519_sign")?; - - let pub_key = sr25519::Public::try_from(pubkey.as_ref()) - .map_err(|_| "Invalid `sr25519` public key")?; - - let signature = sp_io::crypto::sr25519_sign(key_type, &pub_key, &msg); - - match signature { - Some(signature) => { - context.write_memory(out, signature.as_ref()) - .map_err(|_| "Invalid attempt to set out in ext_sr25519_sign")?; - Ok(0) - }, - None => Ok(1), - } - } - - ext_secp256k1_ecdsa_recover( - msg_data: Pointer, - sig_data: Pointer, - pubkey_data: Pointer, - ) -> u32 { - match secp256k1_recover(context, msg_data, sig_data)? { - RecoverResult::Invalid(c) => Ok(c), - RecoverResult::Valid(pubkey) => { - context.write_memory(pubkey_data, &pubkey.serialize()[1..65]) - .map_err(|_| "Invalid attempt to set pubkey in ext_secp256k1_ecdsa_recover")?; - Ok(0) - } - } - } - - ext_secp256k1_ecdsa_recover_compressed( - msg_data: Pointer, - sig_data: Pointer, - pubkey_data: Pointer, - ) -> u32 { - match secp256k1_recover(context, msg_data, sig_data)? { - RecoverResult::Invalid(c) => Ok(c), - RecoverResult::Valid(pubkey) => { - context.write_memory(pubkey_data, &pubkey.serialize_compressed()[..]) - .map_err(|_| "Invalid attempt to set pubkey in ext_secp256k1_ecdsa_recover")?; - Ok(0) - } - } - } - - ext_is_validator() -> u32 { - if sp_io::offchain::is_validator() { Ok(1) } else { Ok(0) } - } - - ext_submit_transaction(msg_data: Pointer, len: WordSize) -> u32 { - let extrinsic = context.read_memory(msg_data, len) - .map_err(|_| "OOB while ext_submit_transaction: wasm")?; - - let res = sp_io::offchain::submit_transaction(extrinsic); - - Ok(if res.is_ok() { 0 } else { 1 }) - } - - ext_network_state(written_out: Pointer) -> Pointer { - let res = sp_io::offchain::network_state(); - - let encoded = res.encode(); - let len = encoded.len() as u32; - let offset = context.allocate_memory(len)?; - context.write_memory(offset, &encoded) - .map_err(|_| "Invalid attempt to set memory in ext_network_state")?; - - context.write_primitive(written_out, len) - .map_err(|_| "Invalid attempt to write written_out in ext_network_state")?; - - Ok(offset) - } - - ext_timestamp() -> u64 { - Ok(sp_io::offchain::timestamp().unix_millis()) - } - - ext_sleep_until(deadline: u64) { - sp_io::offchain::sleep_until(offchain::Timestamp::from_unix_millis(deadline)); - Ok(()) - } - - ext_random_seed(seed_data: Pointer) { - // NOTE the runtime as assumptions about seed size. - let seed = sp_io::offchain::random_seed(); - - context.write_memory(seed_data, &seed) - .map_err(|_| "Invalid attempt to set value in ext_random_seed")?; - Ok(()) - } - - ext_local_storage_set( - kind: u32, - key: Pointer, - key_len: WordSize, - value: Pointer, - value_len: WordSize, - ) { - let kind = offchain::StorageKind::try_from(kind) - .map_err(|_| "storage kind OOB while ext_local_storage_set: wasm")?; - let key = context.read_memory(key, key_len) - .map_err(|_| "OOB while ext_local_storage_set: wasm")?; - let value = context.read_memory(value, value_len) - .map_err(|_| "OOB while ext_local_storage_set: wasm")?; - - sp_io::offchain::local_storage_set(kind, &key, &value); - - Ok(()) - } - - ext_local_storage_get( - kind: u32, - key: Pointer, - key_len: WordSize, - value_len: Pointer, - ) -> Pointer { - let kind = offchain::StorageKind::try_from(kind) - .map_err(|_| "storage kind OOB while ext_local_storage_get: wasm")?; - let key = context.read_memory(key, key_len) - .map_err(|_| "OOB while ext_local_storage_get: wasm")?; - - let maybe_value = sp_io::offchain::local_storage_get(kind, &key); - - let (offset, len) = if let Some(value) = maybe_value { - let offset = context.allocate_memory(value.len() as u32)?; - context.write_memory(offset, &value) - .map_err(|_| "Invalid attempt to set memory in ext_local_storage_get")?; - (offset, value.len() as u32) - } else { - (Pointer::null(), u32::max_value()) - }; - - context.write_primitive(value_len, len) - .map_err(|_| "Invalid attempt to write value_len in ext_local_storage_get")?; - - Ok(offset) - } - - ext_local_storage_compare_and_set( - kind: u32, - key: Pointer, - key_len: WordSize, - old_value: Pointer, - old_value_len: WordSize, - new_value: Pointer, - new_value_len: WordSize, - ) -> u32 { - let kind = offchain::StorageKind::try_from(kind) - .map_err(|_| "storage kind OOB while ext_local_storage_compare_and_set: wasm")?; - let key = context.read_memory(key, key_len) - .map_err(|_| "OOB while ext_local_storage_compare_and_set: wasm")?; - let new_value = context.read_memory(new_value, new_value_len) - .map_err(|_| "OOB while ext_local_storage_compare_and_set: wasm")?; - - let old_value = if old_value_len == u32::max_value() { - None - } else { - Some( - context.read_memory(old_value, old_value_len) - .map_err(|_| "OOB while ext_local_storage_compare_and_set: wasm")? - ) - }; - - let res = sp_io::offchain::local_storage_compare_and_set( - kind, - &key, - old_value, - &new_value, - ); - - Ok(if res { 0 } else { 1 }) - } - - ext_http_request_start( - method: Pointer, - method_len: WordSize, - url: Pointer, - url_len: WordSize, - meta: Pointer, - meta_len: WordSize, - ) -> u32 { - let method = context.read_memory(method, method_len) - .map_err(|_| "OOB while ext_http_request_start: wasm")?; - let url = context.read_memory(url, url_len) - .map_err(|_| "OOB while ext_http_request_start: wasm")?; - let meta = context.read_memory(meta, meta_len) - .map_err(|_| "OOB while ext_http_request_start: wasm")?; - - let method_str = str::from_utf8(&method) - .map_err(|_| "invalid str while ext_http_request_start: wasm")?; - let url_str = str::from_utf8(&url) - .map_err(|_| "invalid str while ext_http_request_start: wasm")?; - - let id = sp_io::offchain::http_request_start(method_str, url_str, &meta); - - if let Ok(id) = id { - Ok(id.into()) - } else { - Ok(u32::max_value()) - } - } - - ext_http_request_add_header( - request_id: u32, - name: Pointer, - name_len: WordSize, - value: Pointer, - value_len: WordSize, - ) -> u32 { - let name = context.read_memory(name, name_len) - .map_err(|_| "OOB while ext_http_request_add_header: wasm")?; - let value = context.read_memory(value, value_len) - .map_err(|_| "OOB while ext_http_request_add_header: wasm")?; - - let name_str = str::from_utf8(&name) - .map_err(|_| "Invalid str while ext_http_request_add_header: wasm")?; - let value_str = str::from_utf8(&value) - .map_err(|_| "Invalid str while ext_http_request_add_header: wasm")?; - - let res = sp_io::offchain::http_request_add_header( - offchain::HttpRequestId(request_id as u16), - name_str, - value_str, - ); - - Ok(if res.is_ok() { 0 } else { 1 }) - } - - ext_http_request_write_body( - request_id: u32, - chunk: Pointer, - chunk_len: WordSize, - deadline: u64, - ) -> u32 { - let chunk = context.read_memory(chunk, chunk_len) - .map_err(|_| "OOB while ext_http_request_write_body: wasm")?; - - let res = sp_io::offchain::http_request_write_body( - offchain::HttpRequestId(request_id as u16), - &chunk, - deadline_to_timestamp(deadline), - ); - - Ok(match res { - Ok(()) => 0, - Err(e) => e.into(), - }) - } - - ext_http_response_wait( - ids: Pointer, - ids_len: WordSize, - statuses: Pointer, - deadline: u64, - ) { - let ids = (0..ids_len) - .map(|i| - context.read_primitive(ids.offset(i).ok_or("Point overflow")?) - .map(|id: u32| offchain::HttpRequestId(id as u16)) - .map_err(|_| "OOB while ext_http_response_wait: wasm") - ) - .collect::, _>>()?; - - let res = sp_io::offchain::http_response_wait(&ids, deadline_to_timestamp(deadline)) - .into_iter() - .map(|status| u32::from(status)) - .enumerate() - // make sure to take up to `ids_len` to avoid exceeding the mem. - .take(ids_len as usize); - - for (i, status) in res { - context.write_primitive(statuses.offset(i as u32).ok_or("Point overflow")?, status) - .map_err(|_| "Invalid attempt to set memory in ext_http_response_wait")?; - } - - Ok(()) - } - - ext_http_response_headers( - request_id: u32, - written_out: Pointer, - ) -> Pointer { - use codec::Encode; - - let headers = sp_io::offchain::http_response_headers( - offchain::HttpRequestId(request_id as u16), - ); - - let encoded = headers.encode(); - let len = encoded.len() as u32; - let offset = context.allocate_memory(len)?; - - context.write_memory(offset, &encoded) - .map_err(|_| "Invalid attempt to set memory in ext_http_response_headers")?; - context.write_primitive(written_out, len) - .map_err(|_| "Invalid attempt to write written_out in ext_http_response_headers")?; - - Ok(offset) - } - - ext_http_response_read_body( - request_id: u32, - buffer: Pointer, - buffer_len: WordSize, - deadline: u64, - ) -> WordSize { - let mut internal_buffer = Vec::with_capacity(buffer_len as usize); - internal_buffer.resize(buffer_len as usize, 0); - - let res = sp_io::offchain::http_response_read_body( - offchain::HttpRequestId(request_id as u16), - &mut internal_buffer, - deadline_to_timestamp(deadline), - ); - - Ok(match res { - Ok(read) => { - context.write_memory(buffer, &internal_buffer[..read as usize]) - .map_err(|_| "Invalid attempt to set memory in ext_http_response_read_body")?; - - read as u32 - }, - Err(err) => { - u32::max_value() - u32::from(err) + 1 - } - }) - } - } -} - -fn deadline_to_timestamp(deadline: u64) -> Option { - if deadline == 0 { - None - } else { - Some(offchain::Timestamp::from_unix_millis(deadline)) - } -} diff --git a/client/executor/src/lib.rs b/client/executor/src/lib.rs index 152e3a49848..af53ed91838 100644 --- a/client/executor/src/lib.rs +++ b/client/executor/src/lib.rs @@ -29,11 +29,8 @@ #![warn(missing_docs)] #![recursion_limit="128"] -#[macro_use] -mod wasm_utils; #[macro_use] mod native_executor; -pub mod deprecated_host_interface; mod wasm_runtime; #[cfg(test)] mod integration_tests; diff --git a/client/executor/src/native_executor.rs b/client/executor/src/native_executor.rs index 4fe7a205f53..1364b753dbe 100644 --- a/client/executor/src/native_executor.rs +++ b/client/executor/src/native_executor.rs @@ -101,10 +101,6 @@ impl NativeExecutor { /// Defaults to `DEFAULT_HEAP_PAGES` if `None` is provided. pub fn new(fallback_method: WasmExecutionMethod, default_heap_pages: Option) -> Self { let mut host_functions = sp_io::SubstrateHostFunctions::host_functions(); - // Add the old and deprecated host functions as well, so that we support old wasm runtimes. - host_functions.extend( - crate::deprecated_host_interface::SubstrateExternals::host_functions(), - ); // Add the custom host functions provided by the user. host_functions.extend(D::ExtendHostFunctions::host_functions()); diff --git a/client/executor/src/wasm_utils.rs b/client/executor/src/wasm_utils.rs deleted file mode 100644 index 539e210a946..00000000000 --- a/client/executor/src/wasm_utils.rs +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright 2017-2020 Parity Technologies (UK) Ltd. -// This file is part of Substrate. - -// Substrate is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Substrate is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Substrate. If not, see . - -//! Utilities for defining the wasm host environment. - -/// Converts arguments into respective WASM types. -#[macro_export] -macro_rules! convert_args { - () => ([]); - ( $( $t:ty ),* ) => ( [ $( <$t as $crate::sp_wasm_interface::IntoValue>::VALUE_TYPE, )* ] ); -} - -/// Generates a WASM signature for given list of parameters. -#[macro_export] -macro_rules! gen_signature { - ( ( $( $params: ty ),* ) ) => ( - $crate::sp_wasm_interface::Signature { - args: std::borrow::Cow::Borrowed(&convert_args!( $( $params ),* )[..]), - return_value: None, - } - ); - ( ( $( $params: ty ),* ) -> $returns:ty ) => ( - $crate::sp_wasm_interface::Signature { - args: std::borrow::Cow::Borrowed(&convert_args!( $( $params ),* )[..]), - return_value: Some(<$returns as $crate::sp_wasm_interface::IntoValue>::VALUE_TYPE), - } - ); -} - -macro_rules! gen_functions { - (@INTERNAL - { $( $generated:tt )* } - $context:ident, - ) => ( - vec![ $( $generated )* ] - ); - (@INTERNAL - { $( $generated:tt )* } - $context:ident, - $name:ident ( $( $names:ident: $params:ty ),* ) $( -> $returns:ty )? { $( $body:tt )* } - $( $tail:tt )* - ) => ( - gen_functions! { - @INTERNAL - { - $( $generated )* - { - struct $name; - - #[allow(unused)] - impl $crate::sp_wasm_interface::Function for $name { - fn name(&self) -> &str { - stringify!($name) - } - fn signature(&self) -> $crate::sp_wasm_interface::Signature { - gen_signature!( ( $( $params ),* ) $( -> $returns )? ) - } - fn execute( - &self, - context: &mut dyn $crate::sp_wasm_interface::FunctionContext, - args: &mut dyn Iterator, - ) -> ::std::result::Result, String> { - let mut $context = context; - marshall! { - args, - ( $( $names : $params ),* ) $( -> $returns )? => { $( $body )* } - } - } - } - - &$name as &dyn $crate::sp_wasm_interface::Function - }, - } - $context, - $( $tail )* - } - ); - - ( $context:ident, $( $tail:tt )* ) => ( - gen_functions!(@INTERNAL {} $context, $($tail)*); - ); -} - -/// Converts the list of arguments coming from WASM into their native types. -#[macro_export] -macro_rules! unmarshall_args { - ( $body:tt, $args_iter:ident, $( $names:ident : $params:ty ),*) => ({ - $( - let $names : $params = - $args_iter.next() - .and_then(|val| <$params as $crate::sp_wasm_interface::TryFromValue>::try_from_value(val)) - .expect( - "`$args_iter` comes from an argument of Externals::execute_function; - args to an external call always matches the signature of the external; - external signatures are built with count and types and in order defined by `$params`; - here, we iterating on `$params`; - qed; - " - ); - )* - $body - }) -} - -/// Since we can't specify the type of closure directly at binding site: -/// -/// ```nocompile -/// let f: FnOnce() -> Result<::NativeType, _> = || { /* ... */ }; -/// ``` -/// -/// we use this function to constrain the type of the closure. -#[inline(always)] -pub fn constrain_closure(f: F) -> F -where - F: FnOnce() -> Result -{ - f -} - -/// Pass the list of parameters by converting them to respective WASM types. -#[macro_export] -macro_rules! marshall { - ( $args_iter:ident, ( $( $names:ident : $params:ty ),* ) -> $returns:ty => $body:tt ) => ({ - let body = $crate::wasm_utils::constrain_closure::<$returns, _>(|| { - unmarshall_args!($body, $args_iter, $( $names : $params ),*) - }); - let r = body()?; - return Ok(Some($crate::sp_wasm_interface::IntoValue::into_value(r))) - }); - ( $args_iter:ident, ( $( $names:ident : $params:ty ),* ) => $body:tt ) => ({ - let body = $crate::wasm_utils::constrain_closure::<(), _>(|| { - unmarshall_args!($body, $args_iter, $( $names : $params ),*) - }); - body()?; - return Ok(None) - }) -} - -/// Implements the wasm host interface for the given type. -#[macro_export] -macro_rules! impl_wasm_host_interface { - ( - impl $interface_name:ident where $context:ident { - $( - $name:ident($( $names:ident : $params:ty ),* $(,)? ) $( -> $returns:ty )? - { $( $body:tt )* } - )* - } - ) => ( - impl $crate::sp_wasm_interface::HostFunctions for $interface_name { - #[allow(non_camel_case_types)] - fn host_functions() -> Vec<&'static dyn $crate::sp_wasm_interface::Function> { - gen_functions!( - $context, - $( $name( $( $names: $params ),* ) $( -> $returns )? { $( $body )* } )* - ) - } - } - ); -} diff --git a/primitives/io/src/lib.rs b/primitives/io/src/lib.rs index 4b520a240a9..aef3eed5aa6 100644 --- a/primitives/io/src/lib.rs +++ b/primitives/io/src/lib.rs @@ -915,6 +915,56 @@ pub fn oom(_: core::alloc::Layout) -> ! { #[cfg(feature = "std")] pub type TestExternalities = sp_state_machine::TestExternalities; +#[cfg(feature = "std")] +mod ext_blake2_256 { + use sp_wasm_interface::{Signature, Function, HostFunctions, ValueType, Value, FunctionContext}; + + /// There is a custom `extern function` in `sp_core::hasher` for `ext_blake2_256` hasher. This + /// custom extern was missed to remove and requires us to support this now. This type is a custom + /// implementation for the wasm function in native. + pub struct ExtBlake2_256; + + impl HostFunctions for ExtBlake2_256 { + fn host_functions() -> Vec<&'static dyn Function> { + vec![&ExtBlake2_256] + } + } + + impl Function for ExtBlake2_256 { + fn name(&self) -> &str { + "ext_blake2_256" + } + + fn signature(&self) -> Signature { + Signature::new_with_args(&[ValueType::I32, ValueType::I32, ValueType::I32][..]) + } + + fn execute( + &self, + context: &mut dyn FunctionContext, + args: &mut dyn Iterator, + ) -> sp_wasm_interface::Result> { + let data = args.next().and_then(|v| v.as_i32()) + .ok_or_else(|| "`data` not present or not an `i32`")? as u32; + let len = args.next().and_then(|v| v.as_i32()) + .ok_or_else(|| "`len` not present or not an `i32`")? as u32; + let out = args.next().and_then(|v| v.as_i32()) + .ok_or_else(|| "`out` not present or not an `i32`")? as u32; + + let result: [u8; 32] = if len == 0 { + sp_core::hashing::blake2_256(&[0u8; 0]) + } else { + let mem = context.read_memory(data.into(), len) + .map_err(|_| "Invalid attempt to get data in ext_blake2_256")?; + sp_core::hashing::blake2_256(&mem) + }; + context.write_memory(out.into(), &result) + .map_err(|_| "Invalid attempt to set result in ext_blake2_256")?; + Ok(None) + } + } +} + /// The host functions Substrate provides for the Wasm runtime environment. /// /// All these host functions will be callable from inside the Wasm environment. @@ -929,6 +979,7 @@ pub type SubstrateHostFunctions = ( logging::HostFunctions, sandbox::HostFunctions, crate::trie::HostFunctions, + ext_blake2_256::ExtBlake2_256, ); #[cfg(test)] diff --git a/primitives/runtime-interface/test-wasm/src/lib.rs b/primitives/runtime-interface/test-wasm/src/lib.rs index 4e99c0f06c1..2e1ab52d677 100644 --- a/primitives/runtime-interface/test-wasm/src/lib.rs +++ b/primitives/runtime-interface/test-wasm/src/lib.rs @@ -105,23 +105,6 @@ pub trait TestApi { } } -/// Two random external functions from the old runtime interface. -/// This ensures that we still inherently export these functions from the host and that we are still -/// compatible with old wasm runtimes. -#[cfg(not(feature = "std"))] -extern "C" { - pub fn ext_clear_storage(key_data: *const u8, key_len: u32); - pub fn ext_keccak_256(data: *const u8, len: u32, out: *mut u8); -} - -/// Make sure the old runtime interface needs to be imported. -#[no_mangle] -#[cfg(not(feature = "std"))] -pub fn force_old_runtime_interface_import() { - unsafe { ext_clear_storage(sp_std::ptr::null(), 0); } - unsafe { ext_keccak_256(sp_std::ptr::null(), 0, sp_std::ptr::null_mut()); } -} - /// This function is not used, but we require it for the compiler to include `sp-io`. /// `sp-io` is required for its panic and oom handler. #[no_mangle] @@ -248,4 +231,14 @@ wasm_export_functions! { } assert_eq!(0, len); } + + fn test_ext_blake2_256() { + use sp_core::Hasher; + + let data = "hey, hash me please!"; + let hash = sp_core::Blake2Hasher::hash(data.as_bytes()); + + let expected = sp_io::hashing::blake2_256(data.as_bytes()); + assert_eq!(&expected, hash.as_ref()); + } } diff --git a/primitives/runtime-interface/test/src/lib.rs b/primitives/runtime-interface/test/src/lib.rs index 559a4281e09..5c5d1db9705 100644 --- a/primitives/runtime-interface/test/src/lib.rs +++ b/primitives/runtime-interface/test/src/lib.rs @@ -33,7 +33,6 @@ fn call_wasm_method(method: &str) -> TestExternalities { ( HF, sp_io::SubstrateHostFunctions, - sc_executor::deprecated_host_interface::SubstrateExternals ) >( method, @@ -128,3 +127,8 @@ fn test_encoded_return_value_memory_is_freed() { fn test_array_return_value_memory_is_freed() { call_wasm_method::("test_array_return_value_memory_is_freed"); } + +#[test] +fn test_ext_blake2_256() { + call_wasm_method::("test_ext_blake2_256"); +} diff --git a/primitives/wasm-interface/src/lib.rs b/primitives/wasm-interface/src/lib.rs index 7bb4469c771..eda2ebb1b52 100644 --- a/primitives/wasm-interface/src/lib.rs +++ b/primitives/wasm-interface/src/lib.rs @@ -170,6 +170,12 @@ impl Pointer { } } +impl From for Pointer { + fn from(ptr: u32) -> Self { + Pointer::new(ptr) + } +} + impl From> for u32 { fn from(ptr: Pointer) -> Self { ptr.ptr -- GitLab From 8c2236879e32e02b91455e19d38490f4741bf967 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Thu, 27 Feb 2020 17:12:00 +0100 Subject: [PATCH 053/106] removes use of sc_client::Client from sc_basic_authorship (#5050) * removes use of sc-client from sc-basic-authorship * refactor use of ProposerFactory * correct dep path --- Cargo.lock | 3 +- bin/node-template/node/src/service.rs | 8 +- bin/node/cli/src/service.rs | 16 +-- client/basic-authorship/Cargo.toml | 1 - .../basic-authorship/src/basic_authorship.rs | 106 +++++++++--------- client/basic-authorship/src/lib.rs | 5 +- client/block-builder/src/lib.rs | 21 ++++ client/consensus/babe/src/tests.rs | 2 +- client/consensus/manual-seal/src/lib.rs | 24 ++-- client/finality-grandpa/Cargo.toml | 1 + client/finality-grandpa/src/tests.rs | 1 + client/network/test/src/lib.rs | 2 +- client/src/client.rs | 55 +++++---- primitives/api/test/Cargo.toml | 1 + primitives/api/test/tests/runtime_calls.rs | 1 + test-utils/runtime/client/src/trait_tests.rs | 1 + 16 files changed, 136 insertions(+), 112 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 757b9ad0800..245493986bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5615,7 +5615,6 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.10.0", "sc-block-builder", - "sc-client", "sc-client-api", "sc-telemetry", "sc-transaction-pool", @@ -6112,6 +6111,7 @@ dependencies = [ "parking_lot 0.10.0", "pin-project", "rand 0.7.3", + "sc-block-builder", "sc-client", "sc-client-api", "sc-keystore", @@ -6944,6 +6944,7 @@ dependencies = [ "criterion 0.3.1", "parity-scale-codec", "rustversion", + "sc-block-builder", "sp-api", "sp-blockchain", "sp-consensus", diff --git a/bin/node-template/node/src/service.rs b/bin/node-template/node/src/service.rs index 6e2a766dc1a..7a714d5d7a3 100644 --- a/bin/node-template/node/src/service.rs +++ b/bin/node-template/node/src/service.rs @@ -93,10 +93,10 @@ pub fn new_full(config: Configuration) .build()?; if participates_in_consensus { - let proposer = sc_basic_authorship::ProposerFactory { - client: service.client(), - transaction_pool: service.transaction_pool(), - }; + let proposer = sc_basic_authorship::ProposerFactory::new( + service.client(), + service.transaction_pool() + ); let client = service.client(); let select_chain = service.select_chain() diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs index 90090cdf547..7df266a687a 100644 --- a/bin/node/cli/src/service.rs +++ b/bin/node/cli/src/service.rs @@ -150,10 +150,10 @@ macro_rules! new_full { ($with_startup_data)(&block_import, &babe_link); if participates_in_consensus { - let proposer = sc_basic_authorship::ProposerFactory { - client: service.client(), - transaction_pool: service.transaction_pool(), - }; + let proposer = sc_basic_authorship::ProposerFactory::new( + service.client(), + service.transaction_pool() + ); let client = service.client(); let select_chain = service.select_chain() @@ -501,10 +501,10 @@ mod tests { let parent_header = service.client().header(&parent_id).unwrap().unwrap(); let parent_hash = parent_header.hash(); let parent_number = *parent_header.number(); - let mut proposer_factory = sc_basic_authorship::ProposerFactory { - client: service.client(), - transaction_pool: service.transaction_pool(), - }; + let mut proposer_factory = sc_basic_authorship::ProposerFactory::new( + service.client(), + service.transaction_pool() + ); let epoch = babe_link.epoch_changes().lock().epoch_for_child_of( descendent_query(&*service.client()), diff --git a/client/basic-authorship/Cargo.toml b/client/basic-authorship/Cargo.toml index c3fb8799bba..56bfb570725 100644 --- a/client/basic-authorship/Cargo.toml +++ b/client/basic-authorship/Cargo.toml @@ -16,7 +16,6 @@ sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api" } sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" } -sc-client = { version = "0.8.0-alpha.2", path = "../" } sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } sp-consensus = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/common" } sp-inherents = { version = "2.0.0-alpha.2", path = "../../primitives/inherents" } diff --git a/client/basic-authorship/src/basic_authorship.rs b/client/basic-authorship/src/basic_authorship.rs index a99453544e5..231d0255919 100644 --- a/client/basic-authorship/src/basic_authorship.rs +++ b/client/basic-authorship/src/basic_authorship.rs @@ -19,8 +19,7 @@ // FIXME #1021 move this into sp-consensus use std::{time, sync::Arc}; -use sc_client_api::{CallExecutor, backend}; -use sc_client::Client as SubstrateClient; +use sc_client_api::backend; use codec::Decode; use sp_consensus::{evaluation, Proposal, RecordProof}; use sp_inherents::InherentData; @@ -32,35 +31,47 @@ use sp_runtime::{ }; use sp_transaction_pool::{TransactionPool, InPoolTransaction}; use sc_telemetry::{telemetry, CONSENSUS_INFO}; -use sc_block_builder::BlockBuilderApi; +use sc_block_builder::{BlockBuilderApi, BlockBuilderProvider}; use sp_api::{ProvideRuntimeApi, ApiExt}; use futures::prelude::*; +use sp_blockchain::HeaderBackend; +use std::marker::PhantomData; /// Proposer factory. -pub struct ProposerFactory where A: TransactionPool { +pub struct ProposerFactory { /// The client instance. - pub client: Arc, + client: Arc, /// The transaction pool. - pub transaction_pool: Arc, + transaction_pool: Arc, + /// phantom member to pin the `Backend` type. + _phantom: PhantomData, +} + +impl ProposerFactory { + pub fn new(client: Arc, transaction_pool: Arc) -> Self { + ProposerFactory { + client, + transaction_pool, + _phantom: PhantomData, + } + } } -impl ProposerFactory, A> +impl ProposerFactory where A: TransactionPool + 'static, B: backend::Backend + Send + Sync + 'static, - E: CallExecutor + Send + Sync + Clone + 'static, Block: BlockT, - RA: Send + Sync + 'static, - SubstrateClient: ProvideRuntimeApi, - as ProvideRuntimeApi>::Api: - BlockBuilderApi + - ApiExt>, + C: BlockBuilderProvider + HeaderBackend + ProvideRuntimeApi + + Send + Sync + 'static, + C::Api: ApiExt> + + BlockBuilderApi, { pub fn init_with_now( &mut self, parent_header: &::Header, now: Box time::Instant + Send + Sync>, - ) -> Proposer, A> { + ) -> Proposer { let parent_hash = parent_header.hash(); let id = BlockId::hash(parent_hash); @@ -75,6 +86,7 @@ impl ProposerFactory, A> parent_number: *parent_header.number(), transaction_pool: self.transaction_pool.clone(), now, + _phantom: PhantomData, }), }; @@ -82,21 +94,19 @@ impl ProposerFactory, A> } } -impl sp_consensus::Environment for - ProposerFactory, A> +impl sp_consensus::Environment for + ProposerFactory where A: TransactionPool + 'static, B: backend::Backend + Send + Sync + 'static, - E: CallExecutor + Send + Sync + Clone + 'static, Block: BlockT, - RA: Send + Sync + 'static, - SubstrateClient: ProvideRuntimeApi, - as ProvideRuntimeApi>::Api: - BlockBuilderApi + - ApiExt>, + C: BlockBuilderProvider + HeaderBackend + ProvideRuntimeApi + + Send + Sync + 'static, + C::Api: ApiExt> + + BlockBuilderApi, { type CreateProposer = future::Ready>; - type Proposer = Proposer, A>; + type Proposer = Proposer; type Error = sp_blockchain::Error; fn init( @@ -108,32 +118,31 @@ impl sp_consensus::Environment for } /// The proposer logic. -pub struct Proposer { - inner: Arc>, +pub struct Proposer { + inner: Arc>, } /// Proposer inner, to wrap parameters under Arc. -struct ProposerInner { +struct ProposerInner { client: Arc, parent_hash: ::Hash, parent_id: BlockId, parent_number: <::Header as HeaderT>::Number, transaction_pool: Arc, now: Box time::Instant + Send + Sync>, + _phantom: PhantomData, } -impl sp_consensus::Proposer for - Proposer, A> +impl sp_consensus::Proposer for + Proposer where A: TransactionPool + 'static, B: backend::Backend + Send + Sync + 'static, - E: CallExecutor + Send + Sync + Clone + 'static, Block: BlockT, - RA: Send + Sync + 'static, - SubstrateClient: ProvideRuntimeApi, - as ProvideRuntimeApi>::Api: - BlockBuilderApi + - ApiExt>, + C: BlockBuilderProvider + HeaderBackend + ProvideRuntimeApi + + Send + Sync + 'static, + C::Api: ApiExt> + + BlockBuilderApi, { type Transaction = backend::TransactionFor; type Proposal = tokio_executor::blocking::Blocking< @@ -157,16 +166,15 @@ impl sp_consensus::Proposer for } } -impl ProposerInner, A> where - A: TransactionPool, - B: sc_client_api::backend::Backend + Send + Sync + 'static, - E: CallExecutor + Send + Sync + Clone + 'static, - Block: BlockT, - RA: Send + Sync + 'static, - SubstrateClient: ProvideRuntimeApi, - as ProvideRuntimeApi>::Api: - BlockBuilderApi + - ApiExt>, +impl ProposerInner + where + A: TransactionPool, + B: backend::Backend + Send + Sync + 'static, + Block: BlockT, + C: BlockBuilderProvider + HeaderBackend + ProvideRuntimeApi + + Send + Sync + 'static, + C::Api: ApiExt> + + BlockBuilderApi, { fn propose_with( &self, @@ -315,10 +323,7 @@ mod tests { txpool.submit_at(&BlockId::number(0), vec![extrinsic(0), extrinsic(1)]) ).unwrap(); - let mut proposer_factory = ProposerFactory { - client: client.clone(), - transaction_pool: txpool.clone(), - }; + let mut proposer_factory = ProposerFactory::new(client.clone(), txpool.clone()); let cell = Mutex::new(time::Instant::now()); let mut proposer = proposer_factory.init_with_now( @@ -359,10 +364,7 @@ mod tests { txpool.submit_at(&BlockId::number(0), vec![extrinsic(0)]), ).unwrap(); - let mut proposer_factory = ProposerFactory { - client: client.clone(), - transaction_pool: txpool.clone(), - }; + let mut proposer_factory = ProposerFactory::new(client.clone(), txpool.clone()); let mut proposer = proposer_factory.init_with_now( &client.header(&block_id).unwrap().unwrap(), diff --git a/client/basic-authorship/src/lib.rs b/client/basic-authorship/src/lib.rs index e9087c89e07..5ec0bc6f9a5 100644 --- a/client/basic-authorship/src/lib.rs +++ b/client/basic-authorship/src/lib.rs @@ -28,10 +28,7 @@ //! # let client = Arc::new(substrate_test_runtime_client::new()); //! # let txpool = Arc::new(BasicPool::new(Default::default(), Arc::new(FullChainApi::new(client.clone()))).0); //! // The first step is to create a `ProposerFactory`. -//! let mut proposer_factory = ProposerFactory { -//! client: client.clone(), -//! transaction_pool: txpool.clone(), -//! }; +//! let mut proposer_factory = ProposerFactory::new(client.clone(), txpool.clone()); //! //! // From this factory, we create a `Proposer`. //! let proposer = proposer_factory.init( diff --git a/client/block-builder/src/lib.rs b/client/block-builder/src/lib.rs index a93ad137835..4c14f3716f2 100644 --- a/client/block-builder/src/lib.rs +++ b/client/block-builder/src/lib.rs @@ -63,6 +63,27 @@ impl>> Built } } +/// Block builder provider +pub trait BlockBuilderProvider + where + Block: BlockT, + B: backend::Backend, + Self: Sized, + RA: ProvideRuntimeApi, +{ + /// Create a new block, built on top of `parent`. + /// + /// When proof recording is enabled, all accessed trie nodes are saved. + /// These recorded trie nodes can be used by a third party to proof the + /// output of this block builder without having access to the full storage. + fn new_block_at>( + &self, + parent: &BlockId, + inherent_digests: DigestFor, + record_proof: R, + ) -> sp_blockchain::Result>; +} + /// Utility for building new (valid) blocks from a stream of extrinsics. pub struct BlockBuilder<'a, Block: BlockT, A: ProvideRuntimeApi, B> { extrinsics: Vec, diff --git a/client/consensus/babe/src/tests.rs b/client/consensus/babe/src/tests.rs index 4045e18b5c3..9331319d55e 100644 --- a/client/consensus/babe/src/tests.rs +++ b/client/consensus/babe/src/tests.rs @@ -23,7 +23,7 @@ use super::*; use authorship::claim_slot; use sp_consensus_babe::{AuthorityPair, SlotNumber}; -use sc_block_builder::BlockBuilder; +use sc_block_builder::{BlockBuilder, BlockBuilderProvider}; use sp_consensus::{ NoNetwork as DummyOracle, Proposal, RecordProof, import_queue::{BoxBlockImport, BoxJustificationImport, BoxFinalityProofImport}, diff --git a/client/consensus/manual-seal/src/lib.rs b/client/consensus/manual-seal/src/lib.rs index c4336485a14..18dc91ad34d 100644 --- a/client/consensus/manual-seal/src/lib.rs +++ b/client/consensus/manual-seal/src/lib.rs @@ -244,10 +244,10 @@ mod tests { let select_chain = LongestChain::new(backend.clone()); let inherent_data_providers = InherentDataProviders::new(); let pool = Arc::new(BasicPool::new(Options::default(), api()).0); - let env = ProposerFactory { - transaction_pool: pool.clone(), - client: client.clone(), - }; + let env = ProposerFactory::new( + client.clone(), + pool.clone() + ); // this test checks that blocks are created as soon as transactions are imported into the pool. let (sender, receiver) = futures::channel::oneshot::channel(); let mut sender = Arc::new(Some(sender)); @@ -309,10 +309,10 @@ mod tests { let select_chain = LongestChain::new(backend.clone()); let inherent_data_providers = InherentDataProviders::new(); let pool = Arc::new(BasicPool::new(Options::default(), api()).0); - let env = ProposerFactory { - transaction_pool: pool.clone(), - client: client.clone(), - }; + let env = ProposerFactory::new( + client.clone(), + pool.clone() + ); // this test checks that blocks are created as soon as an engine command is sent over the stream. let (mut sink, stream) = futures::channel::mpsc::channel(1024); let future = run_manual_seal( @@ -378,10 +378,10 @@ mod tests { let inherent_data_providers = InherentDataProviders::new(); let pool_api = api(); let pool = Arc::new(BasicPool::new(Options::default(), pool_api.clone()).0); - let env = ProposerFactory { - transaction_pool: pool.clone(), - client: client.clone(), - }; + let env = ProposerFactory::new( + client.clone(), + pool.clone(), + ); // this test checks that blocks are created as soon as an engine command is sent over the stream. let (mut sink, stream) = futures::channel::mpsc::channel(1024); let future = run_manual_seal( diff --git a/client/finality-grandpa/Cargo.toml b/client/finality-grandpa/Cargo.toml index f8774ea2836..773cbc23170 100644 --- a/client/finality-grandpa/Cargo.toml +++ b/client/finality-grandpa/Cargo.toml @@ -35,6 +35,7 @@ sc-network = { version = "0.8.0-alpha.2", path = "../network" } sc-network-gossip = { version = "0.8.0-alpha.2", path = "../network-gossip" } sp-finality-tracker = { version = "2.0.0-alpha.2", path = "../../primitives/finality-tracker" } sp-finality-grandpa = { version = "2.0.0-alpha.2", path = "../../primitives/finality-grandpa" } +sc-block-builder = { version = "0.8.0-alpha.2", path = "../block-builder" } finality-grandpa = { version = "0.11.1", features = ["derive-codec"] } pin-project = "0.4.6" diff --git a/client/finality-grandpa/src/tests.rs b/client/finality-grandpa/src/tests.rs index 23c7ec9ba87..6b9ab5e1f2f 100644 --- a/client/finality-grandpa/src/tests.rs +++ b/client/finality-grandpa/src/tests.rs @@ -55,6 +55,7 @@ use finality_proof::{ FinalityProofProvider, AuthoritySetForFinalityProver, AuthoritySetForFinalityChecker, }; use consensus_changes::ConsensusChanges; +use sc_block_builder::BlockBuilderProvider; type PeerData = Mutex< diff --git a/client/network/test/src/lib.rs b/client/network/test/src/lib.rs index d09897e853e..8dc8aff14d4 100644 --- a/client/network/test/src/lib.rs +++ b/client/network/test/src/lib.rs @@ -35,7 +35,7 @@ use sc_client_api::{ FinalityNotification, backend::{TransactionFor, AuxStore, Backend, Finalizer}, }; -use sc_block_builder::BlockBuilder; +use sc_block_builder::{BlockBuilder, BlockBuilderProvider}; use sc_client::LongestChain; use sc_network::config::Roles; use sp_consensus::block_validation::DefaultBlockAnnounceValidator; diff --git a/client/src/client.rs b/client/src/client.rs index babbaaf7ef7..d461a17ded7 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -60,7 +60,7 @@ use sp_api::{ CallApiAt, ConstructRuntimeApi, Core as CoreApi, ApiExt, ApiRef, ProvideRuntimeApi, CallApiAtParams, }; -use sc_block_builder::BlockBuilderApi; +use sc_block_builder::{BlockBuilderApi, BlockBuilderProvider}; pub use sc_client_api::{ backend::{ @@ -863,33 +863,6 @@ impl Client where ) } - /// Create a new block, built on top of `parent`. - /// - /// When proof recording is enabled, all accessed trie nodes are saved. - /// These recorded trie nodes can be used by a third party to proof the - /// output of this block builder without having access to the full storage. - pub fn new_block_at>( - &self, - parent: &BlockId, - inherent_digests: DigestFor, - record_proof: R, - ) -> sp_blockchain::Result> where - E: Clone + Send + Sync, - RA: Send + Sync, - Self: ProvideRuntimeApi, - >::Api: BlockBuilderApi + - ApiExt> - { - sc_block_builder::BlockBuilder::new( - self, - self.expect_block_hash_from_id(parent)?, - self.expect_block_number_from_id(parent)?, - record_proof.into(), - inherent_digests, - &self.backend - ) - } - /// Apply a checked and validated block to an operation. If a justification is provided /// then `finalized` *must* be true. fn apply_block( @@ -1421,6 +1394,32 @@ impl Client where } } +impl BlockBuilderProvider for Client + where + B: backend::Backend + Send + Sync + 'static, + E: CallExecutor + Send + Sync + 'static, + Block: BlockT, + Self: ChainHeaderBackend + ProvideRuntimeApi, + >::Api: ApiExt> + + BlockBuilderApi, +{ + fn new_block_at>( + &self, + parent: &BlockId, + inherent_digests: DigestFor, + record_proof: R, + ) -> sp_blockchain::Result> { + sc_block_builder::BlockBuilder::new( + self, + self.expect_block_hash_from_id(parent)?, + self.expect_block_number_from_id(parent)?, + record_proof.into(), + inherent_digests, + &self.backend + ) + } +} + impl HeaderMetadata for Client where B: backend::Backend, E: CallExecutor, diff --git a/primitives/api/test/Cargo.toml b/primitives/api/test/Cargo.toml index 7b018199a55..dc1600b334e 100644 --- a/primitives/api/test/Cargo.toml +++ b/primitives/api/test/Cargo.toml @@ -15,6 +15,7 @@ sp-version = { version = "2.0.0-alpha.2", path = "../../version" } sp-runtime = { version = "2.0.0-alpha.2", path = "../../runtime" } sp-blockchain = { version = "2.0.0-alpha.2", path = "../../blockchain" } sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } +sc-block-builder = { version = "0.8.0-alpha.2", path = "../../../client/block-builder" } codec = { package = "parity-scale-codec", version = "1.0.0" } sp-state-machine = { version = "0.8.0-alpha.2", path = "../../../primitives/state-machine" } trybuild = "1.0.17" diff --git a/primitives/api/test/tests/runtime_calls.rs b/primitives/api/test/tests/runtime_calls.rs index 66412edae02..6a3af7469cc 100644 --- a/primitives/api/test/tests/runtime_calls.rs +++ b/primitives/api/test/tests/runtime_calls.rs @@ -28,6 +28,7 @@ use sp_state_machine::{ use sp_consensus::SelectChain; use codec::Encode; +use sc_block_builder::BlockBuilderProvider; fn calling_function_with_strat(strat: ExecutionStrategy) { let client = TestClientBuilder::new().set_execution_strategy(strat).build(); diff --git a/test-utils/runtime/client/src/trait_tests.rs b/test-utils/runtime/client/src/trait_tests.rs index 05db43298fd..5ceab4355d8 100644 --- a/test-utils/runtime/client/src/trait_tests.rs +++ b/test-utils/runtime/client/src/trait_tests.rs @@ -30,6 +30,7 @@ use substrate_test_client::sp_consensus::BlockOrigin; use substrate_test_runtime::{self, Transfer}; use sp_runtime::generic::BlockId; use sp_runtime::traits::{Block as BlockT, HasherFor}; +use sc_block_builder::BlockBuilderProvider; /// helper to test the `leaves` implementation for various backends pub fn test_leaves_for_backend(backend: Arc) where -- GitLab From 850ffec250d098ac4b7c6e6ad29ce174e1d639ff Mon Sep 17 00:00:00 2001 From: Sergei Pepyakin Date: Thu, 27 Feb 2020 17:25:28 +0100 Subject: [PATCH 054/106] pallet-transaction-payment clean up (#5070) * Formatting clean up * Introduce separate setters for the fees. --- frame/transaction-payment/src/lib.rs | 85 ++++++++++++++++------------ 1 file changed, 49 insertions(+), 36 deletions(-) diff --git a/frame/transaction-payment/src/lib.rs b/frame/transaction-payment/src/lib.rs index 67b3fa63ac0..3de0f944deb 100644 --- a/frame/transaction-payment/src/lib.rs +++ b/frame/transaction-payment/src/lib.rs @@ -119,7 +119,8 @@ impl Module { { let dispatch_info = ::get_dispatch_info(&unchecked_extrinsic); - let partial_fee = >::compute_fee(len, dispatch_info, 0u32.into()); + let partial_fee = + >::compute_fee(len, dispatch_info, 0u32.into()); let DispatchInfo { weight, class, .. } = dispatch_info; RuntimeDispatchInfo { weight, class, partial_fee } @@ -165,9 +166,10 @@ impl ChargeTransactionPayment { let len_fee = per_byte.saturating_mul(len); let weight_fee = { - // cap the weight to the maximum defined in runtime, otherwise it will be the `Bounded` - // maximum of its data type, which is not desired. - let capped_weight = info.weight.min(::MaximumBlockWeight::get()); + // cap the weight to the maximum defined in runtime, otherwise it will be the + // `Bounded` maximum of its data type, which is not desired. + let capped_weight = info.weight + .min(::MaximumBlockWeight::get()); T::WeightToFee::convert(capped_weight) }; @@ -248,20 +250,21 @@ mod tests { use super::*; use codec::Encode; use frame_support::{ - parameter_types, impl_outer_origin, impl_outer_dispatch, + impl_outer_dispatch, impl_outer_origin, parameter_types, weights::{DispatchClass, DispatchInfo, GetDispatchInfo, Weight}, }; + use pallet_balances::Call as BalancesCall; + use pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo; use sp_core::H256; use sp_runtime::{ - Perbill, testing::{Header, TestXt}, - traits::{BlakeTwo256, IdentityLookup, Extrinsic}, + traits::{BlakeTwo256, Extrinsic, IdentityLookup}, + Perbill, }; - use pallet_balances::Call as BalancesCall; - use sp_std::cell::RefCell; - use pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo; + use std::cell::RefCell; - const CALL: &::Call = &Call::Balances(BalancesCall::transfer(2, 69)); + const CALL: &::Call = + &Call::Balances(BalancesCall::transfer(2, 69)); impl_outer_dispatch! { pub enum Call for Runtime where origin: Origin { @@ -318,7 +321,7 @@ mod tests { type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; } -thread_local! { + thread_local! { static TRANSACTION_BASE_FEE: RefCell = RefCell::new(0); static TRANSACTION_BYTE_FEE: RefCell = RefCell::new(1); static WEIGHT_TO_FEE: RefCell = RefCell::new(1); @@ -373,10 +376,16 @@ thread_local! { } impl ExtBuilder { - pub fn fees(mut self, base: u64, byte: u64, weight: u64) -> Self { - self.base_fee = base; - self.byte_fee = byte; - self.weight_to_fee = weight; + pub fn base_fee(mut self, base_fee: u64) -> Self { + self.base_fee = base_fee; + self + } + pub fn byte_fee(mut self, byte_fee: u64) -> Self { + self.byte_fee = byte_fee; + self + } + pub fn weight_fee(mut self, weight_to_fee: u64) -> Self { + self.weight_to_fee = weight_to_fee; self } pub fn balance_factor(mut self, factor: u64) -> Self { @@ -416,9 +425,9 @@ thread_local! { #[test] fn signed_extension_transaction_payment_work() { - ExtBuilder::default() - .balance_factor(10) // 100 - .fees(5, 1, 1) // 5 fixed, 1 per byte, 1 per weight + ExtBuilder::default() + .balance_factor(10) + .base_fee(5) .build() .execute_with(|| { @@ -441,9 +450,9 @@ thread_local! { #[test] fn signed_extension_transaction_payment_is_bounded() { - ExtBuilder::default() + ExtBuilder::default() .balance_factor(1000) - .fees(0, 0, 1) + .byte_fee(0) .build() .execute_with(|| { @@ -464,7 +473,7 @@ thread_local! { #[test] fn signed_extension_allows_free_transactions() { ExtBuilder::default() - .fees(100, 1, 1) + .base_fee(100) .balance_factor(0) .build() .execute_with(|| @@ -503,7 +512,7 @@ thread_local! { #[test] fn signed_ext_length_fee_is_also_updated_per_congestion() { ExtBuilder::default() - .fees(5, 1, 1) + .base_fee(5) .balance_factor(10) .build() .execute_with(|| @@ -531,7 +540,8 @@ thread_local! { let ext = xt.encode(); let len = ext.len() as u32; ExtBuilder::default() - .fees(5, 1, 2) + .base_fee(5) + .weight_fee(2) .build() .execute_with(|| { @@ -558,10 +568,11 @@ thread_local! { #[test] fn compute_fee_works_without_multiplier() { ExtBuilder::default() - .fees(100, 10, 1) - .balance_factor(0) - .build() - .execute_with(|| + .base_fee(100) + .byte_fee(10) + .balance_factor(0) + .build() + .execute_with(|| { // Next fee multiplier is zero assert_eq!(NextFeeMultiplier::get(), Fixed64::from_natural(0)); @@ -597,10 +608,11 @@ thread_local! { #[test] fn compute_fee_works_with_multiplier() { ExtBuilder::default() - .fees(100, 10, 1) - .balance_factor(0) - .build() - .execute_with(|| + .base_fee(100) + .byte_fee(10) + .balance_factor(0) + .build() + .execute_with(|| { // Add a next fee multiplier NextFeeMultiplier::put(Fixed64::from_rational(1, 2)); // = 1/2 = .5 @@ -629,10 +641,11 @@ thread_local! { #[test] fn compute_fee_does_not_overflow() { ExtBuilder::default() - .fees(100, 10, 1) - .balance_factor(0) - .build() - .execute_with(|| + .base_fee(100) + .byte_fee(10) + .balance_factor(0) + .build() + .execute_with(|| { // Overflow is handled let dispatch_info = DispatchInfo { -- GitLab From e769ac4ab219b70317fbc1fe835a3464294369b7 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Thu, 27 Feb 2020 17:48:26 +0100 Subject: [PATCH 055/106] =?UTF-8?q?*:=20Rename=20prometheus-exporter=20cra?= =?UTF-8?q?te=20to=20substrate-prometheus-end=E2=80=A6=20(#5076)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch renames the crate for the following two reasons: 1. The prometheus-exporter crate introduces native in-process Prometheus style instrumentation to the Substrate project. Within the Prometheus ecosystem the term "exporter" is used for external processes exposing metrics for e.g. the Linux Kernel. In-process exposition would be described via the term "endpoint". 2. "prometheus-exporter" is generic and ignores the fact that it is only usable within the context of Substrate. In addition the name "prometheus-exporter" is already taken on crates.io. --- Cargo.lock | 30 +++++++++++++++--------------- client/cli/Cargo.toml | 2 +- client/service/Cargo.toml | 2 +- client/service/src/builder.rs | 6 +++--- client/service/src/config.rs | 2 +- client/service/src/error.rs | 4 ++-- utils/prometheus/Cargo.toml | 4 ++-- utils/prometheus/src/lib.rs | 2 +- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 245493986bd..14ef98f1c2d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4988,19 +4988,6 @@ dependencies = [ "spin", ] -[[package]] -name = "prometheus-exporter" -version = "0.8.0-alpha.2" -dependencies = [ - "async-std", - "derive_more", - "futures-util", - "hyper 0.13.2", - "log 0.4.8", - "prometheus", - "tokio 0.2.11", -] - [[package]] name = "prost" version = "0.6.1" @@ -5685,7 +5672,6 @@ dependencies = [ "log 0.4.8", "names", "parity-util-mem", - "prometheus-exporter", "regex", "rpassword", "sc-client-api", @@ -5702,6 +5688,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "structopt", + "substrate-prometheus-endpoint", "tempfile", "time", "tokio 0.2.11", @@ -6413,7 +6400,6 @@ dependencies = [ "parity-scale-codec", "parity-util-mem", "parking_lot 0.10.0", - "prometheus-exporter", "sc-chain-spec", "sc-client", "sc-client-api", @@ -6442,6 +6428,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-transaction-pool", + "substrate-prometheus-endpoint", "substrate-test-runtime-client", "sysinfo", "target_info", @@ -7662,6 +7649,19 @@ dependencies = [ "substrate-test-runtime-client", ] +[[package]] +name = "substrate-prometheus-endpoint" +version = "0.8.0-alpha.2" +dependencies = [ + "async-std", + "derive_more", + "futures-util", + "hyper 0.13.2", + "log 0.4.8", + "prometheus", + "tokio 0.2.11", +] + [[package]] name = "substrate-test-client" version = "2.0.0-dev" diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index 4066e1136b9..e8525644d77 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -33,7 +33,7 @@ sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } sc-service = { version = "0.8.0-alpha.2", default-features = false, path = "../service" } sp-state-machine = { version = "0.8.0-alpha.2", path = "../../primitives/state-machine" } sc-telemetry = { version = "2.0.0-alpha.2", path = "../telemetry" } -prometheus-exporter = { path = "../../utils/prometheus" , version = "0.8.0-alpha.2"} +substrate-prometheus-endpoint = { path = "../../utils/prometheus" , version = "0.8.0-alpha.2"} sp-keyring = { version = "2.0.0-alpha.2", path = "../../primitives/keyring" } names = "0.11.0" structopt = "0.3.8" diff --git a/client/service/Cargo.toml b/client/service/Cargo.toml index 462b77bcb05..d504ab20525 100644 --- a/client/service/Cargo.toml +++ b/client/service/Cargo.toml @@ -56,7 +56,7 @@ sc-rpc = { version = "2.0.0-alpha.2", path = "../rpc" } sc-telemetry = { version = "2.0.0-alpha.2", path = "../telemetry" } sc-offchain = { version = "2.0.0-alpha.2", path = "../offchain" } parity-multiaddr = { package = "parity-multiaddr", version = "0.5.0" } -prometheus-exporter = { path = "../../utils/prometheus" , version = "0.8.0-alpha.2"} +substrate-prometheus-endpoint = { path = "../../utils/prometheus" , version = "0.8.0-alpha.2"} sc-tracing = { version = "2.0.0-alpha.2", path = "../tracing" } tracing = "0.1.10" parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index 7159e532c42..8c85c38b188 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -53,7 +53,7 @@ use sysinfo::{get_current_pid, ProcessExt, System, SystemExt}; use sc_telemetry::{telemetry, SUBSTRATE_INFO}; use sp_transaction_pool::{MaintainedTransactionPool, ChainEvent}; use sp_blockchain; -use prometheus_exporter::{register, Gauge, U64, F64, Registry, PrometheusError, Opts, GaugeVec}; +use substrate_prometheus_endpoint::{register, Gauge, U64, F64, Registry, PrometheusError, Opts, GaugeVec}; struct ServiceMetrics { block_height_number: GaugeVec, @@ -1020,7 +1020,7 @@ ServiceBuilder< )); } - // Prometheus exporter and metrics + // Prometheus endpoint and metrics let metrics = if let Some(port) = config.prometheus_port { let registry = match prometheus_registry { Some(registry) => registry, @@ -1030,7 +1030,7 @@ ServiceBuilder< let metrics = ServiceMetrics::register(®istry)?; let future = select( - prometheus_exporter::init_prometheus(port, registry).boxed(), + substrate_prometheus_endpoint::init_prometheus(port, registry).boxed(), exit.clone() ).map(drop); diff --git a/client/service/src/config.rs b/client/service/src/config.rs index 002754f11ce..974dac588de 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -93,7 +93,7 @@ pub struct Configuration { pub rpc_ws_max_connections: Option, /// CORS settings for HTTP & WS servers. `None` if all origins are allowed. pub rpc_cors: Option>, - /// Prometheus exporter Port. `None` if disabled. + /// Prometheus endpoint Port. `None` if disabled. pub prometheus_port: Option, /// Telemetry service URL. `None` if disabled. pub telemetry_endpoints: Option, diff --git a/client/service/src/error.rs b/client/service/src/error.rs index 4d0a2cef942..adf630e44c0 100644 --- a/client/service/src/error.rs +++ b/client/service/src/error.rs @@ -53,8 +53,8 @@ impl<'a> From<&'a str> for Error { } } -impl From for Error { - fn from(e: prometheus_exporter::PrometheusError) -> Self { +impl From for Error { + fn from(e: substrate_prometheus_endpoint::PrometheusError) -> Self { Error::Other(format!("Prometheus error: {}", e)) } } diff --git a/utils/prometheus/Cargo.toml b/utils/prometheus/Cargo.toml index ccbb9bd07fe..3944b35368d 100644 --- a/utils/prometheus/Cargo.toml +++ b/utils/prometheus/Cargo.toml @@ -1,6 +1,6 @@ [package] -description = "Prometheus exporter server" -name = "prometheus-exporter" +description = "Endpoint to expose Prometheus metrics" +name = "substrate-prometheus-endpoint" version = "0.8.0-alpha.2" license = "GPL-3.0" authors = ["Parity Technologies "] diff --git a/utils/prometheus/src/lib.rs b/utils/prometheus/src/lib.rs index 1aaeff2a573..54b9183bc63 100644 --- a/utils/prometheus/src/lib.rs +++ b/utils/prometheus/src/lib.rs @@ -65,7 +65,7 @@ mod known_os { Http(hyper::http::Error), /// i/o error. Io(std::io::Error), - #[display(fmt = "Prometheus exporter port {} already in use.", _0)] + #[display(fmt = "Prometheus port {} already in use.", _0)] PortInUse(SocketAddr) } -- GitLab From f41677d00a51acfc9179917624ac8703658f81ea Mon Sep 17 00:00:00 2001 From: Ashley Date: Thu, 27 Feb 2020 18:28:29 +0100 Subject: [PATCH 056/106] rename `browser-utils` to `substrate-browser-utils` (#5079) --- Cargo.lock | 52 ++++++++++++++++++++-------------------- bin/node/cli/Cargo.toml | 2 +- utils/browser/Cargo.toml | 2 +- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 14ef98f1c2d..50c136dee02 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -422,31 +422,6 @@ dependencies = [ "slab", ] -[[package]] -name = "browser-utils" -version = "0.8.0-alpha.2" -dependencies = [ - "chrono", - "clear_on_drop", - "console_error_panic_hook", - "console_log", - "futures 0.1.29", - "futures 0.3.4", - "futures-timer 3.0.1", - "js-sys", - "kvdb-web", - "libp2p", - "log 0.4.8", - "rand 0.6.5", - "rand 0.7.3", - "sc-chain-spec", - "sc-informant", - "sc-network", - "sc-service", - "wasm-bindgen", - "wasm-bindgen-futures", -] - [[package]] name = "bs58" version = "0.2.5" @@ -3348,7 +3323,6 @@ name = "node-cli" version = "2.0.0-alpha.2" dependencies = [ "assert_cmd", - "browser-utils", "frame-benchmarking-cli", "frame-support", "frame-system", @@ -3406,6 +3380,7 @@ dependencies = [ "sp-timestamp", "sp-transaction-pool", "structopt", + "substrate-browser-utils", "substrate-build-script-utils", "tempfile", "tracing", @@ -7606,6 +7581,31 @@ dependencies = [ "sha2", ] +[[package]] +name = "substrate-browser-utils" +version = "0.8.0-alpha.2" +dependencies = [ + "chrono", + "clear_on_drop", + "console_error_panic_hook", + "console_log", + "futures 0.1.29", + "futures 0.3.4", + "futures-timer 3.0.1", + "js-sys", + "kvdb-web", + "libp2p", + "log 0.4.8", + "rand 0.6.5", + "rand 0.7.3", + "sc-chain-spec", + "sc-informant", + "sc-network", + "sc-service", + "wasm-bindgen", + "wasm-bindgen-futures", +] + [[package]] name = "substrate-build-script-utils" version = "2.0.0-alpha.2" diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml index ca3665cf184..f160e32e97f 100644 --- a/bin/node/cli/Cargo.toml +++ b/bin/node/cli/Cargo.toml @@ -98,7 +98,7 @@ node-inspect = { version = "0.8.0-alpha.2", optional = true, path = "../inspect" # WASM-specific dependencies wasm-bindgen = { version = "0.2.57", optional = true } wasm-bindgen-futures = { version = "0.4.7", optional = true } -browser-utils = { path = "../../../utils/browser", optional = true , version = "0.8.0-alpha.2"} +browser-utils = { package = "substrate-browser-utils", path = "../../../utils/browser", optional = true, version = "0.8.0-alpha.2" } [dev-dependencies] sc-keystore = { version = "2.0.0-alpha.2", path = "../../../client/keystore" } diff --git a/utils/browser/Cargo.toml b/utils/browser/Cargo.toml index 69df8c86018..18ea9920b43 100644 --- a/utils/browser/Cargo.toml +++ b/utils/browser/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "browser-utils" +name = "substrate-browser-utils" version = "0.8.0-alpha.2" authors = ["Parity Technologies "] description = "Utilities for creating a browser light-client." -- GitLab From 013c1ee167354a08283fb69915fda56a62fee943 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Thu, 27 Feb 2020 22:06:08 +0100 Subject: [PATCH 057/106] prepping for Alpha.3 (#5080) * Bump to alpha.3 * update gitlab-ci --- .gitlab-ci.yml | 4 +- Cargo.lock | 298 +++++++++--------- bin/node-template/node/Cargo.toml | 2 +- bin/node-template/pallets/template/Cargo.toml | 2 +- bin/node-template/runtime/Cargo.toml | 2 +- bin/node/cli/Cargo.toml | 2 +- bin/node/executor/Cargo.toml | 2 +- bin/node/inspect/Cargo.toml | 2 +- bin/node/primitives/Cargo.toml | 2 +- bin/node/rpc-client/Cargo.toml | 2 +- bin/node/rpc/Cargo.toml | 2 +- bin/node/runtime/Cargo.toml | 2 +- bin/node/testing/Cargo.toml | 2 +- bin/node/transaction-factory/Cargo.toml | 2 +- bin/utils/chain-spec-builder/Cargo.toml | 2 +- bin/utils/subkey/Cargo.toml | 2 +- client/Cargo.toml | 2 +- client/api/Cargo.toml | 2 +- client/authority-discovery/Cargo.toml | 2 +- client/basic-authorship/Cargo.toml | 2 +- client/block-builder/Cargo.toml | 2 +- client/chain-spec/Cargo.toml | 2 +- client/chain-spec/derive/Cargo.toml | 2 +- client/cli/Cargo.toml | 2 +- client/consensus/aura/Cargo.toml | 2 +- client/consensus/babe/Cargo.toml | 2 +- client/consensus/babe/rpc/Cargo.toml | 2 +- client/consensus/epochs/Cargo.toml | 2 +- client/consensus/manual-seal/Cargo.toml | 2 +- client/consensus/pow/Cargo.toml | 2 +- client/consensus/slots/Cargo.toml | 2 +- client/consensus/uncles/Cargo.toml | 2 +- client/db/Cargo.toml | 2 +- client/executor/Cargo.toml | 2 +- client/executor/common/Cargo.toml | 2 +- client/executor/wasmi/Cargo.toml | 2 +- client/executor/wasmtime/Cargo.toml | 2 +- client/finality-grandpa/Cargo.toml | 2 +- client/informant/Cargo.toml | 2 +- client/keystore/Cargo.toml | 2 +- client/network-gossip/Cargo.toml | 2 +- client/network/Cargo.toml | 2 +- client/offchain/Cargo.toml | 2 +- client/peerset/Cargo.toml | 2 +- client/rpc-api/Cargo.toml | 2 +- client/rpc-servers/Cargo.toml | 2 +- client/rpc/Cargo.toml | 2 +- client/service/Cargo.toml | 2 +- client/state-db/Cargo.toml | 2 +- client/telemetry/Cargo.toml | 2 +- client/tracing/Cargo.toml | 2 +- client/transaction-pool/Cargo.toml | 2 +- client/transaction-pool/graph/Cargo.toml | 2 +- frame/assets/Cargo.toml | 2 +- frame/aura/Cargo.toml | 2 +- frame/authority-discovery/Cargo.toml | 2 +- frame/authorship/Cargo.toml | 2 +- frame/babe/Cargo.toml | 2 +- frame/balances/Cargo.toml | 2 +- frame/benchmarking/Cargo.toml | 2 +- frame/collective/Cargo.toml | 2 +- frame/contracts/Cargo.toml | 2 +- frame/contracts/common/Cargo.toml | 2 +- frame/contracts/rpc/Cargo.toml | 2 +- frame/contracts/rpc/runtime-api/Cargo.toml | 2 +- frame/democracy/Cargo.toml | 2 +- frame/elections-phragmen/Cargo.toml | 2 +- frame/elections/Cargo.toml | 2 +- frame/evm/Cargo.toml | 2 +- frame/example-offchain-worker/Cargo.toml | 2 +- frame/example/Cargo.toml | 2 +- frame/executive/Cargo.toml | 2 +- frame/finality-tracker/Cargo.toml | 2 +- frame/generic-asset/Cargo.toml | 2 +- frame/grandpa/Cargo.toml | 2 +- frame/identity/Cargo.toml | 2 +- frame/im-online/Cargo.toml | 2 +- frame/indices/Cargo.toml | 2 +- frame/membership/Cargo.toml | 2 +- frame/metadata/Cargo.toml | 2 +- frame/nicks/Cargo.toml | 2 +- frame/offences/Cargo.toml | 2 +- frame/randomness-collective-flip/Cargo.toml | 2 +- frame/recovery/Cargo.toml | 2 +- frame/scored-pool/Cargo.toml | 2 +- frame/session/Cargo.toml | 2 +- frame/society/Cargo.toml | 2 +- frame/staking/Cargo.toml | 2 +- frame/staking/reward-curve/Cargo.toml | 2 +- frame/sudo/Cargo.toml | 2 +- frame/support/Cargo.toml | 2 +- frame/support/procedural/Cargo.toml | 2 +- frame/support/procedural/tools/Cargo.toml | 2 +- .../procedural/tools/derive/Cargo.toml | 2 +- frame/system/Cargo.toml | 2 +- frame/system/rpc/runtime-api/Cargo.toml | 2 +- frame/timestamp/Cargo.toml | 2 +- frame/transaction-payment/Cargo.toml | 2 +- frame/transaction-payment/rpc/Cargo.toml | 2 +- .../rpc/runtime-api/Cargo.toml | 2 +- frame/treasury/Cargo.toml | 2 +- frame/utility/Cargo.toml | 2 +- frame/vesting/Cargo.toml | 2 +- primitives/allocator/Cargo.toml | 2 +- primitives/api/Cargo.toml | 2 +- primitives/api/proc-macro/Cargo.toml | 2 +- primitives/application-crypto/Cargo.toml | 2 +- primitives/arithmetic/Cargo.toml | 2 +- primitives/authority-discovery/Cargo.toml | 2 +- primitives/authorship/Cargo.toml | 2 +- primitives/block-builder/Cargo.toml | 2 +- primitives/blockchain/Cargo.toml | 2 +- primitives/consensus/aura/Cargo.toml | 2 +- primitives/consensus/babe/Cargo.toml | 2 +- primitives/consensus/common/Cargo.toml | 2 +- primitives/consensus/pow/Cargo.toml | 2 +- primitives/core/Cargo.toml | 2 +- primitives/debug-derive/Cargo.toml | 2 +- primitives/externalities/Cargo.toml | 2 +- primitives/finality-grandpa/Cargo.toml | 2 +- primitives/finality-tracker/Cargo.toml | 2 +- primitives/inherents/Cargo.toml | 2 +- primitives/io/Cargo.toml | 2 +- primitives/keyring/Cargo.toml | 2 +- primitives/offchain/Cargo.toml | 2 +- primitives/panic-handler/Cargo.toml | 2 +- primitives/phragmen/Cargo.toml | 2 +- primitives/rpc/Cargo.toml | 2 +- primitives/runtime-interface/Cargo.toml | 2 +- .../runtime-interface/proc-macro/Cargo.toml | 2 +- primitives/runtime/Cargo.toml | 2 +- primitives/sandbox/Cargo.toml | 2 +- primitives/serializer/Cargo.toml | 2 +- primitives/session/Cargo.toml | 2 +- primitives/staking/Cargo.toml | 2 +- primitives/state-machine/Cargo.toml | 2 +- primitives/std/Cargo.toml | 2 +- primitives/storage/Cargo.toml | 2 +- primitives/timestamp/Cargo.toml | 2 +- primitives/transaction-pool/Cargo.toml | 2 +- primitives/trie/Cargo.toml | 2 +- primitives/version/Cargo.toml | 2 +- primitives/wasm-interface/Cargo.toml | 2 +- test-utils/Cargo.toml | 2 +- utils/browser/Cargo.toml | 2 +- utils/build-script-utils/Cargo.toml | 2 +- utils/fork-tree/Cargo.toml | 2 +- utils/frame/benchmarking-cli/Cargo.toml | 2 +- utils/frame/rpc/support/Cargo.toml | 2 +- utils/frame/rpc/system/Cargo.toml | 2 +- utils/prometheus/Cargo.toml | 2 +- 151 files changed, 300 insertions(+), 300 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bc7ce84a805..19f7298ab68 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,8 +38,8 @@ variables: DOCKER_OS: "debian:stretch" ARCH: "x86_64" # FIXME set to release - CARGO_UNLEASH_INSTALL_PARAMS: "--version 1.0.0-alpha.6" - CARGO_UNLEASH_PKG_DEF: "--skip node node-* subkey chain-spec-builder" + CARGO_UNLEASH_INSTALL_PARAMS: "--version 1.0.0-alpha.8" + CARGO_UNLEASH_PKG_DEF: "--skip node node-* pallet-template pallet-example pallet-example-* subkey chain-spec-builder" .collect-artifacts: &collect-artifacts diff --git a/Cargo.lock b/Cargo.lock index 50c136dee02..67b3cf7f47f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -573,7 +573,7 @@ dependencies = [ [[package]] name = "chain-spec-builder" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "ansi_term 0.12.1", "node-cli", @@ -1417,14 +1417,14 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "parity-scale-codec", ] [[package]] name = "frame-benchmarking" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "parity-scale-codec", "sp-api", @@ -1435,7 +1435,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-benchmarking", "parity-scale-codec", @@ -1450,7 +1450,7 @@ dependencies = [ [[package]] name = "frame-executive" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -1468,7 +1468,7 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "11.0.0-alpha.2" +version = "11.0.0-alpha.3" dependencies = [ "parity-scale-codec", "serde", @@ -1478,7 +1478,7 @@ dependencies = [ [[package]] name = "frame-support" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "bitmask", "frame-metadata", @@ -1503,7 +1503,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support-procedural-tools", "proc-macro2", @@ -1513,7 +1513,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -1524,7 +1524,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "proc-macro2", "quote", @@ -1549,7 +1549,7 @@ dependencies = [ [[package]] name = "frame-system" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "criterion 0.2.11", "frame-support", @@ -1567,7 +1567,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "parity-scale-codec", "sp-api", @@ -3320,7 +3320,7 @@ dependencies = [ [[package]] name = "node-cli" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "assert_cmd", "frame-benchmarking-cli", @@ -3391,7 +3391,7 @@ dependencies = [ [[package]] name = "node-executor" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "criterion 0.3.1", "frame-benchmarking", @@ -3424,7 +3424,7 @@ dependencies = [ [[package]] name = "node-inspect" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "derive_more", "log 0.4.8", @@ -3440,7 +3440,7 @@ dependencies = [ [[package]] name = "node-primitives" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "pretty_assertions", "sp-core", @@ -3450,7 +3450,7 @@ dependencies = [ [[package]] name = "node-rpc" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "jsonrpc-core", "node-primitives", @@ -3473,7 +3473,7 @@ dependencies = [ [[package]] name = "node-rpc-client" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "env_logger 0.7.1", "futures 0.1.29", @@ -3486,7 +3486,7 @@ dependencies = [ [[package]] name = "node-runtime" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-benchmarking", "frame-executive", @@ -3548,7 +3548,7 @@ dependencies = [ [[package]] name = "node-template" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "futures 0.3.4", "log 0.4.8", @@ -3576,7 +3576,7 @@ dependencies = [ [[package]] name = "node-template-runtime" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-executive", "frame-support", @@ -3608,7 +3608,7 @@ dependencies = [ [[package]] name = "node-testing" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "criterion 0.3.1", "frame-support", @@ -3653,7 +3653,7 @@ dependencies = [ [[package]] name = "node-transaction-factory" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "log 0.4.8", "parity-scale-codec", @@ -3827,7 +3827,7 @@ dependencies = [ [[package]] name = "pallet-assets" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -3841,7 +3841,7 @@ dependencies = [ [[package]] name = "pallet-aura" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -3863,7 +3863,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -3881,7 +3881,7 @@ dependencies = [ [[package]] name = "pallet-authorship" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -3897,7 +3897,7 @@ dependencies = [ [[package]] name = "pallet-babe" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -3922,7 +3922,7 @@ dependencies = [ [[package]] name = "pallet-balances" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-benchmarking", "frame-support", @@ -3938,7 +3938,7 @@ dependencies = [ [[package]] name = "pallet-collective" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -3954,7 +3954,7 @@ dependencies = [ [[package]] name = "pallet-contracts" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "assert_matches", "frame-support", @@ -3979,7 +3979,7 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -3988,7 +3988,7 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4007,7 +4007,7 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc-runtime-api" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "pallet-contracts-primitives", "parity-scale-codec", @@ -4018,7 +4018,7 @@ dependencies = [ [[package]] name = "pallet-democracy" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4035,7 +4035,7 @@ dependencies = [ [[package]] name = "pallet-elections" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4051,7 +4051,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4069,7 +4069,7 @@ dependencies = [ [[package]] name = "pallet-evm" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "evm", "frame-support", @@ -4089,7 +4089,7 @@ dependencies = [ [[package]] name = "pallet-example" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4104,7 +4104,7 @@ dependencies = [ [[package]] name = "pallet-example-offchain-worker" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4119,7 +4119,7 @@ dependencies = [ [[package]] name = "pallet-finality-tracker" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4136,7 +4136,7 @@ dependencies = [ [[package]] name = "pallet-generic-asset" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4150,7 +4150,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4168,7 +4168,7 @@ dependencies = [ [[package]] name = "pallet-identity" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4185,7 +4185,7 @@ dependencies = [ [[package]] name = "pallet-im-online" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4203,7 +4203,7 @@ dependencies = [ [[package]] name = "pallet-indices" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4219,7 +4219,7 @@ dependencies = [ [[package]] name = "pallet-membership" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4233,7 +4233,7 @@ dependencies = [ [[package]] name = "pallet-nicks" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4248,7 +4248,7 @@ dependencies = [ [[package]] name = "pallet-offences" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4264,7 +4264,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4278,7 +4278,7 @@ dependencies = [ [[package]] name = "pallet-recovery" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "enumflags2", "frame-support", @@ -4294,7 +4294,7 @@ dependencies = [ [[package]] name = "pallet-scored-pool" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4309,7 +4309,7 @@ dependencies = [ [[package]] name = "pallet-session" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4329,7 +4329,7 @@ dependencies = [ [[package]] name = "pallet-society" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4345,7 +4345,7 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4368,7 +4368,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -4379,7 +4379,7 @@ dependencies = [ [[package]] name = "pallet-sudo" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4393,7 +4393,7 @@ dependencies = [ [[package]] name = "pallet-template" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4406,7 +4406,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-benchmarking", "frame-support", @@ -4424,7 +4424,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4439,7 +4439,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4456,7 +4456,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "parity-scale-codec", @@ -4469,7 +4469,7 @@ dependencies = [ [[package]] name = "pallet-treasury" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4484,7 +4484,7 @@ dependencies = [ [[package]] name = "pallet-utility" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -4499,7 +4499,7 @@ dependencies = [ [[package]] name = "pallet-vesting" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "enumflags2", "frame-support", @@ -5541,7 +5541,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "bytes 0.5.4", "derive_more", @@ -5570,7 +5570,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "futures 0.3.4", "log 0.4.8", @@ -5593,7 +5593,7 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -5608,7 +5608,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "impl-trait-for-tuples", "sc-chain-spec-derive", @@ -5622,7 +5622,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5632,7 +5632,7 @@ dependencies = [ [[package]] name = "sc-cli" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "ansi_term 0.12.1", "app_dirs", @@ -5671,7 +5671,7 @@ dependencies = [ [[package]] name = "sc-client" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "derive_more", "env_logger 0.7.1", @@ -5708,7 +5708,7 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "derive_more", "fnv", @@ -5739,7 +5739,7 @@ dependencies = [ [[package]] name = "sc-client-db" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "env_logger 0.7.1", "hash-db", @@ -5770,7 +5770,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "derive_more", "env_logger 0.7.1", @@ -5809,7 +5809,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "derive_more", "env_logger 0.7.1", @@ -5860,7 +5860,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "derive_more", "futures 0.3.4", @@ -5885,7 +5885,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "fork-tree", "parity-scale-codec", @@ -5897,7 +5897,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "derive_more", "env_logger 0.7.1", @@ -5925,7 +5925,7 @@ dependencies = [ [[package]] name = "sc-consensus-pow" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "derive_more", "futures 0.3.4", @@ -5945,7 +5945,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "futures 0.3.4", "futures-timer 3.0.1", @@ -5966,7 +5966,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "log 0.4.8", "sc-client-api", @@ -5979,7 +5979,7 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "assert_matches", "derive_more", @@ -6012,7 +6012,7 @@ dependencies = [ [[package]] name = "sc-executor-common" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "derive_more", "log 0.4.8", @@ -6027,7 +6027,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "log 0.4.8", "parity-scale-codec", @@ -6042,7 +6042,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "assert_matches", "log 0.4.8", @@ -6059,7 +6059,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "assert_matches", "env_logger 0.7.1", @@ -6101,7 +6101,7 @@ dependencies = [ [[package]] name = "sc-informant" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "ansi_term 0.12.1", "futures 0.3.4", @@ -6117,7 +6117,7 @@ dependencies = [ [[package]] name = "sc-keystore" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "derive_more", "hex", @@ -6132,7 +6132,7 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "assert_matches", "async-std", @@ -6190,7 +6190,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "futures 0.3.4", "futures-timer 3.0.1", @@ -6232,7 +6232,7 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "bytes 0.5.4", "env_logger 0.7.1", @@ -6263,7 +6263,7 @@ dependencies = [ [[package]] name = "sc-peerset" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "futures 0.3.4", "libp2p", @@ -6275,7 +6275,7 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "assert_matches", "futures 0.1.29", @@ -6312,7 +6312,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "derive_more", "futures 0.3.4", @@ -6334,7 +6334,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "jsonrpc-core", "jsonrpc-http-server", @@ -6361,7 +6361,7 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "derive_more", "exit-future", @@ -6434,7 +6434,7 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "env_logger 0.7.1", "log 0.4.8", @@ -6445,7 +6445,7 @@ dependencies = [ [[package]] name = "sc-telemetry" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "bytes 0.5.4", "futures 0.3.4", @@ -6466,7 +6466,7 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "erased-serde", "log 0.4.8", @@ -6481,7 +6481,7 @@ dependencies = [ [[package]] name = "sc-transaction-graph" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "assert_matches", "criterion 0.3.1", @@ -6503,7 +6503,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "derive_more", "futures 0.3.4", @@ -6864,7 +6864,7 @@ checksum = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" [[package]] name = "sp-allocator" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "derive_more", "log 0.4.8", @@ -6875,7 +6875,7 @@ dependencies = [ [[package]] name = "sp-api" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "hash-db", "parity-scale-codec", @@ -6890,7 +6890,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "blake2-rfc", "proc-macro-crate", @@ -6919,7 +6919,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "parity-scale-codec", "serde", @@ -6941,7 +6941,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "criterion 0.3.1", "integer-sqrt", @@ -6956,7 +6956,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "parity-scale-codec", "sp-api", @@ -6967,7 +6967,7 @@ dependencies = [ [[package]] name = "sp-authorship" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -6977,7 +6977,7 @@ dependencies = [ [[package]] name = "sp-block-builder" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "parity-scale-codec", "sp-api", @@ -6988,7 +6988,7 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "derive_more", "log 0.4.8", @@ -7003,7 +7003,7 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "derive_more", "futures 0.3.4", @@ -7025,7 +7025,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "parity-scale-codec", "sp-api", @@ -7038,7 +7038,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -7053,7 +7053,7 @@ dependencies = [ [[package]] name = "sp-consensus-pow" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "parity-scale-codec", "sp-api", @@ -7064,7 +7064,7 @@ dependencies = [ [[package]] name = "sp-core" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "base58", "blake2-rfc", @@ -7108,7 +7108,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "proc-macro2", "quote", @@ -7117,7 +7117,7 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "environmental", "sp-std", @@ -7126,7 +7126,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "parity-scale-codec", "serde", @@ -7138,7 +7138,7 @@ dependencies = [ [[package]] name = "sp-finality-tracker" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -7147,7 +7147,7 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "derive_more", "parity-scale-codec", @@ -7158,7 +7158,7 @@ dependencies = [ [[package]] name = "sp-io" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "hash-db", "libsecp256k1", @@ -7175,7 +7175,7 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "lazy_static", "sp-core", @@ -7185,7 +7185,7 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "sp-api", "sp-runtime", @@ -7193,7 +7193,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "backtrace", "log 0.4.8", @@ -7201,7 +7201,7 @@ dependencies = [ [[package]] name = "sp-phragmen" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "rand 0.7.3", "serde", @@ -7213,7 +7213,7 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "serde", "serde_json", @@ -7222,7 +7222,7 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "impl-trait-for-tuples", "log 0.4.8", @@ -7242,7 +7242,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "parity-scale-codec", "primitive-types", @@ -7261,7 +7261,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "Inflector", "proc-macro-crate", @@ -7295,7 +7295,7 @@ dependencies = [ [[package]] name = "sp-sandbox" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "assert_matches", "parity-scale-codec", @@ -7309,7 +7309,7 @@ dependencies = [ [[package]] name = "sp-serializer" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "serde", "serde_json", @@ -7317,7 +7317,7 @@ dependencies = [ [[package]] name = "sp-session" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "sp-api", "sp-core", @@ -7327,7 +7327,7 @@ dependencies = [ [[package]] name = "sp-staking" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -7336,7 +7336,7 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "hash-db", "hex-literal", @@ -7355,11 +7355,11 @@ dependencies = [ [[package]] name = "sp-std" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" [[package]] name = "sp-storage" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "impl-serde 0.2.3", "serde", @@ -7381,7 +7381,7 @@ dependencies = [ [[package]] name = "sp-timestamp" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7394,7 +7394,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "derive_more", "futures 0.3.4", @@ -7407,7 +7407,7 @@ dependencies = [ [[package]] name = "sp-trie" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "criterion 0.2.11", "hash-db", @@ -7424,7 +7424,7 @@ dependencies = [ [[package]] name = "sp-version" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "impl-serde 0.2.3", "parity-scale-codec", @@ -7435,7 +7435,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7541,7 +7541,7 @@ dependencies = [ [[package]] name = "subkey" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "clap", "derive_more", @@ -7583,7 +7583,7 @@ dependencies = [ [[package]] name = "substrate-browser-utils" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "chrono", "clear_on_drop", @@ -7608,11 +7608,11 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" [[package]] name = "substrate-frame-rpc-support" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "frame-support", "frame-system", @@ -7628,7 +7628,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" dependencies = [ "env_logger 0.7.1", "frame-system-rpc-runtime-api", @@ -7651,7 +7651,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" dependencies = [ "async-std", "derive_more", @@ -7756,7 +7756,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" [[package]] name = "substrate-wasm-builder" diff --git a/bin/node-template/node/Cargo.toml b/bin/node-template/node/Cargo.toml index 42dcc8ac501..bccd0576dfa 100644 --- a/bin/node-template/node/Cargo.toml +++ b/bin/node-template/node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-template" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Anonymous"] edition = "2018" license = "Unlicense" diff --git a/bin/node-template/pallets/template/Cargo.toml b/bin/node-template/pallets/template/Cargo.toml index 93e13c5505b..808951a77db 100644 --- a/bin/node-template/pallets/template/Cargo.toml +++ b/bin/node-template/pallets/template/Cargo.toml @@ -2,7 +2,7 @@ authors = ['Anonymous'] edition = '2018' name = 'pallet-template' -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" license = "Unlicense" homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" diff --git a/bin/node-template/runtime/Cargo.toml b/bin/node-template/runtime/Cargo.toml index e6b14f1a501..35856e3bdcc 100644 --- a/bin/node-template/runtime/Cargo.toml +++ b/bin/node-template/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-template-runtime" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Anonymous"] edition = "2018" license = "Unlicense" diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml index f160e32e97f..48e4c634f03 100644 --- a/bin/node/cli/Cargo.toml +++ b/bin/node/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-cli" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] description = "Substrate node implementation in Rust." build = "build.rs" diff --git a/bin/node/executor/Cargo.toml b/bin/node/executor/Cargo.toml index 94bd13954a4..2d6dd8d12b0 100644 --- a/bin/node/executor/Cargo.toml +++ b/bin/node/executor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-executor" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] description = "Substrate node implementation in Rust." edition = "2018" diff --git a/bin/node/inspect/Cargo.toml b/bin/node/inspect/Cargo.toml index 218c38d0af9..70ed7e3cfc0 100644 --- a/bin/node/inspect/Cargo.toml +++ b/bin/node/inspect/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-inspect" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/bin/node/primitives/Cargo.toml b/bin/node/primitives/Cargo.toml index 0e053c90413..cb271b987db 100644 --- a/bin/node/primitives/Cargo.toml +++ b/bin/node/primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-primitives" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/bin/node/rpc-client/Cargo.toml b/bin/node/rpc-client/Cargo.toml index d5d5dd90d8e..8b37aff2913 100644 --- a/bin/node/rpc-client/Cargo.toml +++ b/bin/node/rpc-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-rpc-client" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/bin/node/rpc/Cargo.toml b/bin/node/rpc/Cargo.toml index 28143b3bc36..1155eab304f 100644 --- a/bin/node/rpc/Cargo.toml +++ b/bin/node/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-rpc" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/bin/node/runtime/Cargo.toml b/bin/node/runtime/Cargo.toml index 4151f45b8e2..66e9dece177 100644 --- a/bin/node/runtime/Cargo.toml +++ b/bin/node/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-runtime" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" diff --git a/bin/node/testing/Cargo.toml b/bin/node/testing/Cargo.toml index 3e8a4c4d1fe..30402c54905 100644 --- a/bin/node/testing/Cargo.toml +++ b/bin/node/testing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-testing" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] description = "Test utilities for Substrate node." edition = "2018" diff --git a/bin/node/transaction-factory/Cargo.toml b/bin/node/transaction-factory/Cargo.toml index 8a033ad4c13..64c7b8d42ad 100644 --- a/bin/node/transaction-factory/Cargo.toml +++ b/bin/node/transaction-factory/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-transaction-factory" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/bin/utils/chain-spec-builder/Cargo.toml b/bin/utils/chain-spec-builder/Cargo.toml index 22924f88528..5e51c4358e5 100644 --- a/bin/utils/chain-spec-builder/Cargo.toml +++ b/bin/utils/chain-spec-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chain-spec-builder" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" diff --git a/bin/utils/subkey/Cargo.toml b/bin/utils/subkey/Cargo.toml index a6c239c6d75..dead684598f 100644 --- a/bin/utils/subkey/Cargo.toml +++ b/bin/utils/subkey/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subkey" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/Cargo.toml b/client/Cargo.toml index 09fa6a2aaf2..91f3578ce21 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-client" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/api/Cargo.toml b/client/api/Cargo.toml index f1d3478c472..dcbf447f594 100644 --- a/client/api/Cargo.toml +++ b/client/api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-client-api" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/authority-discovery/Cargo.toml b/client/authority-discovery/Cargo.toml index a262730d600..923408865a3 100644 --- a/client/authority-discovery/Cargo.toml +++ b/client/authority-discovery/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-authority-discovery" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" diff --git a/client/basic-authorship/Cargo.toml b/client/basic-authorship/Cargo.toml index 56bfb570725..61184f9517f 100644 --- a/client/basic-authorship/Cargo.toml +++ b/client/basic-authorship/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-basic-authorship" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/block-builder/Cargo.toml b/client/block-builder/Cargo.toml index ee8c1c8ae05..a41acc16129 100644 --- a/client/block-builder/Cargo.toml +++ b/client/block-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-block-builder" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/chain-spec/Cargo.toml b/client/chain-spec/Cargo.toml index 4f6e4be6a1f..10d4fc26224 100644 --- a/client/chain-spec/Cargo.toml +++ b/client/chain-spec/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-chain-spec" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/chain-spec/derive/Cargo.toml b/client/chain-spec/derive/Cargo.toml index 77532f92615..c76949011aa 100644 --- a/client/chain-spec/derive/Cargo.toml +++ b/client/chain-spec/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-chain-spec-derive" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index e8525644d77..588aa134ab1 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-cli" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] description = "Substrate CLI interface." edition = "2018" diff --git a/client/consensus/aura/Cargo.toml b/client/consensus/aura/Cargo.toml index 41b1f4c460b..0a7a7176c73 100644 --- a/client/consensus/aura/Cargo.toml +++ b/client/consensus/aura/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-aura" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] description = "Aura consensus algorithm for substrate" edition = "2018" diff --git a/client/consensus/babe/Cargo.toml b/client/consensus/babe/Cargo.toml index 4ccd0064330..b465ed1f134 100644 --- a/client/consensus/babe/Cargo.toml +++ b/client/consensus/babe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-babe" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] description = "BABE consensus algorithm for substrate" edition = "2018" diff --git a/client/consensus/babe/rpc/Cargo.toml b/client/consensus/babe/rpc/Cargo.toml index 11a8b282112..3f2cc4f0bcb 100644 --- a/client/consensus/babe/rpc/Cargo.toml +++ b/client/consensus/babe/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-babe-rpc" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] description = "RPC extensions for the BABE consensus algorithm" edition = "2018" diff --git a/client/consensus/epochs/Cargo.toml b/client/consensus/epochs/Cargo.toml index 48a14ea5052..778dfa85feb 100644 --- a/client/consensus/epochs/Cargo.toml +++ b/client/consensus/epochs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-epochs" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] description = "Generic epochs-based utilities for consensus" edition = "2018" diff --git a/client/consensus/manual-seal/Cargo.toml b/client/consensus/manual-seal/Cargo.toml index 0ae7ddbd64e..11fee0e3f9e 100644 --- a/client/consensus/manual-seal/Cargo.toml +++ b/client/consensus/manual-seal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-manual-seal" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] description = "Manual sealing engine for Substrate" edition = "2018" diff --git a/client/consensus/pow/Cargo.toml b/client/consensus/pow/Cargo.toml index dd834e83269..83bcee453d7 100644 --- a/client/consensus/pow/Cargo.toml +++ b/client/consensus/pow/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-pow" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] description = "PoW consensus algorithm for substrate" edition = "2018" diff --git a/client/consensus/slots/Cargo.toml b/client/consensus/slots/Cargo.toml index a626e2f179d..435fde0f6fd 100644 --- a/client/consensus/slots/Cargo.toml +++ b/client/consensus/slots/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-slots" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] description = "Generic slots-based utilities for consensus" edition = "2018" diff --git a/client/consensus/uncles/Cargo.toml b/client/consensus/uncles/Cargo.toml index 2c40e539289..ad325ed79f7 100644 --- a/client/consensus/uncles/Cargo.toml +++ b/client/consensus/uncles/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-uncles" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] description = "Generic uncle inclusion utilities for consensus" edition = "2018" diff --git a/client/db/Cargo.toml b/client/db/Cargo.toml index f6b65fdc3c6..68460f42a61 100644 --- a/client/db/Cargo.toml +++ b/client/db/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-client-db" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/executor/Cargo.toml b/client/executor/Cargo.toml index 9bc6ef910ff..a108e63cd17 100644 --- a/client/executor/Cargo.toml +++ b/client/executor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-executor" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/executor/common/Cargo.toml b/client/executor/common/Cargo.toml index 9b3e39b6db6..b3e69181749 100644 --- a/client/executor/common/Cargo.toml +++ b/client/executor/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-executor-common" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/executor/wasmi/Cargo.toml b/client/executor/wasmi/Cargo.toml index ff52d537af6..286acf27526 100644 --- a/client/executor/wasmi/Cargo.toml +++ b/client/executor/wasmi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-executor-wasmi" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/executor/wasmtime/Cargo.toml b/client/executor/wasmtime/Cargo.toml index f823d28ebf7..f1cd5a2eceb 100644 --- a/client/executor/wasmtime/Cargo.toml +++ b/client/executor/wasmtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-executor-wasmtime" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/finality-grandpa/Cargo.toml b/client/finality-grandpa/Cargo.toml index 773cbc23170..7dea004eff4 100644 --- a/client/finality-grandpa/Cargo.toml +++ b/client/finality-grandpa/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-finality-grandpa" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/informant/Cargo.toml b/client/informant/Cargo.toml index a7dc6fa70a2..a29d793c360 100644 --- a/client/informant/Cargo.toml +++ b/client/informant/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-informant" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] description = "Substrate informant." edition = "2018" diff --git a/client/keystore/Cargo.toml b/client/keystore/Cargo.toml index 13d72746ba8..247376bc46e 100644 --- a/client/keystore/Cargo.toml +++ b/client/keystore/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-keystore" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/network-gossip/Cargo.toml b/client/network-gossip/Cargo.toml index b69cf334e9f..6ed9f4de592 100644 --- a/client/network-gossip/Cargo.toml +++ b/client/network-gossip/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Gossiping for the Substrate network protocol" name = "sc-network-gossip" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index 44664b2a267..4e07e84ba9d 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate network protocol" name = "sc-network" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" diff --git a/client/offchain/Cargo.toml b/client/offchain/Cargo.toml index 066be726e88..9aaf5de2a1a 100644 --- a/client/offchain/Cargo.toml +++ b/client/offchain/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate offchain workers" name = "sc-offchain" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" diff --git a/client/peerset/Cargo.toml b/client/peerset/Cargo.toml index 382a1e0b247..d90aa21c4fc 100644 --- a/client/peerset/Cargo.toml +++ b/client/peerset/Cargo.toml @@ -3,7 +3,7 @@ description = "Connectivity manager based on reputation" homepage = "http://parity.io" license = "GPL-3.0" name = "sc-peerset" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" repository = "https://github.com/paritytech/substrate/" diff --git a/client/rpc-api/Cargo.toml b/client/rpc-api/Cargo.toml index 3fb6afb4745..984842dccfd 100644 --- a/client/rpc-api/Cargo.toml +++ b/client/rpc-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-rpc-api" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/rpc-servers/Cargo.toml b/client/rpc-servers/Cargo.toml index e2ccff65e60..79d2984c229 100644 --- a/client/rpc-servers/Cargo.toml +++ b/client/rpc-servers/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-rpc-server" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/rpc/Cargo.toml b/client/rpc/Cargo.toml index 3fb0360601a..2a37465e138 100644 --- a/client/rpc/Cargo.toml +++ b/client/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-rpc" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/service/Cargo.toml b/client/service/Cargo.toml index d504ab20525..e7c55fae029 100644 --- a/client/service/Cargo.toml +++ b/client/service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-service" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/state-db/Cargo.toml b/client/state-db/Cargo.toml index 3f1c4b0cf62..5a69d8b31ec 100644 --- a/client/state-db/Cargo.toml +++ b/client/state-db/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-state-db" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/telemetry/Cargo.toml b/client/telemetry/Cargo.toml index 2b209e5284a..108c13de35c 100644 --- a/client/telemetry/Cargo.toml +++ b/client/telemetry/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-telemetry" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] description = "Telemetry utils" edition = "2018" diff --git a/client/tracing/Cargo.toml b/client/tracing/Cargo.toml index 7201248a6ab..ad988f06079 100644 --- a/client/tracing/Cargo.toml +++ b/client/tracing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-tracing" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" diff --git a/client/transaction-pool/Cargo.toml b/client/transaction-pool/Cargo.toml index e3170d585eb..1b324e97589 100644 --- a/client/transaction-pool/Cargo.toml +++ b/client/transaction-pool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-transaction-pool" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/client/transaction-pool/graph/Cargo.toml b/client/transaction-pool/graph/Cargo.toml index 6b790921928..fbf405d7359 100644 --- a/client/transaction-pool/graph/Cargo.toml +++ b/client/transaction-pool/graph/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-transaction-graph" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/assets/Cargo.toml b/frame/assets/Cargo.toml index 89f9a188870..ba2e58ba28b 100644 --- a/frame/assets/Cargo.toml +++ b/frame/assets/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-assets" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/aura/Cargo.toml b/frame/aura/Cargo.toml index 8a0bb4c094a..110050071b3 100644 --- a/frame/aura/Cargo.toml +++ b/frame/aura/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-aura" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/authority-discovery/Cargo.toml b/frame/authority-discovery/Cargo.toml index 4d2a6642e3b..b96cb2fac1f 100644 --- a/frame/authority-discovery/Cargo.toml +++ b/frame/authority-discovery/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-authority-discovery" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/authorship/Cargo.toml b/frame/authorship/Cargo.toml index ff91917af9a..dec9d8b03c1 100644 --- a/frame/authorship/Cargo.toml +++ b/frame/authorship/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-authorship" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" description = "Block and Uncle Author tracking for the FRAME" authors = ["Parity Technologies "] edition = "2018" diff --git a/frame/babe/Cargo.toml b/frame/babe/Cargo.toml index ce769275c91..14176a1ea47 100644 --- a/frame/babe/Cargo.toml +++ b/frame/babe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-babe" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/balances/Cargo.toml b/frame/balances/Cargo.toml index bc8c1a23c30..c4d963a2f45 100644 --- a/frame/balances/Cargo.toml +++ b/frame/balances/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-balances" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/benchmarking/Cargo.toml b/frame/benchmarking/Cargo.toml index 810d6361ddc..524ecabb3cd 100644 --- a/frame/benchmarking/Cargo.toml +++ b/frame/benchmarking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-benchmarking" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/collective/Cargo.toml b/frame/collective/Cargo.toml index 14d926827df..73200119ff5 100644 --- a/frame/collective/Cargo.toml +++ b/frame/collective/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-collective" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/contracts/Cargo.toml b/frame/contracts/Cargo.toml index 89e93e725f4..632a1ff7767 100644 --- a/frame/contracts/Cargo.toml +++ b/frame/contracts/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-contracts" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/contracts/common/Cargo.toml b/frame/contracts/common/Cargo.toml index 753e79c19e4..878887573bd 100644 --- a/frame/contracts/common/Cargo.toml +++ b/frame/contracts/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-contracts-primitives" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/contracts/rpc/Cargo.toml b/frame/contracts/rpc/Cargo.toml index c026ee6cdd1..61491f7d792 100644 --- a/frame/contracts/rpc/Cargo.toml +++ b/frame/contracts/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-contracts-rpc" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/contracts/rpc/runtime-api/Cargo.toml b/frame/contracts/rpc/runtime-api/Cargo.toml index 96d3a8116d0..ee251cd2c07 100644 --- a/frame/contracts/rpc/runtime-api/Cargo.toml +++ b/frame/contracts/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-contracts-rpc-runtime-api" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/democracy/Cargo.toml b/frame/democracy/Cargo.toml index e62e7a45d9c..7ff3ae2b417 100644 --- a/frame/democracy/Cargo.toml +++ b/frame/democracy/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-democracy" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/elections-phragmen/Cargo.toml b/frame/elections-phragmen/Cargo.toml index 80be82ff2c5..08bbfc979e0 100644 --- a/frame/elections-phragmen/Cargo.toml +++ b/frame/elections-phragmen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-elections-phragmen" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/elections/Cargo.toml b/frame/elections/Cargo.toml index 81e128da31f..55f12028ae6 100644 --- a/frame/elections/Cargo.toml +++ b/frame/elections/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-elections" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/evm/Cargo.toml b/frame/evm/Cargo.toml index 649d6b778f7..0d9091dfaf5 100644 --- a/frame/evm/Cargo.toml +++ b/frame/evm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-evm" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/example-offchain-worker/Cargo.toml b/frame/example-offchain-worker/Cargo.toml index 132ef779be5..39ba8c32870 100644 --- a/frame/example-offchain-worker/Cargo.toml +++ b/frame/example-offchain-worker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-example-offchain-worker" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "Unlicense" diff --git a/frame/example/Cargo.toml b/frame/example/Cargo.toml index 00621704540..90a5b9c76b9 100644 --- a/frame/example/Cargo.toml +++ b/frame/example/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-example" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "Unlicense" diff --git a/frame/executive/Cargo.toml b/frame/executive/Cargo.toml index 63908edba27..f5b4d5e1867 100644 --- a/frame/executive/Cargo.toml +++ b/frame/executive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-executive" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/finality-tracker/Cargo.toml b/frame/finality-tracker/Cargo.toml index 5ca1bd28a52..231e8c76081 100644 --- a/frame/finality-tracker/Cargo.toml +++ b/frame/finality-tracker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-finality-tracker" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/generic-asset/Cargo.toml b/frame/generic-asset/Cargo.toml index 5e48bc8ad7b..3c452c11b02 100644 --- a/frame/generic-asset/Cargo.toml +++ b/frame/generic-asset/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-generic-asset" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Centrality Developers "] edition = "2018" license = "GPL-3.0" diff --git a/frame/grandpa/Cargo.toml b/frame/grandpa/Cargo.toml index f458a59a2cb..feaf8fa8046 100644 --- a/frame/grandpa/Cargo.toml +++ b/frame/grandpa/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-grandpa" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/identity/Cargo.toml b/frame/identity/Cargo.toml index 0cbeb2772bb..4f6bc9ca4a6 100644 --- a/frame/identity/Cargo.toml +++ b/frame/identity/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-identity" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/im-online/Cargo.toml b/frame/im-online/Cargo.toml index e1c35af54c4..3201e808b2d 100644 --- a/frame/im-online/Cargo.toml +++ b/frame/im-online/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-im-online" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/indices/Cargo.toml b/frame/indices/Cargo.toml index 341b2722dc8..462ee1c3b39 100644 --- a/frame/indices/Cargo.toml +++ b/frame/indices/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-indices" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/membership/Cargo.toml b/frame/membership/Cargo.toml index 0d89a8038c0..42e933aa3a9 100644 --- a/frame/membership/Cargo.toml +++ b/frame/membership/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-membership" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/metadata/Cargo.toml b/frame/metadata/Cargo.toml index 2d3160ac014..ee110ac254b 100644 --- a/frame/metadata/Cargo.toml +++ b/frame/metadata/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-metadata" -version = "11.0.0-alpha.2" +version = "11.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/nicks/Cargo.toml b/frame/nicks/Cargo.toml index 44d9ee4a559..81fb07b3ca2 100644 --- a/frame/nicks/Cargo.toml +++ b/frame/nicks/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-nicks" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/offences/Cargo.toml b/frame/offences/Cargo.toml index 458bfd05555..e3601dda5b8 100644 --- a/frame/offences/Cargo.toml +++ b/frame/offences/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-offences" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/randomness-collective-flip/Cargo.toml b/frame/randomness-collective-flip/Cargo.toml index de369b7b88b..b99f4c8e499 100644 --- a/frame/randomness-collective-flip/Cargo.toml +++ b/frame/randomness-collective-flip/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-randomness-collective-flip" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/recovery/Cargo.toml b/frame/recovery/Cargo.toml index efeb349f06b..39baba71e47 100644 --- a/frame/recovery/Cargo.toml +++ b/frame/recovery/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-recovery" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/scored-pool/Cargo.toml b/frame/scored-pool/Cargo.toml index 36efebd7b48..83ec59cb78c 100644 --- a/frame/scored-pool/Cargo.toml +++ b/frame/scored-pool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-scored-pool" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/session/Cargo.toml b/frame/session/Cargo.toml index 5d2b3b5fa8c..3d98f92c43a 100644 --- a/frame/session/Cargo.toml +++ b/frame/session/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-session" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/society/Cargo.toml b/frame/society/Cargo.toml index ef27acb1cb5..898a47010f7 100644 --- a/frame/society/Cargo.toml +++ b/frame/society/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-society" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/staking/Cargo.toml b/frame/staking/Cargo.toml index 47316765266..6e737aea3a0 100644 --- a/frame/staking/Cargo.toml +++ b/frame/staking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-staking" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/staking/reward-curve/Cargo.toml b/frame/staking/reward-curve/Cargo.toml index 0b727cbcf58..3d0920e644f 100644 --- a/frame/staking/reward-curve/Cargo.toml +++ b/frame/staking/reward-curve/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-staking-reward-curve" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/sudo/Cargo.toml b/frame/sudo/Cargo.toml index 3360653c25c..118bb6f1ffd 100644 --- a/frame/sudo/Cargo.toml +++ b/frame/sudo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-sudo" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/support/Cargo.toml b/frame/support/Cargo.toml index c1328021755..d961134142f 100644 --- a/frame/support/Cargo.toml +++ b/frame/support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-support" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/support/procedural/Cargo.toml b/frame/support/procedural/Cargo.toml index 39b7e175eee..1f5ec04d25e 100644 --- a/frame/support/procedural/Cargo.toml +++ b/frame/support/procedural/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-support-procedural" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/support/procedural/tools/Cargo.toml b/frame/support/procedural/tools/Cargo.toml index da107c024fe..8f0ce7b06a0 100644 --- a/frame/support/procedural/tools/Cargo.toml +++ b/frame/support/procedural/tools/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-support-procedural-tools" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/support/procedural/tools/derive/Cargo.toml b/frame/support/procedural/tools/derive/Cargo.toml index e95aa1d6900..872185d19fc 100644 --- a/frame/support/procedural/tools/derive/Cargo.toml +++ b/frame/support/procedural/tools/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-support-procedural-tools-derive" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/system/Cargo.toml b/frame/system/Cargo.toml index b75e0385043..cb5b52b8ca2 100644 --- a/frame/system/Cargo.toml +++ b/frame/system/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-system" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/system/rpc/runtime-api/Cargo.toml b/frame/system/rpc/runtime-api/Cargo.toml index 88df5ea3b8e..2a0f3ff70fe 100644 --- a/frame/system/rpc/runtime-api/Cargo.toml +++ b/frame/system/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-system-rpc-runtime-api" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/timestamp/Cargo.toml b/frame/timestamp/Cargo.toml index fe73b081b01..1c8dfa1dfba 100644 --- a/frame/timestamp/Cargo.toml +++ b/frame/timestamp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-timestamp" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/transaction-payment/Cargo.toml b/frame/transaction-payment/Cargo.toml index b92a22ecde0..0e0ba1d5de1 100644 --- a/frame/transaction-payment/Cargo.toml +++ b/frame/transaction-payment/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-transaction-payment" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/transaction-payment/rpc/Cargo.toml b/frame/transaction-payment/rpc/Cargo.toml index 677b85b5fb3..38fc10d56ce 100644 --- a/frame/transaction-payment/rpc/Cargo.toml +++ b/frame/transaction-payment/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-transaction-payment-rpc" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/transaction-payment/rpc/runtime-api/Cargo.toml b/frame/transaction-payment/rpc/runtime-api/Cargo.toml index 1a5f5fc35f3..369f044a367 100644 --- a/frame/transaction-payment/rpc/runtime-api/Cargo.toml +++ b/frame/transaction-payment/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-transaction-payment-rpc-runtime-api" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/treasury/Cargo.toml b/frame/treasury/Cargo.toml index c47a87fb569..a0bf1443da1 100644 --- a/frame/treasury/Cargo.toml +++ b/frame/treasury/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-treasury" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/utility/Cargo.toml b/frame/utility/Cargo.toml index 68d621861ce..552f1dd2548 100644 --- a/frame/utility/Cargo.toml +++ b/frame/utility/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-utility" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/frame/vesting/Cargo.toml b/frame/vesting/Cargo.toml index ff16007acea..ac23eef5715 100644 --- a/frame/vesting/Cargo.toml +++ b/frame/vesting/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-vesting" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/allocator/Cargo.toml b/primitives/allocator/Cargo.toml index af977ed2406..944cfa6de19 100644 --- a/primitives/allocator/Cargo.toml +++ b/primitives/allocator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-allocator" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/api/Cargo.toml b/primitives/api/Cargo.toml index 6a985b4f485..4c90c41d3fa 100644 --- a/primitives/api/Cargo.toml +++ b/primitives/api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-api" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/api/proc-macro/Cargo.toml b/primitives/api/proc-macro/Cargo.toml index 8e9bf11917b..e031f97ba9b 100644 --- a/primitives/api/proc-macro/Cargo.toml +++ b/primitives/api/proc-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-api-proc-macro" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/application-crypto/Cargo.toml b/primitives/application-crypto/Cargo.toml index 630012ba708..7125ed7982a 100644 --- a/primitives/application-crypto/Cargo.toml +++ b/primitives/application-crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-application-crypto" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" description = "Provides facilities for generating application specific crypto wrapper types." diff --git a/primitives/arithmetic/Cargo.toml b/primitives/arithmetic/Cargo.toml index cfaaa2ebe33..924278ce89f 100644 --- a/primitives/arithmetic/Cargo.toml +++ b/primitives/arithmetic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-arithmetic" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/authority-discovery/Cargo.toml b/primitives/authority-discovery/Cargo.toml index d7093940447..84fe003b9aa 100644 --- a/primitives/authority-discovery/Cargo.toml +++ b/primitives/authority-discovery/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-authority-discovery" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] description = "Authority discovery primitives" edition = "2018" diff --git a/primitives/authorship/Cargo.toml b/primitives/authorship/Cargo.toml index e131393ff10..16f052fe0f5 100644 --- a/primitives/authorship/Cargo.toml +++ b/primitives/authorship/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-authorship" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] description = "Authorship primitives" edition = "2018" diff --git a/primitives/block-builder/Cargo.toml b/primitives/block-builder/Cargo.toml index 1e1a23fd6eb..0c32752ed36 100644 --- a/primitives/block-builder/Cargo.toml +++ b/primitives/block-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-block-builder" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/blockchain/Cargo.toml b/primitives/blockchain/Cargo.toml index cdd31ad1af1..a31cda5c296 100644 --- a/primitives/blockchain/Cargo.toml +++ b/primitives/blockchain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-blockchain" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/consensus/aura/Cargo.toml b/primitives/consensus/aura/Cargo.toml index e2800a528a2..84b56e18c05 100644 --- a/primitives/consensus/aura/Cargo.toml +++ b/primitives/consensus/aura/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus-aura" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] description = "Primitives for Aura consensus" edition = "2018" diff --git a/primitives/consensus/babe/Cargo.toml b/primitives/consensus/babe/Cargo.toml index ddc76cc634e..291958c100c 100644 --- a/primitives/consensus/babe/Cargo.toml +++ b/primitives/consensus/babe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus-babe" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] description = "Primitives for BABE consensus" edition = "2018" diff --git a/primitives/consensus/common/Cargo.toml b/primitives/consensus/common/Cargo.toml index 8e5ddad32d0..0af3d1ad91c 100644 --- a/primitives/consensus/common/Cargo.toml +++ b/primitives/consensus/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/consensus/pow/Cargo.toml b/primitives/consensus/pow/Cargo.toml index 7a8965a4318..978e56706d5 100644 --- a/primitives/consensus/pow/Cargo.toml +++ b/primitives/consensus/pow/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus-pow" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] description = "Primitives for Aura consensus" edition = "2018" diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index 27efd587d4b..8d69110ae6d 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-core" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/debug-derive/Cargo.toml b/primitives/debug-derive/Cargo.toml index 1dfc980578d..e15ef594d31 100644 --- a/primitives/debug-derive/Cargo.toml +++ b/primitives/debug-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-debug-derive" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/externalities/Cargo.toml b/primitives/externalities/Cargo.toml index 4d654e0f947..f462b7670e8 100644 --- a/primitives/externalities/Cargo.toml +++ b/primitives/externalities/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-externalities" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" diff --git a/primitives/finality-grandpa/Cargo.toml b/primitives/finality-grandpa/Cargo.toml index c24bb6e623e..3b71946a00d 100644 --- a/primitives/finality-grandpa/Cargo.toml +++ b/primitives/finality-grandpa/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-finality-grandpa" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/finality-tracker/Cargo.toml b/primitives/finality-tracker/Cargo.toml index 2e8be7e1e5d..23f3b5e394f 100644 --- a/primitives/finality-tracker/Cargo.toml +++ b/primitives/finality-tracker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-finality-tracker" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/inherents/Cargo.toml b/primitives/inherents/Cargo.toml index 3a65576d609..94ee0b89358 100644 --- a/primitives/inherents/Cargo.toml +++ b/primitives/inherents/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-inherents" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/io/Cargo.toml b/primitives/io/Cargo.toml index ff58d03d985..be148aacffe 100644 --- a/primitives/io/Cargo.toml +++ b/primitives/io/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-io" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/keyring/Cargo.toml b/primitives/keyring/Cargo.toml index 9177c377016..1ec4ebe547f 100644 --- a/primitives/keyring/Cargo.toml +++ b/primitives/keyring/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-keyring" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/offchain/Cargo.toml b/primitives/offchain/Cargo.toml index 8e7853f6ea3..45324d368b9 100644 --- a/primitives/offchain/Cargo.toml +++ b/primitives/offchain/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate offchain workers primitives" name = "sp-offchain" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" diff --git a/primitives/panic-handler/Cargo.toml b/primitives/panic-handler/Cargo.toml index 795aa240472..592107b84f0 100644 --- a/primitives/panic-handler/Cargo.toml +++ b/primitives/panic-handler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-panic-handler" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/phragmen/Cargo.toml b/primitives/phragmen/Cargo.toml index 23b872a15cc..6a599bdabd8 100644 --- a/primitives/phragmen/Cargo.toml +++ b/primitives/phragmen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-phragmen" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/rpc/Cargo.toml b/primitives/rpc/Cargo.toml index 96945526179..13d91e71d34 100644 --- a/primitives/rpc/Cargo.toml +++ b/primitives/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-rpc" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/runtime-interface/Cargo.toml b/primitives/runtime-interface/Cargo.toml index d3b3e3120bb..5084b00289f 100644 --- a/primitives/runtime-interface/Cargo.toml +++ b/primitives/runtime-interface/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-runtime-interface" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/runtime-interface/proc-macro/Cargo.toml b/primitives/runtime-interface/proc-macro/Cargo.toml index e925f4db2e3..b18254f62fd 100644 --- a/primitives/runtime-interface/proc-macro/Cargo.toml +++ b/primitives/runtime-interface/proc-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-runtime-interface-proc-macro" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/runtime/Cargo.toml b/primitives/runtime/Cargo.toml index 37e6060bd36..dbdeeabd2fc 100644 --- a/primitives/runtime/Cargo.toml +++ b/primitives/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-runtime" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/sandbox/Cargo.toml b/primitives/sandbox/Cargo.toml index aba1bdf2453..7c797f6c0c6 100755 --- a/primitives/sandbox/Cargo.toml +++ b/primitives/sandbox/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-sandbox" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/serializer/Cargo.toml b/primitives/serializer/Cargo.toml index f71a4af678f..39f78c078b0 100644 --- a/primitives/serializer/Cargo.toml +++ b/primitives/serializer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-serializer" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/session/Cargo.toml b/primitives/session/Cargo.toml index c644ec15189..d01f7ee440c 100644 --- a/primitives/session/Cargo.toml +++ b/primitives/session/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-session" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/staking/Cargo.toml b/primitives/staking/Cargo.toml index 39f6467d435..986f7ecd7ec 100644 --- a/primitives/staking/Cargo.toml +++ b/primitives/staking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-staking" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/state-machine/Cargo.toml b/primitives/state-machine/Cargo.toml index fed71d3edce..91036d74d74 100644 --- a/primitives/state-machine/Cargo.toml +++ b/primitives/state-machine/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-state-machine" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] description = "Substrate State Machine" edition = "2018" diff --git a/primitives/std/Cargo.toml b/primitives/std/Cargo.toml index 6799540939c..38a0c713c05 100644 --- a/primitives/std/Cargo.toml +++ b/primitives/std/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-std" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/storage/Cargo.toml b/primitives/storage/Cargo.toml index 863800bf15e..7e434cdd898 100644 --- a/primitives/storage/Cargo.toml +++ b/primitives/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-storage" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" description = "Storage related primitives" diff --git a/primitives/timestamp/Cargo.toml b/primitives/timestamp/Cargo.toml index 790b6e95941..6a1a861908b 100644 --- a/primitives/timestamp/Cargo.toml +++ b/primitives/timestamp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-timestamp" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/transaction-pool/Cargo.toml b/primitives/transaction-pool/Cargo.toml index 30d60d94f1b..58023c58c4c 100644 --- a/primitives/transaction-pool/Cargo.toml +++ b/primitives/transaction-pool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-transaction-pool" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/trie/Cargo.toml b/primitives/trie/Cargo.toml index 451502618d2..db13e238319 100644 --- a/primitives/trie/Cargo.toml +++ b/primitives/trie/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-trie" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] description = "Patricia trie stuff using a parity-scale-codec node format" repository = "https://github.com/paritytech/substrate/" diff --git a/primitives/version/Cargo.toml b/primitives/version/Cargo.toml index 2b3e64e5613..d38c9d2d88f 100644 --- a/primitives/version/Cargo.toml +++ b/primitives/version/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-version" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/primitives/wasm-interface/Cargo.toml b/primitives/wasm-interface/Cargo.toml index 230ebe96246..dd3c1647f4b 100644 --- a/primitives/wasm-interface/Cargo.toml +++ b/primitives/wasm-interface/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-wasm-interface" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml index 0fb86dd0670..d3477b94a6f 100644 --- a/test-utils/Cargo.toml +++ b/test-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-test-utils" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/utils/browser/Cargo.toml b/utils/browser/Cargo.toml index 18ea9920b43..19892cb7ce8 100644 --- a/utils/browser/Cargo.toml +++ b/utils/browser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-browser-utils" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" authors = ["Parity Technologies "] description = "Utilities for creating a browser light-client." edition = "2018" diff --git a/utils/build-script-utils/Cargo.toml b/utils/build-script-utils/Cargo.toml index a380cdbf8cb..5903d107fbb 100644 --- a/utils/build-script-utils/Cargo.toml +++ b/utils/build-script-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-build-script-utils" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/utils/fork-tree/Cargo.toml b/utils/fork-tree/Cargo.toml index 57a89ad3d9d..6d9d2757f01 100644 --- a/utils/fork-tree/Cargo.toml +++ b/utils/fork-tree/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fork-tree" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/utils/frame/benchmarking-cli/Cargo.toml b/utils/frame/benchmarking-cli/Cargo.toml index 9e9e59c0adb..8d834c20a05 100644 --- a/utils/frame/benchmarking-cli/Cargo.toml +++ b/utils/frame/benchmarking-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-benchmarking-cli" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/utils/frame/rpc/support/Cargo.toml b/utils/frame/rpc/support/Cargo.toml index 6b9a26b3995..1f448816e08 100644 --- a/utils/frame/rpc/support/Cargo.toml +++ b/utils/frame/rpc/support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-frame-rpc-support" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies ", "Andrew Dirksen "] edition = "2018" license = "GPL-3.0" diff --git a/utils/frame/rpc/system/Cargo.toml b/utils/frame/rpc/system/Cargo.toml index 96399be6b86..e209a8d94b0 100644 --- a/utils/frame/rpc/system/Cargo.toml +++ b/utils/frame/rpc/system/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-frame-rpc-system" -version = "2.0.0-alpha.2" +version = "2.0.0-alpha.3" authors = ["Parity Technologies "] edition = "2018" license = "GPL-3.0" diff --git a/utils/prometheus/Cargo.toml b/utils/prometheus/Cargo.toml index 3944b35368d..bc7750a7208 100644 --- a/utils/prometheus/Cargo.toml +++ b/utils/prometheus/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Endpoint to expose Prometheus metrics" name = "substrate-prometheus-endpoint" -version = "0.8.0-alpha.2" +version = "0.8.0-alpha.3" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" -- GitLab From 6653f4b8df572dd4016b968a68d0eeeb6d75b064 Mon Sep 17 00:00:00 2001 From: Marcio Diaz Date: Fri, 28 Feb 2020 12:05:27 +0100 Subject: [PATCH 058/106] Propagate DispatchError for benchmarks. (#5075) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Propagate DispatchError for benchmarks. * Apply review suggestions. * Use RuntimeString. * fix expect Co-Authored-By: Bastian Köcher Co-authored-by: Bastian Köcher --- Cargo.lock | 1 + bin/node/runtime/src/lib.rs | 19 ++++---- frame/benchmarking/Cargo.toml | 3 +- frame/benchmarking/src/utils.rs | 3 +- utils/frame/benchmarking-cli/src/lib.rs | 58 +++++++++++++------------ 5 files changed, 46 insertions(+), 38 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 67b3cf7f47f..e32db20fd8b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1429,6 +1429,7 @@ dependencies = [ "parity-scale-codec", "sp-api", "sp-io", + "sp-runtime", "sp-runtime-interface", "sp-std", ] diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index 730a983a438..9e4496f1e9d 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -31,7 +31,8 @@ pub use node_primitives::{AccountId, Signature}; use node_primitives::{AccountIndex, Balance, BlockNumber, Hash, Index, Moment}; use sp_api::impl_runtime_apis; use sp_runtime::{ - Permill, Perbill, Percent, ApplyExtrinsicResult, impl_opaque_keys, generic, create_runtime_str, + Permill, Perbill, Percent, ApplyExtrinsicResult, RuntimeString, + impl_opaque_keys, generic, create_runtime_str, }; use sp_runtime::curve::PiecewiseLinear; use sp_runtime::transaction_validity::TransactionValidity; @@ -821,15 +822,17 @@ impl_runtime_apis! { extrinsic: Vec, steps: Vec, repeat: u32, - ) -> Option> { + ) -> Result, RuntimeString> { use frame_benchmarking::Benchmarking; - match module.as_slice() { - b"pallet-balances" | b"balances" => Balances::run_benchmark(extrinsic, steps, repeat).ok(), - b"pallet-identity" | b"identity" => Identity::run_benchmark(extrinsic, steps, repeat).ok(), - b"pallet-timestamp" | b"timestamp" => Timestamp::run_benchmark(extrinsic, steps, repeat).ok(), - _ => None, - } + let result = match module.as_slice() { + b"pallet-balances" | b"balances" => Balances::run_benchmark(extrinsic, steps, repeat), + b"pallet-identity" | b"identity" => Identity::run_benchmark(extrinsic, steps, repeat), + b"pallet-timestamp" | b"timestamp" => Timestamp::run_benchmark(extrinsic, steps, repeat), + _ => Err("Benchmark not found for this pallet."), + }; + + result.map_err(|e| e.into()) } } } diff --git a/frame/benchmarking/Cargo.toml b/frame/benchmarking/Cargo.toml index 524ecabb3cd..bd9660dc163 100644 --- a/frame/benchmarking/Cargo.toml +++ b/frame/benchmarking/Cargo.toml @@ -12,9 +12,10 @@ description = "Macro for benchmarking a FRAME runtime." codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false } sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api", default-features = false } sp-runtime-interface = { version = "2.0.0-alpha.2", path = "../../primitives/runtime-interface", default-features = false } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime", default-features = false } sp-std = { version = "2.0.0-alpha.2", path = "../../primitives/std", default-features = false } sp-io = { path = "../../primitives/io", default-features = false, version = "2.0.0-alpha.2" } [features] default = [ "std" ] -std = [ "sp-runtime-interface/std", "sp-api/std", "codec/std", "sp-std/std" ] +std = [ "sp-runtime-interface/std", "sp-runtime/std", "sp-api/std", "codec/std", "sp-std/std" ] diff --git a/frame/benchmarking/src/utils.rs b/frame/benchmarking/src/utils.rs index 9db981a61c8..f9d1ecf8cd3 100644 --- a/frame/benchmarking/src/utils.rs +++ b/frame/benchmarking/src/utils.rs @@ -19,6 +19,7 @@ use codec::{Encode, Decode}; use sp_std::vec::Vec; use sp_io::hashing::blake2_256; +use sp_runtime::RuntimeString; /// An alphabet of possible parameters to use for benchmarking. #[derive(codec::Encode, codec::Decode, Clone, Copy, PartialEq, Debug)] @@ -42,7 +43,7 @@ sp_api::decl_runtime_apis! { extrinsic: Vec, steps: Vec, repeat: u32, - ) -> Option>; + ) -> Result, RuntimeString>; } } diff --git a/utils/frame/benchmarking-cli/src/lib.rs b/utils/frame/benchmarking-cli/src/lib.rs index b2f360e584e..b09b1bad627 100644 --- a/utils/frame/benchmarking-cli/src/lib.rs +++ b/utils/frame/benchmarking-cli/src/lib.rs @@ -109,34 +109,36 @@ impl BenchmarkCmd { ) .execute(strategy.into()) .map_err(|e| format!("Error executing runtime benchmark: {:?}", e))?; - let results = > as Decode>::decode(&mut &result[..]) - .unwrap_or(None); - - if let Some(results) = results { - // Print benchmark metadata - println!( - "Pallet: {:?}, Extrinsic: {:?}, Steps: {:?}, Repeat: {:?}", - self.pallet, - self.extrinsic, - self.steps, - self.repeat, - ); - - // Print the table header - results[0].0.iter().for_each(|param| print!("{:?},", param.0)); - - print!("extrinsic_time,storage_root_time\n"); - // Print the values - results.iter().for_each(|result| { - let parameters = &result.0; - parameters.iter().for_each(|param| print!("{:?},", param.1)); - // Print extrinsic time and storage root time - print!("{:?},{:?}\n", result.1, result.2); - }); - - eprintln!("Done."); - } else { - eprintln!("No Results."); + + let results = , String> as Decode>::decode(&mut &result[..]) + .map_err(|e| format!("Failed to decode benchmark results: {:?}", e))?; + + match results { + Ok(results) => { + // Print benchmark metadata + println!( + "Pallet: {:?}, Extrinsic: {:?}, Steps: {:?}, Repeat: {:?}", + self.pallet, + self.extrinsic, + self.steps, + self.repeat, + ); + + // Print the table header + results[0].0.iter().for_each(|param| print!("{:?},", param.0)); + + print!("extrinsic_time,storage_root_time\n"); + // Print the values + results.iter().for_each(|result| { + let parameters = &result.0; + parameters.iter().for_each(|param| print!("{:?},", param.1)); + // Print extrinsic time and storage root time + print!("{:?},{:?}\n", result.1, result.2); + }); + + eprintln!("Done."); + } + Err(error) => eprintln!("Error: {:?}", error), } Ok(()) -- GitLab From 6b27391d8207610a7e632bcca7ef2cc8424b5351 Mon Sep 17 00:00:00 2001 From: Marcio Diaz Date: Fri, 28 Feb 2020 15:40:42 +0100 Subject: [PATCH 059/106] Add options to overwrite range bounds in benchmark command. (#5072) * Add --mins --maxs to benchmark command. * Apply review suggestions. --- bin/node/runtime/src/lib.rs | 26 +++++++++++++++-- frame/benchmarking/src/lib.rs | 38 ++++++++++++++++++------- frame/benchmarking/src/utils.rs | 12 +++++++- utils/frame/benchmarking-cli/src/lib.rs | 21 ++++++++++++-- 4 files changed, 81 insertions(+), 16 deletions(-) diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index 9e4496f1e9d..ae8251f6209 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -820,15 +820,35 @@ impl_runtime_apis! { fn dispatch_benchmark( module: Vec, extrinsic: Vec, + lowest_range_values: Vec, + highest_range_values: Vec, steps: Vec, repeat: u32, ) -> Result, RuntimeString> { use frame_benchmarking::Benchmarking; let result = match module.as_slice() { - b"pallet-balances" | b"balances" => Balances::run_benchmark(extrinsic, steps, repeat), - b"pallet-identity" | b"identity" => Identity::run_benchmark(extrinsic, steps, repeat), - b"pallet-timestamp" | b"timestamp" => Timestamp::run_benchmark(extrinsic, steps, repeat), + b"pallet-balances" | b"balances" => Balances::run_benchmark( + extrinsic, + lowest_range_values, + highest_range_values, + steps, + repeat, + ), + b"pallet-identity" | b"identity" => Identity::run_benchmark( + extrinsic, + lowest_range_values, + highest_range_values, + steps, + repeat, + ), + b"pallet-timestamp" | b"timestamp" => Timestamp::run_benchmark( + extrinsic, + lowest_range_values, + highest_range_values, + steps, + repeat, + ), _ => Err("Benchmark not found for this pallet."), }; diff --git a/frame/benchmarking/src/lib.rs b/frame/benchmarking/src/lib.rs index e6b6a4f3f59..d979000432c 100644 --- a/frame/benchmarking/src/lib.rs +++ b/frame/benchmarking/src/lib.rs @@ -140,7 +140,13 @@ macro_rules! impl_benchmark { $( $name:ident ),* ) => { impl $crate::Benchmarking<$crate::BenchmarkResults> for Module { - fn run_benchmark(extrinsic: Vec, steps: Vec, repeat: u32) -> Result, &'static str> { + fn run_benchmark( + extrinsic: Vec, + lowest_range_values: Vec, + highest_range_values: Vec, + steps: Vec, + repeat: u32, + ) -> Result, &'static str> { // Map the input to the selected benchmark. let extrinsic = sp_std::str::from_utf8(extrinsic.as_slice()) .map_err(|_| "Could not find extrinsic")?; @@ -157,26 +163,38 @@ macro_rules! impl_benchmark { let mut results: Vec<$crate::BenchmarkResults> = Vec::new(); // Default number of steps for a component. - let mut prev_steps = &10; + let mut prev_steps = 10; // Select the component we will be benchmarking. Each component will be benchmarked. for (idx, (name, low, high)) in components.iter().enumerate() { // Get the number of steps for this component. - let steps = steps.get(idx).unwrap_or(&prev_steps); + let steps = steps.get(idx).cloned().unwrap_or(prev_steps); prev_steps = steps; + let lowest = lowest_range_values.get(idx).cloned().unwrap_or(*low); + let highest = highest_range_values.get(idx).cloned().unwrap_or(*high); + + let diff = highest - lowest; + // Create up to `STEPS` steps for that component between high and low. - let step_size = ((high - low) / steps).max(1); - let num_of_steps = (high - low) / step_size + 1; + let step_size = (diff / steps).max(1); + let num_of_steps = diff / step_size + 1; + for s in 0..num_of_steps { // This is the value we will be testing for component `name` - let component_value = low + step_size * s; + let component_value = lowest + step_size * s; - // Select the mid value for all the other components. + // Select the max value for all the other components. let c: Vec<($crate::BenchmarkParameter, u32)> = components.iter() - .map(|(n, l, h)| - (*n, if n == name { component_value } else { *h }) - ).collect(); + .enumerate() + .map(|(idx, (n, l, h))| + if n == name { + (*n, component_value) + } else { + (*n, *highest_range_values.get(idx).unwrap_or(h)) + } + ) + .collect(); // Run the benchmark `repeat` times. for _ in 0..repeat { diff --git a/frame/benchmarking/src/utils.rs b/frame/benchmarking/src/utils.rs index f9d1ecf8cd3..87996c3f574 100644 --- a/frame/benchmarking/src/utils.rs +++ b/frame/benchmarking/src/utils.rs @@ -41,6 +41,8 @@ sp_api::decl_runtime_apis! { fn dispatch_benchmark( module: Vec, extrinsic: Vec, + lowest_range_values: Vec, + highest_range_values: Vec, steps: Vec, repeat: u32, ) -> Result, RuntimeString>; @@ -78,8 +80,16 @@ pub trait Benchmarking { /// Parameters /// - `extrinsic`: The name of extrinsic function you want to benchmark encoded as bytes. /// - `steps`: The number of sample points you want to take across the range of parameters. + /// - `lowest_range_values`: The lowest number for each range of parameters. + /// - `highest_range_values`: The highest number for each range of parameters. /// - `repeat`: The number of times you want to repeat a benchmark. - fn run_benchmark(extrinsic: Vec, steps: Vec, repeat: u32) -> Result, &'static str>; + fn run_benchmark( + extrinsic: Vec, + lowest_range_values: Vec, + highest_range_values: Vec, + steps: Vec, + repeat: u32, + ) -> Result, &'static str>; } /// The required setup for creating a benchmark. diff --git a/utils/frame/benchmarking-cli/src/lib.rs b/utils/frame/benchmarking-cli/src/lib.rs index b09b1bad627..899419e5de5 100644 --- a/utils/frame/benchmarking-cli/src/lib.rs +++ b/utils/frame/benchmarking-cli/src/lib.rs @@ -39,6 +39,14 @@ pub struct BenchmarkCmd { #[structopt(short, long, use_delimiter = true)] pub steps: Vec, + /// Indicates lowest values for each of the component ranges. + #[structopt(long, use_delimiter = true)] + pub lowest_range_values: Vec, + + /// Indicates highest values for each of the component ranges. + #[structopt(long, use_delimiter = true)] + pub highest_range_values: Vec, + /// Select how many repetitions of this benchmark should run. #[structopt(short, long, default_value = "1")] pub repeat: u32, @@ -104,7 +112,14 @@ impl BenchmarkCmd { &mut changes, &executor, "Benchmark_dispatch_benchmark", - &(&self.pallet, &self.extrinsic, self.steps.clone(), self.repeat).encode(), + &( + &self.pallet, + &self.extrinsic, + self.lowest_range_values.clone(), + self.highest_range_values.clone(), + self.steps.clone(), + self.repeat, + ).encode(), Default::default(), ) .execute(strategy.into()) @@ -117,9 +132,11 @@ impl BenchmarkCmd { Ok(results) => { // Print benchmark metadata println!( - "Pallet: {:?}, Extrinsic: {:?}, Steps: {:?}, Repeat: {:?}", + "Pallet: {:?}, Extrinsic: {:?}, Lowest values: {:?}, Highest values: {:?}, Steps: {:?}, Repeat: {:?}", self.pallet, self.extrinsic, + self.lowest_range_values, + self.highest_range_values, self.steps, self.repeat, ); -- GitLab From b5ec7d412d27feafad79a7c94b6f6451f0efc04f Mon Sep 17 00:00:00 2001 From: Toralf Wittner Date: Fri, 28 Feb 2020 15:41:10 +0100 Subject: [PATCH 060/106] Update yamux to version 0.4.4. (#5086) --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e32db20fd8b..74d952d36fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9120,9 +9120,9 @@ checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" [[package]] name = "yamux" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d73295bc9d9acf89dd9336b3b5f5b57731ee72b587857dd4312721a0196b48e5" +checksum = "f03098897b734bd943ab23f6aa9f98aafd72a88516deedd66f9d564c57bf2f19" dependencies = [ "bytes 0.5.4", "futures 0.3.4", -- GitLab From 29cee59229626644c549e36e7921fca42bed68da Mon Sep 17 00:00:00 2001 From: Ashley Date: Fri, 28 Feb 2020 17:02:33 +0100 Subject: [PATCH 061/106] Remove more instances of futures01 (#4633) * Start removing last few instances of futures01 * Use to_poll on wasm * Revert "Use to_poll on wasm" This reverts commit 1c61728f10d520df5f9b28c415a0db68e478b9c7. * Fix fg test * Upgrade network test futures * Update offchain hyper version * Update service test * bump tokio to 0.2.10 * Removed some unneeded tokios * fixes * fix run_until_all_full * Make service test debuggable * Update client/offchain/src/api/http.rs Co-Authored-By: Demi Obenour <48690212+DemiMarie-parity@users.noreply.github.com> * Add service_test to test-int output * nitpicking * Finally fix test * Give up and revert client/serviec/test * Revert gitlab ci too Co-authored-by: Demi Obenour --- Cargo.lock | 211 ++++++++++---------- client/consensus/aura/Cargo.toml | 2 - client/consensus/aura/src/lib.rs | 30 ++- client/consensus/babe/Cargo.toml | 2 - client/consensus/babe/src/lib.rs | 2 +- client/consensus/babe/src/tests.rs | 35 ++-- client/finality-grandpa/Cargo.toml | 3 +- client/finality-grandpa/src/tests.rs | 129 ++++++------- client/network/test/Cargo.toml | 4 +- client/network/test/src/lib.rs | 63 +++--- client/network/test/src/sync.rs | 278 ++++++++++++--------------- client/service/Cargo.toml | 1 - client/service/src/lib.rs | 6 +- client/service/src/status_sinks.rs | 31 +-- utils/frame/rpc/support/Cargo.toml | 2 +- utils/frame/rpc/support/src/lib.rs | 4 +- 16 files changed, 367 insertions(+), 436 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 74d952d36fc..815981e2fc2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -61,9 +61,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743ad5a418686aad3b87fd14c43badd828cf26e214a00f92a384291cf22e1811" +checksum = "d5e63fd144e18ba274ae7095c0197a870a7b9468abc801dd62f190d80817d2ec" dependencies = [ "memchr", ] @@ -886,33 +886,36 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acec9a3b0b3559f15aee4f90746c4e5e293b701c0f7d3925d24e01645267b68c" +checksum = "cced8691919c02aac3cb0a1bc2e9b73d89e832bf9a06fc579d4e71b68a2da061" dependencies = [ "crossbeam-utils", + "maybe-uninit", ] [[package]] name = "crossbeam-deque" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca" +checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" dependencies = [ "crossbeam-epoch", "crossbeam-utils", + "maybe-uninit", ] [[package]] name = "crossbeam-epoch" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" +checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "autocfg 0.1.7", + "autocfg 1.0.0", "cfg-if", "crossbeam-utils", "lazy_static", + "maybe-uninit", "memoffset", "scopeguard", ] @@ -929,11 +932,11 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" +checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg 0.1.7", + "autocfg 1.0.0", "cfg-if", "lazy_static", ] @@ -969,9 +972,9 @@ dependencies = [ [[package]] name = "csv-core" -version = "0.1.6" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b5cadb6b25c77aeff80ba701712494213f4a8418fcda2ee11b6560c3ad0bf4c" +checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" dependencies = [ "memchr", ] @@ -987,9 +990,9 @@ dependencies = [ [[package]] name = "ctor" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8ce37ad4184ab2ce004c33bf6379185d3b1c95801cab51026bd271bf68eedc" +checksum = "47c5e5ac752e18207b12e16b10631ae5f7f68f8805f335f9b817ead83d9ffce1" dependencies = [ "quote", "syn", @@ -1043,15 +1046,15 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" +checksum = "11c0346158a19b3627234e15596f5e465c360fcdb97d817bcb255e0510f5a788" [[package]] name = "derive_more" -version = "0.99.2" +version = "0.99.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2159be042979966de68315bce7034bb000c775f22e3e834e1c52ff78f041cae8" +checksum = "a806e96c59a76a5ba6e18735b6cf833344671e61e7863f2edb5c518ea2cac95c" dependencies = [ "proc-macro2", "quote", @@ -1752,9 +1755,9 @@ checksum = "a1de7508b218029b0f01662ed8f61b1c964b3ae99d6f25462d0f55a595109df6" [[package]] name = "futures-timer" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3de1a2b2a2a33d9e60e17980b60ee061eeaae96a5abe9121db0fdb9af167a1c5" +checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" dependencies = [ "gloo-timers", "send_wrapper 0.4.0", @@ -1959,7 +1962,7 @@ dependencies = [ "indexmap", "log 0.4.8", "slab", - "tokio 0.2.11", + "tokio 0.2.12", "tokio-util", ] @@ -1999,18 +2002,18 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772" +checksum = "1010591b26bbfe835e9faeabeb11866061cc7dcebffd56ad7d0942d0e61aefd8" dependencies = [ "libc", ] [[package]] name = "hex" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cdda6bf525062a0c9e8f14ee2b37935c86b8efb6c8b69b3c83dfb518a914af" +checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" [[package]] name = "hex-literal" @@ -2179,7 +2182,7 @@ dependencies = [ "net2", "pin-project", "time", - "tokio 0.2.11", + "tokio 0.2.12", "tower-service", "want 0.3.0", ] @@ -2196,7 +2199,7 @@ dependencies = [ "hyper 0.13.2", "rustls", "rustls-native-certs", - "tokio 0.2.11", + "tokio 0.2.12", "tokio-rustls", "webpki", ] @@ -2646,7 +2649,7 @@ dependencies = [ "ed25519-dalek", "fnv", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "lazy_static", "libsecp256k1", "log 0.4.8", @@ -2943,7 +2946,7 @@ checksum = "f9e80ad4e3535345f3d666554ce347d3100453775611c05c60786bf9a1747a10" dependencies = [ "async-std", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "get_if_addrs", "ipnet", "libp2p-core", @@ -3127,9 +3130,6 @@ name = "memchr" version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" -dependencies = [ - "libc", -] [[package]] name = "memoffset" @@ -3819,9 +3819,9 @@ dependencies = [ [[package]] name = "owning_ref" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" +checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" dependencies = [ "stable_deref_trait", ] @@ -4712,9 +4712,9 @@ dependencies = [ [[package]] name = "paste" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "423a519e1c6e828f1e73b720f9d9ed2fa643dce8a7737fb43235ce0b41eeaa49" +checksum = "63e1afe738d71b1ebab5f1207c055054015427dbfc7bbe9ee1266894156ec046" dependencies = [ "paste-impl", "proc-macro-hack", @@ -4722,9 +4722,9 @@ dependencies = [ [[package]] name = "paste-impl" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4214c9e912ef61bf42b81ba9a47e8aad1b2ffaf739ab162bf96d1e011f54e6c5" +checksum = "6d4dc4a7f6f743211c5aab239640a65091535d97d43d92a52bca435a640892bb" dependencies = [ "proc-macro-hack", "proc-macro2", @@ -4840,9 +4840,9 @@ checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" [[package]] name = "predicates" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9bfe52247e5cc9b2f943682a85a5549fb9662245caf094504e69a2f03fe64d4" +checksum = "1188bf092c81c18228c383b190c069a8a613c18a046ffa9fdfc0f5fc8fb2da8a" dependencies = [ "difference", "predicates-core", @@ -4900,9 +4900,9 @@ dependencies = [ [[package]] name = "proc-macro-error" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875077759af22fa20b610ad4471d8155b321c89c3f2785526c9839b099be4e0a" +checksum = "052b3c9af39c7e5e94245f820530487d19eb285faedcb40e0c3275132293f242" dependencies = [ "proc-macro-error-attr", "proc-macro2", @@ -4913,9 +4913,9 @@ dependencies = [ [[package]] name = "proc-macro-error-attr" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5717d9fa2664351a01ed73ba5ef6df09c01a521cb42cb65a061432a826f3c7a" +checksum = "d175bef481c7902e63e3165627123fff3502f06ac043d3ef42d08c1246da9253" dependencies = [ "proc-macro2", "quote", @@ -4943,9 +4943,9 @@ checksum = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" [[package]] name = "proc-macro2" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" +checksum = "6c09721c6781493a2a492a96b5a5bf19b65917fe6728884e7c44dd0c60ca3435" dependencies = [ "unicode-xid", ] @@ -5548,7 +5548,7 @@ dependencies = [ "derive_more", "env_logger 0.7.1", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "libp2p", "log 0.4.8", "parity-scale-codec", @@ -5667,7 +5667,7 @@ dependencies = [ "substrate-prometheus-endpoint", "tempfile", "time", - "tokio 0.2.11", + "tokio 0.2.12", ] [[package]] @@ -5775,9 +5775,8 @@ version = "0.8.0-alpha.3" dependencies = [ "derive_more", "env_logger 0.7.1", - "futures 0.1.29", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "log 0.4.8", "parity-scale-codec", "parking_lot 0.10.0", @@ -5805,7 +5804,6 @@ dependencies = [ "sp-version", "substrate-test-runtime-client", "tempfile", - "tokio 0.1.22", ] [[package]] @@ -5815,9 +5813,8 @@ dependencies = [ "derive_more", "env_logger 0.7.1", "fork-tree", - "futures 0.1.29", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "log 0.4.8", "merlin", "num-bigint", @@ -5856,7 +5853,6 @@ dependencies = [ "sp-version", "substrate-test-runtime-client", "tempfile", - "tokio 0.1.22", ] [[package]] @@ -5921,7 +5917,7 @@ dependencies = [ "substrate-test-runtime-client", "substrate-test-runtime-transaction-pool", "tempfile", - "tokio 0.2.11", + "tokio 0.2.12", ] [[package]] @@ -5949,7 +5945,7 @@ name = "sc-consensus-slots" version = "0.8.0-alpha.3" dependencies = [ "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "log 0.4.8", "parity-scale-codec", "parking_lot 0.10.0", @@ -6066,9 +6062,8 @@ dependencies = [ "env_logger 0.7.1", "finality-grandpa", "fork-tree", - "futures 0.1.29", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "log 0.4.8", "parity-scale-codec", "parking_lot 0.10.0", @@ -6097,7 +6092,7 @@ dependencies = [ "sp-state-machine", "substrate-test-runtime-client", "tempfile", - "tokio 0.1.22", + "tokio 0.2.12", ] [[package]] @@ -6146,7 +6141,7 @@ dependencies = [ "fnv", "fork-tree", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "futures_codec", "libp2p", "linked-hash-map", @@ -6194,7 +6189,7 @@ name = "sc-network-gossip" version = "0.8.0-alpha.3" dependencies = [ "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "libp2p", "log 0.4.8", "lru", @@ -6209,9 +6204,8 @@ name = "sc-network-test" version = "0.8.0-dev" dependencies = [ "env_logger 0.7.1", - "futures 0.1.29", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "libp2p", "log 0.4.8", "parking_lot 0.10.0", @@ -6228,7 +6222,6 @@ dependencies = [ "substrate-test-runtime", "substrate-test-runtime-client", "tempfile", - "tokio 0.1.22", ] [[package]] @@ -6239,7 +6232,7 @@ dependencies = [ "env_logger 0.7.1", "fnv", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "hyper 0.13.2", "hyper-rustls", "log 0.4.8", @@ -6259,7 +6252,7 @@ dependencies = [ "sp-transaction-pool", "substrate-test-runtime-client", "threadpool", - "tokio 0.2.11", + "tokio 0.2.12", ] [[package]] @@ -6369,7 +6362,7 @@ dependencies = [ "futures 0.1.29", "futures 0.3.4", "futures-diagnose", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "lazy_static", "log 0.4.8", "parity-multiaddr 0.5.0", @@ -6408,7 +6401,6 @@ dependencies = [ "substrate-test-runtime-client", "sysinfo", "target_info", - "tokio 0.2.11", "tracing", "wasm-timer", ] @@ -6450,7 +6442,7 @@ version = "2.0.0-alpha.3" dependencies = [ "bytes 0.5.4", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "libp2p", "log 0.4.8", "parking_lot 0.10.0", @@ -6556,9 +6548,9 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scroll" @@ -6676,9 +6668,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.47" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15913895b61e0be854afd32fd4163fcd2a3df34142cf2cb961b310ce694cbf90" +checksum = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" dependencies = [ "itoa", "ryu", @@ -7009,7 +7001,7 @@ dependencies = [ "derive_more", "futures 0.3.4", "futures-diagnose", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "libp2p", "log 0.4.8", "parity-scale-codec", @@ -7592,7 +7584,7 @@ dependencies = [ "console_log", "futures 0.1.29", "futures 0.3.4", - "futures-timer 3.0.1", + "futures-timer 3.0.2", "js-sys", "kvdb-web", "libp2p", @@ -7624,7 +7616,7 @@ dependencies = [ "sc-rpc-api", "serde", "sp-storage", - "tokio 0.1.22", + "tokio 0.2.12", ] [[package]] @@ -7660,7 +7652,7 @@ dependencies = [ "hyper 0.13.2", "log 0.4.8", "prometheus", - "tokio 0.2.11", + "tokio 0.2.12", ] [[package]] @@ -7791,9 +7783,9 @@ checksum = "7c65d530b10ccaeac294f349038a597e435b18fb456aadd0840a623f83b9e941" [[package]] name = "syn" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a0294dc449adc58bb6592fff1a23d3e5e6e235afc6a0ffca2657d19e7bbffe5" +checksum = "123bd9499cfb380418d509322d7a6d52e5315f064fe4b3ad18a53d6b92c07859" dependencies = [ "proc-macro2", "quote", @@ -7901,18 +7893,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "205684fd018ca14432b12cce6ea3d46763311a571c3d294e71ba3f01adcf1aad" +checksum = "ee14bf8e6767ab4c687c9e8bc003879e042a96fd67a3ba5934eadb6536bef4db" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e4d2e50ca050ed44fb58309bdce3efa79948f84f9993ad1978de5eebdce5a7" +checksum = "a7b51e1fbc44b5a0840be594fbc0f960be09050f2617e61e6aa43bef97cd3ef4" dependencies = [ "proc-macro2", "quote", @@ -7950,9 +7942,9 @@ dependencies = [ [[package]] name = "tiny-bip39" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd1fb03fe8e07d17cd851a624a9fff74642a997b67fbd1ccd77533241640d92" +checksum = "a6848cd8f566953ce1e8faeba12ee23cbdbb0437754792cd857d44628b5685e3" dependencies = [ "failure", "hmac", @@ -7961,6 +7953,7 @@ dependencies = [ "rand 0.7.3", "rustc-hash", "sha2", + "unicode-normalization", ] [[package]] @@ -8017,9 +8010,9 @@ dependencies = [ [[package]] name = "tokio" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fdd17989496f49cdc57978c96f0c9fe5e4a58a8bddc6813c449a4624f6a030b" +checksum = "b34bee1facdc352fba10c9c58b654e6ecb6a2250167772bf86071f7c5f2f5061" dependencies = [ "bytes 0.5.4", "fnv", @@ -8114,9 +8107,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4b1e7ed7d5d4c2af3d999904b0eebe76544897cdbfb2b9684bed2174ab20f7c" +checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" dependencies = [ "proc-macro2", "quote", @@ -8150,7 +8143,7 @@ checksum = "141afec0978abae6573065a48882c6bae44c5cc61db9b511ac4abf6a09bfd9cc" dependencies = [ "futures-core", "rustls", - "tokio 0.2.11", + "tokio 0.2.12", "webpki", ] @@ -8273,7 +8266,7 @@ dependencies = [ "futures-sink", "log 0.4.8", "pin-project-lite", - "tokio 0.2.11", + "tokio 0.2.12", ] [[package]] @@ -8293,9 +8286,9 @@ checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" [[package]] name = "tracing" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e213bd24252abeb86a0b7060e02df677d367ce6cb772cef17e9214b8390a8d3" +checksum = "1721cc8cf7d770cc4257872507180f35a4797272f5962f24c806af9e7faf52ab" dependencies = [ "cfg-if", "tracing-attributes", @@ -8304,9 +8297,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cfd395def5a60236e187e1ff905cb55668a59f29928dec05e6e1b1fd2ac1f3" +checksum = "7fbad39da2f9af1cae3016339ad7f2c7a9e870f12e8fd04c4fd7ef35b30c0d2b" dependencies = [ "quote", "syn", @@ -8314,9 +8307,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a46f11e372b8bd4b4398ea54353412fdd7fd42a8370c7e543e218cf7661978" +checksum = "0aa83a9a47081cd522c09c81b31aec2c9273424976f922ad61c053b58350b715" dependencies = [ "lazy_static", ] @@ -8787,9 +8780,9 @@ checksum = "073da89bf1c84db000dd68ce660c1b4a08e3a2d28fd1e3394ab9e7abdde4a0f8" [[package]] name = "wasmparser" -version = "0.51.1" +version = "0.51.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e41b27a1677fe28c115de49efca55dabb14f7fece2c32947ffb9b1064fe5bd4" +checksum = "aeb1956b19469d1c5e63e459d29e7b5aa0f558d9f16fcef09736f8a265e6c10a" [[package]] name = "wasmtime" @@ -8805,7 +8798,7 @@ dependencies = [ "region", "rustc-demangle", "target-lexicon", - "wasmparser 0.51.1", + "wasmparser 0.51.4", "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", @@ -8825,7 +8818,7 @@ dependencies = [ "more-asserts", "target-lexicon", "thiserror", - "wasmparser 0.51.1", + "wasmparser 0.51.4", "wasmtime-environ", ] @@ -8853,7 +8846,7 @@ dependencies = [ "sha2", "thiserror", "toml", - "wasmparser 0.51.1", + "wasmparser 0.51.4", "winapi 0.3.8", "zstd", ] @@ -8875,7 +8868,7 @@ dependencies = [ "region", "target-lexicon", "thiserror", - "wasmparser 0.51.1", + "wasmparser 0.51.4", "wasmtime-debug", "wasmtime-environ", "wasmtime-runtime", @@ -8903,18 +8896,18 @@ dependencies = [ [[package]] name = "wast" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12a729d076deb29c8509fa71f2d427729f9394f9496844ed8fcab152f35d163d" +checksum = "ee7b16105405ca2aa2376ba522d8d4b1a11604941dd3bb7df9fd2ece60f8d16a" dependencies = [ "leb128", ] [[package]] name = "wat" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5795e34a4b39893653dec97e644fac85c31398e0ce1abecc48967aac83d9e8ce" +checksum = "56173f7f4fb59aebe35a7e71423845e1c6c7144bfb56362d497931b6b3bed0f6" dependencies = [ "wast", ] diff --git a/client/consensus/aura/Cargo.toml b/client/consensus/aura/Cargo.toml index 0a7a7176c73..e5b5975ca3f 100644 --- a/client/consensus/aura/Cargo.toml +++ b/client/consensus/aura/Cargo.toml @@ -40,7 +40,5 @@ sc-network = { version = "0.8.0-alpha.2", path = "../../network" } sc-network-test = { version = "0.8.0-dev", path = "../../network/test" } sc-service = { version = "0.8.0-alpha.2", path = "../../service" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } -tokio = "0.1.22" env_logger = "0.7.0" tempfile = "3.1.0" -futures01 = { package = "futures", version = "0.1" } diff --git a/client/consensus/aura/src/lib.rs b/client/consensus/aura/src/lib.rs index 355c0586450..58502286285 100644 --- a/client/consensus/aura/src/lib.rs +++ b/client/consensus/aura/src/lib.rs @@ -829,10 +829,10 @@ mod tests { use sp_runtime::traits::{Block as BlockT, DigestFor}; use sc_network::config::ProtocolConfig; use parking_lot::Mutex; - use tokio::runtime::current_thread; use sp_keyring::sr25519::Keyring; use sc_client::BlockchainEvents; use sp_consensus_aura::sr25519::AuthorityPair; + use std::task::Poll; type Error = sp_blockchain::Error; @@ -950,8 +950,8 @@ mod tests { let net = Arc::new(Mutex::new(net)); let mut import_notifications = Vec::new(); + let mut aura_futures = Vec::new(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut keystore_paths = Vec::new(); for (peer_id, key) in peers { let mut net = net.lock(); @@ -979,7 +979,7 @@ mod tests { &inherent_data_providers, slot_duration.get() ).expect("Registers aura inherent data provider"); - let aura = start_aura::<_, _, _, _, _, AuthorityPair, _, _, _>( + aura_futures.push(start_aura::<_, _, _, _, _, AuthorityPair, _, _, _>( slot_duration, client.clone(), select_chain, @@ -990,21 +990,19 @@ mod tests { false, keystore, sp_consensus::AlwaysCanAuthor, - ) - .expect("Starts aura") - .unit_error() - .compat(); - - runtime.spawn(aura); + ).expect("Starts aura")); } - runtime.spawn(futures01::future::poll_fn(move || { - net.lock().poll(); - Ok::<_, ()>(futures01::Async::NotReady::<()>) - })); - - runtime.block_on(future::join_all(import_notifications) - .unit_error().compat()).unwrap(); + futures::executor::block_on(future::select( + future::poll_fn(move |cx| { + net.lock().poll(cx); + Poll::<()>::Pending + }), + future::select( + future::join_all(aura_futures), + future::join_all(import_notifications) + ) + )); } #[test] diff --git a/client/consensus/babe/Cargo.toml b/client/consensus/babe/Cargo.toml index b465ed1f134..c6d61eb5ec4 100644 --- a/client/consensus/babe/Cargo.toml +++ b/client/consensus/babe/Cargo.toml @@ -54,10 +54,8 @@ sc-network-test = { version = "0.8.0-dev", path = "../../network/test" } sc-service = { version = "0.8.0-alpha.2", path = "../../service" } substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } sc-block-builder = { version = "0.8.0-alpha.2", path = "../../block-builder" } -tokio = "0.1.22" env_logger = "0.7.0" tempfile = "3.1.0" -futures01 = { package = "futures", version = "0.1" } [features] test-helpers = [] diff --git a/client/consensus/babe/src/lib.rs b/client/consensus/babe/src/lib.rs index 000642fec4a..967a78e7bfc 100644 --- a/client/consensus/babe/src/lib.rs +++ b/client/consensus/babe/src/lib.rs @@ -318,7 +318,7 @@ pub struct BabeParams { pub can_author_with: CAW, } -/// Start the babe worker. The returned future should be run in a tokio runtime. +/// Start the babe worker. pub fn start_babe(BabeParams { keystore, client, diff --git a/client/consensus/babe/src/tests.rs b/client/consensus/babe/src/tests.rs index 9331319d55e..a5493918f00 100644 --- a/client/consensus/babe/src/tests.rs +++ b/client/consensus/babe/src/tests.rs @@ -32,10 +32,9 @@ use sc_network_test::*; use sc_network_test::{Block as TestBlock, PeersClient}; use sc_network::config::{BoxFinalityProofRequestBuilder, ProtocolConfig}; use sp_runtime::{generic::DigestItem, traits::{Block as BlockT, DigestFor}}; -use tokio::runtime::current_thread; use sc_client_api::{BlockchainEvents, backend::TransactionFor}; use log::debug; -use std::{time::Duration, cell::RefCell}; +use std::{time::Duration, cell::RefCell, task::Poll}; type Item = DigestItem; @@ -354,7 +353,7 @@ fn run_one_test( let net = Arc::new(Mutex::new(net)); let mut import_notifications = Vec::new(); - let mut runtime = current_thread::Runtime::new().unwrap(); + let mut babe_futures = Vec::new(); let mut keystore_paths = Vec::new(); for (peer_id, seed) in peers { @@ -399,7 +398,7 @@ fn run_one_test( ); - runtime.spawn(start_babe(BabeParams { + babe_futures.push(start_babe(BabeParams { block_import: data.block_import.lock().take().expect("import set up during init"), select_chain, client, @@ -410,23 +409,23 @@ fn run_one_test( babe_link: data.link.clone(), keystore, can_author_with: sp_consensus::AlwaysCanAuthor, - }).expect("Starts babe").unit_error().compat()); + }).expect("Starts babe")); } - runtime.spawn(futures01::future::poll_fn(move || { - let mut net = net.lock(); - net.poll(); - for p in net.peers() { - for (h, e) in p.failed_verifications() { - panic!("Verification failed for {:?}: {}", h, e); + futures::executor::block_on(future::select( + futures::future::poll_fn(move |cx| { + let mut net = net.lock(); + net.poll(cx); + for p in net.peers() { + for (h, e) in p.failed_verifications() { + panic!("Verification failed for {:?}: {}", h, e); + } } - } - - Ok::<_, ()>(futures01::Async::NotReady::<()>) - })); - - runtime.block_on(future::join_all(import_notifications) - .unit_error().compat()).unwrap(); + + Poll::<()>::Pending + }), + future::select(future::join_all(import_notifications), future::join_all(babe_futures)) + )); } #[test] diff --git a/client/finality-grandpa/Cargo.toml b/client/finality-grandpa/Cargo.toml index 7dea004eff4..8dcc24c3da1 100644 --- a/client/finality-grandpa/Cargo.toml +++ b/client/finality-grandpa/Cargo.toml @@ -48,7 +48,6 @@ substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-uti sp-consensus-babe = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/babe" } sp-state-machine = { version = "0.8.0-alpha.2", path = "../../primitives/state-machine" } env_logger = "0.7.0" -tokio = "0.1.22" +tokio = { version = "0.2", features = ["rt-core"] } tempfile = "3.1.0" sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api" } -futures01 = { package = "futures", version = "0.1.29" } diff --git a/client/finality-grandpa/src/tests.rs b/client/finality-grandpa/src/tests.rs index 6b9ab5e1f2f..6e81c2f00af 100644 --- a/client/finality-grandpa/src/tests.rs +++ b/client/finality-grandpa/src/tests.rs @@ -25,7 +25,7 @@ use sc_network_test::{ use sc_network::config::{ProtocolConfig, Roles, BoxFinalityProofRequestBuilder}; use parking_lot::Mutex; use futures_timer::Delay; -use tokio::runtime::current_thread; +use tokio::runtime::{Runtime, Handle}; use sp_keyring::Ed25519Keyring; use sc_client::LongestChain; use sc_client_api::backend::TransactionFor; @@ -47,8 +47,6 @@ use sp_runtime::generic::{BlockId, DigestItem}; use sp_core::{H256, NativeOrEncoded, ExecutionContext, crypto::Public}; use sp_finality_grandpa::{GRANDPA_ENGINE_ID, AuthorityList, GrandpaApi}; use sp_state_machine::{InMemoryBackend, prove_read, read_proof_check}; -use futures01::Async; -use futures::compat::Future01CompatExt; use authorities::AuthoritySet; use finality_proof::{ @@ -370,27 +368,25 @@ fn create_keystore(authority: Ed25519Keyring) -> (KeyStorePtr, tempfile::TempDir (keystore, keystore_path) } -fn block_until_complete(future: impl Future + Unpin, net: &Arc>, runtime: &mut current_thread::Runtime) { - let drive_to_completion = futures01::future::poll_fn(|| { - net.lock().poll(); Ok::, ()>(Async::NotReady) +fn block_until_complete(future: impl Future + Unpin, net: &Arc>, runtime: &mut Runtime) { + let drive_to_completion = futures::future::poll_fn(|cx| { + net.lock().poll(cx); Poll::<()>::Pending }); runtime.block_on( - future::select(future, drive_to_completion.compat()) - .map(|_| Ok::<(), ()>(())) - .compat() - ).unwrap(); + future::select(future, drive_to_completion) + ); } // run the voters to completion. provide a closure to be invoked after // the voters are spawned but before blocking on them. fn run_to_completion_with( - runtime: &mut current_thread::Runtime, + runtime: &mut Runtime, blocks: u64, net: Arc>, peers: &[Ed25519Keyring], with: F, ) -> u64 where - F: FnOnce(current_thread::Handle) -> Option>>> + F: FnOnce(Handle) -> Option>>> { use parking_lot::RwLock; @@ -398,7 +394,7 @@ fn run_to_completion_with( let highest_finalized = Arc::new(RwLock::new(0)); - if let Some(f) = (with)(runtime.handle()) { + if let Some(f) = (with)(runtime.handle().clone()) { wait_for.push(f); }; @@ -456,7 +452,7 @@ fn run_to_completion_with( assert_send(&voter); - runtime.spawn(voter.unit_error().compat()); + runtime.spawn(voter); } // wait for all finalized on each. @@ -468,7 +464,7 @@ fn run_to_completion_with( } fn run_to_completion( - runtime: &mut current_thread::Runtime, + runtime: &mut Runtime, blocks: u64, net: Arc>, peers: &[Ed25519Keyring] @@ -497,13 +493,13 @@ fn add_forced_change( #[test] fn finalize_3_voters_no_observers() { let _ = env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); + let mut runtime = Runtime::new().unwrap(); let peers = &[Ed25519Keyring::Alice, Ed25519Keyring::Bob, Ed25519Keyring::Charlie]; let voters = make_ids(peers); let mut net = GrandpaTestNet::new(TestApi::new(voters), 3); net.peer(0).push_blocks(20, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); for i in 0..3 { assert_eq!(net.peer(i).client().info().best_number, 20, @@ -522,14 +518,14 @@ fn finalize_3_voters_no_observers() { #[test] fn finalize_3_voters_1_full_observer() { - let mut runtime = current_thread::Runtime::new().unwrap(); + let mut runtime = Runtime::new().unwrap(); let peers = &[Ed25519Keyring::Alice, Ed25519Keyring::Bob, Ed25519Keyring::Charlie]; let voters = make_ids(peers); let mut net = GrandpaTestNet::new(TestApi::new(voters), 4); net.peer(0).push_blocks(20, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); let net = Arc::new(Mutex::new(net)); let mut finality_notifications = Vec::new(); @@ -588,7 +584,7 @@ fn finalize_3_voters_1_full_observer() { } for voter in voters { - runtime.spawn(voter.unit_error().compat()); + runtime.spawn(voter); } // wait for all finalized on each. @@ -626,10 +622,10 @@ fn transition_3_voters_twice_1_full_observer() { let api = TestApi::new(genesis_voters); let net = Arc::new(Mutex::new(GrandpaTestNet::new(api, 8))); - let mut runtime = current_thread::Runtime::new().unwrap(); + let mut runtime = Runtime::new().unwrap(); net.lock().peer(0).push_blocks(1, false); - net.lock().block_until_sync(&mut runtime); + net.lock().block_until_sync(); for (i, peer) in net.lock().peers().iter().enumerate() { let full_client = peer.client().as_full().expect("only full clients are used in test"); @@ -689,7 +685,7 @@ fn transition_3_voters_twice_1_full_observer() { future::ready(()) }); - runtime.spawn(block_production.unit_error().compat()); + runtime.spawn(block_production); } let mut finality_notifications = Vec::new(); @@ -748,7 +744,7 @@ fn transition_3_voters_twice_1_full_observer() { }; let voter = run_grandpa_voter(grandpa_params).expect("all in order with client and network"); - runtime.spawn(voter.unit_error().compat()); + runtime.spawn(voter); } // wait for all finalized on each. @@ -759,14 +755,14 @@ fn transition_3_voters_twice_1_full_observer() { #[test] fn justification_is_emitted_when_consensus_data_changes() { - let mut runtime = current_thread::Runtime::new().unwrap(); + let mut runtime = Runtime::new().unwrap(); let peers = &[Ed25519Keyring::Alice, Ed25519Keyring::Bob, Ed25519Keyring::Charlie]; let mut net = GrandpaTestNet::new(TestApi::new(make_ids(peers)), 3); // import block#1 WITH consensus data change let new_authorities = vec![sp_consensus_babe::AuthorityId::from_slice(&[42; 32])]; net.peer(0).push_authorities_change_block(new_authorities); - net.block_until_sync(&mut runtime); + net.block_until_sync(); let net = Arc::new(Mutex::new(net)); run_to_completion(&mut runtime, 1, net.clone(), peers); @@ -777,13 +773,13 @@ fn justification_is_emitted_when_consensus_data_changes() { #[test] fn justification_is_generated_periodically() { - let mut runtime = current_thread::Runtime::new().unwrap(); + let mut runtime = Runtime::new().unwrap(); let peers = &[Ed25519Keyring::Alice, Ed25519Keyring::Bob, Ed25519Keyring::Charlie]; let voters = make_ids(peers); let mut net = GrandpaTestNet::new(TestApi::new(voters), 3); net.peer(0).push_blocks(32, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); let net = Arc::new(Mutex::new(net)); run_to_completion(&mut runtime, 32, net.clone(), peers); @@ -816,7 +812,7 @@ fn consensus_changes_works() { #[test] fn sync_justifications_on_change_blocks() { - let mut runtime = current_thread::Runtime::new().unwrap(); + let mut runtime = Runtime::new().unwrap(); let peers_a = &[Ed25519Keyring::Alice, Ed25519Keyring::Bob, Ed25519Keyring::Charlie]; let peers_b = &[Ed25519Keyring::Alice, Ed25519Keyring::Bob]; let voters = make_ids(peers_b); @@ -840,7 +836,7 @@ fn sync_justifications_on_change_blocks() { // add more blocks on top of it (until we have 25) net.peer(0).push_blocks(4, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); for i in 0..4 { assert_eq!(net.peer(i).client().info().best_number, 25, @@ -857,9 +853,9 @@ fn sync_justifications_on_change_blocks() { } // the last peer should get the justification by syncing from other peers - futures::executor::block_on(futures::future::poll_fn(move |_| { + futures::executor::block_on(futures::future::poll_fn(move |cx| { if net.lock().peer(3).client().justification(&BlockId::Number(21)).unwrap().is_none() { - net.lock().poll(); + net.lock().poll(cx); Poll::Pending } else { Poll::Ready(()) @@ -870,7 +866,7 @@ fn sync_justifications_on_change_blocks() { #[test] fn finalizes_multiple_pending_changes_in_order() { let _ = env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); + let mut runtime = Runtime::new().unwrap(); let peers_a = &[Ed25519Keyring::Alice, Ed25519Keyring::Bob, Ed25519Keyring::Charlie]; let peers_b = &[Ed25519Keyring::Dave, Ed25519Keyring::Eve, Ed25519Keyring::Ferdie]; @@ -915,7 +911,7 @@ fn finalizes_multiple_pending_changes_in_order() { // add more blocks on top of it (until we have 30) net.peer(0).push_blocks(4, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); // all peers imported both change blocks for i in 0..6 { @@ -930,7 +926,7 @@ fn finalizes_multiple_pending_changes_in_order() { #[test] fn force_change_to_new_set() { let _ = env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); + let mut runtime = Runtime::new().unwrap(); // two of these guys are offline. let genesis_authorities = &[ Ed25519Keyring::Alice, @@ -965,7 +961,7 @@ fn force_change_to_new_set() { }); net.lock().peer(0).push_blocks(25, false); - net.lock().block_until_sync(&mut runtime); + net.lock().block_until_sync(); for (i, peer) in net.lock().peers().iter().enumerate() { assert_eq!(peer.client().info().best_number, 26, @@ -1093,7 +1089,7 @@ fn voter_persists_its_votes() { use futures::channel::mpsc; let _ = env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); + let mut runtime = Runtime::new().unwrap(); // we have two authorities but we'll only be running the voter for alice // we are going to be listening for the prevotes it casts @@ -1103,7 +1099,7 @@ fn voter_persists_its_votes() { // alice has a chain with 20 blocks let mut net = GrandpaTestNet::new(TestApi::new(voters.clone()), 2); net.peer(0).push_blocks(20, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); assert_eq!(net.peer(0).client().info().best_number, 20, "Peer #{} failed to sync", 0); @@ -1201,7 +1197,7 @@ fn voter_persists_its_votes() { net: net.clone(), client: client.clone(), keystore, - }.unit_error().compat()); + }); } let (exit_tx, exit_rx) = futures::channel::oneshot::channel::<()>(); @@ -1246,10 +1242,7 @@ fn voter_persists_its_votes() { HasVoted::No, ); - runtime.spawn( - network.map_err(|e| panic!("network bridge should not error: {:?}", e)) - .compat(), - ); + runtime.spawn(network); let round_tx = Arc::new(Mutex::new(round_tx)); let exit_tx = Arc::new(Mutex::new(Some(exit_tx))); @@ -1341,7 +1334,7 @@ fn voter_persists_its_votes() { panic!() } } - }).map(Ok).boxed().compat()); + })); } block_until_complete(exit_rx.into_future(), &net, &mut runtime); @@ -1350,13 +1343,13 @@ fn voter_persists_its_votes() { #[test] fn finalize_3_voters_1_light_observer() { let _ = env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); + let mut runtime = Runtime::new().unwrap(); let authorities = &[Ed25519Keyring::Alice, Ed25519Keyring::Bob, Ed25519Keyring::Charlie]; let voters = make_ids(authorities); let mut net = GrandpaTestNet::new(TestApi::new(voters), 4); net.peer(0).push_blocks(20, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); for i in 0..4 { assert_eq!(net.peer(i).client().info().best_number, 20, @@ -1386,8 +1379,8 @@ fn finalize_3_voters_1_light_observer() { link, net.lock().peers[3].network_service().clone(), Exit, - ).unwrap().unit_error().compat() - ).unwrap(); + ).unwrap() + ); Some(Box::pin(finality_notifications.map(|_| ()))) }); @@ -1396,7 +1389,7 @@ fn finalize_3_voters_1_light_observer() { #[test] fn finality_proof_is_fetched_by_light_client_when_consensus_data_changes() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); + let mut runtime = Runtime::new().unwrap(); let peers = &[Ed25519Keyring::Alice]; let mut net = GrandpaTestNet::new(TestApi::new(make_ids(peers)), 1); @@ -1407,18 +1400,17 @@ fn finality_proof_is_fetched_by_light_client_when_consensus_data_changes() { net.peer(0).push_authorities_change_block(vec![sp_consensus_babe::AuthorityId::from_slice(&[42; 32])]); let net = Arc::new(Mutex::new(net)); run_to_completion(&mut runtime, 1, net.clone(), peers); - net.lock().block_until_sync(&mut runtime); + net.lock().block_until_sync(); // check that the block#1 is finalized on light client - let mut runtime = current_thread::Runtime::new().unwrap(); - let _ = runtime.block_on(futures::future::poll_fn(move |_| { + runtime.block_on(futures::future::poll_fn(move |cx| { if net.lock().peer(1).client().info().finalized_number == 1 { Poll::Ready(()) } else { - net.lock().poll(); + net.lock().poll(cx); Poll::Pending } - }).unit_error().compat()); + })); } #[test] @@ -1427,7 +1419,7 @@ fn empty_finality_proof_is_returned_to_light_client_when_authority_set_is_differ const FORCE_CHANGE: bool = true; let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); + let mut runtime = Runtime::new().unwrap(); // two of these guys are offline. let genesis_authorities = if FORCE_CHANGE { @@ -1472,14 +1464,14 @@ fn empty_finality_proof_is_returned_to_light_client_when_authority_set_is_differ vec![sp_consensus_babe::AuthorityId::from_slice(&[42; 32])] ); // #10 net.lock().peer(0).push_blocks(1, false); // best is #11 - net.lock().block_until_sync(&mut runtime); + net.lock().block_until_sync(); // finalize block #11 on full clients run_to_completion(&mut runtime, 11, net.clone(), peers_a); // request finalization by light client net.lock().add_light_peer(&GrandpaTestNet::default_config()); - net.lock().block_until_sync(&mut runtime); + net.lock().block_until_sync(); // check block, finalized on light client assert_eq!( @@ -1491,14 +1483,14 @@ fn empty_finality_proof_is_returned_to_light_client_when_authority_set_is_differ #[test] fn voter_catches_up_to_latest_round_when_behind() { let _ = env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); + let mut runtime = Runtime::new().unwrap(); let peers = &[Ed25519Keyring::Alice, Ed25519Keyring::Bob]; let voters = make_ids(peers); let mut net = GrandpaTestNet::new(TestApi::new(voters), 3); net.peer(0).push_blocks(50, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); let net = Arc::new(Mutex::new(net)); let mut finality_notifications = Vec::new(); @@ -1548,19 +1540,18 @@ fn voter_catches_up_to_latest_round_when_behind() { let voter = voter(Some(keystore), peer_id, link, net.clone()); - runtime.spawn(voter.unit_error().compat()); + runtime.spawn(voter); } // wait for them to finalize block 50. since they'll vote on 3/4 of the // unfinalized chain it will take at least 4 rounds to do it. - let wait_for_finality = ::futures::future::join_all(finality_notifications) - .map(|_| ()); + let wait_for_finality = ::futures::future::join_all(finality_notifications); // spawn a new voter, it should be behind by at least 4 rounds and should be // able to catch up to the latest round let test = { let net = net.clone(); - let runtime = runtime.handle(); + let runtime = runtime.handle().clone(); wait_for_finality.then(move |_| { let peer_id = 2; @@ -1574,7 +1565,7 @@ fn voter_catches_up_to_latest_round_when_behind() { let voter = voter(None, peer_id, link, net); - runtime.spawn(voter.unit_error().compat()).unwrap(); + runtime.spawn(voter); let start_time = std::time::Instant::now(); let timeout = Duration::from_secs(5 * 60); @@ -1595,14 +1586,12 @@ fn voter_catches_up_to_latest_round_when_behind() { }) }; - let drive_to_completion = futures01::future::poll_fn(|| { - net.lock().poll(); Ok::, ()>(Async::NotReady) + let drive_to_completion = futures::future::poll_fn(|cx| { + net.lock().poll(cx); Poll::<()>::Pending }); runtime.block_on( - future::select(test, drive_to_completion.compat()) - .map(|_| Ok::<(), ()>(())) - .compat() - ).unwrap(); + future::select(test, drive_to_completion) + ); } #[test] diff --git a/client/network/test/Cargo.toml b/client/network/test/Cargo.toml index 54265f1736c..7b749a6d312 100644 --- a/client/network/test/Cargo.toml +++ b/client/network/test/Cargo.toml @@ -13,8 +13,7 @@ repository = "https://github.com/paritytech/substrate/" sc-network = { version = "0.8.0-alpha.2", path = "../" } log = "0.4.8" parking_lot = "0.10.0" -futures = "0.1.29" -futures03 = { package = "futures", version = "0.3.1", features = ["compat"] } +futures = "0.3.1" futures-timer = "3.0.1" rand = "0.7.2" libp2p = { version = "0.16.1", default-features = false, features = ["libp2p-websocket"] } @@ -30,4 +29,3 @@ env_logger = "0.7.0" substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } substrate-test-runtime = { version = "2.0.0-dev", path = "../../../test-utils/runtime" } tempfile = "3.1.0" -tokio = "0.1.22" diff --git a/client/network/test/src/lib.rs b/client/network/test/src/lib.rs index 8dc8aff14d4..94eeb8e5fbc 100644 --- a/client/network/test/src/lib.rs +++ b/client/network/test/src/lib.rs @@ -21,7 +21,7 @@ mod block_import; #[cfg(test)] mod sync; -use std::{collections::HashMap, pin::Pin, sync::Arc, marker::PhantomData}; +use std::{collections::HashMap, pin::Pin, sync::Arc, marker::PhantomData, task::{Poll, Context as FutureContext}}; use libp2p::build_multiaddr; use log::trace; @@ -46,7 +46,6 @@ use sp_consensus::block_import::{BlockImport, ImportResult}; use sp_consensus::Error as ConsensusError; use sp_consensus::{BlockOrigin, ForkChoiceStrategy, BlockImportParams, BlockCheckParams, JustificationImport}; use futures::prelude::*; -use futures03::{Future as _, FutureExt as _, TryFutureExt as _, StreamExt as _, TryStreamExt as _}; use sc_network::{NetworkWorker, NetworkStateInfo, NetworkService, ReportHandle, config::ProtocolId}; use sc_network::config::{NetworkConfiguration, TransportConfig, BoxFinalityProofRequestBuilder}; use libp2p::PeerId; @@ -187,8 +186,8 @@ pub struct Peer { select_chain: Option>, backend: Option>, network: NetworkWorker::Hash>, - imported_blocks_stream: Box, Error = ()> + Send>, - finality_notification_stream: Box, Error = ()> + Send>, + imported_blocks_stream: Pin> + Send>>, + finality_notification_stream: Pin> + Send>>, } impl Peer { @@ -649,10 +648,8 @@ pub trait TestNetFactory: Sized { peer.network.add_known_address(network.service().local_peer_id(), listen_addr.clone()); } - let imported_blocks_stream = Box::new(client.import_notification_stream() - .map(|v| Ok::<_, ()>(v)).compat().fuse()); - let finality_notification_stream = Box::new(client.finality_notification_stream() - .map(|v| Ok::<_, ()>(v)).compat().fuse()); + let imported_blocks_stream = Box::pin(client.import_notification_stream().fuse()); + let finality_notification_stream = Box::pin(client.finality_notification_stream().fuse()); peers.push(Peer { data, @@ -724,10 +721,8 @@ pub trait TestNetFactory: Sized { peer.network.add_known_address(network.service().local_peer_id(), listen_addr.clone()); } - let imported_blocks_stream = Box::new(client.import_notification_stream() - .map(|v| Ok::<_, ()>(v)).compat().fuse()); - let finality_notification_stream = Box::new(client.finality_notification_stream() - .map(|v| Ok::<_, ()>(v)).compat().fuse()); + let imported_blocks_stream = Box::pin(client.import_notification_stream().fuse()); + let finality_notification_stream = Box::pin(client.finality_notification_stream().fuse()); peers.push(Peer { data, @@ -746,70 +741,70 @@ pub trait TestNetFactory: Sized { /// Polls the testnet until all nodes are in sync. /// /// Must be executed in a task context. - fn poll_until_sync(&mut self) -> Async<()> { - self.poll(); + fn poll_until_sync(&mut self, cx: &mut FutureContext) -> Poll<()> { + self.poll(cx); // Return `NotReady` if there's a mismatch in the highest block number. let mut highest = None; for peer in self.peers().iter() { if peer.is_major_syncing() || peer.network.num_queued_blocks() != 0 { - return Async::NotReady + return Poll::Pending } if peer.network.num_sync_requests() != 0 { - return Async::NotReady + return Poll::Pending } match (highest, peer.client.info().best_hash) { (None, b) => highest = Some(b), (Some(ref a), ref b) if a == b => {}, - (Some(_), _) => return Async::NotReady, + (Some(_), _) => return Poll::Pending } } - Async::Ready(()) + Poll::Ready(()) } /// Polls the testnet until theres' no activiy of any kind. /// /// Must be executed in a task context. - fn poll_until_idle(&mut self) -> Async<()> { - self.poll(); + fn poll_until_idle(&mut self, cx: &mut FutureContext) -> Poll<()> { + self.poll(cx); for peer in self.peers().iter() { if peer.is_major_syncing() || peer.network.num_queued_blocks() != 0 { - return Async::NotReady + return Poll::Pending } if peer.network.num_sync_requests() != 0 { - return Async::NotReady + return Poll::Pending } } - Async::Ready(()) + Poll::Ready(()) } /// Blocks the current thread until we are sync'ed. /// - /// Calls `poll_until_sync` repeatedly with the runtime passed as parameter. - fn block_until_sync(&mut self, runtime: &mut tokio::runtime::current_thread::Runtime) { - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| Ok(self.poll_until_sync()))).unwrap(); + /// Calls `poll_until_sync` repeatedly. + fn block_until_sync(&mut self) { + futures::executor::block_on(futures::future::poll_fn::<(), _>(|cx| self.poll_until_sync(cx))); } /// Blocks the current thread until there are no pending packets. /// /// Calls `poll_until_idle` repeatedly with the runtime passed as parameter. - fn block_until_idle(&mut self, runtime: &mut tokio::runtime::current_thread::Runtime) { - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| Ok(self.poll_until_idle()))).unwrap(); + fn block_until_idle(&mut self) { + futures::executor::block_on(futures::future::poll_fn::<(), _>(|cx| self.poll_until_idle(cx))); } /// Polls the testnet. Processes all the pending actions and returns `NotReady`. - fn poll(&mut self) { + fn poll(&mut self, cx: &mut FutureContext) { self.mut_peers(|peers| { for peer in peers { trace!(target: "sync", "-- Polling {}", peer.id()); - futures03::future::poll_fn(|cx| Pin::new(&mut peer.network).poll(cx)) - .map(|item| Ok::<_, ()>(item)) - .compat().poll().unwrap(); + if let Poll::Ready(res) = Pin::new(&mut peer.network).poll(cx) { + res.unwrap(); + } trace!(target: "sync", "-- Polling complete {}", peer.id()); // We poll `imported_blocks_stream`. - while let Ok(Async::Ready(Some(notification))) = peer.imported_blocks_stream.poll() { + while let Poll::Ready(Some(notification)) = peer.imported_blocks_stream.as_mut().poll_next(cx) { peer.network.on_block_imported( notification.header, Vec::new(), @@ -819,7 +814,7 @@ pub trait TestNetFactory: Sized { // We poll `finality_notification_stream`, but we only take the last event. let mut last = None; - while let Ok(Async::Ready(Some(item))) = peer.finality_notification_stream.poll() { + while let Poll::Ready(Some(item)) = peer.finality_notification_stream.as_mut().poll_next(cx) { last = Some(item); } if let Some(notification) = last { diff --git a/client/network/test/src/sync.rs b/client/network/test/src/sync.rs index 2094ddae60c..38825751683 100644 --- a/client/network/test/src/sync.rs +++ b/client/network/test/src/sync.rs @@ -16,14 +16,12 @@ use sc_network::config::Roles; use sp_consensus::BlockOrigin; -use futures03::TryFutureExt as _; use std::time::Duration; -use tokio::runtime::current_thread; +use futures::executor::block_on; use super::*; fn test_ancestor_search_when_common_is(n: usize) { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(3); net.peer(0).push_blocks(n, false); @@ -34,7 +32,7 @@ fn test_ancestor_search_when_common_is(n: usize) { net.peer(1).push_blocks(100, false); net.peer(2).push_blocks(100, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); let peer1 = &net.peers()[1]; assert!(net.peers()[0].blockchain_canon_equals(peer1)); } @@ -42,24 +40,22 @@ fn test_ancestor_search_when_common_is(n: usize) { #[test] fn sync_peers_works() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(3); - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); for peer in 0..3 { if net.peer(peer).num_peers() != 2 { - return Ok(Async::NotReady) + return Poll::Pending } } - Ok(Async::Ready(())) - })).unwrap(); + Poll::Ready(()) + })); } #[test] fn sync_cycle_from_offline_to_syncing_to_offline() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(3); for peer in 0..3 { // Offline, and not major syncing. @@ -71,51 +67,50 @@ fn sync_cycle_from_offline_to_syncing_to_offline() { net.peer(2).push_blocks(100, false); // Block until all nodes are online and nodes 0 and 1 and major syncing. - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); for peer in 0..3 { // Online if net.peer(peer).is_offline() { - return Ok(Async::NotReady) + return Poll::Pending } if peer < 2 { // Major syncing. if net.peer(peer).blocks_count() < 100 && !net.peer(peer).is_major_syncing() { - return Ok(Async::NotReady) + return Poll::Pending } } } - Ok(Async::Ready(())) - })).unwrap(); + Poll::Ready(()) + })); // Block until all nodes are done syncing. - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); for peer in 0..3 { if net.peer(peer).is_major_syncing() { - return Ok(Async::NotReady) + return Poll::Pending } } - Ok(Async::Ready(())) - })).unwrap(); + Poll::Ready(()) + })); // Now drop nodes 1 and 2, and check that node 0 is offline. net.peers.remove(2); net.peers.remove(1); - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); if !net.peer(0).is_offline() { - Ok(Async::NotReady) + Poll::Pending } else { - Ok(Async::Ready(())) + Poll::Ready(()) } - })).unwrap(); + })); } #[test] fn syncing_node_not_major_syncing_when_disconnected() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(3); // Generate blocks. @@ -125,36 +120,35 @@ fn syncing_node_not_major_syncing_when_disconnected() { assert!(!net.peer(1).is_major_syncing()); // Check that we switch to major syncing. - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); if !net.peer(1).is_major_syncing() { - Ok(Async::NotReady) + Poll::Pending } else { - Ok(Async::Ready(())) + Poll::Ready(()) } - })).unwrap(); + })); // Destroy two nodes, and check that we switch to non-major syncing. net.peers.remove(2); net.peers.remove(0); - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); if net.peer(0).is_major_syncing() { - Ok(Async::NotReady) + Poll::Pending } else { - Ok(Async::Ready(())) + Poll::Ready(()) } - })).unwrap(); + })); } #[test] fn sync_from_two_peers_works() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(3); net.peer(1).push_blocks(100, false); net.peer(2).push_blocks(100, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); let peer1 = &net.peers()[1]; assert!(net.peers()[0].blockchain_canon_equals(peer1)); assert!(!net.peer(0).is_major_syncing()); @@ -163,12 +157,11 @@ fn sync_from_two_peers_works() { #[test] fn sync_from_two_peers_with_ancestry_search_works() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(3); net.peer(0).push_blocks(10, true); net.peer(1).push_blocks(100, false); net.peer(2).push_blocks(100, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); let peer1 = &net.peers()[1]; assert!(net.peers()[0].blockchain_canon_equals(peer1)); } @@ -176,14 +169,13 @@ fn sync_from_two_peers_with_ancestry_search_works() { #[test] fn ancestry_search_works_when_backoff_is_one() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(3); net.peer(0).push_blocks(1, false); net.peer(1).push_blocks(2, false); net.peer(2).push_blocks(2, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); let peer1 = &net.peers()[1]; assert!(net.peers()[0].blockchain_canon_equals(peer1)); } @@ -191,14 +183,13 @@ fn ancestry_search_works_when_backoff_is_one() { #[test] fn ancestry_search_works_when_ancestor_is_genesis() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(3); net.peer(0).push_blocks(13, true); net.peer(1).push_blocks(100, false); net.peer(2).push_blocks(100, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); let peer1 = &net.peers()[1]; assert!(net.peers()[0].blockchain_canon_equals(peer1)); } @@ -221,10 +212,9 @@ fn ancestry_search_works_when_common_is_hundred() { #[test] fn sync_long_chain_works() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(2); net.peer(1).push_blocks(500, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); let peer1 = &net.peers()[1]; assert!(net.peers()[0].blockchain_canon_equals(peer1)); } @@ -232,18 +222,17 @@ fn sync_long_chain_works() { #[test] fn sync_no_common_longer_chain_fails() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(3); net.peer(0).push_blocks(20, true); net.peer(1).push_blocks(20, false); - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); if net.peer(0).is_major_syncing() { - Ok(Async::NotReady) + Poll::Pending } else { - Ok(Async::Ready(())) + Poll::Ready(()) } - })).unwrap(); + })); let peer1 = &net.peers()[1]; assert!(!net.peers()[0].blockchain_canon_equals(peer1)); } @@ -251,10 +240,9 @@ fn sync_no_common_longer_chain_fails() { #[test] fn sync_justifications() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = JustificationTestNet::new(3); net.peer(0).push_blocks(20, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); // there's currently no justification for block #10 assert_eq!(net.peer(0).client().justification(&BlockId::Number(10)).unwrap(), None); @@ -274,26 +262,25 @@ fn sync_justifications() { net.peer(1).request_justification(&h2.hash().into(), 15); net.peer(1).request_justification(&h3.hash().into(), 20); - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); for height in (10..21).step_by(5) { if net.peer(0).client().justification(&BlockId::Number(height)).unwrap() != Some(Vec::new()) { - return Ok(Async::NotReady); + return Poll::Pending; } if net.peer(1).client().justification(&BlockId::Number(height)).unwrap() != Some(Vec::new()) { - return Ok(Async::NotReady); + return Poll::Pending; } } - Ok(Async::Ready(())) - })).unwrap(); + Poll::Ready(()) + })); } #[test] fn sync_justifications_across_forks() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = JustificationTestNet::new(3); // we push 5 blocks net.peer(0).push_blocks(5, false); @@ -303,30 +290,29 @@ fn sync_justifications_across_forks() { // peer 1 will only see the longer fork. but we'll request justifications // for both and finalize the small fork instead. - net.block_until_sync(&mut runtime); + net.block_until_sync(); net.peer(0).client().finalize_block(BlockId::Hash(f1_best), Some(Vec::new()), true).unwrap(); net.peer(1).request_justification(&f1_best, 10); net.peer(1).request_justification(&f2_best, 11); - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); if net.peer(0).client().justification(&BlockId::Number(10)).unwrap() == Some(Vec::new()) && net.peer(1).client().justification(&BlockId::Number(10)).unwrap() == Some(Vec::new()) { - Ok(Async::Ready(())) + Poll::Ready(()) } else { - Ok(Async::NotReady) + Poll::Pending } - })).unwrap(); + })); } #[test] fn sync_after_fork_works() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(3); net.peer(0).push_blocks(30, false); net.peer(1).push_blocks(30, false); @@ -340,7 +326,7 @@ fn sync_after_fork_works() { net.peer(2).push_blocks(1, false); // peer 1 has the best chain - net.block_until_sync(&mut runtime); + net.block_until_sync(); let peer1 = &net.peers()[1]; assert!(net.peers()[0].blockchain_canon_equals(peer1)); (net.peers()[1].blockchain_canon_equals(peer1)); @@ -350,7 +336,6 @@ fn sync_after_fork_works() { #[test] fn syncs_all_forks() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(4); net.peer(0).push_blocks(2, false); net.peer(1).push_blocks(2, false); @@ -358,7 +343,7 @@ fn syncs_all_forks() { net.peer(0).push_blocks(2, true); net.peer(1).push_blocks(4, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); // Check that all peers have all of the blocks. assert_eq!(9, net.peer(0).blocks_count()); assert_eq!(9, net.peer(1).blocks_count()); @@ -367,12 +352,11 @@ fn syncs_all_forks() { #[test] fn own_blocks_are_announced() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(3); - net.block_until_sync(&mut runtime); // connect'em + net.block_until_sync(); // connect'em net.peer(0).generate_blocks(1, BlockOrigin::Own, |builder| builder.build().unwrap().block); - net.block_until_sync(&mut runtime); + net.block_until_sync(); assert_eq!(net.peer(0).client.info().best_number, 1); assert_eq!(net.peer(1).client.info().best_number, 1); @@ -384,7 +368,6 @@ fn own_blocks_are_announced() { #[test] fn blocks_are_not_announced_by_light_nodes() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(0); // full peer0 is connected to light peer @@ -397,7 +380,7 @@ fn blocks_are_not_announced_by_light_nodes() { // Sync between 0 and 1. net.peer(0).push_blocks(1, false); assert_eq!(net.peer(0).client.info().best_number, 1); - net.block_until_sync(&mut runtime); + net.block_until_sync(); assert_eq!(net.peer(1).client.info().best_number, 1); // Add another node and remove node 0. @@ -405,18 +388,17 @@ fn blocks_are_not_announced_by_light_nodes() { net.peers.remove(0); // Poll for a few seconds and make sure 1 and 2 (now 0 and 1) don't sync together. - let mut delay = futures_timer::Delay::new(Duration::from_secs(5)).unit_error().compat(); - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| { - net.poll(); - delay.poll().map_err(|_| ()) - })).unwrap(); + let mut delay = futures_timer::Delay::new(Duration::from_secs(5)); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); + Pin::new(&mut delay).poll(cx) + })); assert_eq!(net.peer(1).client.info().best_number, 0); } #[test] fn can_sync_small_non_best_forks() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(2); net.peer(0).push_blocks(30, false); net.peer(1).push_blocks(30, false); @@ -435,14 +417,14 @@ fn can_sync_small_non_best_forks() { assert!(net.peer(1).client().header(&BlockId::Hash(small_hash)).unwrap().is_none()); // poll until the two nodes connect, otherwise announcing the block will not work - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); if net.peer(0).num_peers() == 0 { - Ok(Async::NotReady) + Poll::Pending } else { - Ok(Async::Ready(())) + Poll::Ready(()) } - })).unwrap(); + })); // synchronization: 0 synced to longer chain and 1 didn't sync to small chain. @@ -455,32 +437,31 @@ fn can_sync_small_non_best_forks() { // after announcing, peer 1 downloads the block. - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); assert!(net.peer(0).client().header(&BlockId::Hash(small_hash)).unwrap().is_some()); if net.peer(1).client().header(&BlockId::Hash(small_hash)).unwrap().is_none() { - return Ok(Async::NotReady) + return Poll::Pending } - Ok(Async::Ready(())) - })).unwrap(); - net.block_until_sync(&mut runtime); + Poll::Ready(()) + })); + net.block_until_sync(); let another_fork = net.peer(0).push_blocks_at(BlockId::Number(35), 2, true); net.peer(0).announce_block(another_fork, Vec::new()); - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); if net.peer(1).client().header(&BlockId::Hash(another_fork)).unwrap().is_none() { - return Ok(Async::NotReady) + return Poll::Pending } - Ok(Async::Ready(())) - })).unwrap(); + Poll::Ready(()) + })); } #[test] fn can_not_sync_from_light_peer() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); // given the network with 1 full nodes (#0) and 1 light node (#1) let mut net = TestNet::new(1); @@ -490,7 +471,7 @@ fn can_not_sync_from_light_peer() { net.peer(0).push_blocks(1, false); // and let the light client sync from this node - net.block_until_sync(&mut runtime); + net.block_until_sync(); // ensure #0 && #1 have the same best block let full0_info = net.peer(0).client.info(); @@ -504,29 +485,28 @@ fn can_not_sync_from_light_peer() { net.peers.remove(0); // ensure that the #2 (now #1) fails to sync block #1 even after 5 seconds - let mut test_finished = futures_timer::Delay::new(Duration::from_secs(5)).unit_error().compat(); - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { - net.poll(); - test_finished.poll().map_err(|_| ()) - })).unwrap(); + let mut test_finished = futures_timer::Delay::new(Duration::from_secs(5)); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); + Pin::new(&mut test_finished).poll(cx) + })); } #[test] fn light_peer_imports_header_from_announce() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); - fn import_with_announce(net: &mut TestNet, runtime: &mut current_thread::Runtime, hash: H256) { + fn import_with_announce(net: &mut TestNet, hash: H256) { net.peer(0).announce_block(hash, Vec::new()); - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); if net.peer(1).client().header(&BlockId::Hash(hash)).unwrap().is_some() { - Ok(Async::Ready(())) + Poll::Ready(()) } else { - Ok(Async::NotReady) + Poll::Pending } - })).unwrap(); + })); } // given the network with 1 full nodes (#0) and 1 light node (#1) @@ -534,21 +514,20 @@ fn light_peer_imports_header_from_announce() { net.add_light_peer(&Default::default()); // let them connect to each other - net.block_until_sync(&mut runtime); + net.block_until_sync(); // check that NEW block is imported from announce message let new_hash = net.peer(0).push_blocks(1, false); - import_with_announce(&mut net, &mut runtime, new_hash); + import_with_announce(&mut net, new_hash); // check that KNOWN STALE block is imported from announce message let known_stale_hash = net.peer(0).push_blocks_at(BlockId::Number(0), 1, true); - import_with_announce(&mut net, &mut runtime, known_stale_hash); + import_with_announce(&mut net, known_stale_hash); } #[test] fn can_sync_explicit_forks() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(2); net.peer(0).push_blocks(30, false); net.peer(1).push_blocks(30, false); @@ -568,14 +547,14 @@ fn can_sync_explicit_forks() { assert!(net.peer(1).client().header(&BlockId::Hash(small_hash)).unwrap().is_none()); // poll until the two nodes connect, otherwise announcing the block will not work - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); if net.peer(0).num_peers() == 0 || net.peer(1).num_peers() == 0 { - Ok(Async::NotReady) + Poll::Pending } else { - Ok(Async::Ready(())) + Poll::Ready(()) } - })).unwrap(); + })); // synchronization: 0 synced to longer chain and 1 didn't sync to small chain. @@ -589,21 +568,20 @@ fn can_sync_explicit_forks() { net.peer(1).set_sync_fork_request(vec![first_peer_id], small_hash, small_number); // peer 1 downloads the block. - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); assert!(net.peer(0).client().header(&BlockId::Hash(small_hash)).unwrap().is_some()); if net.peer(1).client().header(&BlockId::Hash(small_hash)).unwrap().is_none() { - return Ok(Async::NotReady) + return Poll::Pending } - Ok(Async::Ready(())) - })).unwrap(); + Poll::Ready(()) + })); } #[test] fn syncs_header_only_forks() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(0); let config = ProtocolConfig::default(); net.add_full_peer_with_states(&config, None); @@ -616,7 +594,7 @@ fn syncs_header_only_forks() { let small_number = net.peer(0).client().info().best_number; net.peer(1).push_blocks(4, false); - net.block_until_sync(&mut runtime); + net.block_until_sync(); // Peer 1 will sync the small fork even though common block state is missing assert_eq!(9, net.peer(0).blocks_count()); assert_eq!(9, net.peer(1).blocks_count()); @@ -624,19 +602,18 @@ fn syncs_header_only_forks() { // Request explicit header-only sync request for the ancient fork. let first_peer_id = net.peer(0).id(); net.peer(1).set_sync_fork_request(vec![first_peer_id], small_hash, small_number); - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); if net.peer(1).client().header(&BlockId::Hash(small_hash)).unwrap().is_none() { - return Ok(Async::NotReady) + return Poll::Pending } - Ok(Async::Ready(())) - })).unwrap(); + Poll::Ready(()) + })); } #[test] fn does_not_sync_announced_old_best_block() { let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(3); let old_hash = net.peer(0).push_blocks(1, false); @@ -645,19 +622,19 @@ fn does_not_sync_announced_old_best_block() { net.peer(1).push_blocks(20, true); net.peer(0).announce_block(old_hash, Vec::new()); - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { + block_on(futures::future::poll_fn::<(), _>(|cx| { // poll once to import announcement - net.poll(); - Ok(Async::Ready(())) - })).unwrap(); + net.poll(cx); + Poll::Ready(()) + })); assert!(!net.peer(1).is_major_syncing()); net.peer(0).announce_block(old_hash_with_parent, Vec::new()); - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { + block_on(futures::future::poll_fn::<(), _>(|cx| { // poll once to import announcement - net.poll(); - Ok(Async::Ready(())) - })).unwrap(); + net.poll(cx); + Poll::Ready(()) + })); assert!(!net.peer(1).is_major_syncing()); } @@ -665,19 +642,18 @@ fn does_not_sync_announced_old_best_block() { fn full_sync_requires_block_body() { // Check that we don't sync headers-only in full mode. let _ = ::env_logger::try_init(); - let mut runtime = current_thread::Runtime::new().unwrap(); let mut net = TestNet::new(2); net.peer(0).push_headers(1); // Wait for nodes to connect - runtime.block_on(futures::future::poll_fn::<(), (), _>(|| -> Result<_, ()> { - net.poll(); + block_on(futures::future::poll_fn::<(), _>(|cx| { + net.poll(cx); if net.peer(0).num_peers() == 0 || net.peer(1).num_peers() == 0 { - Ok(Async::NotReady) + Poll::Pending } else { - Ok(Async::Ready(())) + Poll::Ready(()) } - })).unwrap(); - net.block_until_idle(&mut runtime); + })); + net.block_until_idle(); assert_eq!(net.peer(1).client.info().best_number, 0); } diff --git a/client/service/Cargo.toml b/client/service/Cargo.toml index e7c55fae029..80ba12ca000 100644 --- a/client/service/Cargo.toml +++ b/client/service/Cargo.toml @@ -66,4 +66,3 @@ substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../test-util sp-consensus-babe = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/babe" } grandpa = { version = "0.8.0-alpha.2", package = "sc-finality-grandpa", path = "../finality-grandpa" } grandpa-primitives = { version = "2.0.0-alpha.2", package = "sp-finality-grandpa", path = "../../primitives/finality-grandpa" } -tokio = { version = "0.2", features = ["rt-core"] } diff --git a/client/service/src/lib.rs b/client/service/src/lib.rs index 99b45453411..c4678eb28d2 100644 --- a/client/service/src/lib.rs +++ b/client/service/src/lib.rs @@ -116,6 +116,8 @@ pub struct Service { marker: PhantomData, } +impl Unpin for Service {} + /// Alias for a an implementation of `futures::future::Executor`. pub type TaskExecutor = Arc; @@ -229,7 +231,7 @@ impl AbstractService for Service, TSc, NetworkStatus, NetworkService, TExPool, TOc> where - TBl: BlockT + Unpin, + TBl: BlockT, TBackend: 'static + sc_client_api::backend::Backend, TExec: 'static + sc_client::CallExecutor + Send + Sync + Clone, TRtApi: 'static + Send + Sync, @@ -328,7 +330,7 @@ where } } -impl Future for +impl Future for Service { type Output = Result<(), Error>; diff --git a/client/service/src/status_sinks.rs b/client/service/src/status_sinks.rs index de5fe865736..8e189be157b 100644 --- a/client/service/src/status_sinks.rs +++ b/client/service/src/status_sinks.rs @@ -122,28 +122,17 @@ mod tests { let (tx, rx) = mpsc::unbounded(); status_sinks.push(Duration::from_millis(100), tx); - let mut runtime = tokio::runtime::Runtime::new().unwrap(); - let mut val_order = 5; - runtime.spawn(futures::future::poll_fn(move |cx| { - status_sinks.poll(cx, || { val_order += 1; val_order }); - Poll::<()>::Pending - })); - - let done = rx - .into_future() - .then(|(item, rest)| { - assert_eq!(item, Some(6)); - rest.into_future() - }) - .then(|(item, rest)| { - assert_eq!(item, Some(7)); - rest.into_future() - }) - .map(|(item, _)| { - assert_eq!(item, Some(8)); - }); - runtime.block_on(done); + futures::executor::block_on(futures::future::select( + futures::future::poll_fn(move |cx| { + status_sinks.poll(cx, || { val_order += 1; val_order }); + Poll::<()>::Pending + }), + Box::pin(async { + let items: Vec = rx.take(3).collect().await; + assert_eq!(items, [6, 7, 8]); + }) + )); } } diff --git a/utils/frame/rpc/support/Cargo.toml b/utils/frame/rpc/support/Cargo.toml index 1f448816e08..162d25cf9bf 100644 --- a/utils/frame/rpc/support/Cargo.toml +++ b/utils/frame/rpc/support/Cargo.toml @@ -20,4 +20,4 @@ sc-rpc-api = { version = "0.8.0-alpha.2", path = "../../../../client/rpc-api" } [dev-dependencies] frame-system = { version = "2.0.0-alpha.2", path = "../../../../frame/system" } -tokio = "0.1" +tokio = "0.2" diff --git a/utils/frame/rpc/support/src/lib.rs b/utils/frame/rpc/support/src/lib.rs index a9982945e7f..42c10fb2cc2 100644 --- a/utils/frame/rpc/support/src/lib.rs +++ b/utils/frame/rpc/support/src/lib.rs @@ -33,9 +33,7 @@ use sc_rpc_api::state::StateClient; /// A typed query on chain state usable from an RPC client. /// /// ```no_run -/// # use futures::compat::Compat; /// # use futures::compat::Future01CompatExt; -/// # use futures::future::FutureExt; /// # use jsonrpc_client_transports::RpcError; /// # use jsonrpc_client_transports::transports::http; /// # use codec::Encode; @@ -49,7 +47,7 @@ use sc_rpc_api::state::StateClient; /// # type Hash = (); /// # /// # fn main() -> Result<(), RpcError> { -/// # tokio::runtime::Runtime::new().unwrap().block_on(Compat::new(test().boxed())) +/// # tokio::runtime::Runtime::new().unwrap().block_on(test()) /// # } /// # /// # struct TestRuntime; -- GitLab From 3beb09d1e3a92d2dd5ad77df9dd47e46f691610a Mon Sep 17 00:00:00 2001 From: pscott <30843220+pscott@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:59:39 +0100 Subject: [PATCH 062/106] Make export blocks default to json on stdout (#5090) * Make export blocks default to json on stdout * Multiline instead of single line to stay under 100 cols * Change --json flag to --binary, defaulting to json --- client/cli/src/commands/export_blocks_cmd.rs | 10 +++++----- client/service/src/builder.rs | 2 +- client/service/src/chain_ops.rs | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/client/cli/src/commands/export_blocks_cmd.rs b/client/cli/src/commands/export_blocks_cmd.rs index cdfa463c6d5..21195cccd46 100644 --- a/client/cli/src/commands/export_blocks_cmd.rs +++ b/client/cli/src/commands/export_blocks_cmd.rs @@ -50,9 +50,9 @@ pub struct ExportBlocksCmd { #[structopt(long = "to", value_name = "BLOCK")] pub to: Option, - /// Use JSON output rather than binary. - #[structopt(long = "json")] - pub json: bool, + /// Use binary output rather than JSON. + #[structopt(long = "binary", value_name = "BOOL", parse(try_from_str), default_value("false"))] + pub binary: bool, #[allow(missing_docs)] #[structopt(flatten)] @@ -85,7 +85,7 @@ impl ExportBlocksCmd { let from = self.from.as_ref().and_then(|f| f.parse().ok()).unwrap_or(1); let to = self.to.as_ref().and_then(|t| t.parse().ok()); - let json = self.json; + let binary = self.binary; let file: Box = match &self.output { Some(filename) => Box::new(fs::File::create(filename)?), @@ -93,7 +93,7 @@ impl ExportBlocksCmd { }; run_until_exit(config, |config| { - Ok(builder(config)?.export_blocks(file, from.into(), to, json)) + Ok(builder(config)?.export_blocks(file, from.into(), to, binary)) }) } diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index 8c85c38b188..e5e4e132f9c 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -742,7 +742,7 @@ pub trait ServiceBuilderCommand { output: impl Write + 'static, from: NumberFor, to: Option>, - json: bool + binary: bool ) -> Pin>>>; /// Performs a revert of `blocks` blocks. diff --git a/client/service/src/chain_ops.rs b/client/service/src/chain_ops.rs index a0724f3e1de..03db9232a10 100644 --- a/client/service/src/chain_ops.rs +++ b/client/service/src/chain_ops.rs @@ -203,7 +203,7 @@ impl< mut output: impl Write + 'static, from: NumberFor, to: Option>, - json: bool + binary: bool ) -> Pin>>> { let client = self.client; let mut block = from; @@ -230,7 +230,7 @@ impl< if !wrote_header { info!("Exporting blocks from #{} to #{}", block, last); - if !json { + if binary { let last_: u64 = last.saturated_into::(); let block_: u64 = block.saturated_into::(); let len: u64 = last_ - block_ + 1; @@ -241,13 +241,13 @@ impl< match client.block(&BlockId::number(block))? { Some(block) => { - if json { + if binary { + output.write_all(&block.encode())?; + } else { serde_json::to_writer(&mut output, &block) .map_err(|e| format!("Error writing JSON: {}", e))?; - } else { - output.write_all(&block.encode())?; } - }, + }, // Reached end of the chain. None => return std::task::Poll::Ready(Ok(())), } -- GitLab From 675f6b09590985a9c68721bc6852f2c3fe67c011 Mon Sep 17 00:00:00 2001 From: Fedor Sakharov Date: Mon, 2 Mar 2020 13:00:38 +0300 Subject: [PATCH 063/106] Offence reporting returns a result (#5082) * Offence reporting returns a result * Bump spec_version * Use unwrap instead of assertions * Fix more review grumbles --- bin/node/runtime/src/lib.rs | 2 +- frame/im-online/src/lib.rs | 4 +++- frame/im-online/src/mock.rs | 5 +++-- frame/offences/src/lib.rs | 8 +++++--- frame/offences/src/tests.rs | 20 ++++++++++---------- frame/staking/src/lib.rs | 7 ++++--- primitives/staking/src/offence.rs | 27 +++++++++++++++++++++++++-- 7 files changed, 51 insertions(+), 22 deletions(-) diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index ae8251f6209..85889a50c20 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -82,7 +82,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 226, + spec_version: 227, impl_version: 0, apis: RUNTIME_API_VERSIONS, }; diff --git a/frame/im-online/src/lib.rs b/frame/im-online/src/lib.rs index d6d13c66c25..9aa8d2d67f6 100644 --- a/frame/im-online/src/lib.rs +++ b/frame/im-online/src/lib.rs @@ -608,7 +608,9 @@ impl pallet_session::OneSessionHandler for Module { let validator_set_count = keys.len() as u32; let offence = UnresponsivenessOffence { session_index, validator_set_count, offenders }; - T::ReportUnresponsiveness::report_offence(vec![], offence); + if let Err(e) = T::ReportUnresponsiveness::report_offence(vec![], offence) { + sp_runtime::print(e); + } } } diff --git a/frame/im-online/src/mock.rs b/frame/im-online/src/mock.rs index a703b24629c..97a0e7eb844 100644 --- a/frame/im-online/src/mock.rs +++ b/frame/im-online/src/mock.rs @@ -22,7 +22,7 @@ use std::cell::RefCell; use crate::{Module, Trait}; use sp_runtime::Perbill; -use sp_staking::{SessionIndex, offence::ReportOffence}; +use sp_staking::{SessionIndex, offence::{ReportOffence, OffenceError}}; use sp_runtime::testing::{Header, UintAuthorityId, TestXt}; use sp_runtime::traits::{IdentityLookup, BlakeTwo256, ConvertInto}; use sp_core::H256; @@ -77,8 +77,9 @@ thread_local! { /// A mock offence report handler. pub struct OffenceHandler; impl ReportOffence for OffenceHandler { - fn report_offence(reporters: Vec, offence: Offence) { + fn report_offence(reporters: Vec, offence: Offence) -> Result<(), OffenceError> { OFFENCES.with(|l| l.borrow_mut().push((reporters, offence))); + Ok(()) } } diff --git a/frame/offences/src/lib.rs b/frame/offences/src/lib.rs index 7831ba65a3b..27983cbb533 100644 --- a/frame/offences/src/lib.rs +++ b/frame/offences/src/lib.rs @@ -30,7 +30,7 @@ use frame_support::{ }; use sp_runtime::traits::Hash; use sp_staking::{ - offence::{Offence, ReportOffence, Kind, OnOffenceHandler, OffenceDetails}, + offence::{Offence, ReportOffence, Kind, OnOffenceHandler, OffenceDetails, OffenceError}, }; use codec::{Encode, Decode}; use frame_system as system; @@ -90,7 +90,7 @@ impl> where T::IdentificationTuple: Clone, { - fn report_offence(reporters: Vec, offence: O) { + fn report_offence(reporters: Vec, offence: O) -> Result<(), OffenceError> { let offenders = offence.offenders(); let time_slot = offence.time_slot(); let validator_set_count = offence.validator_set_count(); @@ -104,7 +104,7 @@ where ) { Some(triage) => triage, // The report contained only duplicates, so there is no need to slash again. - None => return, + None => return Err(OffenceError::DuplicateReport), }; // Deposit the event. @@ -123,6 +123,8 @@ where &slash_perbill, offence.session_index(), ); + + Ok(()) } } diff --git a/frame/offences/src/tests.rs b/frame/offences/src/tests.rs index f2f82cf7a87..0ed98427c65 100644 --- a/frame/offences/src/tests.rs +++ b/frame/offences/src/tests.rs @@ -40,7 +40,7 @@ fn should_report_an_authority_and_trigger_on_offence() { }; // when - Offences::report_offence(vec![], offence); + Offences::report_offence(vec![], offence).unwrap(); // then with_on_offence_fractions(|f| { @@ -61,7 +61,7 @@ fn should_not_report_the_same_authority_twice_in_the_same_slot() { time_slot, offenders: vec![5], }; - Offences::report_offence(vec![], offence.clone()); + Offences::report_offence(vec![], offence.clone()).unwrap(); with_on_offence_fractions(|f| { assert_eq!(f.clone(), vec![Perbill::from_percent(25)]); f.clear(); @@ -69,7 +69,7 @@ fn should_not_report_the_same_authority_twice_in_the_same_slot() { // when // report for the second time - Offences::report_offence(vec![], offence); + assert_eq!(Offences::report_offence(vec![], offence), Err(OffenceError::DuplicateReport)); // then with_on_offence_fractions(|f| { @@ -91,7 +91,7 @@ fn should_report_in_different_time_slot() { time_slot, offenders: vec![5], }; - Offences::report_offence(vec![], offence.clone()); + Offences::report_offence(vec![], offence.clone()).unwrap(); with_on_offence_fractions(|f| { assert_eq!(f.clone(), vec![Perbill::from_percent(25)]); f.clear(); @@ -100,7 +100,7 @@ fn should_report_in_different_time_slot() { // when // report for the second time offence.time_slot += 1; - Offences::report_offence(vec![], offence); + Offences::report_offence(vec![], offence).unwrap(); // then with_on_offence_fractions(|f| { @@ -123,7 +123,7 @@ fn should_deposit_event() { }; // when - Offences::report_offence(vec![], offence); + Offences::report_offence(vec![], offence).unwrap(); // then assert_eq!( @@ -149,7 +149,7 @@ fn doesnt_deposit_event_for_dups() { time_slot, offenders: vec![5], }; - Offences::report_offence(vec![], offence.clone()); + Offences::report_offence(vec![], offence.clone()).unwrap(); with_on_offence_fractions(|f| { assert_eq!(f.clone(), vec![Perbill::from_percent(25)]); f.clear(); @@ -157,7 +157,7 @@ fn doesnt_deposit_event_for_dups() { // when // report for the second time - Offences::report_offence(vec![], offence); + assert_eq!(Offences::report_offence(vec![], offence), Err(OffenceError::DuplicateReport)); // then // there is only one event. @@ -191,7 +191,7 @@ fn should_properly_count_offences() { time_slot, offenders: vec![4], }; - Offences::report_offence(vec![], offence1); + Offences::report_offence(vec![], offence1).unwrap(); with_on_offence_fractions(|f| { assert_eq!(f.clone(), vec![Perbill::from_percent(25)]); f.clear(); @@ -199,7 +199,7 @@ fn should_properly_count_offences() { // when // report for the second time - Offences::report_offence(vec![], offence2); + Offences::report_offence(vec![], offence2).unwrap(); // then // the 1st authority should have count 2 and the 2nd one should be reported only once. diff --git a/frame/staking/src/lib.rs b/frame/staking/src/lib.rs index ee708dabd3c..81bce3b5487 100644 --- a/frame/staking/src/lib.rs +++ b/frame/staking/src/lib.rs @@ -276,7 +276,7 @@ use sp_runtime::{ }; use sp_staking::{ SessionIndex, - offence::{OnOffenceHandler, OffenceDetails, Offence, ReportOffence}, + offence::{OnOffenceHandler, OffenceDetails, Offence, ReportOffence, OffenceError}, }; #[cfg(feature = "std")] use sp_runtime::{Serialize, Deserialize}; @@ -1828,7 +1828,7 @@ impl ReportOffence R: ReportOffence, O: Offence, { - fn report_offence(reporters: Vec, offence: O) { + fn report_offence(reporters: Vec, offence: O) -> Result<(), OffenceError> { >::ensure_storage_upgraded(); // disallow any slashing from before the current bonding period. @@ -1840,7 +1840,8 @@ impl ReportOffence } else { >::deposit_event( RawEvent::OldSlashingReportDiscarded(offence_session) - ) + ); + Ok(()) } } } diff --git a/primitives/staking/src/offence.rs b/primitives/staking/src/offence.rs index cac1ed065ce..06e73f018b7 100644 --- a/primitives/staking/src/offence.rs +++ b/primitives/staking/src/offence.rs @@ -91,14 +91,37 @@ pub trait Offence { ) -> Perbill; } +/// Errors that may happen on offence reports. +#[derive(PartialEq, sp_runtime::RuntimeDebug)] +pub enum OffenceError { + /// The report has already been sumbmitted. + DuplicateReport, + + /// Other error has happened. + Other(u8), +} + +impl sp_runtime::traits::Printable for OffenceError { + fn print(&self) { + "OffenceError".print(); + match self { + Self::DuplicateReport => "DuplicateReport".print(), + Self::Other(e) => { + "Other".print(); + e.print(); + } + } + } +} + /// A trait for decoupling offence reporters from the actual handling of offence reports. pub trait ReportOffence> { /// Report an `offence` and reward given `reporters`. - fn report_offence(reporters: Vec, offence: O); + fn report_offence(reporters: Vec, offence: O) -> Result<(), OffenceError>; } impl> ReportOffence for () { - fn report_offence(_reporters: Vec, _offence: O) {} + fn report_offence(_reporters: Vec, _offence: O) -> Result<(), OffenceError> { Ok(()) } } /// A trait to take action on an offence. -- GitLab From 1808b9333612058378b6aa4861f83718de88f92f Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Mon, 2 Mar 2020 11:00:57 +0100 Subject: [PATCH 064/106] Update to libp2p 0.16.2 (#5088) --- Cargo.lock | 37 +++++++++----------------- bin/utils/subkey/Cargo.toml | 2 +- client/authority-discovery/Cargo.toml | 2 +- client/network-gossip/Cargo.toml | 2 +- client/network/Cargo.toml | 2 +- client/network/test/Cargo.toml | 2 +- client/peerset/Cargo.toml | 2 +- client/telemetry/Cargo.toml | 2 +- primitives/consensus/common/Cargo.toml | 2 +- utils/browser/Cargo.toml | 2 +- 10 files changed, 22 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 815981e2fc2..4da524e7ce8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2602,9 +2602,9 @@ dependencies = [ [[package]] name = "libp2p" -version = "0.16.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6bf152b510950e1030f2d3dcca5f0b4017892be50348a15fd3eec8b90c826fb" +checksum = "bba17ee9cac4bb89de5812159877d9b4f0a993bf41697a5a875940cd1eb71f24" dependencies = [ "bytes 0.5.4", "futures 0.3.4", @@ -2763,9 +2763,9 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.16.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c260a92309112fff855ab2bd8f26c246c1dd380b87021abe61358dedb9748d" +checksum = "464dc8412978d40f0286be72ed9ab5e0e1386a4a06e7f174526739b5c3c1f041" dependencies = [ "arrayvec 0.5.1", "bytes 0.5.4", @@ -2828,11 +2828,11 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.16.0" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac7d33809afdf6794f09fdb2f9f94e1550ae230be5bae6430a078eb96fc9e5a6" +checksum = "b15a8a3d71f898beb6f854c8aae27aa1d198e0d1f2e49412261c2d90ef39675a" dependencies = [ - "curve25519-dalek 1.2.3", + "curve25519-dalek 2.0.0", "futures 0.3.4", "lazy_static", "libp2p-core", @@ -2843,7 +2843,7 @@ dependencies = [ "sha2", "snow", "static_assertions", - "x25519-dalek 0.5.2", + "x25519-dalek", "zeroize 1.1.0", ] @@ -2967,9 +2967,9 @@ dependencies = [ [[package]] name = "libp2p-wasm-ext" -version = "0.16.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d40c95ac1a9b7fb7770616e4165f34559885337f3be485b32acdd085261be3a" +checksum = "923581c055bc4b8c5f42d4ce5ef43e52fe5216f1ea4bc26476cb8a966ce6220b" dependencies = [ "futures 0.3.4", "js-sys", @@ -3002,9 +3002,9 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.16.0" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f72aa5a7273c29c6eaea09108a49feaefc7456164863f64f86a193f9e78a4b7f" +checksum = "9dac30de24ccde0e67f363d71a125c587bbe6589503f664947e9b084b68a34f1" dependencies = [ "futures 0.3.4", "libp2p-core", @@ -6826,7 +6826,7 @@ dependencies = [ "rustc_version", "sha2", "subtle 2.2.2", - "x25519-dalek 0.6.0", + "x25519-dalek", ] [[package]] @@ -9083,17 +9083,6 @@ dependencies = [ "winapi-build", ] -[[package]] -name = "x25519-dalek" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee1585dc1484373cbc1cee7aafda26634665cf449436fd6e24bfd1fad230538" -dependencies = [ - "clear_on_drop", - "curve25519-dalek 1.2.3", - "rand_core 0.3.1", -] - [[package]] name = "x25519-dalek" version = "0.6.0" diff --git a/bin/utils/subkey/Cargo.toml b/bin/utils/subkey/Cargo.toml index dead684598f..b0777b1f700 100644 --- a/bin/utils/subkey/Cargo.toml +++ b/bin/utils/subkey/Cargo.toml @@ -30,7 +30,7 @@ derive_more = { version = "0.99.2" } sc-rpc = { version = "2.0.0-alpha.2", path = "../../../client/rpc" } jsonrpc-core-client = { version = "14.0.3", features = ["http"] } hyper = "0.12.35" -libp2p = "0.16.1" +libp2p = "0.16.2" serde_json = "1.0" [features] diff --git a/client/authority-discovery/Cargo.toml b/client/authority-discovery/Cargo.toml index 923408865a3..1e4c70abfeb 100644 --- a/client/authority-discovery/Cargo.toml +++ b/client/authority-discovery/Cargo.toml @@ -18,7 +18,7 @@ codec = { package = "parity-scale-codec", default-features = false, version = "1 derive_more = "0.99.2" futures = "0.3.1" futures-timer = "3.0.1" -libp2p = { version = "0.16.1", default-features = false, features = ["secp256k1", "libp2p-websocket"] } +libp2p = { version = "0.16.2", default-features = false, features = ["secp256k1", "libp2p-websocket"] } log = "0.4.8" prost = "0.6.1" rand = "0.7.2" diff --git a/client/network-gossip/Cargo.toml b/client/network-gossip/Cargo.toml index 6ed9f4de592..08c304c6e06 100644 --- a/client/network-gossip/Cargo.toml +++ b/client/network-gossip/Cargo.toml @@ -13,7 +13,7 @@ documentation = "https://docs.rs/sc-network-gossip" [dependencies] futures = "0.3.1" futures-timer = "3.0.1" -libp2p = { version = "0.16.1", default-features = false, features = ["libp2p-websocket"] } +libp2p = { version = "0.16.2", default-features = false, features = ["libp2p-websocket"] } log = "0.4.8" lru = "0.4.3" parking_lot = "0.10.0" diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index 4e07e84ba9d..50a19e9da05 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -26,7 +26,7 @@ futures = "0.3.1" futures_codec = "0.3.3" futures-timer = "3.0.1" wasm-timer = "0.2" -libp2p = { version = "0.16.1", default-features = false, features = ["libp2p-websocket"] } +libp2p = { version = "0.16.2", default-features = false, features = ["libp2p-websocket"] } linked-hash-map = "0.5.2" linked_hash_set = "0.1.3" log = "0.4.8" diff --git a/client/network/test/Cargo.toml b/client/network/test/Cargo.toml index 7b749a6d312..7fec4f4da8b 100644 --- a/client/network/test/Cargo.toml +++ b/client/network/test/Cargo.toml @@ -16,7 +16,7 @@ parking_lot = "0.10.0" futures = "0.3.1" futures-timer = "3.0.1" rand = "0.7.2" -libp2p = { version = "0.16.1", default-features = false, features = ["libp2p-websocket"] } +libp2p = { version = "0.16.2", default-features = false, features = ["libp2p-websocket"] } sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } sc-client = { version = "0.8.0-alpha.2", path = "../../" } sc-client-api = { version = "2.0.0-alpha.2", path = "../../api" } diff --git a/client/peerset/Cargo.toml b/client/peerset/Cargo.toml index d90aa21c4fc..9e76b8015af 100644 --- a/client/peerset/Cargo.toml +++ b/client/peerset/Cargo.toml @@ -12,7 +12,7 @@ documentation = "https://docs.rs/sc-peerset" [dependencies] futures = "0.3.1" -libp2p = { version = "0.16.1", default-features = false } +libp2p = { version = "0.16.2", default-features = false } log = "0.4.8" serde_json = "1.0.41" wasm-timer = "0.2" diff --git a/client/telemetry/Cargo.toml b/client/telemetry/Cargo.toml index 108c13de35c..248c90ec686 100644 --- a/client/telemetry/Cargo.toml +++ b/client/telemetry/Cargo.toml @@ -16,7 +16,7 @@ parking_lot = "0.10.0" futures = "0.3.1" futures-timer = "3.0.1" wasm-timer = "0.2.0" -libp2p = { version = "0.16.1", default-features = false, features = ["libp2p-websocket"] } +libp2p = { version = "0.16.2", default-features = false, features = ["libp2p-websocket"] } log = "0.4.8" pin-project = "0.4.6" rand = "0.7.2" diff --git a/primitives/consensus/common/Cargo.toml b/primitives/consensus/common/Cargo.toml index 0af3d1ad91c..684ae2d1f6d 100644 --- a/primitives/consensus/common/Cargo.toml +++ b/primitives/consensus/common/Cargo.toml @@ -12,7 +12,7 @@ documentation = "https://docs.rs/sp-consensus/" [dependencies] derive_more = "0.99.2" -libp2p = { version = "0.16.1", default-features = false } +libp2p = { version = "0.16.2", default-features = false } log = "0.4.8" sp-core = { path= "../../core" , version = "2.0.0-alpha.2"} sp-inherents = { version = "2.0.0-alpha.2", path = "../../inherents" } diff --git a/utils/browser/Cargo.toml b/utils/browser/Cargo.toml index 19892cb7ce8..e06794c6ccb 100644 --- a/utils/browser/Cargo.toml +++ b/utils/browser/Cargo.toml @@ -12,7 +12,7 @@ repository = "https://github.com/paritytech/substrate/" futures = "0.3" futures01 = { package = "futures", version = "0.1.29" } log = "0.4.8" -libp2p = { version = "0.16.1", default-features = false } +libp2p = { version = "0.16.2", default-features = false } console_error_panic_hook = "0.1.6" console_log = "0.1.2" js-sys = "0.3.34" -- GitLab From 65ad8e9632f1a627fc9fb386dc5b60a54741d7a0 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Mon, 2 Mar 2020 13:43:29 +0100 Subject: [PATCH 065/106] Remove request ID from the new protocol (#5049) --- client/network/src/protocol/block_requests.rs | 13 +- .../src/protocol/light_client_handler.rs | 162 +++++------------- .../network/src/protocol/schema/api.v1.proto | 18 +- .../src/protocol/schema/light.v1.proto | 22 +-- 4 files changed, 68 insertions(+), 147 deletions(-) diff --git a/client/network/src/protocol/block_requests.rs b/client/network/src/protocol/block_requests.rs index ef970657c5f..20a99378b16 100644 --- a/client/network/src/protocol/block_requests.rs +++ b/client/network/src/protocol/block_requests.rs @@ -111,7 +111,7 @@ impl Config { let mut v = Vec::new(); v.extend_from_slice(b"/"); v.extend_from_slice(id.as_bytes()); - v.extend_from_slice(b"/sync/1"); + v.extend_from_slice(b"/sync/2"); self.protocol = v.into(); self } @@ -146,8 +146,7 @@ where , request: &api::v1::BlockRequest ) -> Result { - log::trace!("block request {} from peer {}: from block {:?} to block {:?}, max blocks {:?}", - request.id, + log::trace!("block request from peer {}: from block {:?} to block {:?}, max blocks {:?}", peer, request.from_block, request.to_block, @@ -242,7 +241,7 @@ where } } - Ok(api::v1::BlockResponse { id: request.id, blocks }) + Ok(api::v1::BlockResponse { blocks }) } } @@ -274,10 +273,10 @@ where fn inject_node_event(&mut self, peer: PeerId, Request(request, mut stream): Request) { match self.on_block_request(&peer, &request) { Ok(res) => { - log::trace!("enqueueing block response {} for peer {} with {} blocks", res.id, peer, res.blocks.len()); + log::trace!("enqueueing block response for peer {} with {} blocks", peer, res.blocks.len()); let mut data = Vec::with_capacity(res.encoded_len()); if let Err(e) = res.encode(&mut data) { - log::debug!("error encoding block response {} for peer {}: {}", res.id, peer, e) + log::debug!("error encoding block response for peer {}: {}", peer, e) } else { let future = async move { if let Err(e) = write_one(&mut stream, data).await { @@ -287,7 +286,7 @@ where self.outgoing.push(future.boxed()) } } - Err(e) => log::debug!("error handling block request {} from peer {}: {}", request.id, peer, e) + Err(e) => log::debug!("error handling block request from peer {}: {}", peer, e) } } diff --git a/client/network/src/protocol/light_client_handler.rs b/client/network/src/protocol/light_client_handler.rs index 77cf71408d6..b531f3515a6 100644 --- a/client/network/src/protocol/light_client_handler.rs +++ b/client/network/src/protocol/light_client_handler.rs @@ -127,7 +127,7 @@ impl Config { let mut v = Vec::new(); v.extend_from_slice(b"/"); v.extend_from_slice(id.as_bytes()); - v.extend_from_slice(b"/light/1"); + v.extend_from_slice(b"/light/2"); self.protocol = v.into(); self } @@ -350,7 +350,7 @@ where , response: api::v1::light::Response ) -> Result, Error> { - log::trace!("response {} from {}", response.id, peer); + log::trace!("response from {}", peer); use api::v1::light::response::Response; match response.response { Some(Response::RemoteCallResponse(response)) => @@ -419,12 +419,10 @@ where fn on_remote_call_request ( &mut self , peer: &PeerId - , request_id: u64 , request: &api::v1::light::RemoteCallRequest ) -> Result { - log::trace!("remote call request {} from {} ({} at {:?})", - request_id, + log::trace!("remote call request from {} ({} at {:?})", peer, request.method, request.block); @@ -434,8 +432,7 @@ where let proof = match self.chain.execution_proof(&block, &request.method, &request.data) { Ok((_, proof)) => proof, Err(e) => { - log::trace!("remote call request {} from {} ({} at {:?}) failed with: {}", - request_id, + log::trace!("remote call request from {} ({} at {:?}) failed with: {}", peer, request.method, request.block, @@ -449,13 +446,12 @@ where api::v1::light::response::Response::RemoteCallResponse(r) }; - Ok(api::v1::light::Response { id: request_id, response: Some(response) }) + Ok(api::v1::light::Response { response: Some(response) }) } fn on_remote_read_request ( &mut self , peer: &PeerId - , request_id: u64 , request: &api::v1::light::RemoteReadRequest ) -> Result { @@ -464,8 +460,7 @@ where return Err(Error::BadRequest("remote read request without keys")) } - log::trace!("remote read request {} from {} ({} at {:?})", - request_id, + log::trace!("remote read request from {} ({} at {:?})", peer, fmt_keys(request.keys.first(), request.keys.last()), request.block); @@ -475,8 +470,7 @@ where let proof = match self.chain.read_proof(&block, &request.keys) { Ok(proof) => proof, Err(error) => { - log::trace!("remote read request {} from {} ({} at {:?}) failed with: {}", - request_id, + log::trace!("remote read request from {} ({} at {:?}) failed with: {}", peer, fmt_keys(request.keys.first(), request.keys.last()), request.block, @@ -490,13 +484,12 @@ where api::v1::light::response::Response::RemoteReadResponse(r) }; - Ok(api::v1::light::Response { id: request_id, response: Some(response) }) + Ok(api::v1::light::Response { response: Some(response) }) } fn on_remote_read_child_request ( &mut self , peer: &PeerId - , request_id: u64 , request: &api::v1::light::RemoteReadChildRequest ) -> Result { @@ -505,8 +498,7 @@ where return Err(Error::BadRequest("remove read child request without keys")) } - log::trace!("remote read child request {} from {} ({} {} at {:?})", - request_id, + log::trace!("remote read child request from {} ({} {} at {:?})", peer, request.storage_key.to_hex::(), fmt_keys(request.keys.first(), request.keys.last()), @@ -519,8 +511,7 @@ where match self.chain.read_child_proof(&block, &request.storage_key, info, &request.keys) { Ok(proof) => proof, Err(error) => { - log::trace!("remote read child request {} from {} ({} {} at {:?}) failed with: {}", - request_id, + log::trace!("remote read child request from {} ({} {} at {:?}) failed with: {}", peer, request.storage_key.to_hex::(), fmt_keys(request.keys.first(), request.keys.last()), @@ -530,8 +521,7 @@ where } } } else { - log::trace!("remote read child request {} from {} ({} {} at {:?}) failed with: {}", - request_id, + log::trace!("remote read child request from {} ({} {} at {:?}) failed with: {}", peer, request.storage_key.to_hex::(), fmt_keys(request.keys.first(), request.keys.last()), @@ -546,25 +536,23 @@ where api::v1::light::response::Response::RemoteReadResponse(r) }; - Ok(api::v1::light::Response { id: request_id, response: Some(response) }) + Ok(api::v1::light::Response { response: Some(response) }) } fn on_remote_header_request ( &mut self , peer: &PeerId - , request_id: u64 , request: &api::v1::light::RemoteHeaderRequest ) -> Result { - log::trace!("remote header proof request {} from {} ({:?})", request_id, peer, request.block); + log::trace!("remote header proof request from {} ({:?})", peer, request.block); let block = Decode::decode(&mut request.block.as_ref())?; let (header, proof) = match self.chain.header_proof(block) { Ok((header, proof)) => (header.encode(), proof), Err(error) => { - log::trace!("remote header proof request {} from {} ({:?}) failed with: {}", - request_id, + log::trace!("remote header proof request from {} ({:?}) failed with: {}", peer, request.block, error); @@ -577,18 +565,16 @@ where api::v1::light::response::Response::RemoteHeaderResponse(r) }; - Ok(api::v1::light::Response { id: request_id, response: Some(response) }) + Ok(api::v1::light::Response { response: Some(response) }) } fn on_remote_changes_request ( &mut self , peer: &PeerId - , request_id: u64 , request: &api::v1::light::RemoteChangesRequest ) -> Result { - log::trace!("remote changes proof request {} from {} for key {} ({:?}..{:?})", - request_id, + log::trace!("remote changes proof request from {} for key {} ({:?}..{:?})", peer, if !request.storage_key.is_empty() { format!("{} : {}", request.storage_key.to_hex::(), request.key.to_hex::()) @@ -613,8 +599,7 @@ where let proof = match self.chain.key_changes_proof(first, last, min, max, storage_key.as_ref(), &key) { Ok(proof) => proof, Err(error) => { - log::trace!("remote changes proof request {} from {} for key {} ({:?}..{:?}) failed with: {}", - request_id, + log::trace!("remote changes proof request from {} for key {} ({:?}..{:?}) failed with: {}", peer, if let Some(sk) = storage_key { format!("{} : {}", sk.0.to_hex::(), key.0.to_hex::()) @@ -646,7 +631,7 @@ where api::v1::light::response::Response::RemoteChangesResponse(r) }; - Ok(api::v1::light::Response { id: request_id, response: Some(response) }) + Ok(api::v1::light::Response { response: Some(response) }) } } @@ -697,29 +682,29 @@ where match event { // An incoming request from remote has been received. Event::Request(request, mut stream) => { - log::trace!("incoming request {} from {}", peer, request.id); + log::trace!("incoming request from {}", peer); let result = match &request.request { Some(api::v1::light::request::Request::RemoteCallRequest(r)) => - self.on_remote_call_request(&peer, request.id, r), + self.on_remote_call_request(&peer, r), Some(api::v1::light::request::Request::RemoteReadRequest(r)) => - self.on_remote_read_request(&peer, request.id, r), + self.on_remote_read_request(&peer, r), Some(api::v1::light::request::Request::RemoteHeaderRequest(r)) => - self.on_remote_header_request(&peer, request.id, r), + self.on_remote_header_request(&peer, r), Some(api::v1::light::request::Request::RemoteReadChildRequest(r)) => - self.on_remote_read_child_request(&peer, request.id, r), + self.on_remote_read_child_request(&peer, r), Some(api::v1::light::request::Request::RemoteChangesRequest(r)) => - self.on_remote_changes_request(&peer, request.id, r), + self.on_remote_changes_request(&peer, r), None => { - log::debug!("ignoring request {} without request data from peer {}", request.id, peer); + log::debug!("ignoring request without request data from peer {}", peer); return } }; match result { Ok(response) => { - log::trace!("enqueueing response {} for peer {}", response.id, peer); + log::trace!("enqueueing response for peer {}", peer); let mut data = Vec::new(); if let Err(e) = response.encode(&mut data) { - log::debug!("error encoding response {} for peer {}: {}", response.id, peer, e) + log::debug!("error encoding response for peer {}: {}", peer, e) } else { let future = async move { if let Err(e) = write_one(&mut stream, data).await { @@ -733,16 +718,15 @@ where self.remove_peer(&peer); self.peerset.report_peer(peer, ReputationChange::new(-(1 << 12), "bad request")) } - Err(e) => log::debug!("error handling request {} from peer {}: {}", request.id, peer, e) + Err(e) => log::debug!("error handling request from peer {}: {}", peer, e) } } // A response to one of our own requests has been received. - Event::Response(response) => { - let id = response.id; + Event::Response(id, response) => { if let Some(request) = self.outstanding.remove(&id) { // We first just check if the response originates from the expected peer. if request.peer != peer { - log::debug!("was expecting response {} from {} instead of {}", id, request.peer, peer); + log::debug!("was expecting response from {} instead of {}", request.peer, peer); self.outstanding.insert(id, request); self.remove_peer(&peer); self.peerset.report_peer(peer, ReputationChange::new_fatal("response from unexpected peer")); @@ -836,16 +820,17 @@ where } }; if let Some(peer) = available_peer { - let id = self.next_request_id(); - let rq = serialize_request(id, &request.request); + let rq = serialize_request(&request.request); let mut buf = Vec::with_capacity(rq.encoded_len()); if let Err(e) = rq.encode(&mut buf) { - log::debug!("failed to serialize request {}: {}", id, e); + log::debug!("failed to serialize request: {}", e); send_reply(Err(ClientError::RemoteFetchFailed), request.request) } else { + let id = self.next_request_id(); log::trace!("sending request {} to peer {}", id, peer); let protocol = OutboundProtocol { request: buf, + request_id: id, max_data_size: self.config.max_data_size, protocol: self.config.protocol.clone(), }; @@ -918,7 +903,7 @@ fn retries(request: &Request) -> usize { rc.unwrap_or(0) } -fn serialize_request(id: u64, request: &Request) -> api::v1::light::Request { +fn serialize_request(request: &Request) -> api::v1::light::Request { let request = match request { Request::Header { request, .. } => { let r = api::v1::light::RemoteHeaderRequest { block: request.block.encode() }; @@ -962,7 +947,7 @@ fn serialize_request(id: u64, request: &Request) -> api::v1::light: } }; - api::v1::light::Request { id, request: Some(request) } + api::v1::light::Request { request: Some(request) } } fn send_reply(result: Result, ClientError>, request: Request) { @@ -1004,7 +989,7 @@ pub enum Event { /// Incoming request from remote and substream to use for the response. Request(api::v1::light::Request, T), /// Incoming response from remote. - Response(api::v1::light::Response), + Response(u64, api::v1::light::Response), } /// Substream upgrade protocol. @@ -1054,6 +1039,8 @@ where pub struct OutboundProtocol { /// The serialized protobuf request. request: Vec, + /// Local identifier for the request. Used to associate it with a response. + request_id: u64, /// The max. request length in bytes. max_data_size: usize, /// The protocol to use for upgrade negotiation. @@ -1082,7 +1069,7 @@ where write_one(&mut s, &self.request).await?; let vec = read_one(&mut s, self.max_data_size).await?; api::v1::light::Response::decode(&vec[..]) - .map(Event::Response) + .map(|r| Event::Response(self.request_id, r)) .map_err(|e| { ReadOneError::Io(io::Error::new(io::ErrorKind::Other, e)) }) @@ -1308,53 +1295,6 @@ mod tests { assert_eq!(0, behaviour.outstanding.len()); } - #[test] - fn disconnects_from_peer_on_response_with_wrong_id() { - let peer = PeerId::random(); - let pset = peerset(); - let mut behaviour = make_behaviour(true, pset.1, make_config()); - - behaviour.inject_connected(peer.clone(), empty_dialer()); - assert_eq!(1, behaviour.peers.len()); - - let chan = oneshot::channel(); - let request = fetcher::RemoteCallRequest { - block: Default::default(), - header: dummy_header(), - method: "test".into(), - call_data: vec![], - retry_count: Some(1), - }; - behaviour.request(Request::Call { request, sender: chan.0 }).unwrap(); - - assert_eq!(1, behaviour.pending_requests.len()); - assert_eq!(0, behaviour.outstanding.len()); - poll(&mut behaviour); // Make progress - assert_eq!(0, behaviour.pending_requests.len()); - assert_eq!(1, behaviour.outstanding.len()); - - // Construct response with bogus ID - let response = { - let r = api::v1::light::RemoteCallResponse { proof: empty_proof() }; - api::v1::light::Response { - id: 2365789, - response: Some(api::v1::light::response::Response::RemoteCallResponse(r)), - } - }; - - // Make sure our bogus ID is really not used. - assert!(!behaviour.outstanding.keys().any(|id| id == &response.id)); - - behaviour.inject_node_event(peer.clone(), Event::Response(response)); - assert!(behaviour.peers.is_empty()); - - poll(&mut behaviour); // More progress - - // The request should be back in the pending queue - assert_eq!(1, behaviour.pending_requests.len()); - assert_eq!(0, behaviour.outstanding.len()); - } - #[test] fn disconnects_from_peer_on_incorrect_response() { let peer = PeerId::random(); @@ -1386,12 +1326,11 @@ mod tests { let response = { let r = api::v1::light::RemoteCallResponse { proof: empty_proof() }; api::v1::light::Response { - id: request_id, response: Some(api::v1::light::response::Response::RemoteCallResponse(r)), } }; - behaviour.inject_node_event(peer.clone(), Event::Response(response)); + behaviour.inject_node_event(peer.clone(), Event::Response(request_id, response)); assert!(behaviour.peers.is_empty()); poll(&mut behaviour); // More progress @@ -1416,12 +1355,11 @@ mod tests { let response = { let r = api::v1::light::RemoteCallResponse { proof: empty_proof() }; api::v1::light::Response { - id: 2347895932, response: Some(api::v1::light::response::Response::RemoteCallResponse(r)), } }; - behaviour.inject_node_event(peer.clone(), Event::Response(response)); + behaviour.inject_node_event(peer.clone(), Event::Response(2347895932, response)); assert!(behaviour.peers.is_empty()); poll(&mut behaviour); @@ -1459,12 +1397,11 @@ mod tests { let response = { let r = api::v1::light::RemoteReadResponse { proof: empty_proof() }; // Not a RemoteCallResponse! api::v1::light::Response { - id: request_id, response: Some(api::v1::light::response::Response::RemoteReadResponse(r)), } }; - behaviour.inject_node_event(peer.clone(), Event::Response(response)); + behaviour.inject_node_event(peer.clone(), Event::Response(request_id, response)); assert!(behaviour.peers.is_empty()); poll(&mut behaviour); // More progress @@ -1513,11 +1450,10 @@ mod tests { let response = { let r = api::v1::light::RemoteCallResponse { proof: empty_proof() }; api::v1::light::Response { - id: request_id, response: Some(api::v1::light::response::Response::RemoteCallResponse(r)) } }; - behaviour.inject_node_event(responding_peer, Event::Response(response.clone())); + behaviour.inject_node_event(responding_peer, Event::Response(request_id, response.clone())); assert_matches!(poll(&mut behaviour), Poll::Ready(NetworkBehaviourAction::SendEvent { .. })); assert_matches!(chan.1.try_recv(), Ok(None)) } @@ -1527,11 +1463,10 @@ mod tests { let response = { let r = api::v1::light::RemoteCallResponse { proof: empty_proof() }; api::v1::light::Response { - id: request_id, response: Some(api::v1::light::response::Response::RemoteCallResponse(r)), } }; - behaviour.inject_node_event(responding_peer, Event::Response(response)); + behaviour.inject_node_event(responding_peer, Event::Response(request_id, response)); assert_matches!(poll(&mut behaviour), Poll::Pending); assert_matches!(chan.1.try_recv(), Ok(Some(Err(ClientError::RemoteFetchFailed)))) } @@ -1551,28 +1486,24 @@ mod tests { proof: empty_proof() }; api::v1::light::Response { - id: 1, response: Some(api::v1::light::response::Response::RemoteHeaderResponse(r)), } } Request::Read{..} => { let r = api::v1::light::RemoteReadResponse { proof: empty_proof() }; api::v1::light::Response { - id: 1, response: Some(api::v1::light::response::Response::RemoteReadResponse(r)), } } Request::ReadChild{..} => { let r = api::v1::light::RemoteReadResponse { proof: empty_proof() }; api::v1::light::Response { - id: 1, response: Some(api::v1::light::response::Response::RemoteReadResponse(r)), } } Request::Call{..} => { let r = api::v1::light::RemoteCallResponse { proof: empty_proof() }; api::v1::light::Response { - id: 1, response: Some(api::v1::light::response::Response::RemoteCallResponse(r)), } } @@ -1584,7 +1515,6 @@ mod tests { roots_proof: empty_proof() }; api::v1::light::Response { - id: 1, response: Some(api::v1::light::response::Response::RemoteChangesResponse(r)), } } @@ -1599,7 +1529,7 @@ mod tests { assert_eq!(1, behaviour.outstanding.len()); assert_eq!(1, *behaviour.outstanding.keys().next().unwrap()); - behaviour.inject_node_event(peer.clone(), Event::Response(response)); + behaviour.inject_node_event(peer.clone(), Event::Response(1, response)); poll(&mut behaviour); diff --git a/client/network/src/protocol/schema/api.v1.proto b/client/network/src/protocol/schema/api.v1.proto index 73128c53de4..ccbf49d6661 100644 --- a/client/network/src/protocol/schema/api.v1.proto +++ b/client/network/src/protocol/schema/api.v1.proto @@ -14,31 +14,27 @@ enum Direction { // Request block data from a peer. message BlockRequest { - // Unique request id. - uint64 id = 1; // Bits of block data to request. - uint32 fields = 2; + uint32 fields = 1; // Start from this block. oneof from_block { // Start with given hash. - bytes hash = 3; + bytes hash = 2; // Start with given block number. - bytes number = 4; + bytes number = 3; } // End at this block. An implementation defined maximum is used when unspecified. - bytes to_block = 5; // optional + bytes to_block = 4; // optional // Sequence direction. - Direction direction = 6; + Direction direction = 5; // Maximum number of blocks to return. An implementation defined maximum is used when unspecified. - uint32 max_blocks = 7; // optional + uint32 max_blocks = 6; // optional } // Response to `BlockRequest` message BlockResponse { - // Id of a request this response was made for. - uint64 id = 1; // Block data for the requested sequence. - repeated BlockData blocks = 2; + repeated BlockData blocks = 1; } // Block data sent in the response. diff --git a/client/network/src/protocol/schema/light.v1.proto b/client/network/src/protocol/schema/light.v1.proto index b9aee67b5ee..1c98d49730c 100644 --- a/client/network/src/protocol/schema/light.v1.proto +++ b/client/network/src/protocol/schema/light.v1.proto @@ -14,26 +14,22 @@ message Pair { // Enumerate all possible light client request messages. message Request { - // Unique request id. - uint64 id = 1; oneof request { - RemoteCallRequest remote_call_request = 2; - RemoteReadRequest remote_read_request = 3; - RemoteHeaderRequest remote_header_request = 4; - RemoteReadChildRequest remote_read_child_request = 5; - RemoteChangesRequest remote_changes_request = 6; + RemoteCallRequest remote_call_request = 1; + RemoteReadRequest remote_read_request = 2; + RemoteHeaderRequest remote_header_request = 3; + RemoteReadChildRequest remote_read_child_request = 4; + RemoteChangesRequest remote_changes_request = 5; } } // Enumerate all possible light client response messages. message Response { - /// Id of a request this response was made for. - uint64 id = 1; oneof response { - RemoteCallResponse remote_call_response = 2; - RemoteReadResponse remote_read_response = 3; - RemoteHeaderResponse remote_header_response = 4; - RemoteChangesResponse remote_changes_response = 6; + RemoteCallResponse remote_call_response = 1; + RemoteReadResponse remote_read_response = 2; + RemoteHeaderResponse remote_header_response = 3; + RemoteChangesResponse remote_changes_response = 4; } } -- GitLab From 7e383edb2f8ed9a912cc012905d752795b8a3201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Mon, 2 Mar 2020 18:20:04 +0100 Subject: [PATCH 066/106] Make sure we remove a peer on disconnect in gossip (#5104) * Make sure we remove peers on disconnect in gossip state machine * Clear up the code * Add a comment --- client/network-gossip/src/state_machine.rs | 49 ++++++++++++++++++++++ client/network/src/protocol/sync.rs | 3 +- client/network/src/protocol/sync/blocks.rs | 27 ++++++------ 3 files changed, 63 insertions(+), 16 deletions(-) diff --git a/client/network-gossip/src/state_machine.rs b/client/network-gossip/src/state_machine.rs index 26433e63ec3..db5ea3603dc 100644 --- a/client/network-gossip/src/state_machine.rs +++ b/client/network-gossip/src/state_machine.rs @@ -258,6 +258,7 @@ impl ConsensusGossip { let mut context = NetworkContext { gossip: self, network, engine_id: engine_id.clone() }; v.peer_disconnected(&mut context, &who); } + self.peers.remove(&who); } /// Perform periodic maintenance @@ -644,4 +645,52 @@ mod tests { let _ = consensus.live_message_sinks.remove(&([0, 0, 0, 0], topic)); assert_eq!(stream.next(), None); } + + #[test] + fn peer_is_removed_on_disconnect() { + struct TestNetwork; + impl Network for TestNetwork { + fn event_stream( + &self, + ) -> std::pin::Pin + Send>> { + unimplemented!("Not required in tests") + } + + fn report_peer(&self, _: PeerId, _: crate::ReputationChange) { + unimplemented!("Not required in tests") + } + + fn disconnect_peer(&self, _: PeerId) { + unimplemented!("Not required in tests") + } + + fn write_notification(&self, _: PeerId, _: crate::ConsensusEngineId, _: Vec) { + unimplemented!("Not required in tests") + } + + fn register_notifications_protocol( + &self, + _: ConsensusEngineId, + _: std::borrow::Cow<'static, [u8]>, + ) { + unimplemented!("Not required in tests") + } + + fn announce(&self, _: H256, _: Vec) { + unimplemented!("Not required in tests") + } + } + + let mut consensus = ConsensusGossip::::new(); + consensus.register_validator_internal([0, 0, 0, 0], Arc::new(AllowAll)); + + let mut network = TestNetwork; + + let peer_id = PeerId::random(); + consensus.new_peer(&mut network, peer_id.clone(), Roles::FULL); + assert!(consensus.peers.contains_key(&peer_id)); + + consensus.peer_disconnected(&mut network, peer_id.clone()); + assert!(!consensus.peers.contains_key(&peer_id)); + } } diff --git a/client/network/src/protocol/sync.rs b/client/network/src/protocol/sync.rs index b1cd89155ef..d0427e61a81 100644 --- a/client/network/src/protocol/sync.rs +++ b/client/network/src/protocol/sync.rs @@ -1167,8 +1167,7 @@ impl ChainSync { } /// Restart the sync process. - fn restart<'a>(&'a mut self) -> impl Iterator), BadPeer>> + 'a - { + fn restart<'a>(&'a mut self) -> impl Iterator), BadPeer>> + 'a { self.queue_blocks.clear(); self.blocks.clear(); let info = self.client.info(); diff --git a/client/network/src/protocol/sync/blocks.rs b/client/network/src/protocol/sync/blocks.rs index d4e4581c670..279150a2255 100644 --- a/client/network/src/protocol/sync/blocks.rs +++ b/client/network/src/protocol/sync/blocks.rs @@ -104,8 +104,7 @@ impl BlockCollection { common: NumberFor, max_parallel: u32, max_ahead: u32, - ) -> Option>> - { + ) -> Option>> { if peer_best <= common { // Bail out early return None; @@ -165,20 +164,20 @@ impl BlockCollection { pub fn drain(&mut self, from: NumberFor) -> Vec> { let mut drained = Vec::new(); let mut ranges = Vec::new(); - { - let mut prev = from; - for (start, range_data) in &mut self.blocks { - match range_data { - &mut BlockRangeState::Complete(ref mut blocks) if *start <= prev => { - prev = *start + (blocks.len() as u32).into(); - let mut blocks = mem::replace(blocks, Vec::new()); - drained.append(&mut blocks); - ranges.push(*start); - }, - _ => break, - } + + let mut prev = from; + for (start, range_data) in &mut self.blocks { + match range_data { + &mut BlockRangeState::Complete(ref mut blocks) if *start <= prev => { + prev = *start + (blocks.len() as u32).into(); + // Remove all elements from `blocks` and add them to `drained` + drained.append(blocks); + ranges.push(*start); + }, + _ => break, } } + for r in ranges { self.blocks.remove(&r); } -- GitLab From 9fb3a7f7ba3f2a19e9585c26075bee724ba08f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Tue, 3 Mar 2020 10:24:26 +0100 Subject: [PATCH 067/106] Expose `state-db` memory info (#5110) This exposes memory statistics from the state-db. --- Cargo.lock | 33 +++++++++++ client/api/src/client.rs | 57 +++++++++++++++++-- client/db/src/lib.rs | 16 ++++-- client/db/src/light.rs | 9 +-- client/informant/src/lib.rs | 5 +- client/service/src/builder.rs | 16 ++++-- client/state-db/Cargo.toml | 3 + client/state-db/src/lib.rs | 86 ++++++++++++++++++++++------- client/state-db/src/noncanonical.rs | 10 +++- client/state-db/src/pruning.rs | 3 +- 10 files changed, 196 insertions(+), 42 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4da524e7ce8..47583e57e3e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1226,6 +1226,33 @@ dependencies = [ "serde_json", ] +[[package]] +name = "ethbloom" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32cfe1c169414b709cf28aa30c74060bdb830a03a8ba473314d079ac79d80a5f" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-rlp", + "impl-serde 0.2.3", + "tiny-keccak 1.5.0", +] + +[[package]] +name = "ethereum-types" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba744248e3553a393143d5ebb68939fc3a4ec0c22a269682535f5ffe7fed728c" +dependencies = [ + "ethbloom", + "fixed-hash", + "impl-rlp", + "impl-serde 0.2.3", + "primitive-types", + "uint", +] + [[package]] name = "evm" version = "0.15.0" @@ -4626,7 +4653,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef1476e40bf8f5c6776e9600983435821ca86eb9819d74a6207cca69d091406a" dependencies = [ "cfg-if", + "ethereum-types", + "hashbrown", "impl-trait-for-tuples", + "lru", "parity-util-mem-derive", "parking_lot 0.10.0", "primitive-types", @@ -6432,7 +6462,10 @@ dependencies = [ "env_logger 0.7.1", "log 0.4.8", "parity-scale-codec", + "parity-util-mem", + "parity-util-mem-derive", "parking_lot 0.10.0", + "sc-client-api", "sp-core", ] diff --git a/client/api/src/client.rs b/client/api/src/client.rs index 7503ce4a79e..4980015568b 100644 --- a/client/api/src/client.rs +++ b/client/api/src/client.rs @@ -97,13 +97,56 @@ pub struct ClientInfo { pub usage: Option, } +/// A wrapper to store the size of some memory. +#[derive(Default, Clone, Debug, Copy)] +pub struct MemorySize(usize); + +impl MemorySize { + /// Creates `Self` from the given `bytes` size. + pub fn from_bytes(bytes: usize) -> Self { + Self(bytes) + } + + /// Returns the memory size as bytes. + pub fn as_bytes(self) -> usize { + self.0 + } +} + +impl fmt::Display for MemorySize { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + if self.0 < 1024 { + write!(f, "{} bytes", self.0) + } else if self.0 < 1024 * 1024 { + write!(f, "{:.2} KiB", self.0 as f64 / 1024f64) + } else if self.0 < 1024 * 1024 * 1024 { + write!(f, "{:.2} MiB", self.0 as f64 / (1024f64 * 1024f64)) + } else { + write!(f, "{:.2} GiB", self.0 as f64 / (1024f64 * 1024f64 * 1024f64)) + } + } +} + +/// Memory statistics for state db. +#[derive(Default, Clone, Debug)] +pub struct StateDbMemoryInfo { + /// Memory usage of the non-canonical overlay + pub non_canonical: MemorySize, + /// Memory usage of the pruning window. + pub pruning: Option, + /// Memory usage of the pinned blocks. + pub pinned: MemorySize, +} + /// Memory statistics for client instance. #[derive(Default, Clone, Debug)] pub struct MemoryInfo { /// Size of state cache. - pub state_cache: usize, + pub state_cache: MemorySize, /// Size of backend database cache. - pub database_cache: usize, + pub database_cache: MemorySize, + /// Size of the state db. + pub state_db: StateDbMemoryInfo, } /// I/O statistics for client instance. @@ -144,10 +187,16 @@ pub struct UsageInfo { impl fmt::Display for UsageInfo { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, - "caches: ({} state, {} db overlay), i/o: ({} tx, {} write, {} read, {} avg tx, {}/{} key cache reads/total, {} key writes)", + write!( + f, + "caches: ({} state, {} db overlay), \ + state db: ({} non-canonical, {} pruning, {} pinned), \ + i/o: ({} tx, {} write, {} read, {} avg tx, {}/{} key cache reads/total, {} key writes)", self.memory.state_cache, self.memory.database_cache, + self.memory.state_db.non_canonical, + self.memory.state_db.pruning.unwrap_or_default(), + self.memory.state_db.pinned, self.io.transactions, self.io.bytes_written, self.io.bytes_read, diff --git a/client/db/src/lib.rs b/client/db/src/lib.rs index 5173497509c..b4dd98457d4 100644 --- a/client/db/src/lib.rs +++ b/client/db/src/lib.rs @@ -46,9 +46,11 @@ use std::path::PathBuf; use std::io; use std::collections::HashMap; -use sc_client_api::{execution_extensions::ExecutionExtensions, ForkBlocks, UsageInfo, MemoryInfo, BadBlocks, IoInfo}; -use sc_client_api::backend::NewBlockState; -use sc_client_api::backend::PrunableStateChangesTrieStorage; +use sc_client_api::{ + ForkBlocks, UsageInfo, MemoryInfo, BadBlocks, IoInfo, MemorySize, + execution_extensions::ExecutionExtensions, + backend::{NewBlockState, PrunableStateChangesTrieStorage}, +}; use sp_blockchain::{ Result as ClientResult, Error as ClientError, well_known_cache_keys, HeaderBackend, @@ -1455,13 +1457,17 @@ impl sc_client_api::backend::Backend for Backend { self.state_usage.take(), ) ); - let database_cache = parity_util_mem::malloc_size(&*self.storage.db); - let state_cache = (*&self.shared_cache).lock().used_storage_cache_size(); + let database_cache = MemorySize::from_bytes(parity_util_mem::malloc_size(&*self.storage.db)); + let state_cache = MemorySize::from_bytes( + (*&self.shared_cache).lock().used_storage_cache_size(), + ); + let state_db = self.storage.state_db.memory_info(); Some(UsageInfo { memory: MemoryInfo { state_cache, database_cache, + state_db, }, io: IoInfo { transactions: io_stats.transactions, diff --git a/client/db/src/light.rs b/client/db/src/light.rs index 14ce6ac0f9a..3d30598b19e 100644 --- a/client/db/src/light.rs +++ b/client/db/src/light.rs @@ -317,7 +317,7 @@ impl LightStorage { // if the header includes changes trie root, let's build a changes tries roots CHT if header.digest().log(DigestItem::as_changes_trie_root).is_some() { let mut current_num = new_cht_start; - let cht_range = ::std::iter::from_fn(|| { + let cht_range = std::iter::from_fn(|| { let old_current_num = current_num; current_num = current_num + One::one(); Some(old_current_num) @@ -572,15 +572,16 @@ impl LightBlockchainStorage for LightStorage #[cfg(not(target_os = "unknown"))] fn usage_info(&self) -> Option { - use sc_client_api::{MemoryInfo, IoInfo}; + use sc_client_api::{MemoryInfo, IoInfo, MemorySize}; - let database_cache = parity_util_mem::malloc_size(&*self.db); + let database_cache = MemorySize::from_bytes(parity_util_mem::malloc_size(&*self.db)); let io_stats = self.io_stats.take_or_else(|| self.db.io_stats(kvdb::IoStatsKind::SincePrevious)); Some(UsageInfo { memory: MemoryInfo { database_cache, - state_cache: 0, + state_cache: Default::default(), + state_db: Default::default(), }, io: IoInfo { transactions: io_stats.transactions, diff --git a/client/informant/src/lib.rs b/client/informant/src/lib.rs index 699dcfdd742..d104a64a2db 100644 --- a/client/informant/src/lib.rs +++ b/client/informant/src/lib.rs @@ -46,7 +46,10 @@ pub fn build(service: &impl AbstractService, format: OutputFormat) -> impl futur if let Some(ref usage) = info.usage { trace!(target: "usage", "Usage statistics: {}", usage); } else { - trace!(target: "usage", "Usage statistics not displayed as backend does not provide it") + trace!( + target: "usage", + "Usage statistics not displayed as backend does not provide it", + ) } #[cfg(not(target_os = "unknown"))] trace!( diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index e5e4e132f9c..cce126f1b39 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -1085,10 +1085,18 @@ ServiceBuilder< "finalized_hash" => ?info.chain.finalized_hash, "bandwidth_download" => bandwidth_download, "bandwidth_upload" => bandwidth_upload, - "used_state_cache_size" => info.usage.as_ref().map(|usage| usage.memory.state_cache).unwrap_or(0), - "used_db_cache_size" => info.usage.as_ref().map(|usage| usage.memory.database_cache).unwrap_or(0), - "disk_read_per_sec" => info.usage.as_ref().map(|usage| usage.io.bytes_read).unwrap_or(0), - "disk_write_per_sec" => info.usage.as_ref().map(|usage| usage.io.bytes_written).unwrap_or(0), + "used_state_cache_size" => info.usage.as_ref() + .map(|usage| usage.memory.state_cache.as_bytes()) + .unwrap_or(0), + "used_db_cache_size" => info.usage.as_ref() + .map(|usage| usage.memory.database_cache.as_bytes()) + .unwrap_or(0), + "disk_read_per_sec" => info.usage.as_ref() + .map(|usage| usage.io.bytes_read) + .unwrap_or(0), + "disk_write_per_sec" => info.usage.as_ref() + .map(|usage| usage.io.bytes_written) + .unwrap_or(0), ); if let Some(metrics) = metrics.as_ref() { metrics.memory_usage_bytes.set(memory); diff --git a/client/state-db/Cargo.toml b/client/state-db/Cargo.toml index 5a69d8b31ec..77e06670d1d 100644 --- a/client/state-db/Cargo.toml +++ b/client/state-db/Cargo.toml @@ -11,8 +11,11 @@ description = "State database maintenance. Handles canonicalization and pruning [dependencies] parking_lot = "0.10.0" log = "0.4.8" +sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } +parity-util-mem = "0.5.1" +parity-util-mem-derive = "0.1.0" [dev-dependencies] env_logger = "0.7.0" diff --git a/client/state-db/src/lib.rs b/client/state-db/src/lib.rs index f670e4f35f3..49b1a59285e 100644 --- a/client/state-db/src/lib.rs +++ b/client/state-db/src/lib.rs @@ -31,7 +31,8 @@ mod noncanonical; mod pruning; -#[cfg(test)] mod test; +#[cfg(test)] +mod test; use std::fmt; use parking_lot::RwLock; @@ -40,6 +41,8 @@ use std::collections::{HashMap, hash_map::Entry}; use noncanonical::NonCanonicalOverlay; use pruning::RefWindow; use log::trace; +use parity_util_mem::{MallocSizeOf, malloc_size}; +use sc_client_api::{StateDbMemoryInfo, MemorySize}; const PRUNING_MODE: &[u8] = b"mode"; const PRUNING_MODE_ARCHIVE: &[u8] = b"archive"; @@ -120,7 +123,6 @@ pub struct ChangeSet { pub deleted: Vec, } - /// A set of changes to the backing database. #[derive(Default, Debug, Clone)] pub struct CommitSet { @@ -196,8 +198,11 @@ struct StateDbSync { pinned: HashMap, } -impl StateDbSync { - pub fn new(mode: PruningMode, db: &D) -> Result, Error> { +impl StateDbSync { + fn new( + mode: PruningMode, + db: &D, + ) -> Result, Error> { trace!(target: "state-db", "StateDb settings: {:?}", mode); // Check that settings match @@ -234,7 +239,13 @@ impl StateDbSync { } } - pub fn insert_block(&mut self, hash: &BlockHash, number: u64, parent_hash: &BlockHash, mut changeset: ChangeSet) -> Result, Error> { + fn insert_block( + &mut self, + hash: &BlockHash, + number: u64, + parent_hash: &BlockHash, + mut changeset: ChangeSet, + ) -> Result, Error> { let mut meta = ChangeSet::default(); if number == 0 { // Save pruning mode when writing first block. @@ -247,7 +258,7 @@ impl StateDbSync { // write changes immediately Ok(CommitSet { data: changeset, - meta: meta, + meta, }) }, PruningMode::Constrained(_) | PruningMode::ArchiveCanonical => { @@ -260,7 +271,10 @@ impl StateDbSync { } } - pub fn canonicalize_block(&mut self, hash: &BlockHash) -> Result, Error> { + fn canonicalize_block( + &mut self, + hash: &BlockHash, + ) -> Result, Error> { let mut commit = CommitSet::default(); if self.mode == PruningMode::ArchiveAll { return Ok(commit) @@ -280,18 +294,23 @@ impl StateDbSync { Ok(commit) } - pub fn best_canonical(&self) -> Option { + fn best_canonical(&self) -> Option { return self.non_canonical.last_canonicalized_block_number() } - pub fn is_pruned(&self, hash: &BlockHash, number: u64) -> bool { + fn is_pruned(&self, hash: &BlockHash, number: u64) -> bool { match self.mode { PruningMode::ArchiveAll => false, PruningMode::ArchiveCanonical | PruningMode::Constrained(_) => { if self.best_canonical().map(|c| number > c).unwrap_or(true) { !self.non_canonical.have_block(hash) } else { - self.pruning.as_ref().map_or(false, |pruning| number < pruning.pending() || !pruning.have_block(hash)) + self.pruning + .as_ref() + .map_or( + false, + |pruning| number < pruning.pending() || !pruning.have_block(hash), + ) } } } @@ -320,7 +339,7 @@ impl StateDbSync { /// Revert all non-canonical blocks with the best block number. /// Returns a database commit or `None` if not possible. /// For archive an empty commit set is returned. - pub fn revert_one(&mut self) -> Option> { + fn revert_one(&mut self) -> Option> { match self.mode { PruningMode::ArchiveAll => { Some(CommitSet::default()) @@ -331,7 +350,7 @@ impl StateDbSync { } } - pub fn pin(&mut self, hash: &BlockHash) -> Result<(), PinError> { + fn pin(&mut self, hash: &BlockHash) -> Result<(), PinError> { match self.mode { PruningMode::ArchiveAll => Ok(()), PruningMode::ArchiveCanonical | PruningMode::Constrained(_) => { @@ -352,7 +371,7 @@ impl StateDbSync { } } - pub fn unpin(&mut self, hash: &BlockHash) { + fn unpin(&mut self, hash: &BlockHash) { match self.pinned.entry(hash.clone()) { Entry::Occupied(mut entry) => { *entry.get_mut() -= 1; @@ -377,12 +396,14 @@ impl StateDbSync { db.get(key.as_ref()).map_err(|e| Error::Db(e)) } - pub fn apply_pending(&mut self) { + fn apply_pending(&mut self) { self.non_canonical.apply_pending(); if let Some(pruning) = &mut self.pruning { pruning.apply_pending(); } - trace!(target: "forks", "First available: {:?} ({}), Last canon: {:?} ({}), Best forks: {:?}", + trace!( + target: "forks", + "First available: {:?} ({}), Last canon: {:?} ({}), Best forks: {:?}", self.pruning.as_ref().and_then(|p| p.next_hash()), self.pruning.as_ref().map(|p| p.pending()).unwrap_or(0), self.non_canonical.last_canonicalized_hash(), @@ -391,12 +412,20 @@ impl StateDbSync { ); } - pub fn revert_pending(&mut self) { + fn revert_pending(&mut self) { if let Some(pruning) = &mut self.pruning { pruning.revert_pending(); } self.non_canonical.revert_pending(); } + + fn memory_info(&self) -> StateDbMemoryInfo { + StateDbMemoryInfo { + non_canonical: MemorySize::from_bytes(malloc_size(&self.non_canonical)), + pruning: self.pruning.as_ref().map(|p| MemorySize::from_bytes(malloc_size(p))), + pinned: MemorySize::from_bytes(malloc_size(&self.pinned)), + } + } } /// State DB maintenance. See module description. @@ -405,21 +434,33 @@ pub struct StateDb { db: RwLock>, } -impl StateDb { +impl StateDb { /// Creates a new instance. Does not expect any metadata in the database. - pub fn new(mode: PruningMode, db: &D) -> Result, Error> { + pub fn new( + mode: PruningMode, + db: &D, + ) -> Result, Error> { Ok(StateDb { db: RwLock::new(StateDbSync::new(mode, db)?) }) } /// Add a new non-canonical block. - pub fn insert_block(&self, hash: &BlockHash, number: u64, parent_hash: &BlockHash, changeset: ChangeSet) -> Result, Error> { + pub fn insert_block( + &self, + hash: &BlockHash, + number: u64, + parent_hash: &BlockHash, + changeset: ChangeSet, + ) -> Result, Error> { self.db.write().insert_block(hash, number, parent_hash, changeset) } /// Finalize a previously inserted block. - pub fn canonicalize_block(&self, hash: &BlockHash) -> Result, Error> { + pub fn canonicalize_block( + &self, + hash: &BlockHash, + ) -> Result, Error> { self.db.write().canonicalize_block(hash) } @@ -466,6 +507,11 @@ impl StateDb { pub fn revert_pending(&self) { self.db.write().revert_pending(); } + + /// Returns the current memory statistics of this instance. + pub fn memory_info(&self) -> StateDbMemoryInfo { + self.db.read().memory_info() + } } #[cfg(test)] diff --git a/client/state-db/src/noncanonical.rs b/client/state-db/src/noncanonical.rs index de7294d770a..6a34523b66f 100644 --- a/client/state-db/src/noncanonical.rs +++ b/client/state-db/src/noncanonical.rs @@ -30,6 +30,7 @@ const NON_CANONICAL_JOURNAL: &[u8] = b"noncanonical_journal"; const LAST_CANONICAL: &[u8] = b"last_canonical"; /// See module documentation. +#[derive(parity_util_mem_derive::MallocSizeOf)] pub struct NonCanonicalOverlay { last_canonicalized: Option<(BlockHash, u64)>, levels: VecDeque>>, @@ -55,6 +56,7 @@ fn to_journal_key(block: u64, index: u64) -> Vec { } #[cfg_attr(test, derive(PartialEq, Debug))] +#[derive(parity_util_mem_derive::MallocSizeOf)] struct BlockOverlay { hash: BlockHash, journal_key: Vec, @@ -99,8 +101,10 @@ fn discard_descendants( let mut discarded = Vec::new(); if let Some(level) = levels.get_mut(index) { *level = level.drain(..).filter_map(|overlay| { - let parent = parents.get(&overlay.hash).expect("there is a parent entry for each entry in levels; qed").clone(); - if parent == *hash { + let parent = parents.get(&overlay.hash) + .expect("there is a parent entry for each entry in levels; qed"); + + if parent == hash { discarded.push(overlay.hash.clone()); if pinned.contains_key(&overlay.hash) { // save to be discarded later. @@ -375,7 +379,7 @@ impl NonCanonicalOverlay { None } - /// Check if the block is in the canonicalization queue. + /// Check if the block is in the canonicalization queue. pub fn have_block(&self, hash: &BlockHash) -> bool { (self.parents.contains_key(hash) || self.pending_insertions.contains(hash)) && !self.pending_canonicalizations.contains(hash) diff --git a/client/state-db/src/pruning.rs b/client/state-db/src/pruning.rs index 71d018087b5..6cf5f260060 100644 --- a/client/state-db/src/pruning.rs +++ b/client/state-db/src/pruning.rs @@ -31,6 +31,7 @@ const LAST_PRUNED: &[u8] = b"last_pruned"; const PRUNING_JOURNAL: &[u8] = b"pruning_journal"; /// See module documentation. +#[derive(parity_util_mem_derive::MallocSizeOf)] pub struct RefWindow { /// A queue of keys that should be deleted for each block in the pruning window. death_rows: VecDeque>, @@ -46,7 +47,7 @@ pub struct RefWindow { pending_prunings: usize, } -#[derive(Debug, PartialEq, Eq)] +#[derive(Debug, PartialEq, Eq, parity_util_mem_derive::MallocSizeOf)] struct DeathRow { hash: BlockHash, journal_key: Vec, -- GitLab From 798390fba8c03235ac2a25769c563ec7c6788425 Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Tue, 3 Mar 2020 10:52:38 +0100 Subject: [PATCH 068/106] Change extrinsic_count to extrinsic_index in pallet-utility (#5044) Co-authored-by: Benjamin Kampmann --- frame/utility/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/utility/src/lib.rs b/frame/utility/src/lib.rs index 76f3ca6bf62..0b60532c3dd 100644 --- a/frame/utility/src/lib.rs +++ b/frame/utility/src/lib.rs @@ -538,7 +538,7 @@ impl Module { pub fn timepoint() -> Timepoint { Timepoint { height: >::block_number(), - index: >::extrinsic_count(), + index: >::extrinsic_index().unwrap_or_default(), } } -- GitLab From a201f34963dbd6fb7a266a5d6f0b5660ca0db34b Mon Sep 17 00:00:00 2001 From: Ashley Date: Tue, 3 Mar 2020 11:36:58 +0100 Subject: [PATCH 069/106] Add more metrics to prometheus (#5034) * Add a few things * Add finality_grandpa_round * fix fg tests * Nitpicks * Nitpicks * Fix name of prometheus crate --- Cargo.lock | 2 ++ bin/node-template/node/src/service.rs | 1 + bin/node/cli/src/service.rs | 1 + client/finality-grandpa/Cargo.toml | 1 + client/finality-grandpa/src/environment.rs | 31 ++++++++++++++++ client/finality-grandpa/src/lib.rs | 12 ++++++- client/finality-grandpa/src/tests.rs | 6 ++++ client/network/Cargo.toml | 1 + client/network/src/config.rs | 4 +++ client/network/src/error.rs | 3 ++ client/network/src/service.rs | 41 ++++++++++++++++++++-- client/network/test/src/lib.rs | 6 ++-- client/service/Cargo.toml | 2 +- client/service/src/builder.rs | 36 +++++++++++-------- client/service/src/error.rs | 4 +-- client/service/src/lib.rs | 8 +++++ 16 files changed, 135 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 47583e57e3e..d651563f137 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6120,6 +6120,7 @@ dependencies = [ "sp-keyring", "sp-runtime", "sp-state-machine", + "substrate-prometheus-endpoint", "substrate-test-runtime-client", "tempfile", "tokio 0.2.12", @@ -6204,6 +6205,7 @@ dependencies = [ "sp-keyring", "sp-runtime", "sp-test-primitives", + "substrate-prometheus-endpoint", "substrate-test-runtime", "substrate-test-runtime-client", "tempfile", diff --git a/bin/node-template/node/src/service.rs b/bin/node-template/node/src/service.rs index 7a714d5d7a3..f87aaf5ec25 100644 --- a/bin/node-template/node/src/service.rs +++ b/bin/node-template/node/src/service.rs @@ -157,6 +157,7 @@ pub fn new_full(config: Configuration) on_exit: service.on_exit(), telemetry_on_connect: Some(service.telemetry_on_connect_stream()), voting_rule: grandpa::VotingRulesBuilder::default().build(), + prometheus_registry: service.prometheus_registry() }; // the GRANDPA voter task is considered infallible, i.e. diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs index 7df266a687a..f31fa0b9730 100644 --- a/bin/node/cli/src/service.rs +++ b/bin/node/cli/src/service.rs @@ -228,6 +228,7 @@ macro_rules! new_full { on_exit: service.on_exit(), telemetry_on_connect: Some(service.telemetry_on_connect_stream()), voting_rule: grandpa::VotingRulesBuilder::default().build(), + prometheus_registry: service.prometheus_registry(), }; // the GRANDPA voter task is considered infallible, i.e. diff --git a/client/finality-grandpa/Cargo.toml b/client/finality-grandpa/Cargo.toml index 8dcc24c3da1..a58da417c01 100644 --- a/client/finality-grandpa/Cargo.toml +++ b/client/finality-grandpa/Cargo.toml @@ -35,6 +35,7 @@ sc-network = { version = "0.8.0-alpha.2", path = "../network" } sc-network-gossip = { version = "0.8.0-alpha.2", path = "../network-gossip" } sp-finality-tracker = { version = "2.0.0-alpha.2", path = "../../primitives/finality-tracker" } sp-finality-grandpa = { version = "2.0.0-alpha.2", path = "../../primitives/finality-grandpa" } +prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.8.0-alpha.2" } sc-block-builder = { version = "0.8.0-alpha.2", path = "../block-builder" } finality-grandpa = { version = "0.11.1", features = ["derive-codec"] } pin-project = "0.4.6" diff --git a/client/finality-grandpa/src/environment.rs b/client/finality-grandpa/src/environment.rs index dca1eab9932..21a44c32dc9 100644 --- a/client/finality-grandpa/src/environment.rs +++ b/client/finality-grandpa/src/environment.rs @@ -58,6 +58,7 @@ use crate::justification::GrandpaJustification; use crate::until_imported::UntilVoteTargetImported; use crate::voting_rule::VotingRule; use sp_finality_grandpa::{AuthorityId, AuthoritySignature, SetId, RoundNumber}; +use prometheus_endpoint::{Gauge, U64, register, PrometheusError}; type HistoricalVotes = finality_grandpa::HistoricalVotes< ::Hash, @@ -372,6 +373,24 @@ impl SharedVoterSetState { } } +/// Prometheus metrics for GRANDPA. +#[derive(Clone)] +pub(crate) struct Metrics { + finality_grandpa_round: Gauge, +} + +impl Metrics { + pub(crate) fn register(registry: &prometheus_endpoint::Registry) -> Result { + Ok(Self { + finality_grandpa_round: register( + Gauge::new("finality_grandpa_round", "Highest completed GRANDPA round.")?, + registry + )?, + }) + } +} + + /// The environment we run GRANDPA in. pub(crate) struct Environment, SC, VR> { pub(crate) client: Arc, @@ -384,6 +403,7 @@ pub(crate) struct Environment, SC, pub(crate) set_id: SetId, pub(crate) voter_set_state: SharedVoterSetState, pub(crate) voting_rule: VR, + pub(crate) metrics: Option, pub(crate) _phantom: PhantomData, } @@ -397,6 +417,17 @@ impl, SC, VR> Environment { pub telemetry_on_connect: Option>, /// A voting rule used to potentially restrict target votes. pub voting_rule: VR, + /// The prometheus metrics registry. + pub prometheus_registry: Option, } /// Run a GRANDPA voter as a task. Provide configuration and a link to a @@ -576,6 +578,7 @@ pub fn run_grandpa_voter( on_exit, telemetry_on_connect, voting_rule, + prometheus_registry, } = grandpa_params; // NOTE: we have recently removed `run_grandpa_observer` from the public @@ -634,6 +637,7 @@ pub fn run_grandpa_voter( voting_rule, persistent_data, voter_commands_rx, + prometheus_registry, ); let voter_work = voter_work @@ -673,6 +677,7 @@ where voting_rule: VR, persistent_data: PersistentData, voter_commands_rx: mpsc::UnboundedReceiver>>, + prometheus_registry: Option, ) -> Self { let voters = persistent_data.authority_set.current_authorities(); @@ -687,6 +692,10 @@ where authority_set: persistent_data.authority_set.clone(), consensus_changes: persistent_data.consensus_changes.clone(), voter_set_state: persistent_data.set_state.clone(), + metrics: prometheus_registry.map(|registry| { + Metrics::register(®istry) + .expect("Other metrics would have failed to register before these; qed") + }), _phantom: PhantomData, }); @@ -807,6 +816,7 @@ where consensus_changes: self.env.consensus_changes.clone(), network: self.env.network.clone(), voting_rule: self.env.voting_rule.clone(), + metrics: self.env.metrics.clone(), _phantom: PhantomData, }); diff --git a/client/finality-grandpa/src/tests.rs b/client/finality-grandpa/src/tests.rs index 6e81c2f00af..7b5880f7ee5 100644 --- a/client/finality-grandpa/src/tests.rs +++ b/client/finality-grandpa/src/tests.rs @@ -447,6 +447,7 @@ fn run_to_completion_with( on_exit: Exit, telemetry_on_connect: None, voting_rule: (), + prometheus_registry: None, }; let voter = run_grandpa_voter(grandpa_params).expect("all in order with client and network"); @@ -578,6 +579,7 @@ fn finalize_3_voters_1_full_observer() { on_exit: Exit, telemetry_on_connect: None, voting_rule: (), + prometheus_registry: None, }; voters.push(run_grandpa_voter(grandpa_params).expect("all in order with client and network")); @@ -741,6 +743,7 @@ fn transition_3_voters_twice_1_full_observer() { on_exit: Exit, telemetry_on_connect: None, voting_rule: (), + prometheus_registry: None, }; let voter = run_grandpa_voter(grandpa_params).expect("all in order with client and network"); @@ -1166,6 +1169,7 @@ fn voter_persists_its_votes() { on_exit: Exit, telemetry_on_connect: None, voting_rule: VotingRulesBuilder::default().build(), + prometheus_registry: None, }; let voter = run_grandpa_voter(grandpa_params) @@ -1511,6 +1515,7 @@ fn voter_catches_up_to_latest_round_when_behind() { on_exit: Exit, telemetry_on_connect: None, voting_rule: (), + prometheus_registry: None, }; Box::pin(run_grandpa_voter(grandpa_params).expect("all in order with client and network")) @@ -1642,6 +1647,7 @@ fn grandpa_environment_respects_voting_rules() { voters: Arc::new(authority_set.current_authorities()), network, voting_rule, + metrics: None, _phantom: PhantomData, } }; diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index 50a19e9da05..565796e3198 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -52,6 +52,7 @@ sp-consensus = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/c sp-consensus-babe = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/babe" } sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } +prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.8.0-alpha.2", path = "../../utils/prometheus" } thiserror = "1" unsigned-varint = { version = "0.3.1", features = ["futures", "futures-codec"] } void = "1.0.2" diff --git a/client/network/src/config.rs b/client/network/src/config.rs index f5cad5977fc..76c0c9b5440 100644 --- a/client/network/src/config.rs +++ b/client/network/src/config.rs @@ -41,6 +41,7 @@ use core::{fmt, iter}; use std::{future::Future, pin::Pin}; use std::{error::Error, fs, io::{self, Write}, net::Ipv4Addr, path::{Path, PathBuf}, sync::Arc}; use zeroize::Zeroize; +use prometheus_endpoint::Registry; /// Network initialization parameters. pub struct Params { @@ -90,6 +91,9 @@ pub struct Params { /// Type to check incoming block announcements. pub block_announce_validator: Box + Send>, + + /// Registry for recording prometheus metrics to. + pub metrics_registry: Option, } bitflags! { diff --git a/client/network/src/error.rs b/client/network/src/error.rs index ba5d5c2d0d2..158e75fcf1d 100644 --- a/client/network/src/error.rs +++ b/client/network/src/error.rs @@ -45,6 +45,8 @@ pub enum Error { /// The second peer id that was found for the bootnode. second_id: PeerId, }, + /// Prometheus metrics error. + Prometheus(prometheus_endpoint::PrometheusError) } // Make `Debug` use the `Display` implementation. @@ -60,6 +62,7 @@ impl std::error::Error for Error { Error::Io(ref err) => Some(err), Error::Client(ref err) => Some(err), Error::DuplicateBootnode { .. } => None, + Error::Prometheus(ref err) => Some(err), } } } diff --git a/client/network/src/service.rs b/client/network/src/service.rs index 288289d95c8..821847add1d 100644 --- a/client/network/src/service.rs +++ b/client/network/src/service.rs @@ -39,6 +39,7 @@ use libp2p::swarm::{NetworkBehaviour, SwarmBuilder, SwarmEvent}; use parking_lot::Mutex; use sc_peerset::PeersetHandle; use sp_runtime::{traits::{Block as BlockT, NumberFor}, ConsensusEngineId}; +use prometheus_endpoint::{Registry, Gauge, U64, register, PrometheusError}; use crate::{behaviour::{Behaviour, BehaviourOut}, config::{parse_str_addr, parse_addr}}; use crate::{transport, config::NonReservedPeerMode, ReputationChange}; @@ -294,6 +295,10 @@ impl NetworkWorker { from_worker, light_client_rqs: params.on_demand.and_then(|od| od.extract_receiver()), event_streams: Vec::new(), + metrics: match params.metrics_registry { + Some(registry) => Some(Metrics::register(®istry)?), + None => None + } }) } @@ -727,6 +732,26 @@ pub struct NetworkWorker { light_client_rqs: Option>>, /// Senders for events that happen on the network. event_streams: Vec>, + /// Prometheus network metrics. + metrics: Option +} + +struct Metrics { + is_major_syncing: Gauge, + peers_count: Gauge, +} + +impl Metrics { + fn register(registry: &Registry) -> Result { + Ok(Self { + is_major_syncing: register(Gauge::new( + "is_major_syncing", "Whether the node is performing a major sync or not.", + )?, registry)?, + peers_count: register(Gauge::new( + "peers_count", "Number of network gossip peers", + )?, registry)?, + }) + } } impl Future for NetworkWorker { @@ -818,16 +843,26 @@ impl Future for NetworkWorker { }; } + let num_connected_peers = this.network_service.user_protocol_mut().num_connected_peers(); + // Update the variables shared with the `NetworkService`. - this.num_connected.store(this.network_service.user_protocol_mut().num_connected_peers(), Ordering::Relaxed); + this.num_connected.store(num_connected_peers, Ordering::Relaxed); { let external_addresses = Swarm::::external_addresses(&this.network_service).cloned().collect(); *this.external_addresses.lock() = external_addresses; } - this.is_major_syncing.store(match this.network_service.user_protocol_mut().sync_state() { + + let is_major_syncing = match this.network_service.user_protocol_mut().sync_state() { SyncState::Idle => false, SyncState::Downloading => true, - }, Ordering::Relaxed); + }; + + this.is_major_syncing.store(is_major_syncing, Ordering::Relaxed); + + if let Some(metrics) = this.metrics.as_ref() { + metrics.is_major_syncing.set(is_major_syncing as u64); + metrics.peers_count.set(num_connected_peers as u64); + } Poll::Pending } diff --git a/client/network/test/src/lib.rs b/client/network/test/src/lib.rs index 94eeb8e5fbc..0add6c63d5a 100644 --- a/client/network/test/src/lib.rs +++ b/client/network/test/src/lib.rs @@ -640,7 +640,8 @@ pub trait TestNetFactory: Sized { transaction_pool: Arc::new(EmptyTransactionPool), protocol_id: ProtocolId::from(&b"test-protocol-name"[..]), import_queue, - block_announce_validator: Box::new(DefaultBlockAnnounceValidator::new(client.clone())) + block_announce_validator: Box::new(DefaultBlockAnnounceValidator::new(client.clone())), + metrics_registry: None, }).unwrap(); self.mut_peers(|peers| { @@ -713,7 +714,8 @@ pub trait TestNetFactory: Sized { transaction_pool: Arc::new(EmptyTransactionPool), protocol_id: ProtocolId::from(&b"test-protocol-name"[..]), import_queue, - block_announce_validator: Box::new(DefaultBlockAnnounceValidator::new(client.clone())) + block_announce_validator: Box::new(DefaultBlockAnnounceValidator::new(client.clone())), + metrics_registry: None, }).unwrap(); self.mut_peers(|peers| { diff --git a/client/service/Cargo.toml b/client/service/Cargo.toml index 80ba12ca000..5ae4a3a526a 100644 --- a/client/service/Cargo.toml +++ b/client/service/Cargo.toml @@ -56,7 +56,7 @@ sc-rpc = { version = "2.0.0-alpha.2", path = "../rpc" } sc-telemetry = { version = "2.0.0-alpha.2", path = "../telemetry" } sc-offchain = { version = "2.0.0-alpha.2", path = "../offchain" } parity-multiaddr = { package = "parity-multiaddr", version = "0.5.0" } -substrate-prometheus-endpoint = { path = "../../utils/prometheus" , version = "0.8.0-alpha.2"} +prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus" , version = "0.8.0-alpha.2"} sc-tracing = { version = "2.0.0-alpha.2", path = "../tracing" } tracing = "0.1.10" parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index cce126f1b39..01bba286c64 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -53,15 +53,15 @@ use sysinfo::{get_current_pid, ProcessExt, System, SystemExt}; use sc_telemetry::{telemetry, SUBSTRATE_INFO}; use sp_transaction_pool::{MaintainedTransactionPool, ChainEvent}; use sp_blockchain; -use substrate_prometheus_endpoint::{register, Gauge, U64, F64, Registry, PrometheusError, Opts, GaugeVec}; +use prometheus_endpoint::{register, Gauge, U64, F64, Registry, PrometheusError, Opts, GaugeVec}; struct ServiceMetrics { block_height_number: GaugeVec, - peers_count: Gauge, ready_transactions_number: Gauge, memory_usage_bytes: Gauge, cpu_usage_percentage: Gauge, network_per_sec_bytes: GaugeVec, + node_roles: Gauge, } impl ServiceMetrics { @@ -71,9 +71,6 @@ impl ServiceMetrics { Opts::new("block_height_number", "Height of the chain"), &["status"] )?, registry)?, - peers_count: register(Gauge::new( - "peers_count", "Number of network gossip peers", - )?, registry)?, ready_transactions_number: register(Gauge::new( "ready_transactions_number", "Number of transactions in the ready queue", )?, registry)?, @@ -87,6 +84,10 @@ impl ServiceMetrics { Opts::new("network_per_sec_bytes", "Networking bytes per second"), &["direction"] )?, registry)?, + node_roles: register(Gauge::new( + "node_roles", "The roles the node is running as", + )?, registry)?, + }) } } @@ -887,6 +888,14 @@ ServiceBuilder< let block_announce_validator = Box::new(sp_consensus::block_validation::DefaultBlockAnnounceValidator::new(client.clone())); + let prometheus_registry_and_port = match config.prometheus_port { + Some(port) => match prometheus_registry { + Some(registry) => Some((registry, port)), + None => Some((Registry::new_custom(Some("substrate".into()), None)?, port)) + }, + None => None + }; + let network_params = sc_network::config::Params { roles: config.roles, executor: { @@ -906,6 +915,7 @@ ServiceBuilder< import_queue, protocol_id, block_announce_validator, + metrics_registry: prometheus_registry_and_port.as_ref().map(|(r, _)| r.clone()) }; let has_bootnodes = !network_params.network_config.boot_nodes.is_empty(); @@ -1020,17 +1030,14 @@ ServiceBuilder< )); } - // Prometheus endpoint and metrics - let metrics = if let Some(port) = config.prometheus_port { - let registry = match prometheus_registry { - Some(registry) => registry, - None => Registry::new_custom(Some("substrate".into()), None)? - }; - + // Prometheus metrics + let metrics = if let Some((registry, port)) = prometheus_registry_and_port.clone() { let metrics = ServiceMetrics::register(®istry)?; + metrics.node_roles.set(u64::from(config.roles.bits())); + let future = select( - substrate_prometheus_endpoint::init_prometheus(port, registry).boxed(), + prometheus_endpoint::init_prometheus(port, registry).boxed(), exit.clone() ).map(drop); @@ -1043,7 +1050,6 @@ ServiceBuilder< } else { None }; - // Periodically notify the telemetry. let transaction_pool_ = transaction_pool.clone(); let client_ = client.clone(); @@ -1102,7 +1108,6 @@ ServiceBuilder< metrics.memory_usage_bytes.set(memory); metrics.cpu_usage_percentage.set(f64::from(cpu_usage)); metrics.ready_transactions_number.set(txpool_status.ready as u64); - metrics.peers_count.set(num_peers as u64); metrics.network_per_sec_bytes.with_label_values(&["download"]).set(net_status.average_download_per_sec); metrics.network_per_sec_bytes.with_label_values(&["upload"]).set(net_status.average_upload_per_sec); @@ -1305,6 +1310,7 @@ ServiceBuilder< _telemetry_on_connect_sinks: telemetry_connection_sinks.clone(), keystore, marker: PhantomData::, + prometheus_registry: prometheus_registry_and_port.map(|(r, _)| r) }) } } diff --git a/client/service/src/error.rs b/client/service/src/error.rs index adf630e44c0..5a78a187892 100644 --- a/client/service/src/error.rs +++ b/client/service/src/error.rs @@ -53,8 +53,8 @@ impl<'a> From<&'a str> for Error { } } -impl From for Error { - fn from(e: substrate_prometheus_endpoint::PrometheusError) -> Self { +impl From for Error { + fn from(e: prometheus_endpoint::PrometheusError) -> Self { Error::Other(format!("Prometheus error: {}", e)) } } diff --git a/client/service/src/lib.rs b/client/service/src/lib.rs index c4678eb28d2..5c59cdf91fc 100644 --- a/client/service/src/lib.rs +++ b/client/service/src/lib.rs @@ -114,6 +114,7 @@ pub struct Service { _offchain_workers: Option>, keystore: sc_keystore::KeyStorePtr, marker: PhantomData, + prometheus_registry: Option, } impl Unpin for Service {} @@ -225,6 +226,9 @@ pub trait AbstractService: 'static + Future> + /// Get a handle to a future that will resolve on exit. fn on_exit(&self) -> ::exit_future::Exit; + + /// Get the prometheus metrics registry, if available. + fn prometheus_registry(&self) -> Option; } impl AbstractService for @@ -328,6 +332,10 @@ where fn on_exit(&self) -> exit_future::Exit { self.exit.clone() } + + fn prometheus_registry(&self) -> Option { + self.prometheus_registry.clone() + } } impl Future for -- GitLab From 870540b7243ed7557b83a7bb6e978351ed81ebee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Tue, 3 Mar 2020 14:40:02 +0100 Subject: [PATCH 070/106] Update to SCALE 1.2.0 (#5113) This updates `parity-scale-codec` to `1.2.0`, which includes multiple performance improvements and a fix that bounds the capacity of a vector at decoding. --- Cargo.lock | 8 ++++---- bin/node-template/pallets/template/Cargo.toml | 10 +++++----- bin/node-template/runtime/Cargo.toml | 2 +- bin/node/cli/Cargo.toml | 2 +- bin/node/executor/Cargo.toml | 2 +- bin/node/inspect/Cargo.toml | 2 +- bin/node/runtime/Cargo.toml | 2 +- bin/node/testing/Cargo.toml | 2 +- bin/node/transaction-factory/Cargo.toml | 2 +- bin/utils/subkey/Cargo.toml | 2 +- client/Cargo.toml | 2 +- client/api/Cargo.toml | 2 +- client/authority-discovery/Cargo.toml | 2 +- client/basic-authorship/Cargo.toml | 2 +- client/block-builder/Cargo.toml | 2 +- client/consensus/aura/Cargo.toml | 2 +- client/consensus/babe/Cargo.toml | 2 +- client/consensus/epochs/Cargo.toml | 2 +- client/consensus/pow/Cargo.toml | 2 +- client/consensus/slots/Cargo.toml | 2 +- client/db/Cargo.toml | 2 +- client/executor/Cargo.toml | 2 +- client/executor/common/Cargo.toml | 2 +- client/executor/wasmi/Cargo.toml | 2 +- client/executor/wasmtime/Cargo.toml | 2 +- client/finality-grandpa/Cargo.toml | 2 +- client/network/Cargo.toml | 2 +- client/offchain/Cargo.toml | 2 +- client/rpc-api/Cargo.toml | 2 +- client/rpc/Cargo.toml | 2 +- client/service/Cargo.toml | 2 +- client/state-db/Cargo.toml | 2 +- client/transaction-pool/Cargo.toml | 2 +- client/transaction-pool/graph/Cargo.toml | 2 +- frame/assets/Cargo.toml | 2 +- frame/aura/Cargo.toml | 2 +- frame/authority-discovery/Cargo.toml | 2 +- frame/authorship/Cargo.toml | 2 +- frame/babe/Cargo.toml | 2 +- frame/balances/Cargo.toml | 2 +- frame/benchmarking/Cargo.toml | 2 +- frame/collective/Cargo.toml | 2 +- frame/contracts/Cargo.toml | 2 +- frame/contracts/common/Cargo.toml | 2 +- frame/contracts/rpc/Cargo.toml | 2 +- frame/contracts/rpc/runtime-api/Cargo.toml | 2 +- frame/democracy/Cargo.toml | 2 +- frame/elections-phragmen/Cargo.toml | 2 +- frame/elections/Cargo.toml | 2 +- frame/evm/Cargo.toml | 2 +- frame/example-offchain-worker/Cargo.toml | 2 +- frame/example/Cargo.toml | 2 +- frame/executive/Cargo.toml | 2 +- frame/finality-tracker/Cargo.toml | 2 +- frame/generic-asset/Cargo.toml | 14 +++++++------- frame/grandpa/Cargo.toml | 2 +- frame/identity/Cargo.toml | 2 +- frame/im-online/Cargo.toml | 2 +- frame/indices/Cargo.toml | 2 +- frame/membership/Cargo.toml | 2 +- frame/metadata/Cargo.toml | 2 +- frame/nicks/Cargo.toml | 2 +- frame/offences/Cargo.toml | 2 +- frame/randomness-collective-flip/Cargo.toml | 2 +- frame/recovery/Cargo.toml | 2 +- frame/scored-pool/Cargo.toml | 2 +- frame/session/Cargo.toml | 2 +- frame/society/Cargo.toml | 2 +- frame/staking/Cargo.toml | 2 +- frame/sudo/Cargo.toml | 2 +- frame/support/Cargo.toml | 2 +- frame/support/test/Cargo.toml | 2 +- frame/system/Cargo.toml | 2 +- frame/system/rpc/runtime-api/Cargo.toml | 2 +- frame/timestamp/Cargo.toml | 2 +- frame/transaction-payment/Cargo.toml | 2 +- frame/transaction-payment/rpc/Cargo.toml | 2 +- .../transaction-payment/rpc/runtime-api/Cargo.toml | 2 +- frame/treasury/Cargo.toml | 2 +- frame/utility/Cargo.toml | 2 +- frame/vesting/Cargo.toml | 2 +- primitives/api/Cargo.toml | 2 +- primitives/api/test/Cargo.toml | 2 +- primitives/application-crypto/Cargo.toml | 4 ++-- primitives/arithmetic/Cargo.toml | 2 +- primitives/authority-discovery/Cargo.toml | 2 +- primitives/authorship/Cargo.toml | 2 +- primitives/block-builder/Cargo.toml | 2 +- primitives/blockchain/Cargo.toml | 2 +- primitives/consensus/aura/Cargo.toml | 2 +- primitives/consensus/babe/Cargo.toml | 2 +- primitives/consensus/common/Cargo.toml | 2 +- primitives/consensus/pow/Cargo.toml | 2 +- primitives/core/Cargo.toml | 2 +- primitives/finality-grandpa/Cargo.toml | 2 +- primitives/finality-tracker/Cargo.toml | 2 +- primitives/inherents/Cargo.toml | 2 +- primitives/io/Cargo.toml | 2 +- primitives/runtime-interface/Cargo.toml | 2 +- primitives/runtime/Cargo.toml | 2 +- primitives/sandbox/Cargo.toml | 2 +- primitives/staking/Cargo.toml | 2 +- primitives/state-machine/Cargo.toml | 2 +- primitives/test-primitives/Cargo.toml | 2 +- primitives/timestamp/Cargo.toml | 2 +- primitives/transaction-pool/Cargo.toml | 2 +- primitives/trie/Cargo.toml | 2 +- primitives/version/Cargo.toml | 2 +- primitives/wasm-interface/Cargo.toml | 2 +- test-utils/client/Cargo.toml | 2 +- test-utils/runtime/Cargo.toml | 2 +- test-utils/runtime/client/Cargo.toml | 2 +- test-utils/runtime/transaction-pool/Cargo.toml | 2 +- utils/fork-tree/Cargo.toml | 2 +- utils/frame/benchmarking-cli/Cargo.toml | 2 +- utils/frame/rpc/system/Cargo.toml | 2 +- 116 files changed, 130 insertions(+), 130 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d651563f137..67346ad86bc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4617,9 +4617,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "1.1.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f747c06d9f3b2ad387ac881b9667298c81b1243aa9833f086e05996937c35507" +checksum = "f509c5e67ca0605ee17dcd3f91ef41cadd685c75a298fb6261b781a5acb3f910" dependencies = [ "arrayvec 0.5.1", "bitvec", @@ -4630,9 +4630,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34e513ff3e406f3ede6796dcdc83d0b32ffb86668cea1ccf7363118abeb00476" +checksum = "5a0ec292e92e8ec7c58e576adacc1e3f399c597c8f263c42f18420abe58e7245" dependencies = [ "proc-macro-crate", "proc-macro2", diff --git a/bin/node-template/pallets/template/Cargo.toml b/bin/node-template/pallets/template/Cargo.toml index 808951a77db..b39fcc1dae4 100644 --- a/bin/node-template/pallets/template/Cargo.toml +++ b/bin/node-template/pallets/template/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/substrate/" description = "FRAME pallet template" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } safe-mix = { default-features = false, version = '1.0.0' } [dependencies.frame-support] @@ -41,8 +41,8 @@ path = "../../../../primitives/runtime" [features] default = ['std'] std = [ - 'codec/std', - 'frame-support/std', - 'safe-mix/std', - 'system/std' + 'codec/std', + 'frame-support/std', + 'safe-mix/std', + 'system/std' ] diff --git a/bin/node-template/runtime/Cargo.toml b/bin/node-template/runtime/Cargo.toml index 35856e3bdcc..9268dd8c050 100644 --- a/bin/node-template/runtime/Cargo.toml +++ b/bin/node-template/runtime/Cargo.toml @@ -8,7 +8,7 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } aura = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-aura", path = "../../../frame/aura" } balances = { version = "2.0.0-alpha.2", default-features = false, package = "pallet-balances", path = "../../../frame/balances" } diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml index 48e4c634f03..cfb1621b692 100644 --- a/bin/node/cli/Cargo.toml +++ b/bin/node/cli/Cargo.toml @@ -31,7 +31,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] # third-party dependencies -codec = { package = "parity-scale-codec", version = "1.0.6" } +codec = { package = "parity-scale-codec", version = "1.2.0" } serde = { version = "1.0.102", features = ["derive"] } futures = { version = "0.3.1", features = ["compat"] } hex-literal = "0.2.1" diff --git a/bin/node/executor/Cargo.toml b/bin/node/executor/Cargo.toml index 2d6dd8d12b0..c8ef75a5a2a 100644 --- a/bin/node/executor/Cargo.toml +++ b/bin/node/executor/Cargo.toml @@ -9,7 +9,7 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } node-primitives = { version = "2.0.0-alpha.2", path = "../primitives" } node-runtime = { version = "2.0.0-alpha.2", path = "../runtime" } sc-executor = { version = "0.8.0-alpha.2", path = "../../../client/executor" } diff --git a/bin/node/inspect/Cargo.toml b/bin/node/inspect/Cargo.toml index 70ed7e3cfc0..022f4d0ca49 100644 --- a/bin/node/inspect/Cargo.toml +++ b/bin/node/inspect/Cargo.toml @@ -8,7 +8,7 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } derive_more = "0.99" log = "0.4.8" sc-cli = { version = "0.8.0-alpha.2", path = "../../../client/cli" } diff --git a/bin/node/runtime/Cargo.toml b/bin/node/runtime/Cargo.toml index 66e9dece177..8a901660ce9 100644 --- a/bin/node/runtime/Cargo.toml +++ b/bin/node/runtime/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] # third-party dependencies -codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } integer-sqrt = { version = "0.1.2" } rustc-hex = { version = "2.0", optional = true } serde = { version = "1.0.102", optional = true } diff --git a/bin/node/testing/Cargo.toml b/bin/node/testing/Cargo.toml index 30402c54905..4496047b50c 100644 --- a/bin/node/testing/Cargo.toml +++ b/bin/node/testing/Cargo.toml @@ -14,7 +14,7 @@ pallet-balances = { version = "2.0.0-alpha.2", path = "../../../frame/balances" sc-client = { version = "0.8.0-alpha.2", path = "../../../client/" } sc-client-db = { version = "0.8.0-alpha.2", path = "../../../client/db/", features = ["kvdb-rocksdb"] } sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api/" } -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } pallet-contracts = { version = "2.0.0-alpha.2", path = "../../../frame/contracts" } pallet-grandpa = { version = "2.0.0-alpha.2", path = "../../../frame/grandpa" } pallet-indices = { version = "2.0.0-alpha.2", path = "../../../frame/indices" } diff --git a/bin/node/transaction-factory/Cargo.toml b/bin/node/transaction-factory/Cargo.toml index 64c7b8d42ad..8de968baa64 100644 --- a/bin/node/transaction-factory/Cargo.toml +++ b/bin/node/transaction-factory/Cargo.toml @@ -12,7 +12,7 @@ sp-block-builder = { version = "2.0.0-alpha.2", path = "../../../primitives/bloc sc-cli = { version = "0.8.0-alpha.2", path = "../../../client/cli" } sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api" } sc-client = { version = "0.8.0-alpha.2", path = "../../../client" } -codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] } sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } log = "0.4.8" sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } diff --git a/bin/utils/subkey/Cargo.toml b/bin/utils/subkey/Cargo.toml index b0777b1f700..252978a3a98 100644 --- a/bin/utils/subkey/Cargo.toml +++ b/bin/utils/subkey/Cargo.toml @@ -20,7 +20,7 @@ rustc-hex = "2.0.1" substrate-bip39 = "0.3.1" hex = "0.4.0" hex-literal = "0.2.1" -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } frame-system = { version = "2.0.0-alpha.2", path = "../../../frame/system" } pallet-balances = { version = "2.0.0-alpha.2", path = "../../../frame/balances" } pallet-transaction-payment = { version = "2.0.0-alpha.2", path = "../../../frame/transaction-payment" } diff --git a/client/Cargo.toml b/client/Cargo.toml index 91f3578ce21..710cdbd128f 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -11,7 +11,7 @@ description = "Substrate Client and associated logic." [dependencies] sc-block-builder = { version = "0.8.0-alpha.2", path = "block-builder" } sc-client-api = { version = "2.0.0-alpha.2", path = "api" } -codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] } sp-consensus = { version = "0.8.0-alpha.2", path = "../primitives/consensus/common" } derive_more = { version = "0.99.2" } sc-executor = { version = "0.8.0-alpha.2", path = "executor" } diff --git a/client/api/Cargo.toml b/client/api/Cargo.toml index dcbf447f594..02568910547 100644 --- a/client/api/Cargo.toml +++ b/client/api/Cargo.toml @@ -11,7 +11,7 @@ documentation = "https://docs.rs/sc-client-api" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-consensus = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/common" } derive_more = { version = "0.99.2" } sc-executor = { version = "0.8.0-alpha.2", path = "../executor" } diff --git a/client/authority-discovery/Cargo.toml b/client/authority-discovery/Cargo.toml index 1e4c70abfeb..0c3b739bb9d 100644 --- a/client/authority-discovery/Cargo.toml +++ b/client/authority-discovery/Cargo.toml @@ -14,7 +14,7 @@ prost-build = "0.6.1" [dependencies] bytes = "0.5.0" -codec = { package = "parity-scale-codec", default-features = false, version = "1.0.3" } +codec = { package = "parity-scale-codec", default-features = false, version = "1.2.0" } derive_more = "0.99.2" futures = "0.3.1" futures-timer = "3.0.1" diff --git a/client/basic-authorship/Cargo.toml b/client/basic-authorship/Cargo.toml index 61184f9517f..7503221f655 100644 --- a/client/basic-authorship/Cargo.toml +++ b/client/basic-authorship/Cargo.toml @@ -11,7 +11,7 @@ description = "Basic implementation of block-authoring logic." [dependencies] log = "0.4.8" futures = "0.3.1" -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api" } sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } diff --git a/client/block-builder/Cargo.toml b/client/block-builder/Cargo.toml index a41acc16129..745669c033e 100644 --- a/client/block-builder/Cargo.toml +++ b/client/block-builder/Cargo.toml @@ -18,4 +18,4 @@ sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } sp-block-builder = { version = "2.0.0-alpha.2", path = "../../primitives/block-builder" } sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } -codec = { package = "parity-scale-codec", version = "1.0.6", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] } diff --git a/client/consensus/aura/Cargo.toml b/client/consensus/aura/Cargo.toml index e5b5975ca3f..be610c16d99 100644 --- a/client/consensus/aura/Cargo.toml +++ b/client/consensus/aura/Cargo.toml @@ -14,7 +14,7 @@ sp-consensus-aura = { version = "0.8.0-alpha.2", path = "../../../primitives/con sp-block-builder = { version = "2.0.0-alpha.2", path = "../../../primitives/block-builder" } sc-client = { version = "0.8.0-alpha.2", path = "../../" } sc-client-api = { version = "2.0.0-alpha.2", path = "../../api" } -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } derive_more = "0.99.2" futures = "0.3.1" diff --git a/client/consensus/babe/Cargo.toml b/client/consensus/babe/Cargo.toml index c6d61eb5ec4..66455adbdf8 100644 --- a/client/consensus/babe/Cargo.toml +++ b/client/consensus/babe/Cargo.toml @@ -11,7 +11,7 @@ documentation = "https://docs.rs/sc-consensus-babe" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] } sp-consensus-babe = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/babe" } sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } sp-application-crypto = { version = "2.0.0-alpha.2", path = "../../../primitives/application-crypto" } diff --git a/client/consensus/epochs/Cargo.toml b/client/consensus/epochs/Cargo.toml index 778dfa85feb..fe236542989 100644 --- a/client/consensus/epochs/Cargo.toml +++ b/client/consensus/epochs/Cargo.toml @@ -9,7 +9,7 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] } parking_lot = "0.10.0" fork-tree = { version = "2.0.0-alpha.2", path = "../../../utils/fork-tree" } sp-runtime = { path = "../../../primitives/runtime" , version = "2.0.0-alpha.2"} diff --git a/client/consensus/pow/Cargo.toml b/client/consensus/pow/Cargo.toml index 83bcee453d7..f95d196b62f 100644 --- a/client/consensus/pow/Cargo.toml +++ b/client/consensus/pow/Cargo.toml @@ -9,7 +9,7 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] } sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } diff --git a/client/consensus/slots/Cargo.toml b/client/consensus/slots/Cargo.toml index 435fde0f6fd..fe7958b2572 100644 --- a/client/consensus/slots/Cargo.toml +++ b/client/consensus/slots/Cargo.toml @@ -10,7 +10,7 @@ homepage = "https://substrate.dev" repository = "https://github.com/paritytech/substrate/" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } sc-client-api = { version = "2.0.0-alpha.2", path = "../../api" } sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } diff --git a/client/db/Cargo.toml b/client/db/Cargo.toml index 68460f42a61..f92a5c48e28 100644 --- a/client/db/Cargo.toml +++ b/client/db/Cargo.toml @@ -18,7 +18,7 @@ kvdb-memorydb = "0.4.0" linked-hash-map = "0.5.2" hash-db = "0.15.2" parity-util-mem = { version = "0.5.1", default-features = false, features = ["std"] } -codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] } sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } diff --git a/client/executor/Cargo.toml b/client/executor/Cargo.toml index a108e63cd17..46e4bb04bb9 100644 --- a/client/executor/Cargo.toml +++ b/client/executor/Cargo.toml @@ -11,7 +11,7 @@ documentation = "https://docs.rs/sc-executor" [dependencies] derive_more = "0.99.2" -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } sp-io = { version = "2.0.0-alpha.2", path = "../../primitives/io" } sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } sp-trie = { version = "2.0.0-alpha.2", path = "../../primitives/trie" } diff --git a/client/executor/common/Cargo.toml b/client/executor/common/Cargo.toml index b3e69181749..04db56938a4 100644 --- a/client/executor/common/Cargo.toml +++ b/client/executor/common/Cargo.toml @@ -12,7 +12,7 @@ documentation = "https://docs.rs/sc-executor-common/" [dependencies] log = "0.4.8" derive_more = "0.99.2" -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } wasmi = "0.6.2" sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } sp-allocator = { version = "2.0.0-alpha.2", path = "../../../primitives/allocator" } diff --git a/client/executor/wasmi/Cargo.toml b/client/executor/wasmi/Cargo.toml index 286acf27526..aa259e29f8d 100644 --- a/client/executor/wasmi/Cargo.toml +++ b/client/executor/wasmi/Cargo.toml @@ -13,7 +13,7 @@ documentation = "https://docs.rs/sc-execturo-wasmi" log = "0.4.8" wasmi = "0.6.2" parity-wasm = "0.41.0" -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } sc-executor-common = { version = "0.8.0-alpha.2", path = "../common" } sp-wasm-interface = { version = "2.0.0-alpha.2", path = "../../../primitives/wasm-interface" } sp-runtime-interface = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime-interface" } diff --git a/client/executor/wasmtime/Cargo.toml b/client/executor/wasmtime/Cargo.toml index f1cd5a2eceb..57f4c2a8423 100644 --- a/client/executor/wasmtime/Cargo.toml +++ b/client/executor/wasmtime/Cargo.toml @@ -12,7 +12,7 @@ description = "Defines a `WasmRuntime` that uses the Wasmtime JIT to execute." log = "0.4.8" wasmi = "0.6.2" parity-wasm = "0.41.0" -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } sc-executor-common = { version = "0.8.0-alpha.2", path = "../common" } sp-wasm-interface = { version = "2.0.0-alpha.2", path = "../../../primitives/wasm-interface" } sp-runtime-interface = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime-interface" } diff --git a/client/finality-grandpa/Cargo.toml b/client/finality-grandpa/Cargo.toml index a58da417c01..6cee0cd8526 100644 --- a/client/finality-grandpa/Cargo.toml +++ b/client/finality-grandpa/Cargo.toml @@ -18,7 +18,7 @@ log = "0.4.8" parking_lot = "0.10.0" rand = "0.7.2" assert_matches = "1.3.0" -parity-scale-codec = { version = "1.0.0", features = ["derive"] } +parity-scale-codec = { version = "1.2.0", features = ["derive"] } sp-arithmetic = { version = "2.0.0-alpha.2", path = "../../primitives/arithmetic" } sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } sp-consensus = { version = "0.8.0-alpha.1", path = "../../primitives/consensus/common" } diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index 565796e3198..d99dce2fd2c 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -16,7 +16,7 @@ prost-build = "0.6.1" [dependencies] bitflags = "1.2.0" bytes = "0.5.0" -codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] } derive_more = "0.99.2" either = "1.5.3" erased-serde = "0.3.9" diff --git a/client/offchain/Cargo.toml b/client/offchain/Cargo.toml index 9aaf5de2a1a..9ea0372969b 100644 --- a/client/offchain/Cargo.toml +++ b/client/offchain/Cargo.toml @@ -19,7 +19,7 @@ log = "0.4.8" threadpool = "1.7" num_cpus = "1.10" sp-offchain = { version = "2.0.0-alpha.2", path = "../../primitives/offchain" } -codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] } parking_lot = "0.10.0" sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } rand = "0.7.2" diff --git a/client/rpc-api/Cargo.toml b/client/rpc-api/Cargo.toml index 984842dccfd..0f3b72e519b 100644 --- a/client/rpc-api/Cargo.toml +++ b/client/rpc-api/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/substrate/" description = "Substrate RPC interfaces." [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } derive_more = "0.99.2" futures = { version = "0.3.1", features = ["compat"] } jsonrpc-core = "14.0.3" diff --git a/client/rpc/Cargo.toml b/client/rpc/Cargo.toml index 2a37465e138..9a8be85becf 100644 --- a/client/rpc/Cargo.toml +++ b/client/rpc/Cargo.toml @@ -13,7 +13,7 @@ sc-rpc-api = { version = "0.8.0-alpha.2", path = "../rpc-api" } sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } sc-client = { version = "0.8.0-alpha.2", path = "../" } sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api" } -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } futures = { version = "0.3.1", features = ["compat"] } jsonrpc-pubsub = "14.0.3" log = "0.4.8" diff --git a/client/service/Cargo.toml b/client/service/Cargo.toml index 5ae4a3a526a..bfc08eb705a 100644 --- a/client/service/Cargo.toml +++ b/client/service/Cargo.toml @@ -47,7 +47,7 @@ sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } sc-client = { version = "0.8.0-alpha.2", path = "../" } sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api" } sc-client-db = { version = "0.8.0-alpha.2", path = "../db" } -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } sc-executor = { version = "0.8.0-alpha.2", path = "../executor" } sc-transaction-pool = { version = "2.0.0-alpha.2", path = "../transaction-pool" } sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../primitives/transaction-pool" } diff --git a/client/state-db/Cargo.toml b/client/state-db/Cargo.toml index 77e06670d1d..7c7823b534e 100644 --- a/client/state-db/Cargo.toml +++ b/client/state-db/Cargo.toml @@ -13,7 +13,7 @@ parking_lot = "0.10.0" log = "0.4.8" sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } -codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] } parity-util-mem = "0.5.1" parity-util-mem-derive = "0.1.0" diff --git a/client/transaction-pool/Cargo.toml b/client/transaction-pool/Cargo.toml index 1b324e97589..3d80e06c955 100644 --- a/client/transaction-pool/Cargo.toml +++ b/client/transaction-pool/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/substrate/" description = "Substrate transaction pool implementation." [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } derive_more = "0.99.2" futures = { version = "0.3.1", features = ["compat"] } futures-diagnose = "1.0" diff --git a/client/transaction-pool/graph/Cargo.toml b/client/transaction-pool/graph/Cargo.toml index fbf405d7359..10846acfea1 100644 --- a/client/transaction-pool/graph/Cargo.toml +++ b/client/transaction-pool/graph/Cargo.toml @@ -24,7 +24,7 @@ linked-hash-map = "0.5.2" [dev-dependencies] assert_matches = "1.3.0" -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } substrate-test-runtime = { version = "2.0.0-dev", path = "../../../test-utils/runtime" } criterion = "0.3" diff --git a/frame/assets/Cargo.toml b/frame/assets/Cargo.toml index ba2e58ba28b..5b0b5f096a9 100644 --- a/frame/assets/Cargo.toml +++ b/frame/assets/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME asset management pallet" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } # Needed for various traits. In our case, `OnFinalize`. sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } # Needed for type-safe access to storage DB. diff --git a/frame/aura/Cargo.toml b/frame/aura/Cargo.toml index 110050071b3..77abfe4ae1f 100644 --- a/frame/aura/Cargo.toml +++ b/frame/aura/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME AURA consensus pallet" [dependencies] sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/application-crypto" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/inherents" } sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } diff --git a/frame/authority-discovery/Cargo.toml b/frame/authority-discovery/Cargo.toml index b96cb2fac1f..c82d1eab588 100644 --- a/frame/authority-discovery/Cargo.toml +++ b/frame/authority-discovery/Cargo.toml @@ -11,7 +11,7 @@ description = "FRAME pallet for authority discovery" [dependencies] sp-authority-discovery = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/authority-discovery" } sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/application-crypto" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } diff --git a/frame/authorship/Cargo.toml b/frame/authorship/Cargo.toml index dec9d8b03c1..2a01cdbd8ad 100644 --- a/frame/authorship/Cargo.toml +++ b/frame/authorship/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/inherents" } sp-authorship = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/authorship" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } diff --git a/frame/babe/Cargo.toml b/frame/babe/Cargo.toml index 14176a1ea47..7e39e5bed5c 100644 --- a/frame/babe/Cargo.toml +++ b/frame/babe/Cargo.toml @@ -10,7 +10,7 @@ description = "Consensus extension module for BABE consensus. Collects on-chain [dependencies] hex-literal = "0.2.1" -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true } sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/inherents" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } diff --git a/frame/balances/Cargo.toml b/frame/balances/Cargo.toml index c4d963a2f45..9d26c5b957e 100644 --- a/frame/balances/Cargo.toml +++ b/frame/balances/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME pallet to manage balances" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/benchmarking/Cargo.toml b/frame/benchmarking/Cargo.toml index bd9660dc163..ecaf987bb02 100644 --- a/frame/benchmarking/Cargo.toml +++ b/frame/benchmarking/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/substrate/" description = "Macro for benchmarking a FRAME runtime." [dependencies] -codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } sp-api = { version = "2.0.0-alpha.2", path = "../../primitives/api", default-features = false } sp-runtime-interface = { version = "2.0.0-alpha.2", path = "../../primitives/runtime-interface", default-features = false } sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime", default-features = false } diff --git a/frame/collective/Cargo.toml b/frame/collective/Cargo.toml index 73200119ff5..60899feb4fb 100644 --- a/frame/collective/Cargo.toml +++ b/frame/collective/Cargo.toml @@ -10,7 +10,7 @@ description = "Collective system: Members of a set of account IDs can make their [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } diff --git a/frame/contracts/Cargo.toml b/frame/contracts/Cargo.toml index 632a1ff7767..86f39f8a82b 100644 --- a/frame/contracts/Cargo.toml +++ b/frame/contracts/Cargo.toml @@ -11,7 +11,7 @@ description = "FRAME pallet for WASM contracts" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } pwasm-utils = { version = "0.12.0", default-features = false } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } parity-wasm = { version = "0.41.0", default-features = false } wasmi-validation = { version = "0.3.0", default-features = false } sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } diff --git a/frame/contracts/common/Cargo.toml b/frame/contracts/common/Cargo.toml index 878887573bd..0d009e7c82b 100644 --- a/frame/contracts/common/Cargo.toml +++ b/frame/contracts/common/Cargo.toml @@ -10,7 +10,7 @@ description = "A crate that hosts a common definitions that are relevant for the [dependencies] # This crate should not rely on any of the frame primitives. -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/std" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../../primitives/runtime" } diff --git a/frame/contracts/rpc/Cargo.toml b/frame/contracts/rpc/Cargo.toml index 61491f7d792..092d049c541 100644 --- a/frame/contracts/rpc/Cargo.toml +++ b/frame/contracts/rpc/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/substrate/" description = "Node-specific RPC methods for interaction with contracts." [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" diff --git a/frame/contracts/rpc/runtime-api/Cargo.toml b/frame/contracts/rpc/runtime-api/Cargo.toml index ee251cd2c07..8435a6c4238 100644 --- a/frame/contracts/rpc/runtime-api/Cargo.toml +++ b/frame/contracts/rpc/runtime-api/Cargo.toml @@ -10,7 +10,7 @@ description = "Runtime API definition required by Contracts RPC extensions." [dependencies] sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../../../primitives/api" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../../../primitives/std" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../../../primitives/runtime" } pallet-contracts-primitives = { version = "2.0.0-alpha.2", default-features = false, path = "../../common" } diff --git a/frame/democracy/Cargo.toml b/frame/democracy/Cargo.toml index 7ff3ae2b417..d2938956bd0 100644 --- a/frame/democracy/Cargo.toml +++ b/frame/democracy/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME pallet for democracy" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/elections-phragmen/Cargo.toml b/frame/elections-phragmen/Cargo.toml index 08bbfc979e0..62ae091e9a4 100644 --- a/frame/elections-phragmen/Cargo.toml +++ b/frame/elections-phragmen/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/substrate/" description = "FRAME election pallet for PHRAGMEN" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } sp-phragmen = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/phragmen" } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } diff --git a/frame/elections/Cargo.toml b/frame/elections/Cargo.toml index 55f12028ae6..e65f4e5d462 100644 --- a/frame/elections/Cargo.toml +++ b/frame/elections/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME pallet for elections" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } diff --git a/frame/evm/Cargo.toml b/frame/evm/Cargo.toml index 0d9091dfaf5..76407d57e42 100644 --- a/frame/evm/Cargo.toml +++ b/frame/evm/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME EVM contracts pallet" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } pallet-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../timestamp" } diff --git a/frame/example-offchain-worker/Cargo.toml b/frame/example-offchain-worker/Cargo.toml index 39ba8c32870..ff8d780c3cf 100644 --- a/frame/example-offchain-worker/Cargo.toml +++ b/frame/example-offchain-worker/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/substrate/" description = "FRAME example pallet for offchain worker" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } serde = { version = "1.0.101", optional = true } diff --git a/frame/example/Cargo.toml b/frame/example/Cargo.toml index 90a5b9c76b9..48c1fd57dc9 100644 --- a/frame/example/Cargo.toml +++ b/frame/example/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME example pallet" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } pallet-balances = { version = "2.0.0-alpha.2", default-features = false, path = "../balances" } diff --git a/frame/executive/Cargo.toml b/frame/executive/Cargo.toml index f5b4d5e1867..deafb0cadd5 100644 --- a/frame/executive/Cargo.toml +++ b/frame/executive/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/substrate/" description = "FRAME executives engine" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } serde = { version = "1.0.101", optional = true } diff --git a/frame/finality-tracker/Cargo.toml b/frame/finality-tracker/Cargo.toml index 231e8c76081..1313080dfe0 100644 --- a/frame/finality-tracker/Cargo.toml +++ b/frame/finality-tracker/Cargo.toml @@ -12,7 +12,7 @@ documentation = "https://docs.rs/pallet-finality-tracker" [dependencies] serde = { version = "1.0.101", default-features = false, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/inherents" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/generic-asset/Cargo.toml b/frame/generic-asset/Cargo.toml index 3c452c11b02..a8df92e3c61 100644 --- a/frame/generic-asset/Cargo.toml +++ b/frame/generic-asset/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME pallet for generic asset management" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } @@ -23,10 +23,10 @@ sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } [features] default = ["std"] std =[ - "serde/std", - "codec/std", - "sp-std/std", - "sp-runtime/std", - "frame-support/std", - "frame-system/std", + "serde/std", + "codec/std", + "sp-std/std", + "sp-runtime/std", + "frame-support/std", + "frame-system/std", ] diff --git a/frame/grandpa/Cargo.toml b/frame/grandpa/Cargo.toml index feaf8fa8046..f5cce65fe90 100644 --- a/frame/grandpa/Cargo.toml +++ b/frame/grandpa/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME pallet for GRANDPA finality gadget" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } sp-finality-grandpa = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/finality-grandpa" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } diff --git a/frame/identity/Cargo.toml b/frame/identity/Cargo.toml index 4f6bc9ca4a6..7ea53f776ed 100644 --- a/frame/identity/Cargo.toml +++ b/frame/identity/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME identity management pallet" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } enumflags2 = { version = "0.6.2" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } diff --git a/frame/im-online/Cargo.toml b/frame/im-online/Cargo.toml index 3201e808b2d..ab8c0669454 100644 --- a/frame/im-online/Cargo.toml +++ b/frame/im-online/Cargo.toml @@ -11,7 +11,7 @@ description = "FRAME's I'm online pallet" [dependencies] sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/application-crypto" } pallet-authorship = { version = "2.0.0-alpha.2", default-features = false, path = "../authorship" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } diff --git a/frame/indices/Cargo.toml b/frame/indices/Cargo.toml index 462ee1c3b39..d7e01765b59 100644 --- a/frame/indices/Cargo.toml +++ b/frame/indices/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME indices management pallet" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-keyring = { version = "2.0.0-alpha.2", optional = true, path = "../../primitives/keyring" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } diff --git a/frame/membership/Cargo.toml b/frame/membership/Cargo.toml index 42e933aa3a9..b54109083dc 100644 --- a/frame/membership/Cargo.toml +++ b/frame/membership/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME membership management pallet" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } diff --git a/frame/metadata/Cargo.toml b/frame/metadata/Cargo.toml index ee110ac254b..b3d333f369f 100644 --- a/frame/metadata/Cargo.toml +++ b/frame/metadata/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/substrate/" description = "Decodable variant of the RuntimeMetadata." [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } diff --git a/frame/nicks/Cargo.toml b/frame/nicks/Cargo.toml index 81fb07b3ca2..07c84c439ff 100644 --- a/frame/nicks/Cargo.toml +++ b/frame/nicks/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME pallet for nick management" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/offences/Cargo.toml b/frame/offences/Cargo.toml index e3601dda5b8..99c52e40885 100644 --- a/frame/offences/Cargo.toml +++ b/frame/offences/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME offences pallet" [dependencies] pallet-balances = { version = "2.0.0-alpha.2", default-features = false, path = "../balances" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/randomness-collective-flip/Cargo.toml b/frame/randomness-collective-flip/Cargo.toml index b99f4c8e499..4e4ce76fee7 100644 --- a/frame/randomness-collective-flip/Cargo.toml +++ b/frame/randomness-collective-flip/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME randomness collective flip pallet" [dependencies] safe-mix = { version = "1.0", default-features = false } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } diff --git a/frame/recovery/Cargo.toml b/frame/recovery/Cargo.toml index 39baba71e47..80456aa375d 100644 --- a/frame/recovery/Cargo.toml +++ b/frame/recovery/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME account recovery pallet" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } enumflags2 = { version = "0.6.2" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } diff --git a/frame/scored-pool/Cargo.toml b/frame/scored-pool/Cargo.toml index 83ec59cb78c..a1b7b39d8cd 100644 --- a/frame/scored-pool/Cargo.toml +++ b/frame/scored-pool/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/substrate/" description = "FRAME pallet for scored pools" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/session/Cargo.toml b/frame/session/Cargo.toml index 3d98f92c43a..74ca9fe67bb 100644 --- a/frame/session/Cargo.toml +++ b/frame/session/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME sessions pallet" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } sp-staking = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/staking" } diff --git a/frame/society/Cargo.toml b/frame/society/Cargo.toml index 898a47010f7..35b1c5c4a45 100644 --- a/frame/society/Cargo.toml +++ b/frame/society/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME society pallet" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.2"} sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } diff --git a/frame/staking/Cargo.toml b/frame/staking/Cargo.toml index 6e737aea3a0..ef4bb60a29e 100644 --- a/frame/staking/Cargo.toml +++ b/frame/staking/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME pallet staking" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-keyring = { version = "2.0.0-alpha.2", optional = true, path = "../../primitives/keyring" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-phragmen = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/phragmen" } diff --git a/frame/sudo/Cargo.toml b/frame/sudo/Cargo.toml index 118bb6f1ffd..8d645df85cb 100644 --- a/frame/sudo/Cargo.toml +++ b/frame/sudo/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME pallet for sudo" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/support/Cargo.toml b/frame/support/Cargo.toml index d961134142f..78a7642d9f1 100644 --- a/frame/support/Cargo.toml +++ b/frame/support/Cargo.toml @@ -11,7 +11,7 @@ description = "Support code for the runtime." [dependencies] log = "0.4" serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } frame-metadata = { version = "11.0.0-alpha.2", default-features = false, path = "../metadata" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-io ={ path = "../../primitives/io", default-features = false , version = "2.0.0-alpha.2"} diff --git a/frame/support/test/Cargo.toml b/frame/support/test/Cargo.toml index 9d706644081..0a5595914b0 100644 --- a/frame/support/test/Cargo.toml +++ b/frame/support/test/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] serde = { version = "1.0.101", default-features = false, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-io ={ path = "../../../primitives/io", default-features = false , version = "2.0.0-alpha.2"} sp-state-machine = { version = "0.8.0-alpha.2", optional = true, path = "../../../primitives/state-machine" } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../" } diff --git a/frame/system/Cargo.toml b/frame/system/Cargo.toml index cb5b52b8ca2..6a418cab8ec 100644 --- a/frame/system/Cargo.toml +++ b/frame/system/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME system module" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-io = { path = "../../primitives/io", default-features = false, version = "2.0.0-alpha.2" } diff --git a/frame/system/rpc/runtime-api/Cargo.toml b/frame/system/rpc/runtime-api/Cargo.toml index 2a0f3ff70fe..3bcc34698a5 100644 --- a/frame/system/rpc/runtime-api/Cargo.toml +++ b/frame/system/rpc/runtime-api/Cargo.toml @@ -10,7 +10,7 @@ description = "Runtime API definition required by System RPC extensions." [dependencies] sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../../../primitives/api" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } [features] default = ["std"] diff --git a/frame/timestamp/Cargo.toml b/frame/timestamp/Cargo.toml index 1c8dfa1dfba..db1d9aaf37a 100644 --- a/frame/timestamp/Cargo.toml +++ b/frame/timestamp/Cargo.toml @@ -12,7 +12,7 @@ documentation = "https://docs.rs/pallet-timestamp" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/transaction-payment/Cargo.toml b/frame/transaction-payment/Cargo.toml index 0e0ba1d5de1..3a291dc5163 100644 --- a/frame/transaction-payment/Cargo.toml +++ b/frame/transaction-payment/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/substrate/" description = "FRAME pallet to manage transaction payments" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } diff --git a/frame/transaction-payment/rpc/Cargo.toml b/frame/transaction-payment/rpc/Cargo.toml index 38fc10d56ce..309dfeedd5b 100644 --- a/frame/transaction-payment/rpc/Cargo.toml +++ b/frame/transaction-payment/rpc/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/substrate/" description = "RPC interface for the transaction payment module." [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" diff --git a/frame/transaction-payment/rpc/runtime-api/Cargo.toml b/frame/transaction-payment/rpc/runtime-api/Cargo.toml index 369f044a367..96716769a39 100644 --- a/frame/transaction-payment/rpc/runtime-api/Cargo.toml +++ b/frame/transaction-payment/rpc/runtime-api/Cargo.toml @@ -11,7 +11,7 @@ description = "RPC runtime API for transaction payment FRAME pallet" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../../../primitives/api" } -codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../../../primitives/std" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../../../primitives/runtime" } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../../../support" } diff --git a/frame/treasury/Cargo.toml b/frame/treasury/Cargo.toml index a0bf1443da1..99071e92763 100644 --- a/frame/treasury/Cargo.toml +++ b/frame/treasury/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME pallet to manage treasury" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } diff --git a/frame/utility/Cargo.toml b/frame/utility/Cargo.toml index 552f1dd2548..46f59a191ae 100644 --- a/frame/utility/Cargo.toml +++ b/frame/utility/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME utilities pallet" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/core" } diff --git a/frame/vesting/Cargo.toml b/frame/vesting/Cargo.toml index ac23eef5715..f01a0f6bf22 100644 --- a/frame/vesting/Cargo.toml +++ b/frame/vesting/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME pallet for manage vesting" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } enumflags2 = { version = "0.6.2" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } diff --git a/primitives/api/Cargo.toml b/primitives/api/Cargo.toml index 4c90c41d3fa..a33ff0fa0d7 100644 --- a/primitives/api/Cargo.toml +++ b/primitives/api/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/substrate/" description = "Substrate runtime api primitives" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } sp-api-proc-macro = { version = "2.0.0-alpha.2", path = "proc-macro" } sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../core" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } diff --git a/primitives/api/test/Cargo.toml b/primitives/api/test/Cargo.toml index dc1600b334e..6d2207c178a 100644 --- a/primitives/api/test/Cargo.toml +++ b/primitives/api/test/Cargo.toml @@ -16,7 +16,7 @@ sp-runtime = { version = "2.0.0-alpha.2", path = "../../runtime" } sp-blockchain = { version = "2.0.0-alpha.2", path = "../../blockchain" } sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensus/common" } sc-block-builder = { version = "0.8.0-alpha.2", path = "../../../client/block-builder" } -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } sp-state-machine = { version = "0.8.0-alpha.2", path = "../../../primitives/state-machine" } trybuild = "1.0.17" rustversion = "1.0.0" diff --git a/primitives/application-crypto/Cargo.toml b/primitives/application-crypto/Cargo.toml index 7125ed7982a..ee710b29885 100644 --- a/primitives/application-crypto/Cargo.toml +++ b/primitives/application-crypto/Cargo.toml @@ -12,7 +12,7 @@ documentation = "https://docs.rs/sp-application-crypto" [dependencies] sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../core" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } @@ -25,7 +25,7 @@ std = [ "full_crypto", "sp-core/std", "codec/std", "serde", "sp-std/std", "sp-io # or Intel SGX. # For the regular wasm runtime builds this should not be used. full_crypto = [ - "sp-core/full_crypto", + "sp-core/full_crypto", # Don't add `panic_handler` and `alloc_error_handler` since they are expected to be provided # by the user anyway. "sp-io/disable_panic_handler", diff --git a/primitives/arithmetic/Cargo.toml b/primitives/arithmetic/Cargo.toml index 924278ce89f..617e8b8e5ce 100644 --- a/primitives/arithmetic/Cargo.toml +++ b/primitives/arithmetic/Cargo.toml @@ -11,7 +11,7 @@ documentation = "https://docs.rs/sp-arithmetic" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } integer-sqrt = "0.1.2" num-traits = { version = "0.2.8", default-features = false } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } diff --git a/primitives/authority-discovery/Cargo.toml b/primitives/authority-discovery/Cargo.toml index 84fe003b9aa..b4197c56d7e 100644 --- a/primitives/authority-discovery/Cargo.toml +++ b/primitives/authority-discovery/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../application-crypto" } -codec = { package = "parity-scale-codec", default-features = false, version = "1.0.3" } +codec = { package = "parity-scale-codec", default-features = false, version = "1.2.0" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../api" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } diff --git a/primitives/authorship/Cargo.toml b/primitives/authorship/Cargo.toml index 16f052fe0f5..c5215631cca 100644 --- a/primitives/authorship/Cargo.toml +++ b/primitives/authorship/Cargo.toml @@ -12,7 +12,7 @@ repository = "https://github.com/paritytech/substrate/" sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../inherents" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } [features] default = [ "std" ] diff --git a/primitives/block-builder/Cargo.toml b/primitives/block-builder/Cargo.toml index 0c32752ed36..b5cb592d55b 100644 --- a/primitives/block-builder/Cargo.toml +++ b/primitives/block-builder/Cargo.toml @@ -12,7 +12,7 @@ description = "The block builder runtime api." sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../api" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } -codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../inherents" } [features] diff --git a/primitives/blockchain/Cargo.toml b/primitives/blockchain/Cargo.toml index a31cda5c296..5fb8ce35747 100644 --- a/primitives/blockchain/Cargo.toml +++ b/primitives/blockchain/Cargo.toml @@ -15,7 +15,7 @@ log = "0.4.8" lru = "0.4.0" parking_lot = "0.10.0" derive_more = "0.99.2" -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-consensus = { version = "0.8.0-alpha.2", path = "../consensus/common" } sp-runtime = { version = "2.0.0-alpha.2", path = "../runtime" } sp-block-builder = { version = "2.0.0-alpha.2", path = "../block-builder" } diff --git a/primitives/consensus/aura/Cargo.toml b/primitives/consensus/aura/Cargo.toml index 84b56e18c05..04d41193997 100644 --- a/primitives/consensus/aura/Cargo.toml +++ b/primitives/consensus/aura/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../../application-crypto" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../std" } sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../api" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../runtime" } diff --git a/primitives/consensus/babe/Cargo.toml b/primitives/consensus/babe/Cargo.toml index 291958c100c..f910b73ed6e 100644 --- a/primitives/consensus/babe/Cargo.toml +++ b/primitives/consensus/babe/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://github.com/paritytech/substrate/" [dependencies] sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../../application-crypto" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../std" } schnorrkel = { version = "0.8.5", features = ["preaudit_deprecated"], optional = true } sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../api" } diff --git a/primitives/consensus/common/Cargo.toml b/primitives/consensus/common/Cargo.toml index 684ae2d1f6d..e8d3c0c6118 100644 --- a/primitives/consensus/common/Cargo.toml +++ b/primitives/consensus/common/Cargo.toml @@ -23,7 +23,7 @@ futures-diagnose = "1.0" sp-std = { version = "2.0.0-alpha.2", path = "../../std" } sp-version = { version = "2.0.0-alpha.2", path = "../../version" } sp-runtime = { version = "2.0.0-alpha.2", path = "../../runtime" } -codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] } parking_lot = "0.10.0" serde = { version = "1.0", features = ["derive"] } diff --git a/primitives/consensus/pow/Cargo.toml b/primitives/consensus/pow/Cargo.toml index 978e56706d5..4abead3258f 100644 --- a/primitives/consensus/pow/Cargo.toml +++ b/primitives/consensus/pow/Cargo.toml @@ -13,7 +13,7 @@ sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../ap sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../std" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../runtime" } sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../../core" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } [features] default = ["std"] diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index 8d69110ae6d..83ef683a39a 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -11,7 +11,7 @@ documentation = "https://docs.rs/sp-core" [dependencies] sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } rustc-hex = { version = "2.0.1", default-features = false } log = { version = "0.4.8", default-features = false } serde = { version = "1.0.101", optional = true, features = ["derive"] } diff --git a/primitives/finality-grandpa/Cargo.toml b/primitives/finality-grandpa/Cargo.toml index 3b71946a00d..d36f0e4b527 100644 --- a/primitives/finality-grandpa/Cargo.toml +++ b/primitives/finality-grandpa/Cargo.toml @@ -12,7 +12,7 @@ documentation = "https://docs.rs/sp-finality-grandpa" [dependencies] sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../application-crypto" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } serde = { version = "1.0.101", optional = true, features = ["derive"] } sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../api" } diff --git a/primitives/finality-tracker/Cargo.toml b/primitives/finality-tracker/Cargo.toml index 23f3b5e394f..f89cb24d4a7 100644 --- a/primitives/finality-tracker/Cargo.toml +++ b/primitives/finality-tracker/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/substrate/" description = "FRAME module that tracks the last finalized block, as perceived by block authors." [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/inherents" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } diff --git a/primitives/inherents/Cargo.toml b/primitives/inherents/Cargo.toml index 94ee0b89358..839edba73de 100644 --- a/primitives/inherents/Cargo.toml +++ b/primitives/inherents/Cargo.toml @@ -14,7 +14,7 @@ documentation = "https://docs.rs/sp-inherents" parking_lot = { version = "0.10.0", optional = true } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../core" } -codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } derive_more = { version = "0.99.2", optional = true } [features] diff --git a/primitives/io/Cargo.toml b/primitives/io/Cargo.toml index be148aacffe..4f740638024 100644 --- a/primitives/io/Cargo.toml +++ b/primitives/io/Cargo.toml @@ -11,7 +11,7 @@ documentation = "https://docs.rs/sp-io" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } hash-db = { version = "0.15.2", default-features = false } sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../core" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } diff --git a/primitives/runtime-interface/Cargo.toml b/primitives/runtime-interface/Cargo.toml index 5084b00289f..70092c0587f 100644 --- a/primitives/runtime-interface/Cargo.toml +++ b/primitives/runtime-interface/Cargo.toml @@ -14,7 +14,7 @@ sp-wasm-interface = { version = "2.0.0-alpha.2", path = "../wasm-interface", def sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } sp-runtime-interface-proc-macro = { version = "2.0.0-alpha.2", path = "proc-macro" } sp-externalities = { version = "0.8.0-alpha.2", optional = true, path = "../externalities" } -codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } static_assertions = "1.0.0" primitive-types = { version = "0.6.2", default-features = false } diff --git a/primitives/runtime/Cargo.toml b/primitives/runtime/Cargo.toml index dbdeeabd2fc..430d29d8e22 100644 --- a/primitives/runtime/Cargo.toml +++ b/primitives/runtime/Cargo.toml @@ -12,7 +12,7 @@ documentation = "https://docs.rs/sp-runtime" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../core" } sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../application-crypto" } sp-arithmetic = { version = "2.0.0-alpha.2", default-features = false, path = "../arithmetic" } diff --git a/primitives/sandbox/Cargo.toml b/primitives/sandbox/Cargo.toml index 7c797f6c0c6..060801a29e4 100755 --- a/primitives/sandbox/Cargo.toml +++ b/primitives/sandbox/Cargo.toml @@ -14,7 +14,7 @@ sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../core sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../io" } sp-wasm-interface = { version = "2.0.0-alpha.2", default-features = false, path = "../wasm-interface" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } [dev-dependencies] wabt = "0.9.2" diff --git a/primitives/staking/Cargo.toml b/primitives/staking/Cargo.toml index 986f7ecd7ec..2f85b8251b0 100644 --- a/primitives/staking/Cargo.toml +++ b/primitives/staking/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/substrate/" description = "A crate which contains primitives that are useful for implementation that uses staking approaches in general. Definitions related to sessions, slashing, etc go here." [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } diff --git a/primitives/state-machine/Cargo.toml b/primitives/state-machine/Cargo.toml index 91036d74d74..51f311e44af 100644 --- a/primitives/state-machine/Cargo.toml +++ b/primitives/state-machine/Cargo.toml @@ -18,7 +18,7 @@ trie-root = "0.16.0" sp-trie = { version = "2.0.0-alpha.2", path = "../trie" } sp-core = { version = "2.0.0-alpha.2", path = "../core" } sp-panic-handler = { version = "2.0.0-alpha.2", path = "../panic-handler" } -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } num-traits = "0.2.8" rand = "0.7.2" sp-externalities = { version = "0.8.0-alpha.2", path = "../externalities" } diff --git a/primitives/test-primitives/Cargo.toml b/primitives/test-primitives/Cargo.toml index 5c1bf0db0fc..1879ca26b7e 100644 --- a/primitives/test-primitives/Cargo.toml +++ b/primitives/test-primitives/Cargo.toml @@ -10,7 +10,7 @@ publish = false [dependencies] sp-application-crypto = { version = "2.0.0-alpha.2", default-features = false, path = "../application-crypto" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-core = { version = "2.0.0-alpha.2", default-features = false, path = "../core" } serde = { version = "1.0.101", optional = true, features = ["derive"] } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } diff --git a/primitives/timestamp/Cargo.toml b/primitives/timestamp/Cargo.toml index 6a1a861908b..1fc40a113f9 100644 --- a/primitives/timestamp/Cargo.toml +++ b/primitives/timestamp/Cargo.toml @@ -12,7 +12,7 @@ description = "Substrate core types and inherents for timestamps." sp-api = { version = "2.0.0-alpha.2", default-features = false, path = "../api" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../inherents" } impl-trait-for-tuples = "0.1.3" wasm-timer = "0.2" diff --git a/primitives/transaction-pool/Cargo.toml b/primitives/transaction-pool/Cargo.toml index 58023c58c4c..69ec59cf5ef 100644 --- a/primitives/transaction-pool/Cargo.toml +++ b/primitives/transaction-pool/Cargo.toml @@ -11,7 +11,7 @@ documentation = "https://docs.rs/sp-transaction-pool" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", optional = true } +codec = { package = "parity-scale-codec", version = "1.2.0", optional = true } derive_more = { version = "0.99.2", optional = true } futures = { version = "0.3.1", optional = true } log = { version = "0.4.8", optional = true } diff --git a/primitives/trie/Cargo.toml b/primitives/trie/Cargo.toml index db13e238319..ddce910609d 100644 --- a/primitives/trie/Cargo.toml +++ b/primitives/trie/Cargo.toml @@ -14,7 +14,7 @@ name = "bench" harness = false [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } hash-db = { version = "0.15.2", default-features = false } trie-db = { version = "0.20.0", default-features = false } diff --git a/primitives/version/Cargo.toml b/primitives/version/Cargo.toml index d38c9d2d88f..edaf940465b 100644 --- a/primitives/version/Cargo.toml +++ b/primitives/version/Cargo.toml @@ -13,7 +13,7 @@ documentation = "https://docs.rs/sp-version" [dependencies] impl-serde = { version = "0.2.3", optional = true } serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../std" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../runtime" } diff --git a/primitives/wasm-interface/Cargo.toml b/primitives/wasm-interface/Cargo.toml index dd3c1647f4b..bbe53df2582 100644 --- a/primitives/wasm-interface/Cargo.toml +++ b/primitives/wasm-interface/Cargo.toml @@ -13,7 +13,7 @@ documentation = "https://docs.rs/sp-wasm-interface" wasmi = { version = "0.6.2", optional = true } impl-trait-for-tuples = "0.1.2" sp-std = { version = "2.0.0-alpha.2", path = "../std", default-features = false } -codec = { package = "parity-scale-codec", version = "1.1.2", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } [features] default = [ "std" ] diff --git a/test-utils/client/Cargo.toml b/test-utils/client/Cargo.toml index 9b5763272c7..77a614e5fec 100644 --- a/test-utils/client/Cargo.toml +++ b/test-utils/client/Cargo.toml @@ -17,7 +17,7 @@ sc-executor = { version = "0.8.0-alpha.2", path = "../../client/executor" } futures = "0.3.1" hash-db = "0.15.2" sp-keyring = { version = "2.0.0-alpha.2", path = "../../primitives/keyring" } -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" } diff --git a/test-utils/runtime/Cargo.toml b/test-utils/runtime/Cargo.toml index 57ee6c03586..96d91992af6 100644 --- a/test-utils/runtime/Cargo.toml +++ b/test-utils/runtime/Cargo.toml @@ -15,7 +15,7 @@ sp-consensus-aura = { version = "0.8.0-alpha.2", default-features = false, path sp-consensus-babe = { version = "0.8.0-alpha.2", default-features = false, path = "../../primitives/consensus/babe" } sp-block-builder = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/block-builder" } cfg-if = "0.1.10" -codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } frame-executive = { version = "2.0.0-alpha.2", default-features = false, path = "../../frame/executive" } sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/inherents" } sp-keyring = { version = "2.0.0-alpha.2", optional = true, path = "../../primitives/keyring" } diff --git a/test-utils/runtime/client/Cargo.toml b/test-utils/runtime/client/Cargo.toml index a6844d7ff9e..5f16e77860b 100644 --- a/test-utils/runtime/client/Cargo.toml +++ b/test-utils/runtime/client/Cargo.toml @@ -16,7 +16,7 @@ substrate-test-runtime = { version = "2.0.0-dev", path = "../../runtime" } sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } sp-api = { version = "2.0.0-alpha.2", path = "../../../primitives/api" } sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api" } sc-client = { version = "0.8.0-alpha.2", path = "../../../client/" } futures = "0.3.1" diff --git a/test-utils/runtime/transaction-pool/Cargo.toml b/test-utils/runtime/transaction-pool/Cargo.toml index 543b466a85d..3e22da468f1 100644 --- a/test-utils/runtime/transaction-pool/Cargo.toml +++ b/test-utils/runtime/transaction-pool/Cargo.toml @@ -11,7 +11,7 @@ publish = false [dependencies] substrate-test-runtime-client = { version = "2.0.0-dev", path = "../client" } parking_lot = "0.10.0" -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } sp-blockchain = { version = "2.0.0-alpha.2", path = "../../../primitives/blockchain" } sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../../primitives/transaction-pool" } diff --git a/utils/fork-tree/Cargo.toml b/utils/fork-tree/Cargo.toml index 6d9d2757f01..8ade20cd7b7 100644 --- a/utils/fork-tree/Cargo.toml +++ b/utils/fork-tree/Cargo.toml @@ -10,4 +10,4 @@ description = "Utility library for managing tree-like ordered data with logic fo documentation = "https://docs.rs/fork-tree" [dependencies] -codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] } diff --git a/utils/frame/benchmarking-cli/Cargo.toml b/utils/frame/benchmarking-cli/Cargo.toml index 8d834c20a05..93c62c3f965 100644 --- a/utils/frame/benchmarking-cli/Cargo.toml +++ b/utils/frame/benchmarking-cli/Cargo.toml @@ -17,4 +17,4 @@ sc-client-db = { version = "0.8.0-alpha.2", path = "../../../client/db" } sc-executor = { version = "0.8.0-alpha.2", path = "../../../client/executor" } sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } structopt = "0.3.8" -codec = { version = "1.1.2", package = "parity-scale-codec" } +codec = { version = "1.2.0", package = "parity-scale-codec" } diff --git a/utils/frame/rpc/system/Cargo.toml b/utils/frame/rpc/system/Cargo.toml index e209a8d94b0..8b1c62ccd70 100644 --- a/utils/frame/rpc/system/Cargo.toml +++ b/utils/frame/rpc/system/Cargo.toml @@ -10,7 +10,7 @@ description = "FRAME's system exposed over Substrate RPC" [dependencies] sc-client = { version = "0.8.0-alpha.2", path = "../../../../client/" } -codec = { package = "parity-scale-codec", version = "1.0.0" } +codec = { package = "parity-scale-codec", version = "1.2.0" } futures = "0.3.1" jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" -- GitLab From 75116bd8c45c7e46a9b8eed9cb29ee4256ed631b Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Tue, 3 Mar 2020 14:48:20 +0100 Subject: [PATCH 071/106] Lazy payouts (#4474) * TODOs * Remove superfluous: * partial implementation * full implementation * fix preferences * update comments * upgrade test WIP * fix more tests * fix cutoff * fix saturation * comment * upgrade mock * upgrade test * WIP migration * WIP migration * remove slot stake stuff * fix merge * migration of ledger * remove equalize from test * add test * fix * update doc * fix compilation * improve test readibility * improve doc * fix most todo * fix migration and test * remove println * WIP * add test and spec * weight * update doc * safer end_era * fix exposure of conversion * Revert "safer end_era" This reverts commit 72ff737d27be67d87308514b13e2574bc5f09fce. * fix useless put * exposure clipped * doc * fix payout with clipped * fix node runtime * add doc * pluggable and generalized staking module * remove print * update doc * refactor * improve documentation and implementation * fix test * Fix test * fix test * fix test * fix remove lowest stake from exposure, not biggest. * nomination index arguments in nominator_payout * add test * try to fix offence * apply slashed and bond eras until active era * doc * update spec version * add test upgrade from previous test environment * Apply suggestions from code review Co-Authored-By: Shawn Tabrizi * nominators upgrade has been cleaned * dynamic history depth implementation * make current_era - history_depth included * Change equality check to start era to less than or equal * Use era specific validator prefs * Add print statement and comment about start era if < * fix next_reward overflow * make more check for bad era claim for zero cost * small refactor * code refactor + fix use of deprecated storage * fix wasm build * add comment * Fix tests * remove outdated comment * Apply suggestions from code review Co-Authored-By: Shawn Tabrizi * gather active era information into one storage Co-authored-by: thiolliere Co-authored-by: Shawn Tabrizi --- bin/node/cli/src/chain_spec.rs | 1 - bin/node/runtime/src/lib.rs | 2 + bin/node/testing/src/genesis.rs | 1 - frame/im-online/src/mock.rs | 2 + frame/session/src/historical.rs | 4 + frame/session/src/lib.rs | 13 +- frame/session/src/mock.rs | 2 + frame/staking/src/lib.rs | 940 +++++++++---- frame/staking/src/mock.rs | 95 +- frame/staking/src/tests.rs | 1251 +++++++++++------ .../tests/test_upgrade_from_master_dataset.rs | 59 + 11 files changed, 1701 insertions(+), 669 deletions(-) create mode 100644 frame/staking/src/tests/test_upgrade_from_master_dataset.rs diff --git a/bin/node/cli/src/chain_spec.rs b/bin/node/cli/src/chain_spec.rs index d163cdf3918..af24db704c3 100644 --- a/bin/node/cli/src/chain_spec.rs +++ b/bin/node/cli/src/chain_spec.rs @@ -247,7 +247,6 @@ pub fn testnet_genesis( }).collect::>(), }), pallet_staking: Some(StakingConfig { - current_era: 0, validator_count: initial_authorities.len() as u32 * 2, minimum_validator_count: initial_authorities.len() as u32, stakers: initial_authorities.iter().map(|x| { diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index 85889a50c20..be5ca25630d 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -269,6 +269,7 @@ parameter_types! { pub const BondingDuration: pallet_staking::EraIndex = 24 * 28; pub const SlashDeferDuration: pallet_staking::EraIndex = 24 * 7; // 1/4 the bonding duration. pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; + pub const MaxNominatorRewardedPerValidator: u32 = 64; } impl pallet_staking::Trait for Runtime { @@ -286,6 +287,7 @@ impl pallet_staking::Trait for Runtime { type SlashCancelOrigin = pallet_collective::EnsureProportionAtLeast<_3, _4, AccountId, CouncilCollective>; type SessionInterface = Self; type RewardCurve = RewardCurve; + type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; } parameter_types! { diff --git a/bin/node/testing/src/genesis.rs b/bin/node/testing/src/genesis.rs index 6aa7290a641..e35059e0c6f 100644 --- a/bin/node/testing/src/genesis.rs +++ b/bin/node/testing/src/genesis.rs @@ -84,7 +84,6 @@ pub fn config_endowed( ] }), pallet_staking: Some(StakingConfig { - current_era: 0, stakers: vec![ (dave(), alice(), 111 * DOLLARS, pallet_staking::StakerStatus::Validator), (eve(), bob(), 100 * DOLLARS, pallet_staking::StakerStatus::Validator), diff --git a/frame/im-online/src/mock.rs b/frame/im-online/src/mock.rs index 97a0e7eb844..78b6409d543 100644 --- a/frame/im-online/src/mock.rs +++ b/frame/im-online/src/mock.rs @@ -49,6 +49,7 @@ impl pallet_session::SessionManager for TestSessionManager { VALIDATORS.with(|l| l.borrow_mut().take()) } fn end_session(_: SessionIndex) {} + fn start_session(_: SessionIndex) {} } impl pallet_session::historical::SessionManager for TestSessionManager { @@ -62,6 +63,7 @@ impl pallet_session::historical::SessionManager for TestSessionManager ) } fn end_session(_: SessionIndex) {} + fn start_session(_: SessionIndex) {} } /// An extrinsic type used for tests. diff --git a/frame/session/src/historical.rs b/frame/session/src/historical.rs index ced630e5fd8..6c305a1a1d6 100644 --- a/frame/session/src/historical.rs +++ b/frame/session/src/historical.rs @@ -108,6 +108,7 @@ pub trait SessionManager: crate::SessionManager /// If there was a validator set change, its returns the set of new validators along with their /// full identifications. fn new_session(new_index: SessionIndex) -> Option>; + fn start_session(start_index: SessionIndex); fn end_session(end_index: SessionIndex); } @@ -146,6 +147,9 @@ impl crate::SessionManager for NoteHistoricalRoot>::start_session(start_index) + } fn end_session(end_index: SessionIndex) { >::end_session(end_index) } diff --git a/frame/session/src/lib.rs b/frame/session/src/lib.rs index 6340b79f0f5..1097cfd6be2 100644 --- a/frame/session/src/lib.rs +++ b/frame/session/src/lib.rs @@ -162,10 +162,15 @@ pub trait SessionManager { /// Because the session pallet can queue validator set the ending session can be lower than the /// last new session index. fn end_session(end_index: SessionIndex); + /// Start the session. + /// + /// The session start to be used for validation + fn start_session(start_index: SessionIndex); } impl SessionManager for () { fn new_session(_: SessionIndex) -> Option> { None } + fn start_session(_: SessionIndex) {} fn end_session(_: SessionIndex) {} } @@ -423,6 +428,8 @@ decl_storage! { >::put(initial_validators_0); >::put(queued_keys); + + T::SessionManager::start_session(0); }); } } @@ -520,6 +527,8 @@ impl Module { // Inform the session handlers that a session is going to end. T::SessionHandler::on_before_session_ending(); + T::SessionManager::end_session(session_index); + // Get queued session keys and validators. let session_keys = >::get(); let validators = session_keys.iter() @@ -532,12 +541,12 @@ impl Module { DisabledValidators::take(); } - T::SessionManager::end_session(session_index); - // Increment session index. let session_index = session_index + 1; CurrentIndex::put(session_index); + T::SessionManager::start_session(session_index); + // Get next validator set. let maybe_next_validators = T::SessionManager::new_session(session_index + 1); let (next_validators, next_identities_changed) diff --git a/frame/session/src/mock.rs b/frame/session/src/mock.rs index df858c8ed57..9d64285b900 100644 --- a/frame/session/src/mock.rs +++ b/frame/session/src/mock.rs @@ -92,6 +92,7 @@ impl SessionHandler for TestSessionHandler { pub struct TestSessionManager; impl SessionManager for TestSessionManager { fn end_session(_: SessionIndex) {} + fn start_session(_: SessionIndex) {} fn new_session(_: SessionIndex) -> Option> { if !TEST_SESSION_CHANGED.with(|l| *l.borrow()) { VALIDATORS.with(|v| { @@ -112,6 +113,7 @@ impl SessionManager for TestSessionManager { #[cfg(feature = "historical")] impl crate::historical::SessionManager for TestSessionManager { fn end_session(_: SessionIndex) {} + fn start_session(_: SessionIndex) {} fn new_session(new_index: SessionIndex) -> Option> { diff --git a/frame/staking/src/lib.rs b/frame/staking/src/lib.rs index 81bce3b5487..3609191f4cb 100644 --- a/frame/staking/src/lib.rs +++ b/frame/staking/src/lib.rs @@ -104,6 +104,11 @@ //! The **reward and slashing** procedure is the core of the Staking module, attempting to _embrace //! valid behavior_ while _punishing any misbehavior or lack of availability_. //! +//! Reward must be claimed by stakers for each era before it gets too old by $HISTORY_DEPTH using +//! `payout_nominator` and `payout_validator` calls. +//! Only the [`T::MaxNominatorRewardedPerValidator`] biggest stakers can claim their reward. This +//! limit the i/o cost to compute nominators payout. +//! //! Slashing can occur at any point in time, once misbehavior is reported. Once slashing is //! determined, a value is deducted from the balance of the validator and all the nominators who //! voted for this validator (values are deducted from the _stash_ account of the slashed entity). @@ -122,6 +127,11 @@ //! //! An account can step back via the [`chill`](enum.Call.html#variant.chill) call. //! +//! ### Session managing +//! +//! The module implement the trait `SessionManager`. Which is the only API to query new validator +//! set and allowing these validator set to be rewarded once their era is ended. +//! //! ## Interface //! //! ### Dispatchable Functions @@ -159,14 +169,6 @@ //! //! ## Implementation Details //! -//! ### Slot Stake -//! -//! The term [`SlotStake`](./struct.Module.html#method.slot_stake) will be used throughout this -//! section. It refers to a value calculated at the end of each era, containing the _minimum value -//! at stake among all validators._ Note that a validator's value at stake might be a combination -//! of the validator's own stake and the votes it received. See [`Exposure`](./struct.Exposure.html) -//! for more details. -//! //! ### Reward Calculation //! //! Validators and nominators are rewarded at the end of each era. The total reward of an era is @@ -236,6 +238,7 @@ //! ## GenesisConfig //! //! The Staking module depends on the [`GenesisConfig`](./struct.GenesisConfig.html). +//! The `GenesisConfig` is optional and allow to set some initial stakers. //! //! ## Related Modules //! @@ -254,7 +257,7 @@ mod slashing; pub mod inflation; -use sp_std::{prelude::*, result}; +use sp_std::{prelude::*, result, collections::btree_map::BTreeMap}; use codec::{HasCompact, Encode, Decode}; use frame_support::{ decl_module, decl_event, decl_storage, ensure, decl_error, @@ -270,7 +273,7 @@ use sp_runtime::{ Perbill, PerThing, RuntimeDebug, curve::PiecewiseLinear, traits::{ - Convert, Zero, One, StaticLookup, CheckedSub, Saturating, Bounded, SaturatedConversion, + Convert, Zero, StaticLookup, CheckedSub, Saturating, SaturatedConversion, AtLeast32Bit, EnsureOrigin, } }; @@ -293,28 +296,29 @@ const STAKING_ID: LockIdentifier = *b"staking "; pub type EraIndex = u32; /// Counter for the number of "reward" points earned by a given validator. -pub type Points = u32; +pub type RewardPoint = u32; + +/// Information regarding the active era (era in used in session). +#[derive(Encode, Decode, Debug)] +pub struct ActiveEraInfo { + /// Index of era. + index: EraIndex, + /// Moment of start + /// + /// Start can be none if start hasn't been set for the era yet, + /// Start is set on the first on_finalize of the era to guarantee usage of `Time`. + start: Option, +} /// Reward points of an era. Used to split era total payout between validators. -#[derive(Encode, Decode, Default)] -pub struct EraPoints { +/// +/// This points will be used to reward validators and their respective nominators. +#[derive(PartialEq, Encode, Decode, Default, Debug)] +pub struct EraRewardPoints { /// Total number of points. Equals the sum of reward points for each validator. - total: Points, - /// The reward points earned by a given validator. The index of this vec corresponds to the - /// index into the current validator set. - individual: Vec, -} - -impl EraPoints { - /// Add the reward to the validator at the given index. Index must be valid - /// (i.e. `index < current_elected.len()`). - fn add_points_to_index(&mut self, index: u32, points: u32) { - if let Some(new_total) = self.total.checked_add(points) { - self.total = new_total; - self.individual.resize((index as usize + 1).max(self.individual.len()), 0); - self.individual[index as usize] += points; // Addition is less than total - } - } + total: RewardPoint, + /// The reward points earned by a given validator. + individual: BTreeMap, } /// Indicates the initial status of the staker. @@ -390,6 +394,8 @@ pub struct StakingLedger { /// Any balance that is becoming free, which may eventually be transferred out /// of the stash (assuming it doesn't get slashed first). pub unlocking: Vec>, + /// The latest and highest era which the staker has claimed reward for. + pub last_reward: Option, } impl< @@ -408,7 +414,14 @@ impl< false }) .collect(); - Self { total, active: self.active, stash: self.stash, unlocking } + + Self { + stash: self.stash, + total, + active: self.active, + unlocking, + last_reward: self.last_reward + } } /// Re-bond funds that were scheduled for unlocking. @@ -499,6 +512,8 @@ pub struct Nominations { /// The targets of nomination. pub targets: Vec, /// The era the nominations were submitted. + /// + /// Except for initial nominations which are considered submitted at era 0. pub submitted_in: EraIndex, /// Whether the nominations have been suppressed. pub suppressed: bool, @@ -595,6 +610,9 @@ pub trait Trait: frame_system::Trait { type Currency: LockableCurrency; /// Time used for computing era duration. + /// + /// It is guaranteed to start being called from the first `on_finalize`. Thus value at genesis + /// is not used. type Time: Time; /// Convert a balance into a number used for election calculation. @@ -635,6 +653,12 @@ pub trait Trait: frame_system::Trait { /// The NPoS reward curve to use. type RewardCurve: Get<&'static PiecewiseLinear<'static>>; + + /// The maximum number of nominator rewarded for each validator. + /// + /// For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can claim + /// their reward. This used to limit the i/o cost for the nominator payout. + type MaxNominatorRewardedPerValidator: Get; } /// Mode of era-forcing. @@ -657,9 +681,18 @@ impl Default for Forcing { decl_storage! { trait Store for Module as Staking { + /// Number of era to keep in history. + /// + /// Information is kept for eras in `[current_era - history_depth; current_era] + /// + /// Must be more than the number of era delayed by session otherwise. + /// i.e. active era must always be in history. + /// i.e. `active_era > current_era - history_depth` must be guaranteed. + HistoryDepth get(fn history_depth) config(): u32 = 84; /// The ideal number of staking participants. pub ValidatorCount get(fn validator_count) config(): u32; + /// Minimum number of staking participants before emergency conditions are imposed. pub MinimumValidatorCount get(fn minimum_validator_count) config(): u32 = DEFAULT_MINIMUM_VALIDATOR_COUNT; @@ -671,6 +704,7 @@ decl_storage! { /// Map from all locked "stash" accounts to the controller account. pub Bonded get(fn bonded): map hasher(blake2_256) T::AccountId => Option; + /// Map from all (unlocked) "controller" accounts to the info regarding the staking. pub Ledger get(fn ledger): map hasher(blake2_256) T::AccountId @@ -684,40 +718,74 @@ decl_storage! { linked_map hasher(blake2_256) T::AccountId => ValidatorPrefs; /// The map from nominator stash key to the set of stash keys of all validators to nominate. - /// - /// NOTE: is private so that we can ensure upgraded before all typical accesses. - /// Direct storage APIs can still bypass this protection. - Nominators get(fn nominators): + pub Nominators get(fn nominators): linked_map hasher(blake2_256) T::AccountId => Option>; - /// Nominators for a particular account that is in action right now. You can't iterate - /// through validators here, but you can find them in the Session module. + /// The current era index. /// - /// This is keyed by the stash account. - pub Stakers get(fn stakers): - map hasher(blake2_256) T::AccountId => Exposure>; + /// This is the latest planned era, depending on how session module queues the validator + /// set, it might be active or not. + pub CurrentEra get(fn current_era): Option; - /// The currently elected validator set keyed by stash account ID. - pub CurrentElected get(fn current_elected): Vec; + /// The active era information, it holds index and start. + /// + /// The active era is the era currently rewarded. + /// Validator set of this era must be equal to `SessionInterface::validators`. + pub ActiveEra get(fn active_era): Option>>; - /// The current era index. - pub CurrentEra get(fn current_era) config(): EraIndex; + /// The session index at which the era start for the last `HISTORY_DEPTH` eras + pub ErasStartSessionIndex get(fn eras_start_session_index): + map hasher(blake2_256) EraIndex => Option; - /// The start of the current era. - pub CurrentEraStart get(fn current_era_start): MomentOf; + /// Exposure of validator at era. + /// + /// This is keyed first by the era index to allow bulk deletion and then the stash account. + /// + /// Is it removed after `HISTORY_DEPTH` eras. + /// If stakers hasn't been set or has been removed then empty exposure is returned. + pub ErasStakers get(fn eras_stakers): + double_map hasher(twox_64_concat) EraIndex, hasher(twox_64_concat) T::AccountId + => Exposure>; - /// The session index at which the current era started. - pub CurrentEraStartSessionIndex get(fn current_era_start_session_index): SessionIndex; + /// Clipped Exposure of validator at era. + /// + /// This is similar to [`ErasStakers`] but number of nominators exposed is reduce to the + /// `T::MaxNominatorRewardedPerValidator` biggest stakers. + /// This is used to limit the i/o cost for the nominator payout. + /// + /// This is keyed fist by the era index to allow bulk deletion and then the stash account. + /// + /// Is it removed after `HISTORY_DEPTH` eras. + /// If stakers hasn't been set or has been removed then empty exposure is returned. + pub ErasStakersClipped get(fn eras_stakers_clipped): + double_map hasher(twox_64_concat) EraIndex, hasher(twox_64_concat) T::AccountId + => Exposure>; - /// Rewards for the current era. Using indices of current elected set. - CurrentEraPointsEarned get(fn current_era_reward): EraPoints; + /// Similarly to `ErasStakers` this holds the preferences of validators. + /// + /// This is keyed fist by the era index to allow bulk deletion and then the stash account. + /// + /// Is it removed after `HISTORY_DEPTH` eras. + // If prefs hasn't been set or has been removed then 0 commission is returned. + pub ErasValidatorPrefs get(fn eras_validator_prefs): + double_map hasher(twox_64_concat) EraIndex, hasher(twox_64_concat) T::AccountId + => ValidatorPrefs; - /// The amount of balance actively at stake for each validator slot, currently. + /// The total validator era payout for the last `HISTORY_DEPTH` eras. /// - /// This is used to derive rewards and punishments. - pub SlotStake get(fn slot_stake) build(|config: &GenesisConfig| { - config.stakers.iter().map(|&(_, _, value, _)| value).min().unwrap_or_default() - }): BalanceOf; + /// Eras that haven't finished yet or has been removed doesn't have reward. + pub ErasValidatorReward get(fn eras_validator_reward): + map hasher(blake2_256) EraIndex => Option>; + + /// Rewards for the last `HISTORY_DEPTH` eras. + /// If reward hasn't been set or has been removed then 0 reward is returned. + pub ErasRewardPoints get(fn eras_reward_points): + map hasher(blake2_256) EraIndex => EraRewardPoints; + + /// The total amount staked for the last `HISTORY_DEPTH` eras. + /// If total hasn't been set or has been removed then 0 stake is returned. + pub ErasTotalStake get(fn eras_total_stake): + map hasher(blake2_256) EraIndex => BalanceOf; /// True if the next session change will be a new era regardless of index. pub ForceEra get(fn force_era) config(): Forcing; @@ -736,6 +804,9 @@ decl_storage! { map hasher(blake2_256) EraIndex => Vec>>; /// A mapping from still-bonded eras to the first session index of that era. + /// + /// Must contains information for eras for the range: + /// `[active_era - bounding_duration; active_era]` BondedEras: Vec<(EraIndex, SessionIndex)>; /// All slashing events on validators, mapped by era to the highest slash proportion @@ -760,6 +831,11 @@ decl_storage! { /// The earliest era for which we have a pending, unapplied slash. EarliestUnappliedSlash: Option; + + /// True if network has been upgraded to this version. + /// + /// True for new networks. + IsUpgraded build(|_| true): bool; } add_extra_genesis { config(stakers): @@ -797,9 +873,8 @@ decl_storage! { decl_event!( pub enum Event where Balance = BalanceOf, ::AccountId { - /// All validators have been rewarded by the first balance; the second is the remainder - /// from the maximum amount of reward. - Reward(Balance, Balance), + /// The staker has been rewarded by this amount. AccountId is controller account. + Reward(AccountId, Balance), /// One validator (and its nominators) has been slashed by the given amount. Slash(AccountId, Balance), /// An old slashing report from a prior era was discarded because it could @@ -833,6 +908,10 @@ decl_error! { NoUnlockChunk, /// Attempting to target a stash that still has funds. FundedTarget, + /// Invalid era to reward. + InvalidEraToReward, + /// Invalid number of nominations. + InvalidNumberOfNominations, } } @@ -854,8 +933,11 @@ decl_module! { fn on_finalize() { // Set the start of the first era. - if !>::exists() { - >::put(T::Time::now()); + if let Some(mut active_era) = Self::active_era() { + if active_era.start.is_none() { + active_era.start = Some(T::Time::now()); + >::put(active_era); + } } } @@ -906,7 +988,13 @@ decl_module! { let stash_balance = T::Currency::free_balance(&stash); let value = value.min(stash_balance); - let item = StakingLedger { stash, total: value, active: value, unlocking: vec![] }; + let item = StakingLedger { + stash, + total: value, + active: value, + unlocking: vec![], + last_reward: Self::current_era(), + }; Self::update_ledger(&controller, &item); } @@ -961,7 +1049,8 @@ decl_module! { /// - Contains a limited number of reads. /// - Each call (requires the remainder of the bonded balance to be above `minimum_balance`) /// will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage. - /// The only way to clean the aforementioned storage item is also user-controlled via `withdraw_unbonded`. + /// The only way to clean the aforementioned storage item is also user-controlled via + /// `withdraw_unbonded`. /// - One DB entry. /// #[weight = SimpleDispatchInfo::FixedNormal(400_000)] @@ -984,7 +1073,8 @@ decl_module! { ledger.active = Zero::zero(); } - let era = Self::current_era() + T::BondingDuration::get(); + // Note: in case there is no current era it is fine to bond one era more. + let era = Self::current_era().unwrap_or(0) + T::BondingDuration::get(); ledger.unlocking.push(UnlockChunk { value, era }); Self::update_ledger(&controller, &ledger); } @@ -1009,8 +1099,10 @@ decl_module! { #[weight = SimpleDispatchInfo::FixedNormal(400_000)] fn withdraw_unbonded(origin) { let controller = ensure_signed(origin)?; - let ledger = Self::ledger(&controller).ok_or(Error::::NotController)?; - let ledger = ledger.consolidate_unlocked(Self::current_era()); + let mut ledger = Self::ledger(&controller).ok_or(Error::::NotController)?; + if let Some(current_era) = Self::current_era() { + ledger = ledger.consolidate_unlocked(current_era) + } if ledger.unlocking.is_empty() && ledger.active.is_zero() { // This account must have called `unbond()` with some value that caused the active @@ -1075,7 +1167,8 @@ decl_module! { let nominations = Nominations { targets, - submitted_in: Self::current_era(), + // initial nominations are considered submitted at era 0. See `Nominations` doc + submitted_in: Self::current_era().unwrap_or(0), suppressed: false, }; @@ -1243,6 +1336,58 @@ decl_module! { ::UnappliedSlashes::insert(&era, &unapplied); } + /// Make one nominator's payout for one era. + /// + /// - `who` is the controller account of the nominator to pay out. + /// - `era` may not be lower than one following the most recently paid era. If it is higher, + /// then it indicates an instruction to skip the payout of all previous eras. + /// - `validators` is the list of all validators that `who` had exposure to during `era`. + /// If it is incomplete, then less than the full reward will be paid out. + /// It must not exceed `MAX_NOMINATIONS`. + /// + /// WARNING: once an era is payed for a validator such validator can't claim the payout of + /// previous era. + /// + /// WARNING: Incorrect arguments here can result in loss of payout. Be very careful. + /// + /// # + /// - Number of storage read of `O(validators)`; `validators` is the argument of the call, + /// and is bounded by `MAX_NOMINATIONS`. + /// - Each storage read is `O(N)` size and decode complexity; `N` is the maximum + /// nominations that can be given to a single validator. + /// - Computation complexity: `O(MAX_NOMINATIONS * logN)`; `MAX_NOMINATIONS` is the + /// maximum number of validators that may be nominated by a single nominator, it is + /// bounded only economically (all nominators are required to place a minimum stake). + /// # + #[weight = SimpleDispatchInfo::FixedNormal(500_000)] + fn payout_nominator(origin, era: EraIndex, validators: Vec<(T::AccountId, u32)>) + -> DispatchResult + { + let who = ensure_signed(origin)?; + Self::do_payout_nominator(who, era, validators) + } + + /// Make one validator's payout for one era. + /// + /// - `who` is the controller account of the validator to pay out. + /// - `era` may not be lower than one following the most recently paid era. If it is higher, + /// then it indicates an instruction to skip the payout of all previous eras. + /// + /// WARNING: once an era is payed for a validator such validator can't claim the payout of + /// previous era. + /// + /// WARNING: Incorrect arguments here can result in loss of payout. Be very careful. + /// + /// # + /// - Time complexity: O(1). + /// - Contains a limited number of reads and writes. + /// # + #[weight = SimpleDispatchInfo::FixedNormal(500_000)] + fn payout_validator(origin, era: EraIndex) -> DispatchResult { + let who = ensure_signed(origin)?; + Self::do_payout_validator(who, era) + } + /// Rebond a portion of the stash scheduled to be unlocked. /// /// # @@ -1262,6 +1407,24 @@ decl_module! { Self::update_ledger(&controller, &ledger); } + /// Set history_depth value. + /// + /// Origin must be root. + #[weight = SimpleDispatchInfo::FixedOperational(500_000)] + fn set_history_depth(origin, #[compact] new_history_depth: EraIndex) { + ensure_root(origin)?; + if let Some(current_era) = Self::current_era() { + HistoryDepth::mutate(|history_depth| { + let last_kept = current_era.checked_sub(*history_depth).unwrap_or(0); + let new_last_kept = current_era.checked_sub(new_history_depth).unwrap_or(0); + for era_index in last_kept..new_last_kept { + Self::clear_era_information(era_index); + } + *history_depth = new_history_depth + }) + } + } + /// Remove all data structure concerning a staker/stash once its balance is zero. /// This is essentially equivalent to `withdraw_unbonded` except it can be called by anyone /// and the target `stash` must have no funds left. @@ -1288,6 +1451,111 @@ impl Module { // MUTABLES (DANGEROUS) + fn do_payout_nominator(who: T::AccountId, era: EraIndex, validators: Vec<(T::AccountId, u32)>) + -> DispatchResult + { + // validators len must not exceed `MAX_NOMINATIONS` to avoid querying more validator + // exposure than necessary. + if validators.len() > MAX_NOMINATIONS { + return Err(Error::::InvalidNumberOfNominations.into()); + } + + // Note: if era has no reward to be claimed, era may be future. better not to update + // `nominator_ledger.last_reward` in this case. + let era_payout = >::get(&era) + .ok_or_else(|| Error::::InvalidEraToReward)?; + + let mut nominator_ledger = >::get(&who).ok_or_else(|| Error::::NotController)?; + + if nominator_ledger.last_reward.map(|last_reward| last_reward >= era).unwrap_or(false) { + return Err(Error::::InvalidEraToReward.into()); + } + + nominator_ledger.last_reward = Some(era); + >::insert(&who, &nominator_ledger); + + let mut reward = Perbill::zero(); + let era_reward_points = >::get(&era); + + for (validator, nominator_index) in validators.into_iter() { + let commission = Self::eras_validator_prefs(&era, &validator).commission; + let validator_exposure = >::get(&era, &validator); + + if let Some(nominator_exposure) = validator_exposure.others + .get(nominator_index as usize) + { + if nominator_exposure.who != nominator_ledger.stash { + continue; + } + + let nominator_exposure_part = Perbill::from_rational_approximation( + nominator_exposure.value, + validator_exposure.total, + ); + let validator_point = era_reward_points.individual.get(&validator) + .map(|points| *points) + .unwrap_or_else(|| Zero::zero()); + let validator_point_part = Perbill::from_rational_approximation( + validator_point, + era_reward_points.total, + ); + reward = reward.saturating_add( + validator_point_part + .saturating_mul(Perbill::one().saturating_sub(commission)) + .saturating_mul(nominator_exposure_part) + ); + } + } + + if let Some(imbalance) = Self::make_payout(&nominator_ledger.stash, reward * era_payout) { + Self::deposit_event(RawEvent::Reward(who, imbalance.peek())); + } + + Ok(()) + } + + fn do_payout_validator(who: T::AccountId, era: EraIndex) -> DispatchResult { + // Note: if era has no reward to be claimed, era may be future. better not to update + // `ledger.last_reward` in this case. + let era_payout = >::get(&era) + .ok_or_else(|| Error::::InvalidEraToReward)?; + + let mut ledger = >::get(&who).ok_or_else(|| Error::::NotController)?; + if ledger.last_reward.map(|last_reward| last_reward >= era).unwrap_or(false) { + return Err(Error::::InvalidEraToReward.into()); + } + + ledger.last_reward = Some(era); + >::insert(&who, &ledger); + + let era_reward_points = >::get(&era); + let commission = Self::eras_validator_prefs(&era, &ledger.stash).commission; + let exposure = >::get(&era, &ledger.stash); + + let exposure_part = Perbill::from_rational_approximation( + exposure.own, + exposure.total, + ); + let validator_point = era_reward_points.individual.get(&ledger.stash) + .map(|points| *points) + .unwrap_or_else(|| Zero::zero()); + let validator_point_part = Perbill::from_rational_approximation( + validator_point, + era_reward_points.total, + ); + let reward = validator_point_part.saturating_mul( + commission.saturating_add( + Perbill::one().saturating_sub(commission).saturating_mul(exposure_part) + ) + ); + + if let Some(imbalance) = Self::make_payout(&ledger.stash, reward * era_payout) { + Self::deposit_event(RawEvent::Reward(who, imbalance.peek())); + } + + Ok(()) + } + /// Update the ledger for a controller. This will also update the stash lock. The lock will /// will lock the entire funds except paying for further transactions. fn update_ledger( @@ -1310,10 +1578,12 @@ impl Module { } /// Ensures storage is upgraded to most recent necessary state. - /// - /// Right now it's a no-op as all networks that are supported by Substrate Frame Core are - /// running with the latest staking storage scheme. - fn ensure_storage_upgraded() {} + fn ensure_storage_upgraded() { + if !IsUpgraded::get() { + IsUpgraded::put(true); + Self::do_upgrade(); + } + } /// Actually make a payment to a staker. This uses the currency's reward function /// to pay the right payee for the given staker account. @@ -1338,113 +1608,90 @@ impl Module { } } - /// Reward a given validator by a specific amount. Add the reward to the validator's, and its - /// nominators' balance, pro-rata based on their exposure, after having removed the validator's - /// pre-payout cut. - fn reward_validator(stash: &T::AccountId, reward: BalanceOf) -> PositiveImbalanceOf { - let off_the_table = Self::validators(stash).commission * reward; - let reward = reward.saturating_sub(off_the_table); - let mut imbalance = >::zero(); - let validator_cut = if reward.is_zero() { - Zero::zero() - } else { - let exposure = Self::stakers(stash); - let total = exposure.total.max(One::one()); - - for i in &exposure.others { - let per_u64 = Perbill::from_rational_approximation(i.value, total); - imbalance.maybe_subsume(Self::make_payout(&i.who, per_u64 * reward)); + /// Plan a new session potentially trigger a new era. + fn new_session(session_index: SessionIndex) -> Option> { + if let Some(current_era) = Self::current_era() { + // Initial era has been set. + + let current_era_start_session_index = Self::eras_start_session_index(current_era) + .unwrap_or_else(|| { + frame_support::print("Error: start_session_index must be set for current_era"); + 0 + }); + + let era_length = session_index.checked_sub(current_era_start_session_index) + .unwrap_or(0); // Must never happen. + + match ForceEra::get() { + Forcing::ForceNew => ForceEra::kill(), + Forcing::ForceAlways => (), + Forcing::NotForcing if era_length >= T::SessionsPerEra::get() => (), + _ => return None, } - let per_u64 = Perbill::from_rational_approximation(exposure.own, total); - per_u64 * reward - }; - - imbalance.maybe_subsume(Self::make_payout(stash, validator_cut + off_the_table)); - - imbalance - } - - /// Session has just ended. Provide the validator set for the next session if it's an era-end. - fn new_session(session_index: SessionIndex) -> Option> { - let era_length = session_index.checked_sub(Self::current_era_start_session_index()).unwrap_or(0); - match ForceEra::get() { - Forcing::ForceNew => ForceEra::kill(), - Forcing::ForceAlways => (), - Forcing::NotForcing if era_length >= T::SessionsPerEra::get() => (), - _ => return None, + Self::new_era(session_index) + } else { + // Set initial era + Self::new_era(session_index) } - - Self::new_era(session_index) } - /// Initialize the first session (and consequently the first era) - fn initial_session() -> Option> { - // note: `CurrentEraStart` is set in `on_finalize` of the first block because now is not - // available yet. - CurrentEraStartSessionIndex::put(0); - BondedEras::mutate(|bonded| bonded.push((0, 0))); - Self::select_validators().1 + /// Start a session potentially starting an era. + fn start_session(start_session: SessionIndex) { + let next_active_era = Self::active_era().map(|e| e.index + 1).unwrap_or(0); + if let Some(next_active_era_start_session_index) = + Self::eras_start_session_index(next_active_era) + { + if next_active_era_start_session_index == start_session { + Self::start_era(start_session); + } else if next_active_era_start_session_index < start_session { + // This arm should never happen, but better handle it than to stall the + // staking pallet. + frame_support::print("Warning: A session appears to have been skipped."); + Self::start_era(start_session); + } + } } - /// The era has changed - enact new staking set. - /// - /// NOTE: This always happens immediately before a session change to ensure that new validators - /// get a chance to set their session keys. - fn new_era(start_session_index: SessionIndex) -> Option> { - // Payout - let points = CurrentEraPointsEarned::take(); - let now = T::Time::now(); - let previous_era_start = >::mutate(|v| { - sp_std::mem::replace(v, now) - }); - let era_duration = now - previous_era_start; - if !era_duration.is_zero() { - let validators = Self::current_elected(); - - let validator_len: BalanceOf = (validators.len() as u32).into(); - let total_rewarded_stake = Self::slot_stake() * validator_len; - - let (total_payout, max_payout) = inflation::compute_total_payout( - &T::RewardCurve::get(), - total_rewarded_stake.clone(), - T::Currency::total_issuance(), - // Duration of era; more than u64::MAX is rewarded as u64::MAX. - era_duration.saturated_into::(), - ); - - let mut total_imbalance = >::zero(); + /// End a session potentially ending an era. + fn end_session(session_index: SessionIndex) { + if let Some(active_era) = Self::active_era() { + let next_active_era_start_session_index = + Self::eras_start_session_index(active_era.index + 1) + .unwrap_or_else(|| { + frame_support::print( + "Error: start_session_index must be set for active_era + 1" + ); + 0 + }); - for (v, p) in validators.iter().zip(points.individual.into_iter()) { - if p != 0 { - let reward = Perbill::from_rational_approximation(p, points.total) * total_payout; - total_imbalance.subsume(Self::reward_validator(v, reward)); - } + if next_active_era_start_session_index == session_index + 1 { + Self::end_era(active_era, session_index); } - - // assert!(total_imbalance.peek() == total_payout) - let total_payout = total_imbalance.peek(); - - let rest = max_payout.saturating_sub(total_payout); - Self::deposit_event(RawEvent::Reward(total_payout, rest)); - - T::Reward::on_unbalanced(total_imbalance); - T::RewardRemainder::on_unbalanced(T::Currency::issue(rest)); } + } - // Increment current era. - let current_era = CurrentEra::mutate(|s| { *s += 1; *s }); - - CurrentEraStartSessionIndex::mutate(|v| { - *v = start_session_index; + /// * Increment `active_era.index`, + /// * reset `active_era.start`, + /// * update `BondedEras` and apply slashes. + fn start_era(start_session: SessionIndex) { + let active_era = >::mutate(|active_era| { + let new_index = active_era.as_ref().map(|info| info.index + 1).unwrap_or(0); + *active_era = Some(ActiveEraInfo { + index: new_index, + // Set new active era start in next `on_finalize`. To guarantee usage of `Time` + start: None, + }); + new_index }); + let bonding_duration = T::BondingDuration::get(); BondedEras::mutate(|bonded| { - bonded.push((current_era, start_session_index)); + bonded.push((active_era, start_session)); - if current_era > bonding_duration { - let first_kept = current_era - bonding_duration; + if active_era > bonding_duration { + let first_kept = active_era - bonding_duration; // prune out everything that's from before the first-kept index. let n_to_prune = bonded.iter() @@ -1462,18 +1709,65 @@ impl Module { } }); - // Reassign all Stakers. - let (_slot_stake, maybe_new_validators) = Self::select_validators(); - Self::apply_unapplied_slashes(current_era); + Self::apply_unapplied_slashes(active_era); + } + + /// Compute payout for era. + fn end_era(active_era: ActiveEraInfo>, _session_index: SessionIndex) { + // Note: active_era_start can be None if end era is called during genesis config. + if let Some(active_era_start) = active_era.start { + let now = T::Time::now(); + + let era_duration = now - active_era_start; + let (total_payout, _max_payout) = inflation::compute_total_payout( + &T::RewardCurve::get(), + Self::eras_total_stake(&active_era.index), + T::Currency::total_issuance(), + // Duration of era; more than u64::MAX is rewarded as u64::MAX. + era_duration.saturated_into::(), + ); + + // Set ending era reward. + >::insert(&active_era.index, total_payout); + } + } + + /// Plan a new era. Return the potential new staking set. + fn new_era(start_session_index: SessionIndex) -> Option> { + // Increment or set current era. + let current_era = CurrentEra::mutate(|s| { + *s = Some(s.map(|s| s + 1).unwrap_or(0)); + s.unwrap() + }); + ErasStartSessionIndex::insert(¤t_era, &start_session_index); + + // Clean old era information. + if let Some(old_era) = current_era.checked_sub(Self::history_depth() + 1) { + Self::clear_era_information(old_era); + } + + // Set staking information for new era. + let maybe_new_validators = Self::select_validators(current_era); maybe_new_validators } + /// Clear all era information for given era. + fn clear_era_information(era_index: EraIndex) { + >::remove_prefix(era_index); + >::remove_prefix(era_index); + >::remove_prefix(era_index); + >::remove(era_index); + >::remove(era_index); + >::remove(era_index); + ErasStartSessionIndex::remove(era_index); + } + /// Apply previously-unapplied slashes on the beginning of a new era, after a delay. - fn apply_unapplied_slashes(current_era: EraIndex) { + fn apply_unapplied_slashes(active_era: EraIndex) { let slash_defer_duration = T::SlashDeferDuration::get(); ::EarliestUnappliedSlash::mutate(|earliest| if let Some(ref mut earliest) = earliest { - let keep_from = current_era.saturating_sub(slash_defer_duration); + let keep_from = active_era.saturating_sub(slash_defer_duration); for era in (*earliest)..keep_from { let era_slashes = ::UnappliedSlashes::take(&era); for slash in era_slashes { @@ -1485,19 +1779,25 @@ impl Module { }) } - /// Select a new validator set from the assembled stakers and their role preferences. + /// Select a new validator set from the assembled stakers and their role preferences, and store + /// staking information for the new current era. + /// + /// Fill the storages `ErasStakers`, `ErasStakersClipped`, `ErasValidatorPrefs` and + /// `ErasTotalStake` for current era. /// - /// Returns the new `SlotStake` value and a set of newly selected _stash_ IDs. + /// Returns a set of newly selected _stash_ IDs. /// /// Assumes storage is coherent with the declaration. - fn select_validators() -> (BalanceOf, Option>) { + fn select_validators(current_era: EraIndex) -> Option> { let mut all_nominators: Vec<(T::AccountId, Vec)> = Vec::new(); - let all_validator_candidates_iter = >::enumerate(); - let all_validators = all_validator_candidates_iter.map(|(who, _pref)| { - let self_vote = (who.clone(), vec![who.clone()]); + let mut all_validators_and_prefs = BTreeMap::new(); + let mut all_validators = Vec::new(); + for (validator, preference) in >::enumerate() { + let self_vote = (validator.clone(), vec![validator.clone()]); all_nominators.push(self_vote); - who - }).collect::>(); + all_validators_and_prefs.insert(validator.clone(), preference); + all_validators.push(validator); + } let nominator_votes = >::enumerate().map(|(nominator, nominations)| { let Nominations { submitted_in, mut targets, suppressed: _ } = nominations; @@ -1524,8 +1824,8 @@ impl Module { ); if let Some(phragmen_result) = maybe_phragmen_result { - let elected_stashes = phragmen_result.winners.iter() - .map(|(s, _)| s.clone()) + let elected_stashes = phragmen_result.winners.into_iter() + .map(|(s, _)| s) .collect::>(); let assignments = phragmen_result.assignments; @@ -1538,13 +1838,8 @@ impl Module { Self::slashable_balance_of, ); - // Clear Stakers. - for v in Self::current_elected().iter() { - >::remove(v); - } - - // Populate Stakers and figure out the minimum stake behind a slot. - let mut slot_stake = BalanceOf::::max_value(); + // Populate stakers information and figure out the total stake. + let mut total_staked = BalanceOf::::zero(); for (c, s) in supports.into_iter() { // build `struct exposure` from `support` let mut others = Vec::new(); @@ -1561,6 +1856,9 @@ impl Module { } total = total.saturating_add(value); }); + + total_staked = total_staked.saturating_add(total); + let exposure = Exposure { own, others, @@ -1570,24 +1868,31 @@ impl Module { // we simulate it in some tests. total, }; + >::insert(¤t_era, &c, &exposure); - if exposure.total < slot_stake { - slot_stake = exposure.total; + let mut exposure_clipped = exposure; + let clipped_max_len = T::MaxNominatorRewardedPerValidator::get() as usize; + if exposure_clipped.others.len() > clipped_max_len { + exposure_clipped.others.sort_unstable_by(|a, b| a.value.cmp(&b.value).reverse()); + exposure_clipped.others.truncate(clipped_max_len); } - >::insert(&c, exposure.clone()); + >::insert(¤t_era, &c, exposure_clipped); } - // Update slot stake. - >::put(&slot_stake); - - // Set the new validator set in sessions. - >::put(&elected_stashes); + // Insert current era staking informations + >::insert(¤t_era, total_staked); + let default_pref = ValidatorPrefs::default(); + for stash in &elected_stashes { + let pref = all_validators_and_prefs.get(stash) + .unwrap_or(&default_pref); // Must never happen, but better to be safe. + >::insert(¤t_era, stash, pref); + } // In order to keep the property required by `n_session_ending` // that we must return the new validator set even if it's the same as the old, // as long as any underlying economic conditions have changed, we don't attempt // to do any optimization where we compare against the prior set. - (slot_stake, Some(elected_stashes)) + Some(elected_stashes) } else { // There were not enough candidates for even our minimal level of functionality. // This is bad. @@ -1595,7 +1900,7 @@ impl Module { // and let the chain keep producing blocks until we can decide on a sufficiently // substantial set. // TODO: #2494 - (Self::slot_stake(), None) + None } } @@ -1633,66 +1938,207 @@ impl Module { /// /// COMPLEXITY: Complexity is `number_of_validator_to_reward x current_elected_len`. /// If you need to reward lots of validator consider using `reward_by_indices`. - pub fn reward_by_ids(validators_points: impl IntoIterator) { - CurrentEraPointsEarned::mutate(|rewards| { - let current_elected = >::current_elected(); - for (validator, points) in validators_points.into_iter() { - if let Some(index) = current_elected.iter() - .position(|elected| *elected == validator) - { - rewards.add_points_to_index(index as u32, points); + pub fn reward_by_ids( + validators_points: impl IntoIterator + ) { + if let Some(active_era) = Self::active_era() { + >::mutate(active_era.index, |era_rewards| { + for (validator, points) in validators_points.into_iter() { + *era_rewards.individual.entry(validator).or_default() += points; + era_rewards.total += points; } - } - }); + }); + } + } + + /// Ensures that at the end of the current session there will be a new era. + fn ensure_new_era() { + match ForceEra::get() { + Forcing::ForceAlways | Forcing::ForceNew => (), + _ => ForceEra::put(Forcing::ForceNew), + } } - /// Add reward points to validators using their validator index. + /// Update storages to current version /// - /// For each element in the iterator the given number of points in u32 is added to the - /// validator, thus duplicates are handled. - pub fn reward_by_indices(validators_points: impl IntoIterator) { - let current_elected_len = >::current_elected().len() as u32; + /// In old version the staking module has several issue about handling session delay, the + /// current era was always considered the active one. + /// + /// After the migration the current era will still be considered the active one for the era of + /// the upgrade. And the delay issue will be fixed when planning the next era. + // * create: + // * ActiveEraStart + // * ErasRewardPoints + // * ActiveEra + // * ErasStakers + // * ErasStakersClipped + // * ErasValidatorPrefs + // * ErasTotalStake + // * ErasStartSessionIndex + // * translate StakingLedger + // * removal of: + // * Stakers + // * SlotStake + // * CurrentElected + // * CurrentEraStart + // * CurrentEraStartSessionIndex + // * CurrentEraPointsEarned + fn do_upgrade() { + /// Deprecated storages used for migration only. + mod deprecated { + use crate::{Trait, BalanceOf, MomentOf, SessionIndex, Exposure}; + use codec::{Encode, Decode}; + use frame_support::{decl_module, decl_storage}; + use sp_std::prelude::*; + + /// Reward points of an era. Used to split era total payout between validators. + #[derive(Encode, Decode, Default)] + pub struct EraPoints { + /// Total number of points. Equals the sum of reward points for each validator. + pub total: u32, + /// The reward points earned by a given validator. The index of this vec corresponds to the + /// index into the current validator set. + pub individual: Vec, + } - CurrentEraPointsEarned::mutate(|rewards| { - for (validator_index, points) in validators_points.into_iter() { - if validator_index < current_elected_len { - rewards.add_points_to_index(validator_index, points); + decl_module! { + pub struct Module for enum Call where origin: T::Origin { } + } + + decl_storage! { + pub trait Store for Module as Staking { + pub SlotStake: BalanceOf; + + /// The currently elected validator set keyed by stash account ID. + pub CurrentElected: Vec; + + /// The start of the current era. + pub CurrentEraStart: MomentOf; + + /// The session index at which the current era started. + pub CurrentEraStartSessionIndex: SessionIndex; + + /// Rewards for the current era. Using indices of current elected set. + pub CurrentEraPointsEarned: EraPoints; + + /// Nominators for a particular account that is in action right now. You can't iterate + /// through validators here, but you can find them in the Session module. + /// + /// This is keyed by the stash account. + pub Stakers: map hasher(blake2_256) T::AccountId => Exposure>; } } + } + + #[derive(Encode, Decode)] + struct OldStakingLedger { + stash: AccountId, + #[codec(compact)] + total: Balance, + #[codec(compact)] + active: Balance, + unlocking: Vec>, + } + + let current_era_start_index = deprecated::CurrentEraStartSessionIndex::get(); + let current_era = as Store>::CurrentEra::get().unwrap_or(0); + let current_era_start = deprecated::CurrentEraStart::::get(); + as Store>::ErasStartSessionIndex::insert(current_era, current_era_start_index); + as Store>::ActiveEra::put(ActiveEraInfo { + index: current_era, + start: Some(current_era_start), }); - } - /// Ensures that at the end of the current session there will be a new era. - fn ensure_new_era() { - match ForceEra::get() { - Forcing::ForceAlways | Forcing::ForceNew => (), - _ => ForceEra::put(Forcing::ForceNew), + let current_elected = deprecated::CurrentElected::::get(); + let mut current_total_stake = >::zero(); + for validator in ¤t_elected { + let exposure = deprecated::Stakers::::get(validator); + current_total_stake += exposure.total; + as Store>::ErasStakers::insert(current_era, validator, &exposure); + + let mut exposure_clipped = exposure; + let clipped_max_len = T::MaxNominatorRewardedPerValidator::get() as usize; + if exposure_clipped.others.len() > clipped_max_len { + exposure_clipped.others.sort_unstable_by(|a, b| a.value.cmp(&b.value).reverse()); + exposure_clipped.others.truncate(clipped_max_len); + } + as Store>::ErasStakersClipped::insert(current_era, validator, exposure_clipped); + + let pref = as Store>::Validators::get(validator); + as Store>::ErasValidatorPrefs::insert(current_era, validator, pref); + } + as Store>::ErasTotalStake::insert(current_era, current_total_stake); + + let points = deprecated::CurrentEraPointsEarned::get(); + as Store>::ErasRewardPoints::insert(current_era, EraRewardPoints { + total: points.total, + individual: current_elected.iter().cloned().zip(points.individual.iter().cloned()).collect(), + }); + + let res = as Store>::Ledger::translate_values( + |old: OldStakingLedger>| StakingLedger { + stash: old.stash, + total: old.total, + active: old.active, + unlocking: old.unlocking, + last_reward: None, + } + ); + if let Err(e) = res { + frame_support::print("Encountered error in migration of Staking::Ledger map."); + frame_support::print("The number of removed key/value is:"); + frame_support::print(e); } + + + // Kill old storages + deprecated::Stakers::::remove_all(); + deprecated::SlotStake::::kill(); + deprecated::CurrentElected::::kill(); + deprecated::CurrentEraStart::::kill(); + deprecated::CurrentEraStartSessionIndex::kill(); + deprecated::CurrentEraPointsEarned::kill(); } } +/// In this implementation `new_session(session)` must be called before `end_session(session-1)` +/// i.e. the new session must be planned before the ending of the previous session. +/// +/// Once the first new_session is planned, all session must start and then end in order, though +/// some session can lag in between the newest session planned and the latest session started. impl pallet_session::SessionManager for Module { fn new_session(new_index: SessionIndex) -> Option> { Self::ensure_storage_upgraded(); - if new_index == 0 { - return Self::initial_session(); - } - Self::new_session(new_index - 1) + Self::new_session(new_index) + } + fn start_session(start_index: SessionIndex) { + Self::start_session(start_index) + } + fn end_session(end_index: SessionIndex) { + Self::end_session(end_index) } - fn end_session(_end_index: SessionIndex) {} } +/// This implementation has the same constrains as the implementation of +/// `pallet_session::SessionManager`. impl SessionManager>> for Module { fn new_session(new_index: SessionIndex) -> Option>)>> { >::new_session(new_index).map(|validators| { + let current_era = Self::current_era() + // Must be some as a new era has been created. + .unwrap_or(0); + validators.into_iter().map(|v| { - let exposure = >::get(&v); + let exposure = Self::eras_stakers(current_era, &v); (v, exposure) }).collect() }) } + fn start_session(start_index: SessionIndex) { + >::start_session(start_index) + } fn end_session(end_index: SessionIndex) { >::end_session(end_index) } @@ -1702,9 +2148,12 @@ impl SessionManager> /// * 20 points to the block producer for producing a (non-uncle) block in the relay chain, /// * 2 points to the block producer for each reference to a previously unreferenced uncle, and /// * 1 point to the producer of each referenced uncle block. -impl pallet_authorship::EventHandler for Module { +impl pallet_authorship::EventHandler for Module + where + T: Trait + pallet_authorship::Trait + pallet_session::Trait +{ fn note_author(author: T::AccountId) { - Self::reward_by_ids(vec![(author, 20)]); + Self::reward_by_ids(vec![(author, 20)]) } fn note_uncle(author: T::AccountId, _age: T::BlockNumber) { Self::reward_by_ids(vec![ @@ -1724,15 +2173,22 @@ impl Convert> for StashOf { } } -/// A typed conversion from stash account ID to the current exposure of nominators +/// A typed conversion from stash account ID to the active exposure of nominators /// on that account. +/// +/// Active exposure is the exposure of the validator set currently validating, i.e. in +/// `active_era`. It can differ from the latest planned exposure in `current_era`. pub struct ExposureOf(sp_std::marker::PhantomData); impl Convert>>> for ExposureOf { fn convert(validator: T::AccountId) -> Option>> { - Some(>::stakers(&validator)) + if let Some(active_era) = >::active_era() { + Some(>::eras_stakers(active_era.index, &validator)) + } else { + None + } } } @@ -1756,13 +2212,25 @@ impl OnOffenceHandler= current_era_start_session { - era_now + // fast path for active-era report - most likely. + // `slash_session` cannot be in a future active era. It must be in `active_era` or before. + let slash_era = if slash_session >= active_era_start_session_index { + active_era } else { let eras = BondedEras::get(); @@ -1775,7 +2243,7 @@ impl OnOffenceHandler::EarliestUnappliedSlash::mutate(|earliest| { if earliest.is_none() { - *earliest = Some(era_now) + *earliest = Some(active_era) } }); @@ -1796,7 +2264,7 @@ impl OnOffenceHandler OnOffenceHandler::UnappliedSlashes::mutate( - era_now, + active_era, move |for_later| for_later.push(unapplied), ); } diff --git a/frame/staking/src/mock.rs b/frame/staking/src/mock.rs index 22d66284635..b7cae91bedf 100644 --- a/frame/staking/src/mock.rs +++ b/frame/staking/src/mock.rs @@ -16,22 +16,23 @@ //! Test utilities -use std::{collections::HashSet, cell::RefCell}; +use std::{collections::{HashSet, HashMap}, cell::RefCell}; use sp_runtime::{Perbill, KeyTypeId}; use sp_runtime::curve::PiecewiseLinear; -use sp_runtime::traits::{IdentityLookup, Convert, OpaqueKeys, OnInitialize, SaturatedConversion}; +use sp_runtime::traits::{IdentityLookup, Convert, OpaqueKeys, OnInitialize, OnFinalize, SaturatedConversion}; use sp_runtime::testing::{Header, UintAuthorityId}; use sp_staking::{SessionIndex, offence::{OffenceDetails, OnOffenceHandler}}; use sp_core::{H256, crypto::key_types}; use sp_io; use frame_support::{ - assert_ok, impl_outer_origin, parameter_types, StorageLinkedMap, StorageValue, + assert_ok, impl_outer_origin, parameter_types, StorageLinkedMap, StorageValue, StorageMap, + StorageDoubleMap, traits::{Currency, Get, FindAuthor}, weights::Weight, }; use crate::{ EraIndex, GenesisConfig, Module, Trait, StakerStatus, ValidatorPrefs, RewardDestination, - Nominators, inflation + Nominators, inflation, SessionInterface, Exposure, ErasStakers, ErasRewardPoints }; /// The AccountId alias in this test module. @@ -198,6 +199,7 @@ parameter_types! { pub const SessionsPerEra: SessionIndex = 3; pub const BondingDuration: EraIndex = 3; pub const RewardCurve: &'static PiecewiseLinear<'static> = &I_NPOS; + pub const MaxNominatorRewardedPerValidator: u32 = 64; } impl Trait for Test { type Currency = pallet_balances::Module; @@ -213,6 +215,7 @@ impl Trait for Test { type BondingDuration = BondingDuration; type SessionInterface = Self; type RewardCurve = RewardCurve; + type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; } pub struct ExtBuilder { @@ -328,7 +331,6 @@ impl ExtBuilder { }; let nominated = if self.nominate { vec![11, 21] } else { vec![] }; let _ = GenesisConfig::{ - current_era: 0, stakers: vec![ // (stash, controller, staked_amount, status) (11, 10, balance_factor * 1000, StakerStatus::::Validator), @@ -366,35 +368,34 @@ pub type Session = pallet_session::Module; pub type Timestamp = pallet_timestamp::Module; pub type Staking = Module; -pub fn check_exposure_all() { - Staking::current_elected().into_iter().for_each(|acc| check_exposure(acc)); +pub fn check_exposure_all(era: EraIndex) { + ErasStakers::::iter_prefix(era).for_each(check_exposure) } -pub fn check_nominator_all() { - >::enumerate().for_each(|(acc, _)| check_nominator_exposure(acc)); +pub fn check_nominator_all(era: EraIndex) { + >::enumerate() + .for_each(|(acc, _)| check_nominator_exposure(era, acc)); } /// Check for each selected validator: expo.total = Sum(expo.other) + expo.own -pub fn check_exposure(stash: u64) { - assert_is_stash(stash); - let expo = Staking::stakers(&stash); +pub fn check_exposure(expo: Exposure) { assert_eq!( expo.total as u128, expo.own as u128 + expo.others.iter().map(|e| e.value as u128).sum::(), - "wrong total exposure for {:?}: {:?}", stash, expo, + "wrong total exposure {:?}", expo, ); } /// Check that for each nominator: slashable_balance > sum(used_balance) /// Note: we might not consume all of a nominator's balance, but we MUST NOT over spend it. -pub fn check_nominator_exposure(stash: u64) { +pub fn check_nominator_exposure(era: EraIndex, stash: AccountId) { assert_is_stash(stash); let mut sum = 0; - Staking::current_elected() - .iter() - .map(|v| Staking::stakers(v)) - .for_each(|e| e.others.iter() - .filter(|i| i.who == stash) - .for_each(|i| sum += i.value)); + ErasStakers::::iter_prefix(era) + .for_each(|exposure| { + exposure.others.iter() + .filter(|i| i.who == stash) + .for_each(|i| sum += i.value) + }); let nominator_stake = Staking::slashable_balance_of(&stash); // a nominator cannot over-spend. assert!( @@ -403,11 +404,11 @@ pub fn check_nominator_exposure(stash: u64) { ); } -pub fn assert_is_stash(acc: u64) { +pub fn assert_is_stash(acc: AccountId) { assert!(Staking::bonded(&acc).is_some(), "Not a stash."); } -pub fn assert_ledger_consistent(stash: u64) { +pub fn assert_ledger_consistent(stash: AccountId) { assert_is_stash(stash); let ledger = Staking::ledger(stash - 1).unwrap(); @@ -437,9 +438,8 @@ pub fn advance_session() { } pub fn start_session(session_index: SessionIndex) { - // Compensate for session delay - let session_index = session_index + 1; for i in Session::current_index()..session_index { + Staking::on_finalize(System::block_number()); System::set_block_number((i + 1).into()); Timestamp::set_timestamp(System::block_number() * 1000); Session::on_initialize(System::block_number()); @@ -450,22 +450,21 @@ pub fn start_session(session_index: SessionIndex) { pub fn start_era(era_index: EraIndex) { start_session((era_index * 3).into()); - assert_eq!(Staking::current_era(), era_index); + assert_eq!(Staking::active_era().unwrap().index, era_index); } pub fn current_total_payout_for_duration(duration: u64) -> u64 { inflation::compute_total_payout( ::RewardCurve::get(), - >::slot_stake() * 2, + Staking::eras_total_stake(Staking::active_era().unwrap().index), Balances::total_issuance(), duration, ).0 } pub fn reward_all_elected() { - let rewards = >::current_elected().iter() - .map(|v| (*v, 1)) - .collect::>(); + let rewards = ::SessionInterface::validators().into_iter() + .map(|v| (v, 1)); >::reward_by_ids(rewards) } @@ -489,8 +488,8 @@ pub fn on_offence_in_era( } } - if Staking::current_era() == era { - Staking::on_offence(offenders, slash_fraction, Staking::current_era_start_session_index()); + if Staking::active_era().unwrap().index == era { + Staking::on_offence(offenders, slash_fraction, Staking::eras_start_session_index(era).unwrap()); } else { panic!("cannot slash in era {}", era); } @@ -500,6 +499,38 @@ pub fn on_offence_now( offenders: &[OffenceDetails>], slash_fraction: &[Perbill], ) { - let now = Staking::current_era(); + let now = Staking::active_era().unwrap().index; on_offence_in_era(offenders, slash_fraction, now) } + +/// Make all validator and nominator request their payment +pub fn make_all_reward_payment(era: EraIndex) { + let validators_with_reward = ErasRewardPoints::::get(era).individual.keys() + .cloned() + .collect::>(); + + // reward nominators + let mut nominator_controllers = HashMap::new(); + for validator in Staking::eras_reward_points(era).individual.keys() { + let validator_exposure = Staking::eras_stakers_clipped(era, validator); + for (nom_index, nom) in validator_exposure.others.iter().enumerate() { + if let Some(nom_ctrl) = Staking::bonded(nom.who) { + nominator_controllers.entry(nom_ctrl) + .or_insert(vec![]) + .push((validator.clone(), nom_index as u32)); + } + } + } + for (nominator_controller, validators_with_nom_index) in nominator_controllers { + assert_ok!(Staking::payout_nominator( + Origin::signed(nominator_controller), + era, + validators_with_nom_index, + )); + } + + // reward validators + for validator_controller in validators_with_reward.iter().filter_map(Staking::bonded) { + assert_ok!(Staking::payout_validator(Origin::signed(validator_controller), era)); + } +} diff --git a/frame/staking/src/tests.rs b/frame/staking/src/tests.rs index d950c171ad1..98536a042aa 100644 --- a/frame/staking/src/tests.rs +++ b/frame/staking/src/tests.rs @@ -16,6 +16,8 @@ //! Tests for the module. +mod test_upgrade_from_master_dataset; + use super::*; use mock::*; use sp_runtime::{assert_eq_error_rate, traits::{OnInitialize, BadOrigin}}; @@ -23,9 +25,13 @@ use sp_staking::offence::OffenceDetails; use frame_support::{ assert_ok, assert_noop, traits::{Currency, ReservableCurrency}, - dispatch::DispatchError, StorageMap, + StorageMap, + storage::migration::{put_storage_value, get_storage_value}, }; +use pallet_balances::Error as BalancesError; +use sp_io::hashing::blake2_256; use substrate_test_utils::assert_eq_uvec; +use crate::Store; #[test] fn force_unstake_works() { @@ -36,11 +42,7 @@ fn force_unstake_works() { // Cant transfer assert_noop!( Balances::transfer(Origin::signed(11), 1, 10), - DispatchError::Module { - index: 0, - error: 1, - message: Some("LiquidityRestrictions"), - } + BalancesError::::LiquidityRestrictions ); // Force unstake requires root. assert_noop!(Staking::force_unstake(Origin::signed(11), 11), BadOrigin); @@ -67,12 +69,12 @@ fn basic_setup_works() { // Account 10 controls the stash from account 11, which is 100 * balance_factor units assert_eq!( Staking::ledger(&10), - Some(StakingLedger { stash: 11, total: 1000, active: 1000, unlocking: vec![] }) + Some(StakingLedger { stash: 11, total: 1000, active: 1000, unlocking: vec![], last_reward: None }) ); // Account 20 controls the stash from account 21, which is 200 * balance_factor units assert_eq!( Staking::ledger(&20), - Some(StakingLedger { stash: 21, total: 1000, active: 1000, unlocking: vec![] }) + Some(StakingLedger { stash: 21, total: 1000, active: 1000, unlocking: vec![], last_reward: None }) ); // Account 1 does not control any stash assert_eq!(Staking::ledger(&1), None); @@ -86,27 +88,35 @@ fn basic_setup_works() { assert_eq!( Staking::ledger(100), - Some(StakingLedger { stash: 101, total: 500, active: 500, unlocking: vec![] }) + Some(StakingLedger { stash: 101, total: 500, active: 500, unlocking: vec![], last_reward: None }) ); assert_eq!(Staking::nominators(101).unwrap().targets, vec![11, 21]); assert_eq!( - Staking::stakers(11), - Exposure { total: 1125, own: 1000, others: vec![ IndividualExposure { who: 101, value: 125 }] } + Staking::eras_stakers(Staking::active_era().unwrap().index, 11), + Exposure { + total: 1125, + own: 1000, + others: vec![ IndividualExposure { who: 101, value: 125 }] + }, ); assert_eq!( - Staking::stakers(21), - Exposure { total: 1375, own: 1000, others: vec![ IndividualExposure { who: 101, value: 375 }] } + Staking::eras_stakers(Staking::active_era().unwrap().index, 21), + Exposure { + total: 1375, + own: 1000, + others: vec![ IndividualExposure { who: 101, value: 375 }] + }, ); // initial slot_stake - assert_eq!(Staking::slot_stake(), 1125); + assert_eq!(Staking::eras_total_stake(Staking::active_era().unwrap().index), 2500); // The number of validators required. assert_eq!(Staking::validator_count(), 2); // Initial Era and session - assert_eq!(Staking::current_era(), 0); + assert_eq!(Staking::active_era().unwrap().index, 0); // Account 10 has `balance_factor` free balance assert_eq!(Balances::free_balance(10), 1); @@ -116,8 +126,8 @@ fn basic_setup_works() { assert_eq!(Staking::force_era(), Forcing::NotForcing); // All exposures must be correct. - check_exposure_all(); - check_nominator_all(); + check_exposure_all(Staking::active_era().unwrap().index); + check_nominator_all(Staking::active_era().unwrap().index); }); } @@ -126,10 +136,10 @@ fn change_controller_works() { ExtBuilder::default().build().execute_with(|| { assert_eq!(Staking::bonded(&11), Some(10)); - assert!(>::enumerate().map(|(c, _)| c).collect::>().contains(&11)); + assert!(Session::validators().contains(&11)); // 10 can control 11 who is initially a validator. assert_ok!(Staking::chill(Origin::signed(10))); - assert!(!>::enumerate().map(|(c, _)| c).collect::>().contains(&11)); + assert!(Session::validators().contains(&11)); assert_ok!(Staking::set_controller(Origin::signed(11), 5)); @@ -149,114 +159,87 @@ fn rewards_should_work() { // * rewards get recorded per session // * rewards get paid per Era // * Check that nominators are also rewarded - ExtBuilder::default().nominate(false).build().execute_with(|| { - // Init some balances - let _ = Balances::make_free_balance_be(&2, 500); - - let delay = 1000; - let init_balance_2 = Balances::total_balance(&2); + ExtBuilder::default().nominate(true).build().execute_with(|| { let init_balance_10 = Balances::total_balance(&10); let init_balance_11 = Balances::total_balance(&11); + let init_balance_20 = Balances::total_balance(&20); + let init_balance_21 = Balances::total_balance(&21); + let init_balance_100 = Balances::total_balance(&100); + let init_balance_101 = Balances::total_balance(&101); - // Set payee to controller - assert_ok!(Staking::set_payee(Origin::signed(10), RewardDestination::Controller)); - - // Initial config should be correct - assert_eq!(Staking::current_era(), 0); - assert_eq!(Session::current_index(), 0); + // Check state + Payee::::insert(11, RewardDestination::Controller); + Payee::::insert(21, RewardDestination::Controller); + Payee::::insert(101, RewardDestination::Controller); - // Add a dummy nominator. - // - // Equal division indicates that the reward will be equally divided among validator and - // nominator. - >::insert(&11, Exposure { - own: 500, - total: 1000, - others: vec![IndividualExposure {who: 2, value: 500 }] - }); - - >::insert(&2, RewardDestination::Stash); - assert_eq!(Staking::payee(2), RewardDestination::Stash); - assert_eq!(Staking::payee(11), RewardDestination::Controller); - - let mut block = 3; // Block 3 => Session 1 => Era 0 - System::set_block_number(block); - Timestamp::set_timestamp(block * 5000); // on time. - Session::on_initialize(System::block_number()); - assert_eq!(Staking::current_era(), 0); - assert_eq!(Session::current_index(), 1); >::reward_by_ids(vec![(11, 50)]); >::reward_by_ids(vec![(11, 50)]); // This is the second validator of the current elected set. >::reward_by_ids(vec![(21, 50)]); - // This must be no-op as it is not an elected validator. - >::reward_by_ids(vec![(1001, 10_000)]); // Compute total payout now for whole duration as other parameter won't change - let total_payout = current_total_payout_for_duration(9 * 5 * 1000); - assert!(total_payout > 10); // Test is meaningful if reward something - - // No reward yet - assert_eq!(Balances::total_balance(&2), init_balance_2); - assert_eq!(Balances::total_balance(&10), init_balance_10); - assert_eq!(Balances::total_balance(&11), init_balance_11); - - block = 6; // Block 6 => Session 2 => Era 0 - System::set_block_number(block); - Timestamp::set_timestamp(block * 5000 + delay); // a little late. - Session::on_initialize(System::block_number()); - assert_eq!(Staking::current_era(), 0); - assert_eq!(Session::current_index(), 2); + let total_payout_0 = current_total_payout_for_duration(3 * 1000); + assert!(total_payout_0 > 10); // Test is meaningful if reward something - block = 9; // Block 9 => Session 3 => Era 1 - System::set_block_number(block); - Timestamp::set_timestamp(block * 5000); // back to being on time. no delays - Session::on_initialize(System::block_number()); - assert_eq!(Staking::current_era(), 1); - assert_eq!(Session::current_index(), 3); + start_session(1); - // 11 validator has 2/3 of the total rewards and half half for it and its nominator - assert_eq_error_rate!(Balances::total_balance(&2), init_balance_2 + total_payout / 3, 1); - assert_eq_error_rate!(Balances::total_balance(&10), init_balance_10 + total_payout / 3, 1); + assert_eq!(Balances::total_balance(&10), init_balance_10); assert_eq!(Balances::total_balance(&11), init_balance_11); - }); -} - -#[test] -fn multi_era_reward_should_work() { - // Should check that: - // The value of current_session_reward is set at the end of each era, based on - // slot_stake and session_reward. - ExtBuilder::default().nominate(false).build().execute_with(|| { - let init_balance_10 = Balances::total_balance(&10); - - // Set payee to controller - assert_ok!(Staking::set_payee(Origin::signed(10), RewardDestination::Controller)); - - // Compute now as other parameter won't change - let total_payout_0 = current_total_payout_for_duration(3000); - assert!(total_payout_0 > 10); // Test is meaningful if reward something - >::reward_by_ids(vec![(11, 1)]); + assert_eq!(Balances::total_balance(&20), init_balance_20); + assert_eq!(Balances::total_balance(&21), init_balance_21); + assert_eq!(Balances::total_balance(&100), init_balance_100); + assert_eq!(Balances::total_balance(&101), init_balance_101); + assert_eq_uvec!(Session::validators(), vec![11, 21]); + assert_eq!(Staking::eras_reward_points(Staking::active_era().unwrap().index), EraRewardPoints { + total: 50*3, + individual: vec![(11, 100), (21, 50)].into_iter().collect(), + }); + let part_for_10 = Perbill::from_rational_approximation::(1000, 1125); + let part_for_20 = Perbill::from_rational_approximation::(1000, 1375); + let part_for_100_from_10 = Perbill::from_rational_approximation::(125, 1125); + let part_for_100_from_20 = Perbill::from_rational_approximation::(375, 1375); - start_session(0); - start_session(1); start_session(2); start_session(3); - assert_eq!(Staking::current_era(), 1); - assert_eq!(Balances::total_balance(&10), init_balance_10 + total_payout_0); + assert_eq!(Staking::active_era().unwrap().index, 1); + mock::make_all_reward_payment(0); + + assert_eq_error_rate!(Balances::total_balance(&10), init_balance_10 + part_for_10 * total_payout_0*2/3, 2); + assert_eq_error_rate!(Balances::total_balance(&11), init_balance_11, 2); + assert_eq_error_rate!(Balances::total_balance(&20), init_balance_20 + part_for_20 * total_payout_0*1/3, 2); + assert_eq_error_rate!(Balances::total_balance(&21), init_balance_21, 2); + assert_eq_error_rate!( + Balances::total_balance(&100), + init_balance_100 + + part_for_100_from_10 * total_payout_0 * 2/3 + + part_for_100_from_20 * total_payout_0 * 1/3, + 2 + ); + assert_eq_error_rate!(Balances::total_balance(&101), init_balance_101, 2); - start_session(4); + assert_eq_uvec!(Session::validators(), vec![11, 21]); + >::reward_by_ids(vec![(11, 1)]); - let total_payout_1 = current_total_payout_for_duration(3000); + // Compute total payout now for whole duration as other parameter won't change + let total_payout_1 = current_total_payout_for_duration(3 * 1000); assert!(total_payout_1 > 10); // Test is meaningful if reward something - >::reward_by_ids(vec![(11, 101)]); - - // new era is triggered here. - start_session(5); - // pay time - assert_eq!(Balances::total_balance(&10), init_balance_10 + total_payout_0 + total_payout_1); + start_era(2); + mock::make_all_reward_payment(1); + + assert_eq_error_rate!(Balances::total_balance(&10), init_balance_10 + part_for_10 * (total_payout_0 * 2/3 + total_payout_1), 2); + assert_eq_error_rate!(Balances::total_balance(&11), init_balance_11, 2); + assert_eq_error_rate!(Balances::total_balance(&20), init_balance_20 + part_for_20 * total_payout_0 * 1/3, 2); + assert_eq_error_rate!(Balances::total_balance(&21), init_balance_21, 2); + assert_eq_error_rate!( + Balances::total_balance(&100), + init_balance_100 + + part_for_100_from_10 * (total_payout_0 * 2/3 + total_payout_1) + + part_for_100_from_20 * total_payout_0 * 1/3, + 2 + ); + assert_eq_error_rate!(Balances::total_balance(&101), init_balance_101, 2); }); } @@ -271,6 +254,9 @@ fn staking_should_work() { .fair(false) // to give 20 more staked value .build() .execute_with(|| { + // --- Block 1: + start_session(1); + Timestamp::set_timestamp(1); // Initialize time. // remember + compare this along with the test. @@ -279,55 +265,64 @@ fn staking_should_work() { // put some money in account that we'll use. for i in 1..5 { let _ = Balances::make_free_balance_be(&i, 2000); } - // --- Block 1: - start_session(1); + // --- Block 2: + start_session(2); // add a new candidate for being a validator. account 3 controlled by 4. assert_ok!(Staking::bond(Origin::signed(3), 4, 1500, RewardDestination::Controller)); + let current_era_at_bond = Staking::current_era(); assert_ok!(Staking::validate(Origin::signed(4), ValidatorPrefs::default())); // No effects will be seen so far. assert_eq_uvec!(validator_controllers(), vec![20, 10]); - // --- Block 2: - start_session(2); + // --- Block 3: + start_session(3); // No effects will be seen so far. Era has not been yet triggered. assert_eq_uvec!(validator_controllers(), vec![20, 10]); - // --- Block 3: the validators will now be queued. - start_session(3); - assert_eq!(Staking::current_era(), 1); - - // --- Block 4: the validators will now be changed. + // --- Block 4: the validators will now be queued. start_session(4); + assert_eq!(Staking::active_era().unwrap().index, 1); + + // --- Block 5: the validators are still in queue. + start_session(5); + + // --- Block 6: the validators will now be changed. + start_session(6); assert_eq_uvec!(validator_controllers(), vec![20, 4]); - // --- Block 4: Unstake 4 as a validator, freeing up the balance stashed in 3 + // --- Block 6: Unstake 4 as a validator, freeing up the balance stashed in 3 // 4 will chill Staking::chill(Origin::signed(4)).unwrap(); - // --- Block 5: nothing. 4 is still there. - start_session(5); + // --- Block 7: nothing. 4 is still there. + start_session(7); assert_eq_uvec!(validator_controllers(), vec![20, 4]); - // --- Block 6: 4 will not be a validator. - start_session(7); + // --- Block 8: + start_session(8); + + // --- Block 9: 4 will not be a validator. + start_session(9); assert_eq_uvec!(validator_controllers(), vec![20, 10]); // Note: the stashed value of 4 is still lock assert_eq!( Staking::ledger(&4), - Some(StakingLedger { stash: 3, total: 1500, active: 1500, unlocking: vec![] }) + Some(StakingLedger { + stash: 3, + total: 1500, + active: 1500, + unlocking: vec![], + last_reward: current_era_at_bond, + }) ); // e.g. it cannot spend more than 500 that it has free from the total 2000 assert_noop!( Balances::reserve(&3, 501), - DispatchError::Module { - index: 0, - error: 1, - message: Some("LiquidityRestrictions"), - } + BalancesError::::LiquidityRestrictions ); assert_ok!(Balances::reserve(&3, 409)); }); @@ -353,11 +348,12 @@ fn less_than_needed_candidates_works() { // But the exposure is updated in a simple way. No external votes exists. // This is purely self-vote. - assert_eq!(Staking::stakers(10).others.len(), 0); - assert_eq!(Staking::stakers(20).others.len(), 0); - assert_eq!(Staking::stakers(30).others.len(), 0); - check_exposure_all(); - check_nominator_all(); + assert!( + ErasStakers::::iter_prefix(Staking::active_era().unwrap().index) + .all(|exposure| exposure.others.is_empty()) + ); + check_exposure_all(Staking::active_era().unwrap().index); + check_nominator_all(Staking::active_era().unwrap().index); }); } @@ -379,6 +375,7 @@ fn no_candidate_emergency_condition() { // set the minimum validator count. ::MinimumValidatorCount::put(10); + // try to chill let _ = Staking::chill(Origin::signed(10)); // trigger era @@ -461,8 +458,6 @@ fn nominating_and_rewards_should_work() { assert!(total_payout_0 > 100); // Test is meaningful if reward something >::reward_by_ids(vec![(41, 1)]); >::reward_by_ids(vec![(31, 1)]); - >::reward_by_ids(vec![(21, 10)]); // must be no-op - >::reward_by_ids(vec![(11, 10)]); // must be no-op start_era(1); @@ -470,45 +465,40 @@ fn nominating_and_rewards_should_work() { assert_eq_uvec!(validator_controllers(), vec![20, 10]); // OLD validators must have already received some rewards. + mock::make_all_reward_payment(0); assert_eq!(Balances::total_balance(&40), 1 + total_payout_0 / 2); assert_eq!(Balances::total_balance(&30), 1 + total_payout_0 / 2); // ------ check the staked value of all parties. - // total expo of 10, with 1200 coming from nominators (externals), according to phragmen. - assert_eq!(Staking::stakers(11).own, 1000); - assert_eq!(Staking::stakers(11).total, 1000 + 800); - // 2 and 4 supported 10, each with stake 600, according to phragmen. - assert_eq!( - Staking::stakers(11).others.iter().map(|e| e.value).collect::>>(), - vec![400, 400] - ); + // 30 and 40 are not chosen anymore + assert_eq!(ErasStakers::::iter_prefix(Staking::active_era().unwrap().index).count(), 2); assert_eq!( - Staking::stakers(11).others.iter().map(|e| e.who).collect::>(), - vec![3, 1] - ); - // total expo of 20, with 500 coming from nominators (externals), according to phragmen. - assert_eq!(Staking::stakers(21).own, 1000); - assert_eq_error_rate!(Staking::stakers(21).total, 1000 + 1200, 2); - // 2 and 4 supported 20, each with stake 250, according to phragmen. - assert_eq!( - Staking::stakers(21).others.iter().map(|e| e.value).collect::>>(), - vec![600, 600] + Staking::eras_stakers(Staking::active_era().unwrap().index, 11), + Exposure { + total: 1000 + 800, + own: 1000, + others: vec![ + IndividualExposure { who: 3, value: 400 }, + IndividualExposure { who: 1, value: 400 }, + ] + }, ); assert_eq!( - Staking::stakers(21).others.iter().map(|e| e.who).collect::>(), - vec![3, 1] + Staking::eras_stakers(Staking::active_era().unwrap().index, 21), + Exposure { + total: 1000 + 1200, + own: 1000, + others: vec![ + IndividualExposure { who: 3, value: 600 }, + IndividualExposure { who: 1, value: 600 }, + ] + }, ); - // They are not chosen anymore - assert_eq!(Staking::stakers(31).total, 0); - assert_eq!(Staking::stakers(41).total, 0); - // the total reward for era 1 let total_payout_1 = current_total_payout_for_duration(3000); assert!(total_payout_1 > 100); // Test is meaningful if reward something - >::reward_by_ids(vec![(41, 10)]); // must be no-op - >::reward_by_ids(vec![(31, 10)]); // must be no-op >::reward_by_ids(vec![(21, 2)]); >::reward_by_ids(vec![(11, 1)]); @@ -517,6 +507,7 @@ fn nominating_and_rewards_should_work() { // nothing else will happen, era ends and rewards are paid again, // it is expected that nominators will also be paid. See below + mock::make_all_reward_payment(1); let payout_for_10 = total_payout_1 / 3; let payout_for_20 = 2 * total_payout_1 / 3; // Nominator 2: has [400/1800 ~ 2/9 from 10] + [600/2200 ~ 3/11 from 20]'s reward. ==> 2/9 + 3/11 @@ -545,8 +536,8 @@ fn nominating_and_rewards_should_work() { 1, ); - check_exposure_all(); - check_nominator_all(); + check_exposure_all(Staking::active_era().unwrap().index); + check_nominator_all(Staking::active_era().unwrap().index); }); } @@ -589,13 +580,13 @@ fn nominators_also_get_slashed() { &[OffenceDetails { offender: ( 11, - Staking::stakers(&11), + Staking::eras_stakers(Staking::active_era().unwrap().index, 11), ), reporters: vec![], }], &[Perbill::from_percent(5)], ); - let expo = Staking::stakers(11); + let expo = Staking::eras_stakers(Staking::active_era().unwrap().index, 11); let slash_value = 50; let total_slash = expo.total.min(slash_value); let validator_slash = expo.own.min(total_slash); @@ -604,8 +595,8 @@ fn nominators_also_get_slashed() { // initial + first era reward + slash assert_eq!(Balances::total_balance(&11), initial_balance - validator_slash); assert_eq!(Balances::total_balance(&2), initial_balance - nominator_slash); - check_exposure_all(); - check_nominator_all(); + check_exposure_all(Staking::active_era().unwrap().index); + check_nominator_all(Staking::active_era().unwrap().index); // Because slashing happened. assert!(is_disabled(10)); }); @@ -660,42 +651,52 @@ fn double_controlling_should_fail() { #[test] fn session_and_eras_work() { ExtBuilder::default().build().execute_with(|| { - assert_eq!(Staking::current_era(), 0); + assert_eq!(Staking::active_era().unwrap().index, 0); // Block 1: No change. - start_session(0); + start_session(1); assert_eq!(Session::current_index(), 1); - assert_eq!(Staking::current_era(), 0); + assert_eq!(Staking::active_era().unwrap().index, 0); - // Block 2: Simple era change. + // Block 2: No change. start_session(2); - assert_eq!(Session::current_index(), 3); - assert_eq!(Staking::current_era(), 1); + assert_eq!(Session::current_index(), 2); + assert_eq!(Staking::active_era().unwrap().index, 0); - // Block 3: Schedule an era length change; no visible changes. + // Block 3: Era increment. start_session(3); + assert_eq!(Session::current_index(), 3); + assert_eq!(Staking::active_era().unwrap().index, 1); + + // Block 4: No change. + start_session(4); assert_eq!(Session::current_index(), 4); - assert_eq!(Staking::current_era(), 1); + assert_eq!(Staking::active_era().unwrap().index, 1); - // Block 4: Era change kicks in. + // Block 5: No change. start_session(5); - assert_eq!(Session::current_index(), 6); - assert_eq!(Staking::current_era(), 2); + assert_eq!(Session::current_index(), 5); + assert_eq!(Staking::active_era().unwrap().index, 1); - // Block 5: No change. + // Block 6: Era increment. start_session(6); - assert_eq!(Session::current_index(), 7); - assert_eq!(Staking::current_era(), 2); + assert_eq!(Session::current_index(), 6); + assert_eq!(Staking::active_era().unwrap().index, 2); - // Block 6: No change. + // Block 7: No change. start_session(7); - assert_eq!(Session::current_index(), 8); - assert_eq!(Staking::current_era(), 2); + assert_eq!(Session::current_index(), 7); + assert_eq!(Staking::active_era().unwrap().index, 2); - // Block 7: Era increment. + // Block 8: No change. start_session(8); + assert_eq!(Session::current_index(), 8); + assert_eq!(Staking::active_era().unwrap().index, 2); + + // Block 9: Era increment. + start_session(9); assert_eq!(Session::current_index(), 9); - assert_eq!(Staking::current_era(), 3); + assert_eq!(Staking::active_era().unwrap().index, 3); }); } @@ -703,50 +704,53 @@ fn session_and_eras_work() { fn forcing_new_era_works() { ExtBuilder::default().build().execute_with(|| { // normal flow of session. - assert_eq!(Staking::current_era(), 0); + assert_eq!(Staking::active_era().unwrap().index, 0); start_session(0); - assert_eq!(Staking::current_era(), 0); + assert_eq!(Staking::active_era().unwrap().index, 0); start_session(1); - assert_eq!(Staking::current_era(), 0); + assert_eq!(Staking::active_era().unwrap().index, 0); start_session(2); - assert_eq!(Staking::current_era(), 1); + assert_eq!(Staking::active_era().unwrap().index, 0); + start_session(3); + assert_eq!(Staking::active_era().unwrap().index, 1); // no era change. ForceEra::put(Forcing::ForceNone); - start_session(3); - assert_eq!(Staking::current_era(), 1); start_session(4); - assert_eq!(Staking::current_era(), 1); + assert_eq!(Staking::active_era().unwrap().index, 1); start_session(5); - assert_eq!(Staking::current_era(), 1); + assert_eq!(Staking::active_era().unwrap().index, 1); start_session(6); - assert_eq!(Staking::current_era(), 1); + assert_eq!(Staking::active_era().unwrap().index, 1); + start_session(7); + assert_eq!(Staking::active_era().unwrap().index, 1); // back to normal. // this immediately starts a new session. ForceEra::put(Forcing::NotForcing); - start_session(7); - assert_eq!(Staking::current_era(), 2); start_session(8); - assert_eq!(Staking::current_era(), 2); + assert_eq!(Staking::active_era().unwrap().index, 1); // There is one session delay + start_session(9); + assert_eq!(Staking::active_era().unwrap().index, 2); // forceful change ForceEra::put(Forcing::ForceAlways); - start_session(9); - assert_eq!(Staking::current_era(), 3); start_session(10); - assert_eq!(Staking::current_era(), 4); + assert_eq!(Staking::active_era().unwrap().index, 2); // There is one session delay start_session(11); - assert_eq!(Staking::current_era(), 5); + assert_eq!(Staking::active_era().unwrap().index, 3); + start_session(12); + assert_eq!(Staking::active_era().unwrap().index, 4); // just one forceful change ForceEra::put(Forcing::ForceNew); - start_session(12); - assert_eq!(Staking::current_era(), 6); - - assert_eq!(ForceEra::get(), Forcing::NotForcing); start_session(13); - assert_eq!(Staking::current_era(), 6); + assert_eq!(Staking::active_era().unwrap().index, 5); + assert_eq!(ForceEra::get(), Forcing::NotForcing); + start_session(14); + assert_eq!(Staking::active_era().unwrap().index, 6); + start_session(15); + assert_eq!(Staking::active_era().unwrap().index, 6); }); } @@ -760,15 +764,11 @@ fn cannot_transfer_staked_balance() { // Confirm account 11 has some free balance assert_eq!(Balances::free_balance(11), 1000); // Confirm account 11 (via controller 10) is totally staked - assert_eq!(Staking::stakers(&11).total, 1000); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 11).total, 1000); // Confirm account 11 cannot transfer as a result assert_noop!( Balances::transfer(Origin::signed(11), 20, 1), - DispatchError::Module { - index: 0, - error: 1, - message: Some("LiquidityRestrictions"), - } + BalancesError::::LiquidityRestrictions ); // Give account 11 extra free balance @@ -789,15 +789,11 @@ fn cannot_transfer_staked_balance_2() { // Confirm account 21 has some free balance assert_eq!(Balances::free_balance(21), 2000); // Confirm account 21 (via controller 20) is totally staked - assert_eq!(Staking::stakers(&21).total, 1000); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 21).total, 1000); // Confirm account 21 can transfer at most 1000 assert_noop!( Balances::transfer(Origin::signed(21), 20, 1001), - DispatchError::Module { - index: 0, - error: 1, - message: Some("LiquidityRestrictions"), - } + BalancesError::::LiquidityRestrictions ); assert_ok!(Balances::transfer(Origin::signed(21), 20, 1000)); }); @@ -812,15 +808,11 @@ fn cannot_reserve_staked_balance() { // Confirm account 11 has some free balance assert_eq!(Balances::free_balance(11), 1000); // Confirm account 11 (via controller 10) is totally staked - assert_eq!(Staking::stakers(&11).own, 1000); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 11).own, 1000); // Confirm account 11 cannot transfer as a result assert_noop!( Balances::reserve(&11, 1), - DispatchError::Module { - index: 0, - error: 1, - message: Some("LiquidityRestrictions"), - } + BalancesError::::LiquidityRestrictions ); // Give account 11 extra free balance @@ -835,7 +827,7 @@ fn reward_destination_works() { // Rewards go to the correct destination as determined in Payee ExtBuilder::default().nominate(false).build().execute_with(|| { // Check that account 11 is a validator - assert!(Staking::current_elected().contains(&11)); + assert!(Session::validators().contains(&11)); // Check the balance of the validator account assert_eq!(Balances::free_balance(10), 1); // Check the balance of the stash account @@ -846,6 +838,7 @@ fn reward_destination_works() { total: 1000, active: 1000, unlocking: vec![], + last_reward: None, })); // Compute total payout now for whole duration as other parameter won't change @@ -854,6 +847,7 @@ fn reward_destination_works() { >::reward_by_ids(vec![(11, 1)]); start_era(1); + mock::make_all_reward_payment(0); // Check that RewardDestination is Staked (default) assert_eq!(Staking::payee(&11), RewardDestination::Staked); @@ -865,6 +859,7 @@ fn reward_destination_works() { total: 1000 + total_payout_0, active: 1000 + total_payout_0, unlocking: vec![], + last_reward: Some(0), })); //Change RewardDestination to Stash @@ -876,6 +871,7 @@ fn reward_destination_works() { >::reward_by_ids(vec![(11, 1)]); start_era(2); + mock::make_all_reward_payment(1); // Check that RewardDestination is Stash assert_eq!(Staking::payee(&11), RewardDestination::Stash); @@ -889,6 +885,7 @@ fn reward_destination_works() { total: 1000 + total_payout_0, active: 1000 + total_payout_0, unlocking: vec![], + last_reward: Some(1), })); // Change RewardDestination to Controller @@ -903,6 +900,7 @@ fn reward_destination_works() { >::reward_by_ids(vec![(11, 1)]); start_era(3); + mock::make_all_reward_payment(2); // Check that RewardDestination is Controller assert_eq!(Staking::payee(&11), RewardDestination::Controller); @@ -914,6 +912,7 @@ fn reward_destination_works() { total: 1000 + total_payout_0, active: 1000 + total_payout_0, unlocking: vec![], + last_reward: Some(2), })); // Check that amount in staked account is NOT increased. assert_eq!(Balances::free_balance(11), recorded_stash_balance); @@ -926,45 +925,39 @@ fn validator_payment_prefs_work() { // Note: unstake threshold is being directly tested in slashing tests. // This test will focus on validator payment. ExtBuilder::default().build().execute_with(|| { - // Initial config - let stash_initial_balance = Balances::total_balance(&11); - - // check the balance of a validator accounts. - assert_eq!(Balances::total_balance(&10), 1); - // check the balance of a validator's stash accounts. - assert_eq!(Balances::total_balance(&11), stash_initial_balance); - // and the nominator (to-be) - let _ = Balances::make_free_balance_be(&2, 500); - - // add a dummy nominator. - >::insert(&11, Exposure { - own: 500, // equal division indicates that the reward will be equally divided among validator and nominator. - total: 1000, - others: vec![IndividualExposure {who: 2, value: 500 }] - }); - >::insert(&2, RewardDestination::Stash); + let commission = Perbill::from_percent(40); >::insert(&11, ValidatorPrefs { - commission: Perbill::from_percent(50), + commission: commission.clone(), }); + // Reward controller so staked ratio doesn't change. + >::insert(&11, RewardDestination::Controller); + >::insert(&101, RewardDestination::Controller); + + start_era(1); + mock::make_all_reward_payment(0); + + let balance_era_1_10 = Balances::total_balance(&10); + let balance_era_1_100 = Balances::total_balance(&100); + // Compute total payout now for whole duration as other parameter won't change - let total_payout_0 = current_total_payout_for_duration(3000); - assert!(total_payout_0 > 100); // Test is meaningful if reward something + let total_payout_1 = current_total_payout_for_duration(3000); + assert!(total_payout_1 > 100); // Test is meaningful if reward something + let exposure_1 = Staking::eras_stakers(Staking::active_era().unwrap().index, 11); >::reward_by_ids(vec![(11, 1)]); - start_era(1); + start_era(2); + mock::make_all_reward_payment(1); - // whats left to be shared is the sum of 3 rounds minus the validator's cut. - let shared_cut = total_payout_0 / 2; - // Validator's payee is Staked account, 11, reward will be paid here. - assert_eq!(Balances::total_balance(&11), stash_initial_balance + shared_cut / 2 + shared_cut); - // Controller account will not get any reward. - assert_eq!(Balances::total_balance(&10), 1); - // Rest of the reward will be shared and paid to the nominator in stake. - assert_eq!(Balances::total_balance(&2), 500 + shared_cut / 2); + let taken_cut = commission * total_payout_1; + let shared_cut = total_payout_1 - taken_cut; + let reward_of_10 = shared_cut * exposure_1.own / exposure_1.total + taken_cut; + let reward_of_100 = shared_cut * exposure_1.others[0].value / exposure_1.total; + assert_eq_error_rate!(Balances::total_balance(&10), balance_era_1_10 + reward_of_10, 2); + assert_eq_error_rate!(Balances::total_balance(&100), balance_era_1_100 + reward_of_100, 2); - check_exposure_all(); - check_nominator_all(); + check_exposure_all(Staking::active_era().unwrap().index); + check_nominator_all(Staking::active_era().unwrap().index); }); } @@ -985,6 +978,7 @@ fn bond_extra_works() { total: 1000, active: 1000, unlocking: vec![], + last_reward: None, })); // Give account 11 some large free balance greater than total @@ -998,6 +992,7 @@ fn bond_extra_works() { total: 1000 + 100, active: 1000 + 100, unlocking: vec![], + last_reward: None, })); // Call the bond_extra function with a large number, should handle it @@ -1008,6 +1003,7 @@ fn bond_extra_works() { total: 1000000, active: 1000000, unlocking: vec![], + last_reward: None, })); }); } @@ -1027,7 +1023,7 @@ fn bond_extra_and_withdraw_unbonded_works() { let _ = Balances::make_free_balance_be(&11, 1000000); // Initial config should be correct - assert_eq!(Staking::current_era(), 0); + assert_eq!(Staking::active_era().unwrap().index, 0); assert_eq!(Session::current_index(), 0); // check the balance of a validator accounts. @@ -1042,8 +1038,9 @@ fn bond_extra_and_withdraw_unbonded_works() { total: 1000, active: 1000, unlocking: vec![], + last_reward: None, })); - assert_eq!(Staking::stakers(&11), Exposure { total: 1000, own: 1000, others: vec![] }); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 11), Exposure { total: 1000, own: 1000, others: vec![] }); // deposit the extra 100 units Staking::bond_extra(Origin::signed(11), 100).unwrap(); @@ -1053,14 +1050,15 @@ fn bond_extra_and_withdraw_unbonded_works() { total: 1000 + 100, active: 1000 + 100, unlocking: vec![], + last_reward: None, })); // Exposure is a snapshot! only updated after the next era update. - assert_ne!(Staking::stakers(&11), Exposure { total: 1000 + 100, own: 1000 + 100, others: vec![] }); + assert_ne!(Staking::eras_stakers(Staking::active_era().unwrap().index, 11), Exposure { total: 1000 + 100, own: 1000 + 100, others: vec![] }); // trigger next era. Timestamp::set_timestamp(10); start_era(2); - assert_eq!(Staking::current_era(), 2); + assert_eq!(Staking::active_era().unwrap().index, 2); // ledger should be the same. assert_eq!(Staking::ledger(&10), Some(StakingLedger { @@ -1068,20 +1066,21 @@ fn bond_extra_and_withdraw_unbonded_works() { total: 1000 + 100, active: 1000 + 100, unlocking: vec![], + last_reward: None, })); // Exposure is now updated. - assert_eq!(Staking::stakers(&11), Exposure { total: 1000 + 100, own: 1000 + 100, others: vec![] }); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 11), Exposure { total: 1000 + 100, own: 1000 + 100, others: vec![] }); // Unbond almost all of the funds in stash. Staking::unbond(Origin::signed(10), 1000).unwrap(); assert_eq!(Staking::ledger(&10), Some(StakingLedger { - stash: 11, total: 1000 + 100, active: 100, unlocking: vec![UnlockChunk{ value: 1000, era: 2 + 3}] }) + stash: 11, total: 1000 + 100, active: 100, unlocking: vec![UnlockChunk{ value: 1000, era: 2 + 3}], last_reward: None }) ); // Attempting to free the balances now will fail. 2 eras need to pass. Staking::withdraw_unbonded(Origin::signed(10)).unwrap(); assert_eq!(Staking::ledger(&10), Some(StakingLedger { - stash: 11, total: 1000 + 100, active: 100, unlocking: vec![UnlockChunk{ value: 1000, era: 2 + 3}] })); + stash: 11, total: 1000 + 100, active: 100, unlocking: vec![UnlockChunk{ value: 1000, era: 2 + 3}], last_reward: None })); // trigger next era. start_era(3); @@ -1089,7 +1088,7 @@ fn bond_extra_and_withdraw_unbonded_works() { // nothing yet Staking::withdraw_unbonded(Origin::signed(10)).unwrap(); assert_eq!(Staking::ledger(&10), Some(StakingLedger { - stash: 11, total: 1000 + 100, active: 100, unlocking: vec![UnlockChunk{ value: 1000, era: 2 + 3}] })); + stash: 11, total: 1000 + 100, active: 100, unlocking: vec![UnlockChunk{ value: 1000, era: 2 + 3}], last_reward: None })); // trigger next era. start_era(5); @@ -1097,7 +1096,7 @@ fn bond_extra_and_withdraw_unbonded_works() { Staking::withdraw_unbonded(Origin::signed(10)).unwrap(); // Now the value is free and the staking ledger is updated. assert_eq!(Staking::ledger(&10), Some(StakingLedger { - stash: 11, total: 100, active: 100, unlocking: vec![] })); + stash: 11, total: 100, active: 100, unlocking: vec![], last_reward: None })); }) } @@ -1158,11 +1157,12 @@ fn rebond_works() { total: 1000, active: 1000, unlocking: vec![], + last_reward: None, }) ); start_era(2); - assert_eq!(Staking::current_era(), 2); + assert_eq!(Staking::active_era().unwrap().index, 2); // Try to rebond some funds. We get an error since no fund is unbonded. assert_noop!( @@ -1180,8 +1180,9 @@ fn rebond_works() { active: 100, unlocking: vec![UnlockChunk { value: 900, - era: 2 + 3 - },] + era: 2 + 3, + }], + last_reward: None, }) ); @@ -1194,6 +1195,7 @@ fn rebond_works() { total: 1000, active: 1000, unlocking: vec![], + last_reward: None, }) ); @@ -1206,6 +1208,7 @@ fn rebond_works() { total: 1000, active: 100, unlocking: vec![UnlockChunk { value: 900, era: 5 }], + last_reward: None, }) ); @@ -1218,6 +1221,7 @@ fn rebond_works() { total: 1000, active: 600, unlocking: vec![UnlockChunk { value: 400, era: 5 }], + last_reward: None, }) ); @@ -1229,7 +1233,8 @@ fn rebond_works() { stash: 11, total: 1000, active: 1000, - unlocking: vec![] + unlocking: vec![], + last_reward: None, }) ); @@ -1247,7 +1252,8 @@ fn rebond_works() { UnlockChunk { value: 300, era: 5 }, UnlockChunk { value: 300, era: 5 }, UnlockChunk { value: 300, era: 5 }, - ] + ], + last_reward: None, }) ); @@ -1262,7 +1268,8 @@ fn rebond_works() { unlocking: vec![ UnlockChunk { value: 300, era: 5 }, UnlockChunk { value: 100, era: 5 }, - ] + ], + last_reward: None, }) ); }) @@ -1295,6 +1302,7 @@ fn rebond_is_fifo() { total: 1000, active: 1000, unlocking: vec![], + last_reward: None, }) ); @@ -1310,7 +1318,8 @@ fn rebond_is_fifo() { active: 600, unlocking: vec![ UnlockChunk { value: 400, era: 2 + 3 }, - ] + ], + last_reward: None, }) ); @@ -1327,7 +1336,8 @@ fn rebond_is_fifo() { unlocking: vec![ UnlockChunk { value: 400, era: 2 + 3 }, UnlockChunk { value: 300, era: 3 + 3 }, - ] + ], + last_reward: None, }) ); @@ -1345,7 +1355,8 @@ fn rebond_is_fifo() { UnlockChunk { value: 400, era: 2 + 3 }, UnlockChunk { value: 300, era: 3 + 3 }, UnlockChunk { value: 200, era: 4 + 3 }, - ] + ], + last_reward: None, }) ); @@ -1360,36 +1371,34 @@ fn rebond_is_fifo() { unlocking: vec![ UnlockChunk { value: 400, era: 2 + 3 }, UnlockChunk { value: 100, era: 3 + 3 }, - ] + ], + last_reward: None, }) ); }) } #[test] -fn slot_stake_is_least_staked_validator_and_exposure_defines_maximum_punishment() { - // Test that slot_stake is determined by the least staked validator - // Test that slot_stake is the maximum punishment that can happen to a validator +fn reward_to_stake_works() { ExtBuilder::default().nominate(false).fair(false).build().execute_with(|| { // Confirm validator count is 2 assert_eq!(Staking::validator_count(), 2); // Confirm account 10 and 20 are validators assert!(>::contains_key(&11) && >::contains_key(&21)); - assert_eq!(Staking::stakers(&11).total, 1000); - assert_eq!(Staking::stakers(&21).total, 2000); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 11).total, 1000); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 21).total, 2000); // Give the man some money. let _ = Balances::make_free_balance_be(&10, 1000); let _ = Balances::make_free_balance_be(&20, 1000); - // We confirm initialized slot_stake is this value - assert_eq!(Staking::slot_stake(), Staking::stakers(&11).total); + // Bypass logic and change current exposure + ErasStakers::::insert(0, 21, Exposure { total: 69, own: 69, others: vec![] }); // Now lets lower account 20 stake - >::insert(&21, Exposure { total: 69, own: 69, others: vec![] }); - assert_eq!(Staking::stakers(&21).total, 69); - >::insert(&20, StakingLedger { stash: 22, total: 69, active: 69, unlocking: vec![] }); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 21).total, 69); + >::insert(&20, StakingLedger { stash: 21, total: 69, active: 69, unlocking: vec![], last_reward: None }); // Compute total payout now for whole duration as other parameter won't change let total_payout_0 = current_total_payout_for_duration(3000); @@ -1399,19 +1408,23 @@ fn slot_stake_is_least_staked_validator_and_exposure_defines_maximum_punishment( // New era --> rewards are paid --> stakes are changed start_era(1); + mock::make_all_reward_payment(0); - // -- new balances + reward - assert_eq!(Staking::stakers(&11).total, 1000 + total_payout_0 / 2); - assert_eq!(Staking::stakers(&21).total, 69 + total_payout_0 / 2); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 11).total, 1000); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 21).total, 69); let _11_balance = Balances::free_balance(&11); assert_eq!(_11_balance, 1000 + total_payout_0 / 2); - // -- slot stake should also be updated. - assert_eq!(Staking::slot_stake(), 69 + total_payout_0 / 2); + // Trigger another new era as the info are frozen before the era start. + start_era(2); + + // -- new infos + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 11).total, 1000 + total_payout_0 / 2); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 21).total, 69 + total_payout_0 / 2); - check_exposure_all(); - check_nominator_all(); + check_exposure_all(Staking::active_era().unwrap().index); + check_nominator_all(Staking::active_era().unwrap().index); }); } @@ -1529,8 +1542,6 @@ fn on_free_balance_zero_stash_removes_nominator() { fn switching_roles() { // Test that it should be possible to switch between roles (nominator, validator, idle) with minimal overhead. ExtBuilder::default().nominate(false).build().execute_with(|| { - Timestamp::set_timestamp(1); // Initialize time. - // Reset reward destination for i in &[10, 20] { assert_ok!(Staking::set_payee(Origin::signed(*i), RewardDestination::Controller)); } @@ -1550,20 +1561,7 @@ fn switching_roles() { assert_ok!(Staking::bond(Origin::signed(5), 6, 1000, RewardDestination::Controller)); assert_ok!(Staking::validate(Origin::signed(6), ValidatorPrefs::default())); - // new block - start_session(1); - - // no change - assert_eq_uvec!(validator_controllers(), vec![20, 10]); - - // new block - start_session(2); - - // no change - assert_eq_uvec!(validator_controllers(), vec![20, 10]); - - // new block --> ne era --> new validators - start_session(3); + start_era(1); // with current nominators 10 and 5 have the most stake assert_eq_uvec!(validator_controllers(), vec![6, 10]); @@ -1577,18 +1575,12 @@ fn switching_roles() { // 2 : 2000 self vote + 250 vote. // Winners: 20 and 2 - start_session(4); - assert_eq_uvec!(validator_controllers(), vec![6, 10]); - - start_session(5); - assert_eq_uvec!(validator_controllers(), vec![6, 10]); + start_era(2); - // ne era - start_session(6); assert_eq_uvec!(validator_controllers(), vec![2, 20]); - check_exposure_all(); - check_nominator_all(); + check_exposure_all(Staking::active_era().unwrap().index); + check_nominator_all(Staking::active_era().unwrap().index); }); } @@ -1632,6 +1624,7 @@ fn bond_with_no_staked_value() { ); // bonded with absolute minimum value possible. assert_ok!(Staking::bond(Origin::signed(1), 2, 5, RewardDestination::Controller)); + let current_era_at_bond = Staking::current_era(); assert_eq!(Balances::locks(&1)[0].amount, 5); // unbonding even 1 will cause all to be unbonded. @@ -1642,7 +1635,8 @@ fn bond_with_no_staked_value() { stash: 1, active: 0, total: 5, - unlocking: vec![UnlockChunk {value: 5, era: 3}] + unlocking: vec![UnlockChunk {value: 5, era: 3}], + last_reward: current_era_at_bond, }) ); @@ -1664,7 +1658,7 @@ fn bond_with_no_staked_value() { } #[test] -fn bond_with_little_staked_value_bounded_by_slot_stake() { +fn bond_with_little_staked_value_bounded() { // Behavior when someone bonds with little staked value. // Particularly when she votes and the candidate is elected. ExtBuilder::default() @@ -1683,36 +1677,40 @@ fn bond_with_little_staked_value_bounded_by_slot_stake() { assert_ok!(Staking::bond(Origin::signed(1), 2, 1, RewardDestination::Controller)); assert_ok!(Staking::validate(Origin::signed(2), ValidatorPrefs::default())); + // reward era 0 let total_payout_0 = current_total_payout_for_duration(3000); assert!(total_payout_0 > 100); // Test is meaningful if reward something reward_all_elected(); start_era(1); + mock::make_all_reward_payment(0); // 2 is elected. - // and fucks up the slot stake. assert_eq_uvec!(validator_controllers(), vec![20, 10, 2]); - assert_eq!(Staking::slot_stake(), 1); + // And has minimal stake + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 2).total, 0); // Old ones are rewarded. assert_eq!(Balances::free_balance(10), init_balance_10 + total_payout_0 / 3); // no rewards paid to 2. This was initial election. assert_eq!(Balances::free_balance(2), init_balance_2); + // reward era 1 let total_payout_1 = current_total_payout_for_duration(3000); assert!(total_payout_1 > 100); // Test is meaningful if reward something reward_all_elected(); start_era(2); + mock::make_all_reward_payment(1); assert_eq_uvec!(validator_controllers(), vec![20, 10, 2]); - assert_eq!(Staking::slot_stake(), 1); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 2).total, 0); assert_eq!(Balances::free_balance(2), init_balance_2 + total_payout_1 / 3); assert_eq!( Balances::free_balance(&10), init_balance_10 + total_payout_0 / 3 + total_payout_1 / 3, ); - check_exposure_all(); - check_nominator_all(); + check_exposure_all(Staking::active_era().unwrap().index); + check_nominator_all(Staking::active_era().unwrap().index); }); } @@ -1732,8 +1730,8 @@ fn new_era_elects_correct_number_of_validators() { Session::on_initialize(System::block_number()); assert_eq!(validator_controllers().len(), 1); - check_exposure_all(); - check_nominator_all(); + check_exposure_all(Staking::active_era().unwrap().index); + check_nominator_all(Staking::active_era().unwrap().index); }) } @@ -1755,8 +1753,8 @@ fn phragmen_should_not_overflow_validators() { // This test will fail this. Will saturate. // check_exposure_all(); - assert_eq!(Staking::stakers(3).total, u64::max_value()); - assert_eq!(Staking::stakers(5).total, u64::max_value()); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 3).total, u64::max_value()); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 5).total, u64::max_value()); }) } @@ -1777,8 +1775,8 @@ fn phragmen_should_not_overflow_nominators() { assert_eq_uvec!(validator_controllers(), vec![4, 2]); // Saturate. - assert_eq!(Staking::stakers(3).total, u64::max_value()); - assert_eq!(Staking::stakers(5).total, u64::max_value()); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 3).total, u64::max_value()); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 5).total, u64::max_value()); }) } @@ -1796,8 +1794,8 @@ fn phragmen_should_not_overflow_ultimate() { assert_eq_uvec!(validator_controllers(), vec![4, 2]); // Saturate. - assert_eq!(Staking::stakers(3).total, u64::max_value()); - assert_eq!(Staking::stakers(5).total, u64::max_value()); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 3).total, u64::max_value()); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 5).total, u64::max_value()); }) } @@ -1812,10 +1810,19 @@ fn reward_validator_slashing_validator_doesnt_overflow() { // Set staker let _ = Balances::make_free_balance_be(&11, stake); - >::insert(&11, Exposure { total: stake, own: stake, others: vec![] }); + + let exposure = Exposure:: { total: stake, own: stake, others: vec![] }; + let reward = EraRewardPoints:: { + total: 1, + individual: vec![(11, 1)].into_iter().collect(), + }; // Check reward - let _ = Staking::reward_validator(&11, reward_slash); + ErasRewardPoints::::insert(0, reward); + ErasStakers::::insert(0, 11, &exposure); + ErasStakersClipped::::insert(0, 11, exposure); + ErasValidatorReward::::insert(0, stake); + assert_ok!(Staking::payout_validator(Origin::signed(10), 0)); assert_eq!(Balances::total_balance(&11), stake * 2); // Set staker @@ -1825,16 +1832,18 @@ fn reward_validator_slashing_validator_doesnt_overflow() { // only slashes out of bonded stake are applied. without this line, // it is 0. Staking::bond(Origin::signed(2), 20000, stake - 1, RewardDestination::default()).unwrap(); - >::insert(&11, Exposure { total: stake, own: 1, others: vec![ - IndividualExposure { who: 2, value: stake - 1 } - ]}); - + // Override exposure of 11 + ErasStakers::::insert(0, 11, Exposure { + total: stake, + own: 1, + others: vec![ IndividualExposure { who: 2, value: stake - 1 }] + }); // Check slashing on_offence_now( &[ OffenceDetails { - offender: (11, Staking::stakers(&11)), + offender: (11, Staking::eras_stakers(Staking::active_era().unwrap().index, 11)), reporters: vec![], }, ], @@ -1855,45 +1864,49 @@ fn reward_from_authorship_event_handler_works() { >::note_author(11); >::note_uncle(21, 1); - // An uncle author that is not currently elected doesn't get rewards, - // but the block producer does get reward for referencing it. - >::note_uncle(31, 1); // Rewarding the same two times works. >::note_uncle(11, 1); // Not mandatory but must be coherent with rewards - assert_eq!(>::get(), vec![21, 11]); + assert_eq_uvec!(Session::validators(), vec![11, 21]); // 21 is rewarded as an uncle producer // 11 is rewarded as a block producer and uncle referencer and uncle producer - assert_eq!(CurrentEraPointsEarned::get().individual, vec![1, 20 + 2 * 3 + 1]); - assert_eq!(CurrentEraPointsEarned::get().total, 28); + assert_eq!( + ErasRewardPoints::::get(Staking::active_era().unwrap().index), + EraRewardPoints { + individual: vec![(11, 20 + 2 * 2 + 1), (21, 1)].into_iter().collect(), + total: 26, + }, + ); }) } #[test] fn add_reward_points_fns_works() { ExtBuilder::default().build().execute_with(|| { - let validators = >::current_elected(); // Not mandatory but must be coherent with rewards - assert_eq!(validators, vec![21, 11]); + assert_eq!(Session::validators(), vec![21, 11]); - >::reward_by_indices(vec![ - (0, 1), - (1, 1), - (2, 1), - (1, 1), + >::reward_by_ids(vec![ + (21, 1), + (11, 1), + (11, 1), ]); >::reward_by_ids(vec![ (21, 1), (11, 1), - (31, 1), (11, 1), ]); - assert_eq!(CurrentEraPointsEarned::get().individual, vec![2, 4]); - assert_eq!(CurrentEraPointsEarned::get().total, 6); + assert_eq!( + ErasRewardPoints::::get(Staking::active_era().unwrap().index), + EraRewardPoints { + individual: vec![(11, 4), (21, 2)].into_iter().collect(), + total: 6, + }, + ); }) } @@ -1916,19 +1929,20 @@ fn era_is_always_same_length() { // session changes. ExtBuilder::default().build().execute_with(|| { start_era(1); - assert_eq!(Staking::current_era_start_session_index(), SessionsPerEra::get()); + assert_eq!(Staking::eras_start_session_index(Staking::active_era().unwrap().index).unwrap(), SessionsPerEra::get()); start_era(2); - assert_eq!(Staking::current_era_start_session_index(), SessionsPerEra::get() * 2); + assert_eq!(Staking::eras_start_session_index(Staking::active_era().unwrap().index).unwrap(), SessionsPerEra::get() * 2); let session = Session::current_index(); ForceEra::put(Forcing::ForceNew); advance_session(); - assert_eq!(Staking::current_era(), 3); - assert_eq!(Staking::current_era_start_session_index(), session + 1); + advance_session(); + assert_eq!(Staking::active_era().unwrap().index, 3); + assert_eq!(Staking::eras_start_session_index(Staking::active_era().unwrap().index).unwrap(), session + 2); start_era(4); - assert_eq!(Staking::current_era_start_session_index(), session + SessionsPerEra::get() + 1); + assert_eq!(Staking::eras_start_session_index(Staking::active_era().unwrap().index).unwrap(), session + 2 + SessionsPerEra::get()); }); } @@ -1939,7 +1953,7 @@ fn offence_forces_new_era() { &[OffenceDetails { offender: ( 11, - Staking::stakers(&11), + Staking::eras_stakers(Staking::active_era().unwrap().index, 11), ), reporters: vec![], }], @@ -1959,7 +1973,7 @@ fn offence_ensures_new_era_without_clobbering() { &[OffenceDetails { offender: ( 11, - Staking::stakers(&11), + Staking::eras_stakers(Staking::active_era().unwrap().index, 11), ), reporters: vec![], }], @@ -1973,12 +1987,13 @@ fn offence_ensures_new_era_without_clobbering() { #[test] fn offence_deselects_validator_when_slash_is_zero() { ExtBuilder::default().build().execute_with(|| { + assert!(Session::validators().contains(&11)); assert!(>::contains_key(11)); on_offence_now( &[OffenceDetails { offender: ( 11, - Staking::stakers(&11), + Staking::eras_stakers(Staking::active_era().unwrap().index, 11), ), reporters: vec![], }], @@ -1986,6 +2001,9 @@ fn offence_deselects_validator_when_slash_is_zero() { ); assert_eq!(Staking::force_era(), Forcing::ForceNew); assert!(!>::contains_key(11)); + start_era(1); + assert!(!Session::validators().contains(&11)); + assert!(!>::contains_key(11)); }); } @@ -1994,7 +2012,7 @@ fn slashing_performed_according_exposure() { // This test checks that slashing is performed according the exposure (or more precisely, // historical exposure), not the current balance. ExtBuilder::default().build().execute_with(|| { - assert_eq!(Staking::stakers(&11).own, 1000); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 11).own, 1000); // Handle an offence with a historical exposure. on_offence_now( @@ -2023,11 +2041,12 @@ fn slash_in_old_span_does_not_deselect() { start_era(1); assert!(>::contains_key(11)); + assert!(Session::validators().contains(&11)); on_offence_now( &[OffenceDetails { offender: ( 11, - Staking::stakers(&11), + Staking::eras_stakers(Staking::active_era().unwrap().index, 11), ), reporters: vec![], }], @@ -2041,6 +2060,7 @@ fn slash_in_old_span_does_not_deselect() { Staking::validate(Origin::signed(10), Default::default()).unwrap(); assert_eq!(Staking::force_era(), Forcing::NotForcing); assert!(>::contains_key(11)); + assert!(!Session::validators().contains(&11)); start_era(3); @@ -2051,7 +2071,7 @@ fn slash_in_old_span_does_not_deselect() { &[OffenceDetails { offender: ( 11, - Staking::stakers(&11), + Staking::eras_stakers(Staking::active_era().unwrap().index, 11), ), reporters: vec![], }], @@ -2062,12 +2082,13 @@ fn slash_in_old_span_does_not_deselect() { // not for zero-slash. assert_eq!(Staking::force_era(), Forcing::NotForcing); assert!(>::contains_key(11)); + assert!(Session::validators().contains(&11)); on_offence_in_era( &[OffenceDetails { offender: ( 11, - Staking::stakers(&11), + Staking::eras_stakers(Staking::active_era().unwrap().index, 11), ), reporters: vec![], }], @@ -2079,6 +2100,7 @@ fn slash_in_old_span_does_not_deselect() { // or non-zero. assert_eq!(Staking::force_era(), Forcing::NotForcing); assert!(>::contains_key(11)); + assert!(Session::validators().contains(&11)); assert_ledger_consistent(11); }); } @@ -2091,13 +2113,13 @@ fn reporters_receive_their_slice() { // The reporters' reward is calculated from the total exposure. let initial_balance = 1125; - assert_eq!(Staking::stakers(&11).total, initial_balance); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 11).total, initial_balance); on_offence_now( &[OffenceDetails { offender: ( 11, - Staking::stakers(&11), + Staking::eras_stakers(Staking::active_era().unwrap().index, 11), ), reporters: vec![1, 2], }], @@ -2122,13 +2144,13 @@ fn subsequent_reports_in_same_span_pay_out_less() { // The reporters' reward is calculated from the total exposure. let initial_balance = 1125; - assert_eq!(Staking::stakers(&11).total, initial_balance); + assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 11).total, initial_balance); on_offence_now( &[OffenceDetails { offender: ( 11, - Staking::stakers(&11), + Staking::eras_stakers(Staking::active_era().unwrap().index, 11), ), reporters: vec![1], }], @@ -2144,7 +2166,7 @@ fn subsequent_reports_in_same_span_pay_out_less() { &[OffenceDetails { offender: ( 11, - Staking::stakers(&11), + Staking::eras_stakers(Staking::active_era().unwrap().index, 11), ), reporters: vec![1], }], @@ -2168,7 +2190,7 @@ fn invulnerables_are_not_slashed() { assert_eq!(Balances::free_balance(11), 1000); assert_eq!(Balances::free_balance(21), 2000); - let exposure = Staking::stakers(&21); + let exposure = Staking::eras_stakers(Staking::active_era().unwrap().index, 21); let initial_balance = Staking::slashable_balance_of(&21); let nominator_balances: Vec<_> = exposure.others @@ -2177,11 +2199,11 @@ fn invulnerables_are_not_slashed() { on_offence_now( &[ OffenceDetails { - offender: (11, Staking::stakers(&11)), + offender: (11, Staking::eras_stakers(Staking::active_era().unwrap().index, 11)), reporters: vec![], }, OffenceDetails { - offender: (21, Staking::stakers(&21)), + offender: (21, Staking::eras_stakers(Staking::active_era().unwrap().index, 21)), reporters: vec![], }, ], @@ -2215,7 +2237,7 @@ fn dont_slash_if_fraction_is_zero() { &[OffenceDetails { offender: ( 11, - Staking::stakers(&11), + Staking::eras_stakers(Staking::active_era().unwrap().index, 11), ), reporters: vec![], }], @@ -2236,7 +2258,7 @@ fn only_slash_for_max_in_era() { on_offence_now( &[ OffenceDetails { - offender: (11, Staking::stakers(&11)), + offender: (11, Staking::eras_stakers(Staking::active_era().unwrap().index, 11)), reporters: vec![], }, ], @@ -2250,7 +2272,7 @@ fn only_slash_for_max_in_era() { on_offence_now( &[ OffenceDetails { - offender: (11, Staking::stakers(&11)), + offender: (11, Staking::eras_stakers(Staking::active_era().unwrap().index, 11)), reporters: vec![], }, ], @@ -2263,7 +2285,7 @@ fn only_slash_for_max_in_era() { on_offence_now( &[ OffenceDetails { - offender: (11, Staking::stakers(&11)), + offender: (11, Staking::eras_stakers(Staking::active_era().unwrap().index, 11)), reporters: vec![], }, ], @@ -2284,7 +2306,7 @@ fn garbage_collection_after_slashing() { on_offence_now( &[ OffenceDetails { - offender: (11, Staking::stakers(&11)), + offender: (11, Staking::eras_stakers(Staking::active_era().unwrap().index, 11)), reporters: vec![], }, ], @@ -2298,7 +2320,7 @@ fn garbage_collection_after_slashing() { on_offence_now( &[ OffenceDetails { - offender: (11, Staking::stakers(&11)), + offender: (11, Staking::eras_stakers(Staking::active_era().unwrap().index, 11)), reporters: vec![], }, ], @@ -2325,21 +2347,21 @@ fn garbage_collection_on_window_pruning() { assert_eq!(Balances::free_balance(11), 1000); - let exposure = Staking::stakers(&11); + let exposure = Staking::eras_stakers(Staking::active_era().unwrap().index, 11); assert_eq!(Balances::free_balance(101), 2000); let nominated_value = exposure.others.iter().find(|o| o.who == 101).unwrap().value; on_offence_now( &[ OffenceDetails { - offender: (11, Staking::stakers(&11)), + offender: (11, Staking::eras_stakers(Staking::active_era().unwrap().index, 11)), reporters: vec![], }, ], &[Perbill::from_percent(10)], ); - let now = Staking::current_era(); + let now = Staking::active_era().unwrap().index; assert_eq!(Balances::free_balance(11), 900); assert_eq!(Balances::free_balance(101), 2000 - (nominated_value / 10)); @@ -2373,8 +2395,8 @@ fn slashing_nominators_by_span_max() { assert_eq!(Staking::slashable_balance_of(&21), 1000); - let exposure_11 = Staking::stakers(&11); - let exposure_21 = Staking::stakers(&21); + let exposure_11 = Staking::eras_stakers(Staking::active_era().unwrap().index, 11); + let exposure_21 = Staking::eras_stakers(Staking::active_era().unwrap().index, 21); assert_eq!(Balances::free_balance(101), 2000); let nominated_value_11 = exposure_11.others.iter().find(|o| o.who == 101).unwrap().value; let nominated_value_21 = exposure_21.others.iter().find(|o| o.who == 101).unwrap().value; @@ -2382,7 +2404,7 @@ fn slashing_nominators_by_span_max() { on_offence_in_era( &[ OffenceDetails { - offender: (11, Staking::stakers(&11)), + offender: (11, Staking::eras_stakers(Staking::active_era().unwrap().index, 11)), reporters: vec![], }, ], @@ -2416,7 +2438,7 @@ fn slashing_nominators_by_span_max() { on_offence_in_era( &[ OffenceDetails { - offender: (21, Staking::stakers(&21)), + offender: (21, Staking::eras_stakers(Staking::active_era().unwrap().index, 21)), reporters: vec![], }, ], @@ -2439,7 +2461,7 @@ fn slashing_nominators_by_span_max() { on_offence_in_era( &[ OffenceDetails { - offender: (11, Staking::stakers(&11)), + offender: (11, Staking::eras_stakers(Staking::active_era().unwrap().index, 11)), reporters: vec![], }, ], @@ -2475,7 +2497,7 @@ fn slashes_are_summed_across_spans() { on_offence_now( &[ OffenceDetails { - offender: (21, Staking::stakers(&21)), + offender: (21, Staking::eras_stakers(Staking::active_era().unwrap().index, 21)), reporters: vec![], }, ], @@ -2500,7 +2522,7 @@ fn slashes_are_summed_across_spans() { on_offence_now( &[ OffenceDetails { - offender: (21, Staking::stakers(&21)), + offender: (21, Staking::eras_stakers(Staking::active_era().unwrap().index, 21)), reporters: vec![], }, ], @@ -2525,14 +2547,14 @@ fn deferred_slashes_are_deferred() { assert_eq!(Balances::free_balance(11), 1000); - let exposure = Staking::stakers(&11); + let exposure = Staking::eras_stakers(Staking::active_era().unwrap().index, 11); assert_eq!(Balances::free_balance(101), 2000); let nominated_value = exposure.others.iter().find(|o| o.who == 101).unwrap().value; on_offence_now( &[ OffenceDetails { - offender: (11, Staking::stakers(&11)), + offender: (11, Staking::eras_stakers(Staking::active_era().unwrap().index, 11)), reporters: vec![], }, ], @@ -2568,7 +2590,7 @@ fn remove_deferred() { assert_eq!(Balances::free_balance(11), 1000); - let exposure = Staking::stakers(&11); + let exposure = Staking::eras_stakers(Staking::active_era().unwrap().index, 11); assert_eq!(Balances::free_balance(101), 2000); let nominated_value = exposure.others.iter().find(|o| o.who == 101).unwrap().value; @@ -2638,7 +2660,7 @@ fn remove_multi_deferred() { assert_eq!(Balances::free_balance(11), 1000); - let exposure = Staking::stakers(&11); + let exposure = Staking::eras_stakers(Staking::active_era().unwrap().index, 11); assert_eq!(Balances::free_balance(101), 2000); on_offence_now( @@ -2654,7 +2676,7 @@ fn remove_multi_deferred() { on_offence_now( &[ OffenceDetails { - offender: (21, Staking::stakers(&21)), + offender: (21, Staking::eras_stakers(Staking::active_era().unwrap().index, 21)), reporters: vec![], } ], @@ -2687,7 +2709,7 @@ fn slash_kicks_validators_not_nominators() { assert_eq!(Balances::free_balance(11), 1000); - let exposure = Staking::stakers(&11); + let exposure = Staking::eras_stakers(Staking::active_era().unwrap().index, 11); assert_eq!(Balances::free_balance(101), 2000); let nominated_value = exposure.others.iter().find(|o| o.who == 101).unwrap().value; @@ -2719,6 +2741,199 @@ fn slash_kicks_validators_not_nominators() { }); } +#[test] +fn claim_reward_at_the_last_era_and_no_double_claim_and_invalid_claim() { + // should check that: + // * rewards get paid until history_depth for both validators and nominators + // * an invalid era to claim doesn't update last_reward + // * double claim of one era fails + ExtBuilder::default().nominate(true).build().execute_with(|| { + let init_balance_10 = Balances::total_balance(&10); + let init_balance_100 = Balances::total_balance(&100); + + let part_for_10 = Perbill::from_rational_approximation::(1000, 1125); + let part_for_100 = Perbill::from_rational_approximation::(125, 1125); + + // Check state + Payee::::insert(11, RewardDestination::Controller); + Payee::::insert(101, RewardDestination::Controller); + + >::reward_by_ids(vec![(11, 1)]); + // Compute total payout now for whole duration as other parameter won't change + let total_payout_0 = current_total_payout_for_duration(3000); + assert!(total_payout_0 > 10); // Test is meaningful if reward something + + start_era(1); + + >::reward_by_ids(vec![(11, 1)]); + // Change total issuance in order to modify total payout + let _ = Balances::deposit_creating(&999, 1_000_000_000); + // Compute total payout now for whole duration as other parameter won't change + let total_payout_1 = current_total_payout_for_duration(3000); + assert!(total_payout_1 > 10); // Test is meaningful if reward something + assert!(total_payout_1 != total_payout_0); + + start_era(2); + + >::reward_by_ids(vec![(11, 1)]); + // Change total issuance in order to modify total payout + let _ = Balances::deposit_creating(&999, 1_000_000_000); + // Compute total payout now for whole duration as other parameter won't change + let total_payout_2 = current_total_payout_for_duration(3000); + assert!(total_payout_2 > 10); // Test is meaningful if reward something + assert!(total_payout_2 != total_payout_0); + assert!(total_payout_2 != total_payout_1); + + start_era(Staking::history_depth() + 1); + + let active_era = Staking::active_era().unwrap().index; + + // This is the latest planned era in staking, not the active era + let current_era = Staking::current_era().unwrap(); + + // Last kept is 1: + assert!(current_era - Staking::history_depth() == 1); + assert_noop!( + Staking::payout_validator(Origin::signed(10), 0), + // Fail: Era out of history + Error::::InvalidEraToReward + ); + assert_ok!(Staking::payout_validator(Origin::signed(10), 1)); + assert_ok!(Staking::payout_validator(Origin::signed(10), 2)); + assert_noop!( + Staking::payout_validator(Origin::signed(10), 2), + // Fail: Double claim + Error::::InvalidEraToReward + ); + assert_noop!( + Staking::payout_validator(Origin::signed(10), active_era), + // Fail: Era not finished yet + Error::::InvalidEraToReward + ); + + assert_noop!( + Staking::payout_nominator(Origin::signed(100), 0, vec![(11, 0)]), + // Fail: Era out of history + Error::::InvalidEraToReward + ); + assert_ok!(Staking::payout_nominator(Origin::signed(100), 1, vec![(11, 0)])); + assert_ok!(Staking::payout_nominator(Origin::signed(100), 2, vec![(11, 0)])); + assert_noop!( + Staking::payout_nominator(Origin::signed(100), 2, vec![(11, 0)]), + // Fail: Double claim + Error::::InvalidEraToReward + ); + assert_noop!( + Staking::payout_nominator(Origin::signed(100), active_era, vec![(11, 0)]), + // Fail: Era not finished yet + Error::::InvalidEraToReward + ); + + // Era 0 can't be rewarded anymore and current era can't be rewarded yet + // only era 1 and 2 can be rewarded. + + assert_eq!( + Balances::total_balance(&10), + init_balance_10 + part_for_10 * (total_payout_1 + total_payout_2), + ); + assert_eq!( + Balances::total_balance(&100), + init_balance_100 + part_for_100 * (total_payout_1 + total_payout_2), + ); + }); +} + +#[test] +fn upgrade_works() { + ExtBuilder::default().build().execute_with(|| { + start_era(3); + + assert_eq!(Session::validators(), vec![21, 11]); + + // Insert fake data to check the migration + put_storage_value::>(b"Staking", b"CurrentElected", b"", vec![21, 31]); + put_storage_value::(b"Staking", b"CurrentEraStartSessionIndex", b"", 5); + put_storage_value::>(b"Staking", b"CurrentEraStart", b"", 777); + put_storage_value( + b"Staking", b"Stakers", &blake2_256(&11u64.encode()), + Exposure:: { + total: 10, + own: 10, + others: vec![], + } + ); + put_storage_value( + b"Staking", b"Stakers", &blake2_256(&21u64.encode()), + Exposure:: { + total: 20, + own: 20, + others: vec![], + } + ); + put_storage_value( + b"Staking", b"Stakers", &blake2_256(&31u64.encode()), + Exposure:: { + total: 30, + own: 30, + others: vec![], + } + ); + put_storage_value::<(u32, Vec)>(b"Staking", b"CurrentEraPointsEarned", b"", (12, vec![2, 10])); + ::ErasStakers::remove_all(); + ::ErasStakersClipped::remove_all(); + + ::IsUpgraded::put(false); + + // Perform upgrade + Staking::ensure_storage_upgraded(); + + assert_eq!(::IsUpgraded::get(), true); + + // Check migration + assert_eq!(::ErasStartSessionIndex::get(3).unwrap(), 5); + assert_eq!(::ErasRewardPoints::get(3), EraRewardPoints { + total: 12, + individual: vec![(21, 2), (31, 10)].into_iter().collect(), + }); + assert_eq!(::ActiveEra::get().unwrap().index, 3); + assert_eq!(::ActiveEra::get().unwrap().start, Some(777)); + assert_eq!(::CurrentEra::get().unwrap(), 3); + assert_eq!(::ErasStakers::get(3, 11), Exposure { + total: 0, + own: 0, + others: vec![], + }); + assert_eq!(::ErasStakers::get(3, 21), Exposure { + total: 20, + own: 20, + others: vec![], + }); + assert_eq!(::ErasStakers::get(3, 31), Exposure { + total: 30, + own: 30, + others: vec![], + }); + assert_eq!(::ErasStakersClipped::get(3, 11), Exposure { + total: 0, + own: 0, + others: vec![], + }); + assert_eq!(::ErasStakersClipped::get(3, 21), Exposure { + total: 20, + own: 20, + others: vec![], + }); + assert_eq!(::ErasStakersClipped::get(3, 31), Exposure { + total: 30, + own: 30, + others: vec![], + }); + assert_eq!(::ErasValidatorPrefs::get(3, 21), Staking::validators(21)); + assert_eq!(::ErasValidatorPrefs::get(3, 31), Staking::validators(31)); + assert_eq!(::ErasTotalStake::get(3), 50); + }) +} + #[test] fn zero_slash_keeps_nominators() { ExtBuilder::default().build().execute_with(|| { @@ -2726,7 +2941,7 @@ fn zero_slash_keeps_nominators() { assert_eq!(Balances::free_balance(11), 1000); - let exposure = Staking::stakers(&11); + let exposure = Staking::eras_stakers(Staking::active_era().unwrap().index, 11); assert_eq!(Balances::free_balance(101), 2000); on_offence_now( @@ -2756,3 +2971,245 @@ fn zero_slash_keeps_nominators() { assert!(nominations.submitted_in >= last_slash); }); } + +#[test] +fn six_session_delay() { + ExtBuilder::default().build().execute_with(|| { + use pallet_session::SessionManager; + + let val_set = Session::validators(); + let init_session = Session::current_index(); + let init_active_era = Staking::active_era().unwrap().index; + // pallet-session is delaying session by one, thus the next session to plan is +2. + assert_eq!(>::new_session(init_session + 2), None); + assert_eq!(>::new_session(init_session + 3), Some(val_set.clone())); + assert_eq!(>::new_session(init_session + 4), None); + assert_eq!(>::new_session(init_session + 5), None); + assert_eq!(>::new_session(init_session + 6), Some(val_set.clone())); + + >::end_session(init_session); + >::start_session(init_session + 1); + assert_eq!(Staking::active_era().unwrap().index, init_active_era); + >::end_session(init_session + 1); + >::start_session(init_session + 2); + assert_eq!(Staking::active_era().unwrap().index, init_active_era); + + // Reward current era + Staking::reward_by_ids(vec![(11, 1)]); + + // New active era is triggered here. + >::end_session(init_session + 2); + >::start_session(init_session + 3); + assert_eq!(Staking::active_era().unwrap().index, init_active_era + 1); + >::end_session(init_session + 3); + >::start_session(init_session + 4); + assert_eq!(Staking::active_era().unwrap().index, init_active_era + 1); + >::end_session(init_session + 4); + >::start_session(init_session + 5); + assert_eq!(Staking::active_era().unwrap().index, init_active_era + 1); + + // Reward current era + Staking::reward_by_ids(vec![(21, 2)]); + + // New active era is triggered here. + >::end_session(init_session + 5); + >::start_session(init_session + 6); + assert_eq!(Staking::active_era().unwrap().index, init_active_era + 2); + + // That reward are correct + assert_eq!(Staking::eras_reward_points(init_active_era).total, 1); + assert_eq!(Staking::eras_reward_points(init_active_era + 1).total, 2); + }); +} + +#[test] +fn test_max_nominator_rewarded_per_validator_and_cant_steal_someone_else_reward() { + // Test: + // * If nominator nomination is below the $MaxNominatorRewardedPerValidator other nominator + // then the nominator can't claim its reward + // * A nominator can't claim another nominator reward + ExtBuilder::default().build().execute_with(|| { + for i in 0..=::MaxNominatorRewardedPerValidator::get() { + let stash = 10_000 + i as u64; + let controller = 20_000 + i as u64; + let balance = 10_000 + i as u64; + Balances::make_free_balance_be(&stash, balance); + assert_ok!( + Staking::bond( + Origin::signed(stash), + controller, + balance, + RewardDestination::Stash + ) + ); + assert_ok!(Staking::nominate(Origin::signed(controller), vec![11])); + } + mock::start_era(1); + + >::reward_by_ids(vec![(11, 1)]); + // Compute total payout now for whole duration as other parameter won't change + let total_payout_0 = current_total_payout_for_duration(3 * 1000); + assert!(total_payout_0 > 100); // Test is meaningful if reward something + + mock::start_era(2); + mock::make_all_reward_payment(1); + + // nominator 10_000 can't get its reward because exposure is clipped. However it will try + // to query other people reward. + assert_ok!(Staking::payout_nominator(Origin::signed(20_000), 1, vec![(11, 0)])); + + // Assert only nominators from 1 to Max are rewarded + for i in 0..=::MaxNominatorRewardedPerValidator::get() { + let stash = 10_000 + i as u64; + let balance = 10_000 + i as u64; + if stash == 10_000 { + assert!(Balances::free_balance(&stash) == balance); + } else { + assert!(Balances::free_balance(&stash) > balance); + } + } + }); +} + +// Test that an upgrade from previous test environment works. +#[test] +fn test_upgrade_from_master_works() { + let data_sets = &[ + test_upgrade_from_master_dataset::_0, + test_upgrade_from_master_dataset::_1, + test_upgrade_from_master_dataset::_2, + test_upgrade_from_master_dataset::_3, + test_upgrade_from_master_dataset::_4, + test_upgrade_from_master_dataset::_5, + test_upgrade_from_master_dataset::_6, + test_upgrade_from_master_dataset::_7, + test_upgrade_from_master_dataset::_8, + ]; + for data_set in data_sets.iter() { + let mut storage = sp_runtime::Storage::default(); + for (key, value) in data_set.iter() { + storage.top.insert(key.to_vec(), value.to_vec()); + } + let mut ext = sp_io::TestExternalities::from(storage); + ext.execute_with(|| { + let old_stakers = + get_storage_value::>(b"Staking", b"CurrentElected", b"").unwrap(); + let old_staker_0 = old_stakers[0]; + let old_staker_1 = old_stakers[1]; + let old_current_era = + get_storage_value::(b"Staking", b"CurrentEra", b"").unwrap(); + let old_staker_0_exposure = get_storage_value::>( + b"Staking", b"Stakers", &blake2_256(&old_staker_0.encode()) + ).unwrap(); + let old_staker_1_exposure = get_storage_value::>( + b"Staking", b"Stakers", &blake2_256(&old_staker_1.encode()) + ).unwrap(); + let ( + old_era_points_earned_total, + old_era_points_earned_individual + ) = get_storage_value::<(u32, Vec)>(b"Staking", b"CurrentEraPointsEarned", b"") + .unwrap_or((0, vec![])); + + Staking::ensure_storage_upgraded(); + assert!(::IsUpgraded::get()); + + // Check ActiveEra and CurrentEra + let active_era = Staking::active_era().unwrap().index; + let current_era = Staking::current_era().unwrap(); + assert!(current_era == active_era); + assert!(current_era == old_current_era); + + // Check ErasStartSessionIndex + let active_era_start = Staking::eras_start_session_index(active_era).unwrap(); + let current_era_start = Staking::eras_start_session_index(current_era).unwrap(); + let current_session_index = Session::current_index(); + assert!(current_era_start == active_era_start); + assert!(active_era_start <= current_session_index); + assert_eq!(::ErasStartSessionIndex::iter().count(), 1); + + // Check ErasStakers + assert_eq!(::ErasStakers::iter().count(), 2); + assert_eq!( + ::ErasStakers::get(current_era, old_staker_0), + old_staker_0_exposure + ); + assert_eq!( + ::ErasStakers::get(current_era, old_staker_1), + old_staker_1_exposure + ); + + // Check ErasStakersClipped + assert_eq!(::ErasStakersClipped::iter().count(), 2); + assert!(::ErasStakersClipped::iter().all(|exposure_clipped| { + let max = ::MaxNominatorRewardedPerValidator::get() as usize; + exposure_clipped.others.len() <= max + })); + assert_eq!( + ::ErasStakersClipped::get(current_era, old_staker_0), + old_staker_0_exposure + ); + assert_eq!( + ::ErasStakersClipped::get(current_era, old_staker_1), + old_staker_1_exposure + ); + + // Check ErasValidatorPrefs + assert_eq!(::ErasValidatorPrefs::iter().count(), 2); + assert_eq!( + ::ErasValidatorPrefs::get(current_era, old_staker_0), + Staking::validators(old_staker_0) + ); + assert_eq!( + ::ErasValidatorPrefs::get(current_era, old_staker_1), + Staking::validators(old_staker_1) + ); + + // Check ErasTotalStake + assert_eq!(::ErasTotalStake::iter().count(), 1); + assert_eq!( + ::ErasTotalStake::get(current_era), + old_staker_0_exposure.total + old_staker_1_exposure.total + ); + + // Check ErasRewardPoints + assert_eq!(::ErasRewardPoints::iter().count(), 1); + let mut individual = BTreeMap::new(); + if let Some(p) = old_era_points_earned_individual.get(0) { + individual.insert(old_staker_0, p.clone()); + } + if let Some(p) = old_era_points_earned_individual.get(1) { + individual.insert(old_staker_1, p.clone()); + } + assert_eq!( + ::ErasRewardPoints::get(current_era), + EraRewardPoints { + total: old_era_points_earned_total, + individual, + } + ); + + // Check ErasValidatorReward + assert_eq!(::ErasValidatorReward::iter().count(), 0); + }); + } +} + +#[test] +fn set_history_depth_works() { + ExtBuilder::default().build().execute_with(|| { + start_era(10); + Staking::set_history_depth(Origin::ROOT, 20).unwrap(); + assert!(::ErasTotalStake::contains_key(10 - 4)); + assert!(::ErasTotalStake::contains_key(10 - 5)); + Staking::set_history_depth(Origin::ROOT, 4).unwrap(); + assert!(::ErasTotalStake::contains_key(10 - 4)); + assert!(!::ErasTotalStake::contains_key(10 - 5)); + Staking::set_history_depth(Origin::ROOT, 3).unwrap(); + assert!(!::ErasTotalStake::contains_key(10 - 4)); + assert!(!::ErasTotalStake::contains_key(10 - 5)); + Staking::set_history_depth(Origin::ROOT, 8).unwrap(); + assert!(!::ErasTotalStake::contains_key(10 - 4)); + assert!(!::ErasTotalStake::contains_key(10 - 5)); + }); +} + diff --git a/frame/staking/src/tests/test_upgrade_from_master_dataset.rs b/frame/staking/src/tests/test_upgrade_from_master_dataset.rs new file mode 100644 index 00000000000..32f9b0a3edb --- /dev/null +++ b/frame/staking/src/tests/test_upgrade_from_master_dataset.rs @@ -0,0 +1,59 @@ +// Copyright 2020-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Data set for testing update from previous staking module. +//! +//! Each data set correspond to the storage state for its corresponding block just before the +//! staking initialisation. +//! +//! it has been generated using the following code at commit +//! dc92587bea4032e0a0fc96785bfd9aa17c95459e +//! +//! ```nocompile +//! fn print_storage(i: u32) { +//! let mut storage = vec![]; +//! let mut current_key = vec![]; +//! while let Some(key) = sp_io::storage::next_key(¤t_key) { +//! storage.push((key.clone(), sp_io::storage::get(&key).unwrap())); +//! current_key = key; +//! } +//! println!("const _{}: &[(&[u8], &[u8])] = {:?};", i, storage); +//! } +//! +//! #[test] +//! fn get_states() { +//! let mut ext = ExtBuilder::default().build(); +//! +//! for index in 1..10u32 { +//! ext.execute_with(|| { +//! print_storage(index - 1); +//! System::set_block_number((index).into()); +//! Timestamp::set_timestamp(System::block_number() * 1000); +//! Session::on_initialize(System::block_number()); +//! }); +//! } +//! } +//! ``` + +pub const _0: &[(&[u8], &[u8])] = &[(&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 2, 165, 193, 177, 154, 183, 160, 79, 83, 108, 81, 154, 202, 73, 131, 172], &[1, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 10, 152, 253, 190, 156, 230, 197, 88, 55, 87, 108, 96, 199, 175, 56, 80], &[15, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215], &[60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 138, 66, 243, 51, 35, 203, 92, 237, 59, 68, 221, 130, 95, 218, 159, 204], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 164, 71, 4, 181, 104, 210, 22, 103, 53, 106, 90, 5, 12, 17, 135, 70, 129, 228, 122, 25, 230, 178, 155, 10, 101, 185, 89, 23, 98, 206, 81, 67, 237, 48, 208, 38, 30, 93, 36, 163, 32, 23, 82, 80, 107, 32, 241, 92], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 29, 189, 125, 11, 86, 26, 65, 210, 60, 42, 70, 154, 212, 47, 189, 112, 213, 67, 139, 174, 130, 111, 111, 214, 7, 65, 49, 144, 195, 124, 54, 59], &[0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 100, 74, 81, 252, 33, 158, 145, 69, 184, 87, 123, 183, 118, 40, 118, 123, 28, 47, 115, 116, 142, 218, 139, 120, 139, 252, 102, 161, 181, 42, 32, 248], &[0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 165, 212, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 108, 221, 179, 103, 175, 189, 88, 59, 180, 143, 155, 189, 125, 91, 163, 177, 208, 115, 139, 72, 129, 177, 205, 221, 56, 22, 149, 38, 216, 21, 129, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 44, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 232, 139, 67, 253, 237, 99, 35, 239, 2, 255, 239, 251, 216, 196, 8, 70, 238, 9, 191, 49, 98, 113, 189, 34, 54, 150, 89, 201, 89, 221, 115, 58], &[0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 233, 103, 96, 210, 116, 101, 58, 57, 180, 41, 168, 126, 186, 174, 157, 58, 164, 253, 245, 139, 144, 150, 207, 11, 235, 199, 196, 229, 164, 194, 237, 141], &[0, 0, 0, 0, 0, 0, 0, 0, 144, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0]), (&[58, 99, 111, 100, 101], &[]), (&[58, 101, 120, 116, 114, 105, 110, 115, 105, 99, 95, 105, 110, 100, 101, 120], &[0, 0, 0, 0]), (&[58, 104, 101, 97, 112, 112, 97, 103, 101, 115], &[8, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 11, 106, 69, 50, 30, 250, 233, 42, 234, 21, 224, 116, 14, 199, 175, 231], &[0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 14, 160, 236, 172, 118, 69, 125, 15, 155, 57, 185, 129, 221, 16, 112, 18], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 19, 142, 113, 97, 36, 145, 25, 45, 104, 222, 171, 126, 111, 86, 63, 225], &[2, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 40, 220, 203, 85, 155, 149, 196, 1, 104, 161, 178, 105, 101, 129, 181, 167], &[0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[40, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[10, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[30, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[20, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[100, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[21, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[31, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[11, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[101, 0, 0, 0, 0, 0, 0, 0, 209, 7, 209, 7, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[41, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 80, 154, 155, 110, 250, 147, 245, 187, 131, 248, 88, 240, 186, 191, 211, 11], &[0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 85, 121, 41, 127, 77, 251, 150, 9, 231, 228, 194, 235, 171, 156, 228, 10], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 86, 239, 98, 39, 206, 203, 47, 7, 39, 76, 176, 87, 45, 143, 164, 194], &[101, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 106, 147, 17, 38, 51, 187, 51, 84, 230, 121, 82, 252, 221, 116, 12, 213], &[31, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[149, 17, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 245, 1]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[125, 21, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 221, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 1, 21, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 1, 21, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 1, 31, 0, 0, 0, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 106, 99, 127, 98, 174, 42, 241, 199, 227, 30, 237, 126, 150, 190, 4, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[8, 11, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 189, 47, 11, 41, 160, 8, 163, 96, 9, 172, 68, 204, 160, 201, 105], &[101, 4, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 180, 154, 39, 56, 238, 179, 8, 150, 170, 203, 139, 63, 180, 100, 113, 189], &[0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 194, 154, 3, 16, 225, 187, 69, 210, 12, 172, 231, 124, 203, 98, 201, 125], &[0, 225, 245, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 234, 7, 222, 43, 143, 1, 5, 22, 220, 163, 247, 239, 82, 247, 172, 90], &[4, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 247, 218, 208, 49, 115, 36, 174, 202, 232, 116, 75, 135, 252, 149, 242, 243], &[0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 1, 0, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 244, 1, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 87, 200, 117, 228, 207, 247, 65, 72, 228, 98, 143, 38, 75, 151, 76, 128], &[214, 61, 165, 212, 232, 0, 0, 0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 227, 253, 141, 247, 41, 112, 188, 130, 229, 38, 126, 160, 30, 221, 217, 73], &[1]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 109, 123, 24, 86, 30, 19, 159, 228, 49, 200, 33, 139, 70, 205, 244, 47, 40, 190, 110, 43, 138, 12, 26, 121, 5, 219, 103, 1, 110, 91, 142, 123], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 238, 43, 102, 225, 142, 104, 190, 12, 183, 86, 115, 25, 37, 223, 229, 65, 253, 167, 152, 54, 57, 147, 167, 137, 80, 161, 2, 235, 195, 174, 40, 244], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 17, 218, 109, 31, 118, 29, 223, 155, 219, 76, 157, 110, 83, 3, 235, 212, 31, 97, 133, 141, 10, 86, 71, 161, 167, 191, 224, 137, 191, 146, 27, 233], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 225, 44, 34, 212, 241, 98, 217, 160, 18, 201, 49, 146, 51, 218, 93, 62, 146, 60, 197, 225, 2, 155, 143, 144, 228, 114, 73, 201, 171, 37, 107, 53], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 224, 205, 208, 98, 230, 234, 242, 66, 149, 173, 76, 207, 196, 29, 70, 9], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 255, 58, 225, 39, 112, 190, 162, 228, 141, 155, 222, 115, 133, 231, 162, 95], &[0, 0, 0, 0, 2, 0, 0, 0])]; +pub const _1: &[(&[u8], &[u8])] = &[(&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 2, 165, 193, 177, 154, 183, 160, 79, 83, 108, 81, 154, 202, 73, 131, 172], &[1, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 10, 152, 253, 190, 156, 230, 197, 88, 55, 87, 108, 96, 199, 175, 56, 80], &[16, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215], &[64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 138, 66, 243, 51, 35, 203, 92, 237, 59, 68, 221, 130, 95, 218, 159, 204], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 164, 71, 4, 181, 104, 210, 22, 103, 53, 106, 90, 5, 12, 17, 135, 70, 129, 228, 122, 25, 230, 178, 155, 10, 101, 185, 89, 23, 98, 206, 81, 67, 237, 48, 208, 38, 30, 93, 36, 163, 32, 23, 82, 80, 107, 32, 241, 92], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 29, 189, 125, 11, 86, 26, 65, 210, 60, 42, 70, 154, 212, 47, 189, 112, 213, 67, 139, 174, 130, 111, 111, 214, 7, 65, 49, 144, 195, 124, 54, 59], &[0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 100, 74, 81, 252, 33, 158, 145, 69, 184, 87, 123, 183, 118, 40, 118, 123, 28, 47, 115, 116, 142, 218, 139, 120, 139, 252, 102, 161, 181, 42, 32, 248], &[0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 165, 212, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 108, 221, 179, 103, 175, 189, 88, 59, 180, 143, 155, 189, 125, 91, 163, 177, 208, 115, 139, 72, 129, 177, 205, 221, 56, 22, 149, 38, 216, 21, 129, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 44, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 232, 139, 67, 253, 237, 99, 35, 239, 2, 255, 239, 251, 216, 196, 8, 70, 238, 9, 191, 49, 98, 113, 189, 34, 54, 150, 89, 201, 89, 221, 115, 58], &[0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 233, 103, 96, 210, 116, 101, 58, 57, 180, 41, 168, 126, 186, 174, 157, 58, 164, 253, 245, 139, 144, 150, 207, 11, 235, 199, 196, 229, 164, 194, 237, 141], &[0, 0, 0, 0, 0, 0, 0, 0, 144, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0]), (&[58, 99, 111, 100, 101], &[]), (&[58, 101, 120, 116, 114, 105, 110, 115, 105, 99, 95, 105, 110, 100, 101, 120], &[0, 0, 0, 0]), (&[58, 104, 101, 97, 112, 112, 97, 103, 101, 115], &[8, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 11, 106, 69, 50, 30, 250, 233, 42, 234, 21, 224, 116, 14, 199, 175, 231], &[0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 14, 160, 236, 172, 118, 69, 125, 15, 155, 57, 185, 129, 221, 16, 112, 18], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 19, 142, 113, 97, 36, 145, 25, 45, 104, 222, 171, 126, 111, 86, 63, 225], &[2, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 40, 220, 203, 85, 155, 149, 196, 1, 104, 161, 178, 105, 101, 129, 181, 167], &[0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[40, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[10, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[30, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[20, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[100, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[21, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[31, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[11, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[101, 0, 0, 0, 0, 0, 0, 0, 209, 7, 209, 7, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[41, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 80, 154, 155, 110, 250, 147, 245, 187, 131, 248, 88, 240, 186, 191, 211, 11], &[0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 85, 121, 41, 127, 77, 251, 150, 9, 231, 228, 194, 235, 171, 156, 228, 10], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 86, 239, 98, 39, 206, 203, 47, 7, 39, 76, 176, 87, 45, 143, 164, 194], &[101, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 106, 147, 17, 38, 51, 187, 51, 84, 230, 121, 82, 252, 221, 116, 12, 213], &[31, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[149, 17, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 245, 1]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[125, 21, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 221, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 1, 21, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 1, 21, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 1, 31, 0, 0, 0, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 106, 99, 127, 98, 174, 42, 241, 199, 227, 30, 237, 126, 150, 190, 4, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[8, 11, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 189, 47, 11, 41, 160, 8, 163, 96, 9, 172, 68, 204, 160, 201, 105], &[101, 4, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 180, 154, 39, 56, 238, 179, 8, 150, 170, 203, 139, 63, 180, 100, 113, 189], &[0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 194, 154, 3, 16, 225, 187, 69, 210, 12, 172, 231, 124, 203, 98, 201, 125], &[0, 225, 245, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 234, 7, 222, 43, 143, 1, 5, 22, 220, 163, 247, 239, 82, 247, 172, 90], &[4, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 247, 218, 208, 49, 115, 36, 174, 202, 232, 116, 75, 135, 252, 149, 242, 243], &[0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 1, 0, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 244, 1, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 87, 200, 117, 228, 207, 247, 65, 72, 228, 98, 143, 38, 75, 151, 76, 128], &[214, 61, 165, 212, 232, 0, 0, 0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 227, 253, 141, 247, 41, 112, 188, 130, 229, 38, 126, 160, 30, 221, 217, 73], &[1]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 109, 123, 24, 86, 30, 19, 159, 228, 49, 200, 33, 139, 70, 205, 244, 47, 40, 190, 110, 43, 138, 12, 26, 121, 5, 219, 103, 1, 110, 91, 142, 123], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 238, 43, 102, 225, 142, 104, 190, 12, 183, 86, 115, 25, 37, 223, 229, 65, 253, 167, 152, 54, 57, 147, 167, 137, 80, 161, 2, 235, 195, 174, 40, 244], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 118, 56, 0, 163, 106, 153, 253, 252, 124, 16, 246, 65, 95, 110, 230], &[1, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 148, 80, 191, 164, 185, 106, 63, 167, 163, 200, 244, 13, 166, 191, 50, 225], &[0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 17, 218, 109, 31, 118, 29, 223, 155, 219, 76, 157, 110, 83, 3, 235, 212, 31, 97, 133, 141, 10, 86, 71, 161, 167, 191, 224, 137, 191, 146, 27, 233], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 123, 10, 161, 115, 94, 91, 165, 141, 50, 54, 49, 108, 103, 31, 228, 240, 14, 211, 102, 238, 114, 65, 124, 158, 208, 42, 83, 168, 1, 158, 133, 184], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 225, 44, 34, 212, 241, 98, 217, 160, 18, 201, 49, 146, 51, 218, 93, 62, 146, 60, 197, 225, 2, 155, 143, 144, 228, 114, 73, 201, 171, 37, 107, 53], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 224, 205, 208, 98, 230, 234, 242, 66, 149, 173, 76, 207, 196, 29, 70, 9], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 255, 58, 225, 39, 112, 190, 162, 228, 141, 155, 222, 115, 133, 231, 162, 95], &[0, 0, 0, 0, 3, 0, 0, 0]), (&[240, 195, 101, 195, 207, 89, 214, 113, 235, 114, 218, 14, 122, 65, 19, 196, 159, 31, 5, 21, 244, 98, 205, 207, 132, 224, 241, 214, 4, 93, 252, 187], &[232, 3, 0, 0, 0, 0, 0, 0])]; +pub const _2: &[(&[u8], &[u8])] = &[(&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 2, 165, 193, 177, 154, 183, 160, 79, 83, 108, 81, 154, 202, 73, 131, 172], &[2, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 10, 152, 253, 190, 156, 230, 197, 88, 55, 87, 108, 96, 199, 175, 56, 80], &[17, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215], &[68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 138, 66, 243, 51, 35, 203, 92, 237, 59, 68, 221, 130, 95, 218, 159, 204], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 164, 71, 4, 181, 104, 210, 22, 103, 53, 106, 90, 5, 12, 17, 135, 70, 129, 228, 122, 25, 230, 178, 155, 10, 101, 185, 89, 23, 98, 206, 81, 67, 237, 48, 208, 38, 30, 93, 36, 163, 32, 23, 82, 80, 107, 32, 241, 92], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 29, 189, 125, 11, 86, 26, 65, 210, 60, 42, 70, 154, 212, 47, 189, 112, 213, 67, 139, 174, 130, 111, 111, 214, 7, 65, 49, 144, 195, 124, 54, 59], &[0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 100, 74, 81, 252, 33, 158, 145, 69, 184, 87, 123, 183, 118, 40, 118, 123, 28, 47, 115, 116, 142, 218, 139, 120, 139, 252, 102, 161, 181, 42, 32, 248], &[0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 165, 212, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 108, 221, 179, 103, 175, 189, 88, 59, 180, 143, 155, 189, 125, 91, 163, 177, 208, 115, 139, 72, 129, 177, 205, 221, 56, 22, 149, 38, 216, 21, 129, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 44, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 232, 139, 67, 253, 237, 99, 35, 239, 2, 255, 239, 251, 216, 196, 8, 70, 238, 9, 191, 49, 98, 113, 189, 34, 54, 150, 89, 201, 89, 221, 115, 58], &[0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 233, 103, 96, 210, 116, 101, 58, 57, 180, 41, 168, 126, 186, 174, 157, 58, 164, 253, 245, 139, 144, 150, 207, 11, 235, 199, 196, 229, 164, 194, 237, 141], &[0, 0, 0, 0, 0, 0, 0, 0, 144, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0]), (&[58, 99, 111, 100, 101], &[]), (&[58, 101, 120, 116, 114, 105, 110, 115, 105, 99, 95, 105, 110, 100, 101, 120], &[0, 0, 0, 0]), (&[58, 104, 101, 97, 112, 112, 97, 103, 101, 115], &[8, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 11, 106, 69, 50, 30, 250, 233, 42, 234, 21, 224, 116, 14, 199, 175, 231], &[0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 14, 160, 236, 172, 118, 69, 125, 15, 155, 57, 185, 129, 221, 16, 112, 18], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 19, 142, 113, 97, 36, 145, 25, 45, 104, 222, 171, 126, 111, 86, 63, 225], &[2, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 40, 220, 203, 85, 155, 149, 196, 1, 104, 161, 178, 105, 101, 129, 181, 167], &[0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[40, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[10, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[30, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[20, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[100, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[21, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[31, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[11, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[101, 0, 0, 0, 0, 0, 0, 0, 209, 7, 209, 7, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[41, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 80, 154, 155, 110, 250, 147, 245, 187, 131, 248, 88, 240, 186, 191, 211, 11], &[0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 85, 121, 41, 127, 77, 251, 150, 9, 231, 228, 194, 235, 171, 156, 228, 10], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 86, 239, 98, 39, 206, 203, 47, 7, 39, 76, 176, 87, 45, 143, 164, 194], &[101, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 106, 147, 17, 38, 51, 187, 51, 84, 230, 121, 82, 252, 221, 116, 12, 213], &[31, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[149, 17, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 245, 1]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[125, 21, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 221, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 1, 21, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 1, 21, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 1, 31, 0, 0, 0, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 106, 99, 127, 98, 174, 42, 241, 199, 227, 30, 237, 126, 150, 190, 4, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[8, 11, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 189, 47, 11, 41, 160, 8, 163, 96, 9, 172, 68, 204, 160, 201, 105], &[101, 4, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 180, 154, 39, 56, 238, 179, 8, 150, 170, 203, 139, 63, 180, 100, 113, 189], &[0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 194, 154, 3, 16, 225, 187, 69, 210, 12, 172, 231, 124, 203, 98, 201, 125], &[0, 225, 245, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 234, 7, 222, 43, 143, 1, 5, 22, 220, 163, 247, 239, 82, 247, 172, 90], &[4, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 247, 218, 208, 49, 115, 36, 174, 202, 232, 116, 75, 135, 252, 149, 242, 243], &[0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 1, 0, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 244, 1, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 87, 200, 117, 228, 207, 247, 65, 72, 228, 98, 143, 38, 75, 151, 76, 128], &[214, 61, 165, 212, 232, 0, 0, 0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 227, 253, 141, 247, 41, 112, 188, 130, 229, 38, 126, 160, 30, 221, 217, 73], &[1]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 109, 123, 24, 86, 30, 19, 159, 228, 49, 200, 33, 139, 70, 205, 244, 47, 40, 190, 110, 43, 138, 12, 26, 121, 5, 219, 103, 1, 110, 91, 142, 123], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 238, 43, 102, 225, 142, 104, 190, 12, 183, 86, 115, 25, 37, 223, 229, 65, 253, 167, 152, 54, 57, 147, 167, 137, 80, 161, 2, 235, 195, 174, 40, 244], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 118, 56, 0, 163, 106, 153, 253, 252, 124, 16, 246, 65, 95, 110, 230], &[2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 148, 80, 191, 164, 185, 106, 63, 167, 163, 200, 244, 13, 166, 191, 50, 225], &[0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 17, 218, 109, 31, 118, 29, 223, 155, 219, 76, 157, 110, 83, 3, 235, 212, 31, 97, 133, 141, 10, 86, 71, 161, 167, 191, 224, 137, 191, 146, 27, 233], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 123, 10, 161, 115, 94, 91, 165, 141, 50, 54, 49, 108, 103, 31, 228, 240, 14, 211, 102, 238, 114, 65, 124, 158, 208, 42, 83, 168, 1, 158, 133, 184], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 140, 3, 159, 247, 202, 161, 124, 206, 191, 202, 220, 68, 189, 159, 206, 106, 75, 102, 153, 196, 208, 61, 226, 227, 52, 154, 161, 220, 17, 25, 60, 215], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 225, 44, 34, 212, 241, 98, 217, 160, 18, 201, 49, 146, 51, 218, 93, 62, 146, 60, 197, 225, 2, 155, 143, 144, 228, 114, 73, 201, 171, 37, 107, 53], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 224, 205, 208, 98, 230, 234, 242, 66, 149, 173, 76, 207, 196, 29, 70, 9], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 255, 58, 225, 39, 112, 190, 162, 228, 141, 155, 222, 115, 133, 231, 162, 95], &[0, 0, 0, 0, 4, 0, 0, 0]), (&[240, 195, 101, 195, 207, 89, 214, 113, 235, 114, 218, 14, 122, 65, 19, 196, 159, 31, 5, 21, 244, 98, 205, 207, 132, 224, 241, 214, 4, 93, 252, 187], &[208, 7, 0, 0, 0, 0, 0, 0])]; +pub const _3: &[(&[u8], &[u8])] = &[(&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 2, 165, 193, 177, 154, 183, 160, 79, 83, 108, 81, 154, 202, 73, 131, 172], &[3, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 10, 152, 253, 190, 156, 230, 197, 88, 55, 87, 108, 96, 199, 175, 56, 80], &[19, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215], &[76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 138, 66, 243, 51, 35, 203, 92, 237, 59, 68, 221, 130, 95, 218, 159, 204], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 164, 71, 4, 181, 104, 210, 22, 103, 53, 106, 90, 5, 12, 17, 135, 70, 129, 228, 122, 25, 230, 178, 155, 10, 101, 185, 89, 23, 98, 206, 81, 67, 237, 48, 208, 38, 30, 93, 36, 163, 32, 23, 82, 80, 107, 32, 241, 92], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 29, 189, 125, 11, 86, 26, 65, 210, 60, 42, 70, 154, 212, 47, 189, 112, 213, 67, 139, 174, 130, 111, 111, 214, 7, 65, 49, 144, 195, 124, 54, 59], &[0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 100, 74, 81, 252, 33, 158, 145, 69, 184, 87, 123, 183, 118, 40, 118, 123, 28, 47, 115, 116, 142, 218, 139, 120, 139, 252, 102, 161, 181, 42, 32, 248], &[0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 165, 212, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 108, 221, 179, 103, 175, 189, 88, 59, 180, 143, 155, 189, 125, 91, 163, 177, 208, 115, 139, 72, 129, 177, 205, 221, 56, 22, 149, 38, 216, 21, 129, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 44, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 232, 139, 67, 253, 237, 99, 35, 239, 2, 255, 239, 251, 216, 196, 8, 70, 238, 9, 191, 49, 98, 113, 189, 34, 54, 150, 89, 201, 89, 221, 115, 58], &[0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 233, 103, 96, 210, 116, 101, 58, 57, 180, 41, 168, 126, 186, 174, 157, 58, 164, 253, 245, 139, 144, 150, 207, 11, 235, 199, 196, 229, 164, 194, 237, 141], &[0, 0, 0, 0, 0, 0, 0, 0, 144, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0]), (&[58, 99, 111, 100, 101], &[]), (&[58, 101, 120, 116, 114, 105, 110, 115, 105, 99, 95, 105, 110, 100, 101, 120], &[0, 0, 0, 0]), (&[58, 104, 101, 97, 112, 112, 97, 103, 101, 115], &[8, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 11, 106, 69, 50, 30, 250, 233, 42, 234, 21, 224, 116, 14, 199, 175, 231], &[1, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 14, 160, 236, 172, 118, 69, 125, 15, 155, 57, 185, 129, 221, 16, 112, 18], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 19, 142, 113, 97, 36, 145, 25, 45, 104, 222, 171, 126, 111, 86, 63, 225], &[2, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 40, 220, 203, 85, 155, 149, 196, 1, 104, 161, 178, 105, 101, 129, 181, 167], &[0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[40, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[10, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[30, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[20, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[100, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[21, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[31, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[11, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[101, 0, 0, 0, 0, 0, 0, 0, 209, 7, 209, 7, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[41, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 80, 154, 155, 110, 250, 147, 245, 187, 131, 248, 88, 240, 186, 191, 211, 11], &[3, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 85, 121, 41, 127, 77, 251, 150, 9, 231, 228, 194, 235, 171, 156, 228, 10], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 86, 239, 98, 39, 206, 203, 47, 7, 39, 76, 176, 87, 45, 143, 164, 194], &[101, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 106, 147, 17, 38, 51, 187, 51, 84, 230, 121, 82, 252, 221, 116, 12, 213], &[31, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[149, 17, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 245, 1]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[125, 21, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 221, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 1, 21, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 1, 21, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 1, 31, 0, 0, 0, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 106, 99, 127, 98, 174, 42, 241, 199, 227, 30, 237, 126, 150, 190, 4, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[8, 11, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 189, 47, 11, 41, 160, 8, 163, 96, 9, 172, 68, 204, 160, 201, 105], &[101, 4, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 166, 97, 104, 247, 231, 37, 155, 102, 112, 160, 111, 37, 101, 227, 229, 242], &[184, 11, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 180, 154, 39, 56, 238, 179, 8, 150, 170, 203, 139, 63, 180, 100, 113, 189], &[0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 194, 154, 3, 16, 225, 187, 69, 210, 12, 172, 231, 124, 203, 98, 201, 125], &[0, 225, 245, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 234, 7, 222, 43, 143, 1, 5, 22, 220, 163, 247, 239, 82, 247, 172, 90], &[8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 247, 218, 208, 49, 115, 36, 174, 202, 232, 116, 75, 135, 252, 149, 242, 243], &[0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 1, 0, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 244, 1, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 87, 200, 117, 228, 207, 247, 65, 72, 228, 98, 143, 38, 75, 151, 76, 128], &[214, 61, 165, 212, 232, 0, 0, 0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 227, 253, 141, 247, 41, 112, 188, 130, 229, 38, 126, 160, 30, 221, 217, 73], &[1]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 109, 123, 24, 86, 30, 19, 159, 228, 49, 200, 33, 139, 70, 205, 244, 47, 40, 190, 110, 43, 138, 12, 26, 121, 5, 219, 103, 1, 110, 91, 142, 123], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 238, 43, 102, 225, 142, 104, 190, 12, 183, 86, 115, 25, 37, 223, 229, 65, 253, 167, 152, 54, 57, 147, 167, 137, 80, 161, 2, 235, 195, 174, 40, 244], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 118, 56, 0, 163, 106, 153, 253, 252, 124, 16, 246, 65, 95, 110, 230], &[3, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 148, 80, 191, 164, 185, 106, 63, 167, 163, 200, 244, 13, 166, 191, 50, 225], &[1]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 17, 218, 109, 31, 118, 29, 223, 155, 219, 76, 157, 110, 83, 3, 235, 212, 31, 97, 133, 141, 10, 86, 71, 161, 167, 191, 224, 137, 191, 146, 27, 233], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 38, 160, 142, 77, 12, 81, 144, 240, 24, 113, 224, 86, 155, 98, 144, 184, 103, 96, 8, 93, 153, 241, 126, 180, 231, 230, 181, 143, 235, 141, 98, 73], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 123, 10, 161, 115, 94, 91, 165, 141, 50, 54, 49, 108, 103, 31, 228, 240, 14, 211, 102, 238, 114, 65, 124, 158, 208, 42, 83, 168, 1, 158, 133, 184], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 140, 3, 159, 247, 202, 161, 124, 206, 191, 202, 220, 68, 189, 159, 206, 106, 75, 102, 153, 196, 208, 61, 226, 227, 52, 154, 161, 220, 17, 25, 60, 215], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 225, 44, 34, 212, 241, 98, 217, 160, 18, 201, 49, 146, 51, 218, 93, 62, 146, 60, 197, 225, 2, 155, 143, 144, 228, 114, 73, 201, 171, 37, 107, 53], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 224, 205, 208, 98, 230, 234, 242, 66, 149, 173, 76, 207, 196, 29, 70, 9], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 255, 58, 225, 39, 112, 190, 162, 228, 141, 155, 222, 115, 133, 231, 162, 95], &[0, 0, 0, 0, 5, 0, 0, 0]), (&[240, 195, 101, 195, 207, 89, 214, 113, 235, 114, 218, 14, 122, 65, 19, 196, 159, 31, 5, 21, 244, 98, 205, 207, 132, 224, 241, 214, 4, 93, 252, 187], &[184, 11, 0, 0, 0, 0, 0, 0])]; +pub const _4: &[(&[u8], &[u8])] = &[(&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 2, 165, 193, 177, 154, 183, 160, 79, 83, 108, 81, 154, 202, 73, 131, 172], &[4, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 10, 152, 253, 190, 156, 230, 197, 88, 55, 87, 108, 96, 199, 175, 56, 80], &[20, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215], &[80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 138, 66, 243, 51, 35, 203, 92, 237, 59, 68, 221, 130, 95, 218, 159, 204], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 164, 71, 4, 181, 104, 210, 22, 103, 53, 106, 90, 5, 12, 17, 135, 70, 129, 228, 122, 25, 230, 178, 155, 10, 101, 185, 89, 23, 98, 206, 81, 67, 237, 48, 208, 38, 30, 93, 36, 163, 32, 23, 82, 80, 107, 32, 241, 92], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 29, 189, 125, 11, 86, 26, 65, 210, 60, 42, 70, 154, 212, 47, 189, 112, 213, 67, 139, 174, 130, 111, 111, 214, 7, 65, 49, 144, 195, 124, 54, 59], &[0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 100, 74, 81, 252, 33, 158, 145, 69, 184, 87, 123, 183, 118, 40, 118, 123, 28, 47, 115, 116, 142, 218, 139, 120, 139, 252, 102, 161, 181, 42, 32, 248], &[0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 165, 212, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 108, 221, 179, 103, 175, 189, 88, 59, 180, 143, 155, 189, 125, 91, 163, 177, 208, 115, 139, 72, 129, 177, 205, 221, 56, 22, 149, 38, 216, 21, 129, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 44, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 232, 139, 67, 253, 237, 99, 35, 239, 2, 255, 239, 251, 216, 196, 8, 70, 238, 9, 191, 49, 98, 113, 189, 34, 54, 150, 89, 201, 89, 221, 115, 58], &[0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 233, 103, 96, 210, 116, 101, 58, 57, 180, 41, 168, 126, 186, 174, 157, 58, 164, 253, 245, 139, 144, 150, 207, 11, 235, 199, 196, 229, 164, 194, 237, 141], &[0, 0, 0, 0, 0, 0, 0, 0, 144, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0]), (&[58, 99, 111, 100, 101], &[]), (&[58, 101, 120, 116, 114, 105, 110, 115, 105, 99, 95, 105, 110, 100, 101, 120], &[0, 0, 0, 0]), (&[58, 104, 101, 97, 112, 112, 97, 103, 101, 115], &[8, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 11, 106, 69, 50, 30, 250, 233, 42, 234, 21, 224, 116, 14, 199, 175, 231], &[1, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 14, 160, 236, 172, 118, 69, 125, 15, 155, 57, 185, 129, 221, 16, 112, 18], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 19, 142, 113, 97, 36, 145, 25, 45, 104, 222, 171, 126, 111, 86, 63, 225], &[2, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 40, 220, 203, 85, 155, 149, 196, 1, 104, 161, 178, 105, 101, 129, 181, 167], &[0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[40, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[10, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[30, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[20, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[100, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[21, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[31, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[11, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[101, 0, 0, 0, 0, 0, 0, 0, 209, 7, 209, 7, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[41, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 80, 154, 155, 110, 250, 147, 245, 187, 131, 248, 88, 240, 186, 191, 211, 11], &[3, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 85, 121, 41, 127, 77, 251, 150, 9, 231, 228, 194, 235, 171, 156, 228, 10], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 86, 239, 98, 39, 206, 203, 47, 7, 39, 76, 176, 87, 45, 143, 164, 194], &[101, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 106, 147, 17, 38, 51, 187, 51, 84, 230, 121, 82, 252, 221, 116, 12, 213], &[31, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[149, 17, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 245, 1]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[125, 21, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 221, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 1, 21, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 1, 21, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 1, 31, 0, 0, 0, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 106, 99, 127, 98, 174, 42, 241, 199, 227, 30, 237, 126, 150, 190, 4, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[8, 11, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 189, 47, 11, 41, 160, 8, 163, 96, 9, 172, 68, 204, 160, 201, 105], &[101, 4, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 166, 97, 104, 247, 231, 37, 155, 102, 112, 160, 111, 37, 101, 227, 229, 242], &[184, 11, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 180, 154, 39, 56, 238, 179, 8, 150, 170, 203, 139, 63, 180, 100, 113, 189], &[0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 194, 154, 3, 16, 225, 187, 69, 210, 12, 172, 231, 124, 203, 98, 201, 125], &[0, 225, 245, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 234, 7, 222, 43, 143, 1, 5, 22, 220, 163, 247, 239, 82, 247, 172, 90], &[8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 247, 218, 208, 49, 115, 36, 174, 202, 232, 116, 75, 135, 252, 149, 242, 243], &[0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 1, 0, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 244, 1, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 87, 200, 117, 228, 207, 247, 65, 72, 228, 98, 143, 38, 75, 151, 76, 128], &[214, 61, 165, 212, 232, 0, 0, 0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 227, 253, 141, 247, 41, 112, 188, 130, 229, 38, 126, 160, 30, 221, 217, 73], &[1]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 109, 123, 24, 86, 30, 19, 159, 228, 49, 200, 33, 139, 70, 205, 244, 47, 40, 190, 110, 43, 138, 12, 26, 121, 5, 219, 103, 1, 110, 91, 142, 123], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 238, 43, 102, 225, 142, 104, 190, 12, 183, 86, 115, 25, 37, 223, 229, 65, 253, 167, 152, 54, 57, 147, 167, 137, 80, 161, 2, 235, 195, 174, 40, 244], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 118, 56, 0, 163, 106, 153, 253, 252, 124, 16, 246, 65, 95, 110, 230], &[4, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 148, 80, 191, 164, 185, 106, 63, 167, 163, 200, 244, 13, 166, 191, 50, 225], &[0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 17, 218, 109, 31, 118, 29, 223, 155, 219, 76, 157, 110, 83, 3, 235, 212, 31, 97, 133, 141, 10, 86, 71, 161, 167, 191, 224, 137, 191, 146, 27, 233], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 38, 160, 142, 77, 12, 81, 144, 240, 24, 113, 224, 86, 155, 98, 144, 184, 103, 96, 8, 93, 153, 241, 126, 180, 231, 230, 181, 143, 235, 141, 98, 73], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 123, 10, 161, 115, 94, 91, 165, 141, 50, 54, 49, 108, 103, 31, 228, 240, 14, 211, 102, 238, 114, 65, 124, 158, 208, 42, 83, 168, 1, 158, 133, 184], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 140, 3, 159, 247, 202, 161, 124, 206, 191, 202, 220, 68, 189, 159, 206, 106, 75, 102, 153, 196, 208, 61, 226, 227, 52, 154, 161, 220, 17, 25, 60, 215], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 140, 53, 210, 47, 69, 157, 119, 202, 76, 11, 11, 80, 53, 134, 151, 102, 214, 13, 24, 43, 151, 22, 171, 62, 136, 121, 224, 102, 71, 136, 153, 168], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 225, 44, 34, 212, 241, 98, 217, 160, 18, 201, 49, 146, 51, 218, 93, 62, 146, 60, 197, 225, 2, 155, 143, 144, 228, 114, 73, 201, 171, 37, 107, 53], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 224, 205, 208, 98, 230, 234, 242, 66, 149, 173, 76, 207, 196, 29, 70, 9], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 255, 58, 225, 39, 112, 190, 162, 228, 141, 155, 222, 115, 133, 231, 162, 95], &[0, 0, 0, 0, 6, 0, 0, 0]), (&[240, 195, 101, 195, 207, 89, 214, 113, 235, 114, 218, 14, 122, 65, 19, 196, 159, 31, 5, 21, 244, 98, 205, 207, 132, 224, 241, 214, 4, 93, 252, 187], &[160, 15, 0, 0, 0, 0, 0, 0])]; +pub const _5: &[(&[u8], &[u8])] = &[(&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 2, 165, 193, 177, 154, 183, 160, 79, 83, 108, 81, 154, 202, 73, 131, 172], &[5, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 10, 152, 253, 190, 156, 230, 197, 88, 55, 87, 108, 96, 199, 175, 56, 80], &[21, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215], &[84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 138, 66, 243, 51, 35, 203, 92, 237, 59, 68, 221, 130, 95, 218, 159, 204], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 164, 71, 4, 181, 104, 210, 22, 103, 53, 106, 90, 5, 12, 17, 135, 70, 129, 228, 122, 25, 230, 178, 155, 10, 101, 185, 89, 23, 98, 206, 81, 67, 237, 48, 208, 38, 30, 93, 36, 163, 32, 23, 82, 80, 107, 32, 241, 92], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 29, 189, 125, 11, 86, 26, 65, 210, 60, 42, 70, 154, 212, 47, 189, 112, 213, 67, 139, 174, 130, 111, 111, 214, 7, 65, 49, 144, 195, 124, 54, 59], &[0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 100, 74, 81, 252, 33, 158, 145, 69, 184, 87, 123, 183, 118, 40, 118, 123, 28, 47, 115, 116, 142, 218, 139, 120, 139, 252, 102, 161, 181, 42, 32, 248], &[0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 165, 212, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 108, 221, 179, 103, 175, 189, 88, 59, 180, 143, 155, 189, 125, 91, 163, 177, 208, 115, 139, 72, 129, 177, 205, 221, 56, 22, 149, 38, 216, 21, 129, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 44, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 232, 139, 67, 253, 237, 99, 35, 239, 2, 255, 239, 251, 216, 196, 8, 70, 238, 9, 191, 49, 98, 113, 189, 34, 54, 150, 89, 201, 89, 221, 115, 58], &[0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 233, 103, 96, 210, 116, 101, 58, 57, 180, 41, 168, 126, 186, 174, 157, 58, 164, 253, 245, 139, 144, 150, 207, 11, 235, 199, 196, 229, 164, 194, 237, 141], &[0, 0, 0, 0, 0, 0, 0, 0, 144, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0]), (&[58, 99, 111, 100, 101], &[]), (&[58, 101, 120, 116, 114, 105, 110, 115, 105, 99, 95, 105, 110, 100, 101, 120], &[0, 0, 0, 0]), (&[58, 104, 101, 97, 112, 112, 97, 103, 101, 115], &[8, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 11, 106, 69, 50, 30, 250, 233, 42, 234, 21, 224, 116, 14, 199, 175, 231], &[1, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 14, 160, 236, 172, 118, 69, 125, 15, 155, 57, 185, 129, 221, 16, 112, 18], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 19, 142, 113, 97, 36, 145, 25, 45, 104, 222, 171, 126, 111, 86, 63, 225], &[2, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 40, 220, 203, 85, 155, 149, 196, 1, 104, 161, 178, 105, 101, 129, 181, 167], &[0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[40, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[10, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[30, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[20, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[100, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[21, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[31, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[11, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[101, 0, 0, 0, 0, 0, 0, 0, 209, 7, 209, 7, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[41, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 80, 154, 155, 110, 250, 147, 245, 187, 131, 248, 88, 240, 186, 191, 211, 11], &[3, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 85, 121, 41, 127, 77, 251, 150, 9, 231, 228, 194, 235, 171, 156, 228, 10], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 86, 239, 98, 39, 206, 203, 47, 7, 39, 76, 176, 87, 45, 143, 164, 194], &[101, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 106, 147, 17, 38, 51, 187, 51, 84, 230, 121, 82, 252, 221, 116, 12, 213], &[31, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[149, 17, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 245, 1]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[125, 21, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 221, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 1, 21, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 1, 21, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 1, 31, 0, 0, 0, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 106, 99, 127, 98, 174, 42, 241, 199, 227, 30, 237, 126, 150, 190, 4, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[8, 11, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 189, 47, 11, 41, 160, 8, 163, 96, 9, 172, 68, 204, 160, 201, 105], &[101, 4, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 166, 97, 104, 247, 231, 37, 155, 102, 112, 160, 111, 37, 101, 227, 229, 242], &[184, 11, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 180, 154, 39, 56, 238, 179, 8, 150, 170, 203, 139, 63, 180, 100, 113, 189], &[0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 194, 154, 3, 16, 225, 187, 69, 210, 12, 172, 231, 124, 203, 98, 201, 125], &[0, 225, 245, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 234, 7, 222, 43, 143, 1, 5, 22, 220, 163, 247, 239, 82, 247, 172, 90], &[8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 247, 218, 208, 49, 115, 36, 174, 202, 232, 116, 75, 135, 252, 149, 242, 243], &[0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 1, 0, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 244, 1, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 87, 200, 117, 228, 207, 247, 65, 72, 228, 98, 143, 38, 75, 151, 76, 128], &[214, 61, 165, 212, 232, 0, 0, 0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 227, 253, 141, 247, 41, 112, 188, 130, 229, 38, 126, 160, 30, 221, 217, 73], &[1]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 109, 123, 24, 86, 30, 19, 159, 228, 49, 200, 33, 139, 70, 205, 244, 47, 40, 190, 110, 43, 138, 12, 26, 121, 5, 219, 103, 1, 110, 91, 142, 123], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 238, 43, 102, 225, 142, 104, 190, 12, 183, 86, 115, 25, 37, 223, 229, 65, 253, 167, 152, 54, 57, 147, 167, 137, 80, 161, 2, 235, 195, 174, 40, 244], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 118, 56, 0, 163, 106, 153, 253, 252, 124, 16, 246, 65, 95, 110, 230], &[5, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 148, 80, 191, 164, 185, 106, 63, 167, 163, 200, 244, 13, 166, 191, 50, 225], &[0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 17, 218, 109, 31, 118, 29, 223, 155, 219, 76, 157, 110, 83, 3, 235, 212, 31, 97, 133, 141, 10, 86, 71, 161, 167, 191, 224, 137, 191, 146, 27, 233], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 38, 160, 142, 77, 12, 81, 144, 240, 24, 113, 224, 86, 155, 98, 144, 184, 103, 96, 8, 93, 153, 241, 126, 180, 231, 230, 181, 143, 235, 141, 98, 73], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 123, 10, 161, 115, 94, 91, 165, 141, 50, 54, 49, 108, 103, 31, 228, 240, 14, 211, 102, 238, 114, 65, 124, 158, 208, 42, 83, 168, 1, 158, 133, 184], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 140, 3, 159, 247, 202, 161, 124, 206, 191, 202, 220, 68, 189, 159, 206, 106, 75, 102, 153, 196, 208, 61, 226, 227, 52, 154, 161, 220, 17, 25, 60, 215], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 140, 53, 210, 47, 69, 157, 119, 202, 76, 11, 11, 80, 53, 134, 151, 102, 214, 13, 24, 43, 151, 22, 171, 62, 136, 121, 224, 102, 71, 136, 153, 168], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 225, 44, 34, 212, 241, 98, 217, 160, 18, 201, 49, 146, 51, 218, 93, 62, 146, 60, 197, 225, 2, 155, 143, 144, 228, 114, 73, 201, 171, 37, 107, 53], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 244, 170, 194, 251, 227, 63, 3, 85, 75, 254, 181, 89, 234, 38, 144, 237, 133, 33, 202, 164, 190, 150, 30, 97, 201, 26, 201, 161, 83, 13, 206, 122], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 224, 205, 208, 98, 230, 234, 242, 66, 149, 173, 76, 207, 196, 29, 70, 9], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 255, 58, 225, 39, 112, 190, 162, 228, 141, 155, 222, 115, 133, 231, 162, 95], &[0, 0, 0, 0, 7, 0, 0, 0]), (&[240, 195, 101, 195, 207, 89, 214, 113, 235, 114, 218, 14, 122, 65, 19, 196, 159, 31, 5, 21, 244, 98, 205, 207, 132, 224, 241, 214, 4, 93, 252, 187], &[136, 19, 0, 0, 0, 0, 0, 0])]; +pub const _6: &[(&[u8], &[u8])] = &[(&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 2, 165, 193, 177, 154, 183, 160, 79, 83, 108, 81, 154, 202, 73, 131, 172], &[6, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 10, 152, 253, 190, 156, 230, 197, 88, 55, 87, 108, 96, 199, 175, 56, 80], &[23, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215], &[92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 138, 66, 243, 51, 35, 203, 92, 237, 59, 68, 221, 130, 95, 218, 159, 204], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 164, 71, 4, 181, 104, 210, 22, 103, 53, 106, 90, 5, 12, 17, 135, 70, 129, 228, 122, 25, 230, 178, 155, 10, 101, 185, 89, 23, 98, 206, 81, 67, 237, 48, 208, 38, 30, 93, 36, 163, 32, 23, 82, 80, 107, 32, 241, 92], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 29, 189, 125, 11, 86, 26, 65, 210, 60, 42, 70, 154, 212, 47, 189, 112, 213, 67, 139, 174, 130, 111, 111, 214, 7, 65, 49, 144, 195, 124, 54, 59], &[0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 100, 74, 81, 252, 33, 158, 145, 69, 184, 87, 123, 183, 118, 40, 118, 123, 28, 47, 115, 116, 142, 218, 139, 120, 139, 252, 102, 161, 181, 42, 32, 248], &[0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 165, 212, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 108, 221, 179, 103, 175, 189, 88, 59, 180, 143, 155, 189, 125, 91, 163, 177, 208, 115, 139, 72, 129, 177, 205, 221, 56, 22, 149, 38, 216, 21, 129, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 44, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 232, 139, 67, 253, 237, 99, 35, 239, 2, 255, 239, 251, 216, 196, 8, 70, 238, 9, 191, 49, 98, 113, 189, 34, 54, 150, 89, 201, 89, 221, 115, 58], &[0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 233, 103, 96, 210, 116, 101, 58, 57, 180, 41, 168, 126, 186, 174, 157, 58, 164, 253, 245, 139, 144, 150, 207, 11, 235, 199, 196, 229, 164, 194, 237, 141], &[0, 0, 0, 0, 0, 0, 0, 0, 144, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0]), (&[58, 99, 111, 100, 101], &[]), (&[58, 101, 120, 116, 114, 105, 110, 115, 105, 99, 95, 105, 110, 100, 101, 120], &[0, 0, 0, 0]), (&[58, 104, 101, 97, 112, 112, 97, 103, 101, 115], &[8, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 11, 106, 69, 50, 30, 250, 233, 42, 234, 21, 224, 116, 14, 199, 175, 231], &[2, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 14, 160, 236, 172, 118, 69, 125, 15, 155, 57, 185, 129, 221, 16, 112, 18], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 19, 142, 113, 97, 36, 145, 25, 45, 104, 222, 171, 126, 111, 86, 63, 225], &[2, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 40, 220, 203, 85, 155, 149, 196, 1, 104, 161, 178, 105, 101, 129, 181, 167], &[0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[40, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[10, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[30, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[20, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[100, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[21, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[31, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[11, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[101, 0, 0, 0, 0, 0, 0, 0, 209, 7, 209, 7, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[41, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 80, 154, 155, 110, 250, 147, 245, 187, 131, 248, 88, 240, 186, 191, 211, 11], &[6, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 85, 121, 41, 127, 77, 251, 150, 9, 231, 228, 194, 235, 171, 156, 228, 10], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 86, 239, 98, 39, 206, 203, 47, 7, 39, 76, 176, 87, 45, 143, 164, 194], &[101, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 106, 147, 17, 38, 51, 187, 51, 84, 230, 121, 82, 252, 221, 116, 12, 213], &[31, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[149, 17, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 245, 1]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[125, 21, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 221, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 1, 21, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 1, 21, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 1, 31, 0, 0, 0, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 106, 99, 127, 98, 174, 42, 241, 199, 227, 30, 237, 126, 150, 190, 4, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[8, 11, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 189, 47, 11, 41, 160, 8, 163, 96, 9, 172, 68, 204, 160, 201, 105], &[101, 4, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 166, 97, 104, 247, 231, 37, 155, 102, 112, 160, 111, 37, 101, 227, 229, 242], &[112, 23, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 180, 154, 39, 56, 238, 179, 8, 150, 170, 203, 139, 63, 180, 100, 113, 189], &[0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 194, 154, 3, 16, 225, 187, 69, 210, 12, 172, 231, 124, 203, 98, 201, 125], &[0, 225, 245, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 234, 7, 222, 43, 143, 1, 5, 22, 220, 163, 247, 239, 82, 247, 172, 90], &[12, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 247, 218, 208, 49, 115, 36, 174, 202, 232, 116, 75, 135, 252, 149, 242, 243], &[0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 1, 0, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 244, 1, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 87, 200, 117, 228, 207, 247, 65, 72, 228, 98, 143, 38, 75, 151, 76, 128], &[214, 61, 165, 212, 232, 0, 0, 0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 227, 253, 141, 247, 41, 112, 188, 130, 229, 38, 126, 160, 30, 221, 217, 73], &[1]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 109, 123, 24, 86, 30, 19, 159, 228, 49, 200, 33, 139, 70, 205, 244, 47, 40, 190, 110, 43, 138, 12, 26, 121, 5, 219, 103, 1, 110, 91, 142, 123], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 238, 43, 102, 225, 142, 104, 190, 12, 183, 86, 115, 25, 37, 223, 229, 65, 253, 167, 152, 54, 57, 147, 167, 137, 80, 161, 2, 235, 195, 174, 40, 244], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 118, 56, 0, 163, 106, 153, 253, 252, 124, 16, 246, 65, 95, 110, 230], &[6, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 148, 80, 191, 164, 185, 106, 63, 167, 163, 200, 244, 13, 166, 191, 50, 225], &[1]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 17, 218, 109, 31, 118, 29, 223, 155, 219, 76, 157, 110, 83, 3, 235, 212, 31, 97, 133, 141, 10, 86, 71, 161, 167, 191, 224, 137, 191, 146, 27, 233], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 38, 160, 142, 77, 12, 81, 144, 240, 24, 113, 224, 86, 155, 98, 144, 184, 103, 96, 8, 93, 153, 241, 126, 180, 231, 230, 181, 143, 235, 141, 98, 73], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 91, 143, 41, 219, 118, 207, 78, 103, 110, 79, 201, 177, 112, 64, 49, 45, 235, 237, 175, 205, 86, 55, 251, 60, 123, 173, 210, 205, 220, 230, 164, 69], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 123, 10, 161, 115, 94, 91, 165, 141, 50, 54, 49, 108, 103, 31, 228, 240, 14, 211, 102, 238, 114, 65, 124, 158, 208, 42, 83, 168, 1, 158, 133, 184], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 140, 3, 159, 247, 202, 161, 124, 206, 191, 202, 220, 68, 189, 159, 206, 106, 75, 102, 153, 196, 208, 61, 226, 227, 52, 154, 161, 220, 17, 25, 60, 215], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 140, 53, 210, 47, 69, 157, 119, 202, 76, 11, 11, 80, 53, 134, 151, 102, 214, 13, 24, 43, 151, 22, 171, 62, 136, 121, 224, 102, 71, 136, 153, 168], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 225, 44, 34, 212, 241, 98, 217, 160, 18, 201, 49, 146, 51, 218, 93, 62, 146, 60, 197, 225, 2, 155, 143, 144, 228, 114, 73, 201, 171, 37, 107, 53], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 244, 170, 194, 251, 227, 63, 3, 85, 75, 254, 181, 89, 234, 38, 144, 237, 133, 33, 202, 164, 190, 150, 30, 97, 201, 26, 201, 161, 83, 13, 206, 122], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 224, 205, 208, 98, 230, 234, 242, 66, 149, 173, 76, 207, 196, 29, 70, 9], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 255, 58, 225, 39, 112, 190, 162, 228, 141, 155, 222, 115, 133, 231, 162, 95], &[0, 0, 0, 0, 8, 0, 0, 0]), (&[240, 195, 101, 195, 207, 89, 214, 113, 235, 114, 218, 14, 122, 65, 19, 196, 159, 31, 5, 21, 244, 98, 205, 207, 132, 224, 241, 214, 4, 93, 252, 187], &[112, 23, 0, 0, 0, 0, 0, 0])]; +pub const _7: &[(&[u8], &[u8])] = &[(&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 2, 165, 193, 177, 154, 183, 160, 79, 83, 108, 81, 154, 202, 73, 131, 172], &[7, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 10, 152, 253, 190, 156, 230, 197, 88, 55, 87, 108, 96, 199, 175, 56, 80], &[24, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215], &[96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 138, 66, 243, 51, 35, 203, 92, 237, 59, 68, 221, 130, 95, 218, 159, 204], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 164, 71, 4, 181, 104, 210, 22, 103, 53, 106, 90, 5, 12, 17, 135, 70, 129, 228, 122, 25, 230, 178, 155, 10, 101, 185, 89, 23, 98, 206, 81, 67, 237, 48, 208, 38, 30, 93, 36, 163, 32, 23, 82, 80, 107, 32, 241, 92], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 29, 189, 125, 11, 86, 26, 65, 210, 60, 42, 70, 154, 212, 47, 189, 112, 213, 67, 139, 174, 130, 111, 111, 214, 7, 65, 49, 144, 195, 124, 54, 59], &[0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 100, 74, 81, 252, 33, 158, 145, 69, 184, 87, 123, 183, 118, 40, 118, 123, 28, 47, 115, 116, 142, 218, 139, 120, 139, 252, 102, 161, 181, 42, 32, 248], &[0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 165, 212, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 108, 221, 179, 103, 175, 189, 88, 59, 180, 143, 155, 189, 125, 91, 163, 177, 208, 115, 139, 72, 129, 177, 205, 221, 56, 22, 149, 38, 216, 21, 129, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 44, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 232, 139, 67, 253, 237, 99, 35, 239, 2, 255, 239, 251, 216, 196, 8, 70, 238, 9, 191, 49, 98, 113, 189, 34, 54, 150, 89, 201, 89, 221, 115, 58], &[0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 233, 103, 96, 210, 116, 101, 58, 57, 180, 41, 168, 126, 186, 174, 157, 58, 164, 253, 245, 139, 144, 150, 207, 11, 235, 199, 196, 229, 164, 194, 237, 141], &[0, 0, 0, 0, 0, 0, 0, 0, 144, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0]), (&[58, 99, 111, 100, 101], &[]), (&[58, 101, 120, 116, 114, 105, 110, 115, 105, 99, 95, 105, 110, 100, 101, 120], &[0, 0, 0, 0]), (&[58, 104, 101, 97, 112, 112, 97, 103, 101, 115], &[8, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 11, 106, 69, 50, 30, 250, 233, 42, 234, 21, 224, 116, 14, 199, 175, 231], &[2, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 14, 160, 236, 172, 118, 69, 125, 15, 155, 57, 185, 129, 221, 16, 112, 18], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 19, 142, 113, 97, 36, 145, 25, 45, 104, 222, 171, 126, 111, 86, 63, 225], &[2, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 40, 220, 203, 85, 155, 149, 196, 1, 104, 161, 178, 105, 101, 129, 181, 167], &[0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[40, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[10, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[30, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[20, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[100, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[21, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[31, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[11, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[101, 0, 0, 0, 0, 0, 0, 0, 209, 7, 209, 7, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[41, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 80, 154, 155, 110, 250, 147, 245, 187, 131, 248, 88, 240, 186, 191, 211, 11], &[6, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 85, 121, 41, 127, 77, 251, 150, 9, 231, 228, 194, 235, 171, 156, 228, 10], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 86, 239, 98, 39, 206, 203, 47, 7, 39, 76, 176, 87, 45, 143, 164, 194], &[101, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 106, 147, 17, 38, 51, 187, 51, 84, 230, 121, 82, 252, 221, 116, 12, 213], &[31, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[149, 17, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 245, 1]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[125, 21, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 221, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 1, 21, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 1, 21, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 1, 31, 0, 0, 0, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 106, 99, 127, 98, 174, 42, 241, 199, 227, 30, 237, 126, 150, 190, 4, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[8, 11, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 189, 47, 11, 41, 160, 8, 163, 96, 9, 172, 68, 204, 160, 201, 105], &[101, 4, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 166, 97, 104, 247, 231, 37, 155, 102, 112, 160, 111, 37, 101, 227, 229, 242], &[112, 23, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 180, 154, 39, 56, 238, 179, 8, 150, 170, 203, 139, 63, 180, 100, 113, 189], &[0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 194, 154, 3, 16, 225, 187, 69, 210, 12, 172, 231, 124, 203, 98, 201, 125], &[0, 225, 245, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 234, 7, 222, 43, 143, 1, 5, 22, 220, 163, 247, 239, 82, 247, 172, 90], &[12, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 247, 218, 208, 49, 115, 36, 174, 202, 232, 116, 75, 135, 252, 149, 242, 243], &[0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 1, 0, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 244, 1, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 87, 200, 117, 228, 207, 247, 65, 72, 228, 98, 143, 38, 75, 151, 76, 128], &[214, 61, 165, 212, 232, 0, 0, 0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 227, 253, 141, 247, 41, 112, 188, 130, 229, 38, 126, 160, 30, 221, 217, 73], &[1]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 109, 123, 24, 86, 30, 19, 159, 228, 49, 200, 33, 139, 70, 205, 244, 47, 40, 190, 110, 43, 138, 12, 26, 121, 5, 219, 103, 1, 110, 91, 142, 123], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 238, 43, 102, 225, 142, 104, 190, 12, 183, 86, 115, 25, 37, 223, 229, 65, 253, 167, 152, 54, 57, 147, 167, 137, 80, 161, 2, 235, 195, 174, 40, 244], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 118, 56, 0, 163, 106, 153, 253, 252, 124, 16, 246, 65, 95, 110, 230], &[7, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 148, 80, 191, 164, 185, 106, 63, 167, 163, 200, 244, 13, 166, 191, 50, 225], &[0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 17, 218, 109, 31, 118, 29, 223, 155, 219, 76, 157, 110, 83, 3, 235, 212, 31, 97, 133, 141, 10, 86, 71, 161, 167, 191, 224, 137, 191, 146, 27, 233], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 38, 160, 142, 77, 12, 81, 144, 240, 24, 113, 224, 86, 155, 98, 144, 184, 103, 96, 8, 93, 153, 241, 126, 180, 231, 230, 181, 143, 235, 141, 98, 73], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 91, 143, 41, 219, 118, 207, 78, 103, 110, 79, 201, 177, 112, 64, 49, 45, 235, 237, 175, 205, 86, 55, 251, 60, 123, 173, 210, 205, 220, 230, 164, 69], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 123, 10, 161, 115, 94, 91, 165, 141, 50, 54, 49, 108, 103, 31, 228, 240, 14, 211, 102, 238, 114, 65, 124, 158, 208, 42, 83, 168, 1, 158, 133, 184], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 140, 3, 159, 247, 202, 161, 124, 206, 191, 202, 220, 68, 189, 159, 206, 106, 75, 102, 153, 196, 208, 61, 226, 227, 52, 154, 161, 220, 17, 25, 60, 215], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 140, 53, 210, 47, 69, 157, 119, 202, 76, 11, 11, 80, 53, 134, 151, 102, 214, 13, 24, 43, 151, 22, 171, 62, 136, 121, 224, 102, 71, 136, 153, 168], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 157, 255, 135, 106, 75, 148, 45, 10, 151, 17, 209, 130, 33, 137, 143, 17, 202, 57, 117, 21, 137, 235, 244, 212, 157, 116, 159, 107, 62, 73, 50, 146], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 225, 44, 34, 212, 241, 98, 217, 160, 18, 201, 49, 146, 51, 218, 93, 62, 146, 60, 197, 225, 2, 155, 143, 144, 228, 114, 73, 201, 171, 37, 107, 53], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 244, 170, 194, 251, 227, 63, 3, 85, 75, 254, 181, 89, 234, 38, 144, 237, 133, 33, 202, 164, 190, 150, 30, 97, 201, 26, 201, 161, 83, 13, 206, 122], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 224, 205, 208, 98, 230, 234, 242, 66, 149, 173, 76, 207, 196, 29, 70, 9], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 255, 58, 225, 39, 112, 190, 162, 228, 141, 155, 222, 115, 133, 231, 162, 95], &[0, 0, 0, 0, 9, 0, 0, 0]), (&[240, 195, 101, 195, 207, 89, 214, 113, 235, 114, 218, 14, 122, 65, 19, 196, 159, 31, 5, 21, 244, 98, 205, 207, 132, 224, 241, 214, 4, 93, 252, 187], &[88, 27, 0, 0, 0, 0, 0, 0])]; +pub const _8: &[(&[u8], &[u8])] = &[(&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 2, 165, 193, 177, 154, 183, 160, 79, 83, 108, 81, 154, 202, 73, 131, 172], &[8, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 10, 152, 253, 190, 156, 230, 197, 88, 55, 87, 108, 96, 199, 175, 56, 80], &[25, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215], &[100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 138, 66, 243, 51, 35, 203, 92, 237, 59, 68, 221, 130, 95, 218, 159, 204], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 164, 71, 4, 181, 104, 210, 22, 103, 53, 106, 90, 5, 12, 17, 135, 70, 129, 228, 122, 25, 230, 178, 155, 10, 101, 185, 89, 23, 98, 206, 81, 67, 237, 48, 208, 38, 30, 93, 36, 163, 32, 23, 82, 80, 107, 32, 241, 92], &[69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 29, 189, 125, 11, 86, 26, 65, 210, 60, 42, 70, 154, 212, 47, 189, 112, 213, 67, 139, 174, 130, 111, 111, 214, 7, 65, 49, 144, 195, 124, 54, 59], &[0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 100, 74, 81, 252, 33, 158, 145, 69, 184, 87, 123, 183, 118, 40, 118, 123, 28, 47, 115, 116, 142, 218, 139, 120, 139, 252, 102, 161, 181, 42, 32, 248], &[0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 165, 212, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 108, 221, 179, 103, 175, 189, 88, 59, 180, 143, 155, 189, 125, 91, 163, 177, 208, 115, 139, 72, 129, 177, 205, 221, 56, 22, 149, 38, 216, 21, 129, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 44, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 232, 139, 67, 253, 237, 99, 35, 239, 2, 255, 239, 251, 216, 196, 8, 70, 238, 9, 191, 49, 98, 113, 189, 34, 54, 150, 89, 201, 89, 221, 115, 58], &[0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 233, 103, 96, 210, 116, 101, 58, 57, 180, 41, 168, 126, 186, 174, 157, 58, 164, 253, 245, 139, 144, 150, 207, 11, 235, 199, 196, 229, 164, 194, 237, 141], &[0, 0, 0, 0, 0, 0, 0, 0, 144, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0, 0, 0, 0, 0, 0, 0, 0, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0]), (&[58, 99, 111, 100, 101], &[]), (&[58, 101, 120, 116, 114, 105, 110, 115, 105, 99, 95, 105, 110, 100, 101, 120], &[0, 0, 0, 0]), (&[58, 104, 101, 97, 112, 112, 97, 103, 101, 115], &[8, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 11, 106, 69, 50, 30, 250, 233, 42, 234, 21, 224, 116, 14, 199, 175, 231], &[2, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 14, 160, 236, 172, 118, 69, 125, 15, 155, 57, 185, 129, 221, 16, 112, 18], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 19, 142, 113, 97, 36, 145, 25, 45, 104, 222, 171, 126, 111, 86, 63, 225], &[2, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 40, 220, 203, 85, 155, 149, 196, 1, 104, 161, 178, 105, 101, 129, 181, 167], &[0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[40, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[10, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[30, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[20, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 62, 209, 75, 69, 237, 32, 208, 84, 240, 94, 55, 226, 84, 44, 254, 112, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[100, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 94, 90, 15, 75, 176, 234, 179, 121, 134, 37, 171, 24, 100, 84, 93, 19, 212, 232, 208, 104, 153, 217, 219, 77, 97, 219, 157, 238, 147, 186, 2, 221], &[21, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 165, 186, 85, 195, 163, 151, 212, 60, 23, 89, 63, 40, 154, 164, 151, 157, 10, 229, 146, 68, 179, 47, 3, 236, 19, 65, 97, 129, 175, 134, 209, 11], &[31, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 189, 225, 131, 90, 186, 237, 15, 242, 121, 87, 0, 55, 252, 73, 213, 189, 23, 110, 180, 130, 163, 178, 129, 109, 244, 252, 194, 204, 27, 200, 106, 202], &[11, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 213, 92, 123, 109, 126, 139, 228, 10, 88, 51, 198, 4, 8, 188, 78, 184, 171, 234, 78, 93, 168, 211, 37, 233, 8, 135, 156, 195, 59, 151, 205, 153], &[101, 0, 0, 0, 0, 0, 0, 0, 209, 7, 209, 7, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 66, 42, 219, 87, 159, 29, 191, 79, 56, 134, 197, 207, 163, 187, 140, 196, 216, 247, 229, 16, 146, 46, 205, 71, 180, 10, 28, 88, 41, 56, 34, 6, 69, 103, 185, 191, 60, 126, 225, 114, 12, 144, 76, 94, 12, 87, 247, 55], &[41, 0, 0, 0, 0, 0, 0, 0, 161, 15, 161, 15, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 80, 154, 155, 110, 250, 147, 245, 187, 131, 248, 88, 240, 186, 191, 211, 11], &[6, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 85, 121, 41, 127, 77, 251, 150, 9, 231, 228, 194, 235, 171, 156, 228, 10], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 86, 239, 98, 39, 206, 203, 47, 7, 39, 76, 176, 87, 45, 143, 164, 194], &[101, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 106, 147, 17, 38, 51, 187, 51, 84, 230, 121, 82, 252, 221, 116, 12, 213], &[31, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[149, 17, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 245, 1]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 131, 229, 133, 187, 197, 253, 206, 197, 114, 25, 192, 220, 129, 239, 95, 244, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[125, 21, 161, 15, 4, 101, 0, 0, 0, 0, 0, 0, 0, 221, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0, 1, 21, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0, 0, 1, 21, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0, 1, 31, 0, 0, 0, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 146, 32, 225, 114, 190, 211, 22, 96, 95, 115, 241, 255, 123, 74, 222, 152, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 106, 99, 127, 98, 174, 42, 241, 199, 227, 30, 237, 126, 150, 190, 4, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[8, 11, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 156, 189, 47, 11, 41, 160, 8, 163, 96, 9, 172, 68, 204, 160, 201, 105], &[101, 4, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 166, 97, 104, 247, 231, 37, 155, 102, 112, 160, 111, 37, 101, 227, 229, 242], &[112, 23, 0, 0, 0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 180, 154, 39, 56, 238, 179, 8, 150, 170, 203, 139, 63, 180, 100, 113, 189], &[0, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 194, 154, 3, 16, 225, 187, 69, 210, 12, 172, 231, 124, 203, 98, 201, 125], &[0, 225, 245, 5]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 234, 7, 222, 43, 143, 1, 5, 22, 220, 163, 247, 239, 82, 247, 172, 90], &[12, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0]), (&[95, 62, 73, 7, 247, 22, 172, 137, 182, 52, 125, 21, 236, 236, 237, 202, 247, 218, 208, 49, 115, 36, 174, 202, 232, 116, 75, 135, 252, 149, 242, 243], &[0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 77, 254, 57, 245, 78, 123, 168, 74, 190, 191, 139, 138, 100, 234, 72, 46, 45, 174, 43, 141, 96, 79, 230, 7, 252, 242, 172, 39, 100, 43, 161, 177], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 137, 6, 59, 94, 171, 160, 104, 80, 196, 182, 201, 87, 28, 70, 86, 200, 124, 206, 182, 4, 38, 77, 37, 233, 32, 121, 227, 154, 137, 129, 91, 166], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 1, 0, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 232, 3, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 33, 143, 38, 199, 58, 221, 99, 72, 151, 85, 11, 64, 3, 178, 107, 198, 250, 67, 84, 127, 177, 206, 187, 248, 7, 171, 139, 143, 54, 116, 13, 218, 140, 198, 7, 172, 12, 47, 130, 190, 178, 198, 48, 211, 195, 137, 122, 61], &[4, 115, 116, 97, 107, 105, 110, 103, 32, 244, 1, 0, 0, 0, 0, 0, 0, 2]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 87, 200, 117, 228, 207, 247, 65, 72, 228, 98, 143, 38, 75, 151, 76, 128], &[214, 61, 165, 212, 232, 0, 0, 0]), (&[194, 38, 18, 118, 204, 157, 31, 133, 152, 234, 75, 106, 116, 177, 92, 47, 227, 253, 141, 247, 41, 112, 188, 130, 229, 38, 126, 160, 30, 221, 217, 73], &[1]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 83, 50, 194, 39, 103, 192, 178, 217, 125, 32, 22, 246, 168, 239, 120, 222, 173, 2, 155, 120, 7, 166, 176, 226, 172, 7, 43, 102, 21, 204, 92, 8], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 76, 1, 78, 107, 248, 184, 194, 192, 17, 231, 41, 11, 133, 105, 107, 179, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 170, 10, 228, 226, 42, 96, 247, 17, 144, 247, 250, 141, 205, 84, 104, 175, 49, 59, 161, 58, 250, 178, 59, 219, 34, 1, 81, 12, 128, 142, 182, 22], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 109, 123, 24, 86, 30, 19, 159, 228, 49, 200, 33, 139, 70, 205, 244, 47, 40, 190, 110, 43, 138, 12, 26, 121, 5, 219, 103, 1, 110, 91, 142, 123], &[11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 99, 128, 64, 70, 131, 252, 137, 232, 35, 52, 80, 200, 170, 25, 80, 159, 230, 50, 156, 192, 179, 158, 9, 52, 58, 115, 101, 115, 115, 105, 111, 110, 58, 107, 101, 121, 115, 238, 43, 102, 225, 142, 104, 190, 12, 183, 86, 115, 25, 37, 223, 229, 65, 253, 167, 152, 54, 57, 147, 167, 137, 80, 161, 2, 235, 195, 174, 40, 244], &[21, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 114, 118, 56, 0, 163, 106, 153, 253, 252, 124, 16, 246, 65, 95, 110, 230], &[8, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 136, 220, 222, 147, 76, 101, 130, 39, 238, 29, 250, 252, 214, 225, 105, 3], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 148, 80, 191, 164, 185, 106, 63, 167, 163, 200, 244, 13, 166, 191, 50, 225], &[0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 17, 218, 109, 31, 118, 29, 223, 155, 219, 76, 157, 110, 83, 3, 235, 212, 31, 97, 133, 141, 10, 86, 71, 161, 167, 191, 224, 137, 191, 146, 27, 233], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 38, 160, 142, 77, 12, 81, 144, 240, 24, 113, 224, 86, 155, 98, 144, 184, 103, 96, 8, 93, 153, 241, 126, 180, 231, 230, 181, 143, 235, 141, 98, 73], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 47, 1, 107, 122, 93, 185, 48, 218, 189, 234, 3, 170, 104, 210, 115, 77, 47, 164, 122, 5, 87, 226, 13, 19, 12, 193, 224, 68, 248, 220, 87, 150], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 91, 143, 41, 219, 118, 207, 78, 103, 110, 79, 201, 177, 112, 64, 49, 45, 235, 237, 175, 205, 86, 55, 251, 60, 123, 173, 210, 205, 220, 230, 164, 69], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 123, 10, 161, 115, 94, 91, 165, 141, 50, 54, 49, 108, 103, 31, 228, 240, 14, 211, 102, 238, 114, 65, 124, 158, 208, 42, 83, 168, 1, 158, 133, 184], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 140, 3, 159, 247, 202, 161, 124, 206, 191, 202, 220, 68, 189, 159, 206, 106, 75, 102, 153, 196, 208, 61, 226, 227, 52, 154, 161, 220, 17, 25, 60, 215], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 140, 53, 210, 47, 69, 157, 119, 202, 76, 11, 11, 80, 53, 134, 151, 102, 214, 13, 24, 43, 151, 22, 171, 62, 136, 121, 224, 102, 71, 136, 153, 168], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 157, 255, 135, 106, 75, 148, 45, 10, 151, 17, 209, 130, 33, 137, 143, 17, 202, 57, 117, 21, 137, 235, 244, 212, 157, 116, 159, 107, 62, 73, 50, 146], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 225, 44, 34, 212, 241, 98, 217, 160, 18, 201, 49, 146, 51, 218, 93, 62, 146, 60, 197, 225, 2, 155, 143, 144, 228, 114, 73, 201, 171, 37, 107, 53], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 152, 239, 125, 192, 96, 67, 110, 78, 216, 3, 175, 7, 99, 43, 137, 182, 244, 170, 194, 251, 227, 63, 3, 85, 75, 254, 181, 89, 234, 38, 144, 237, 133, 33, 202, 164, 190, 150, 30, 97, 201, 26, 201, 161, 83, 13, 206, 122], &[44, 175, 112, 32, 141, 187, 198, 225, 208, 96, 126, 2, 8, 79, 212, 67, 222, 67, 84, 75, 213, 91, 72, 122, 231, 108, 125, 176, 42, 11, 117, 78, 2, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 224, 205, 208, 98, 230, 234, 242, 66, 149, 173, 76, 207, 196, 29, 70, 9], &[8, 21, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0]), (&[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 255, 58, 225, 39, 112, 190, 162, 228, 141, 155, 222, 115, 133, 231, 162, 95], &[0, 0, 0, 0, 10, 0, 0, 0]), (&[240, 195, 101, 195, 207, 89, 214, 113, 235, 114, 218, 14, 122, 65, 19, 196, 159, 31, 5, 21, 244, 98, 205, 207, 132, 224, 241, 214, 4, 93, 252, 187], &[64, 31, 0, 0, 0, 0, 0, 0])]; -- GitLab From f3e635712e3116c28d026f3cc023b62408fa9f85 Mon Sep 17 00:00:00 2001 From: Marcio Diaz Date: Wed, 4 Mar 2020 10:13:14 +0100 Subject: [PATCH 072/106] Fix benchmarks! macro for non dispatchable code (#5100) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Init allowing non dispatchable closure to be benchmarked. * Remove example, add it in timestamp * Fix nits. * Move test to example. * Update frame/example/src/lib.rs Co-Authored-By: Shawn Tabrizi * Update frame/example/src/lib.rs Co-Authored-By: Shawn Tabrizi * Apply review suggestion: move test to benchmarking crate. * Update frame/benchmarking/src/lib.rs Co-Authored-By: Bastian Köcher * Remove unused imports. Co-authored-by: Shawn Tabrizi Co-authored-by: Bastian Köcher Co-authored-by: Benjamin Kampmann --- Cargo.lock | 3 + frame/benchmarking/Cargo.toml | 12 +- frame/benchmarking/src/lib.rs | 246 ++++++++++++++++---------------- frame/benchmarking/src/tests.rs | 169 ++++++++++++++++++++++ frame/benchmarking/src/utils.rs | 8 +- frame/example/Cargo.toml | 2 + frame/example/src/lib.rs | 42 +++++- 7 files changed, 352 insertions(+), 130 deletions(-) create mode 100644 frame/benchmarking/src/tests.rs diff --git a/Cargo.lock b/Cargo.lock index 67346ad86bc..a7fdd2b4c91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1456,6 +1456,8 @@ dependencies = [ name = "frame-benchmarking" version = "2.0.0-alpha.3" dependencies = [ + "frame-support", + "frame-system", "parity-scale-codec", "sp-api", "sp-io", @@ -4119,6 +4121,7 @@ dependencies = [ name = "pallet-example" version = "2.0.0-alpha.3" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "pallet-balances", diff --git a/frame/benchmarking/Cargo.toml b/frame/benchmarking/Cargo.toml index ecaf987bb02..b39031a6b77 100644 --- a/frame/benchmarking/Cargo.toml +++ b/frame/benchmarking/Cargo.toml @@ -15,7 +15,17 @@ sp-runtime-interface = { version = "2.0.0-alpha.2", path = "../../primitives/run sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime", default-features = false } sp-std = { version = "2.0.0-alpha.2", path = "../../primitives/std", default-features = false } sp-io = { path = "../../primitives/io", default-features = false, version = "2.0.0-alpha.2" } +frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } [features] default = [ "std" ] -std = [ "sp-runtime-interface/std", "sp-runtime/std", "sp-api/std", "codec/std", "sp-std/std" ] +std = [ + "codec/std", + "sp-runtime-interface/std", + "sp-runtime/std", + "sp-api/std", + "sp-std/std", + "frame-support/std", + "frame-system/std", +] diff --git a/frame/benchmarking/src/lib.rs b/frame/benchmarking/src/lib.rs index d979000432c..f7e98336b29 100644 --- a/frame/benchmarking/src/lib.rs +++ b/frame/benchmarking/src/lib.rs @@ -18,6 +18,7 @@ #![cfg_attr(not(feature = "std"), no_std)] +mod tests; mod utils; pub use utils::*; #[doc(hidden)] @@ -82,15 +83,14 @@ pub use sp_io::storage::root as storage_root; /// foo { /// let caller = account::(b"caller", 0, benchmarks_seed); /// let l = ...; -/// } _(Origin::Signed(caller), vec![0u8; l]) +/// }: _(Origin::Signed(caller), vec![0u8; l]) /// /// // second dispatchable: bar; this is a root dispatchable and accepts a `u8` vector of size -/// // `l`. We don't want it preininitialised like before so we override using the `=> ()` -/// // notation. +/// // `l`. We don't want it preininitialised like before so we override using the `=> ()` notation. /// // In this case, we explicitly name the call using `bar` instead of `_`. /// bar { /// let l = _ .. _ => (); -/// } bar(Origin::Root, vec![0u8; l]) +/// }: bar(Origin::Root, vec![0u8; l]) /// /// // third dispatchable: baz; this is a user dispatchable. It isn't dependent on length like the /// // other two but has its own complexity `c` that needs setting up. It uses `caller` (in the @@ -100,13 +100,13 @@ pub use sp_io::storage::root as storage_root; /// baz1 { /// let caller = account::(b"caller", 0, benchmarks_seed); /// let c = 0 .. 10 => setup_c(&caller, c); -/// } baz(Origin::Signed(caller)) +/// }: baz(Origin::Signed(caller)) /// /// // this is a second benchmark of the baz dispatchable with a different setup. /// baz2 { /// let caller = account::(b"caller", 0, benchmarks_seed); /// let c = 0 .. 10 => setup_c_in_some_other_way(&caller, c); -/// } baz(Origin::Signed(caller)) +/// }: baz(Origin::Signed(caller)) /// /// // this is benchmarking some code that is not a dispatchable. /// populate_a_set { @@ -115,7 +115,7 @@ pub use sp_io::storage::root as storage_root; /// for i in 0..x { /// m.insert(i); /// } -/// } { m.into_iter().collect::() } +/// }: { m.into_iter().collect::() } /// } /// ``` #[macro_export] @@ -134,97 +134,6 @@ macro_rules! benchmarks { } } -#[macro_export] -macro_rules! impl_benchmark { - ( - $( $name:ident ),* - ) => { - impl $crate::Benchmarking<$crate::BenchmarkResults> for Module { - fn run_benchmark( - extrinsic: Vec, - lowest_range_values: Vec, - highest_range_values: Vec, - steps: Vec, - repeat: u32, - ) -> Result, &'static str> { - // Map the input to the selected benchmark. - let extrinsic = sp_std::str::from_utf8(extrinsic.as_slice()) - .map_err(|_| "Could not find extrinsic")?; - let selected_benchmark = match extrinsic { - $( stringify!($name) => SelectedBenchmark::$name, )* - _ => return Err("Could not find extrinsic."), - }; - - // Warm up the DB - $crate::benchmarking::commit_db(); - $crate::benchmarking::wipe_db(); - - let components = , RawOrigin>>::components(&selected_benchmark); - let mut results: Vec<$crate::BenchmarkResults> = Vec::new(); - - // Default number of steps for a component. - let mut prev_steps = 10; - - // Select the component we will be benchmarking. Each component will be benchmarked. - for (idx, (name, low, high)) in components.iter().enumerate() { - // Get the number of steps for this component. - let steps = steps.get(idx).cloned().unwrap_or(prev_steps); - prev_steps = steps; - - let lowest = lowest_range_values.get(idx).cloned().unwrap_or(*low); - let highest = highest_range_values.get(idx).cloned().unwrap_or(*high); - - let diff = highest - lowest; - - // Create up to `STEPS` steps for that component between high and low. - let step_size = (diff / steps).max(1); - let num_of_steps = diff / step_size + 1; - - for s in 0..num_of_steps { - // This is the value we will be testing for component `name` - let component_value = lowest + step_size * s; - - // Select the max value for all the other components. - let c: Vec<($crate::BenchmarkParameter, u32)> = components.iter() - .enumerate() - .map(|(idx, (n, l, h))| - if n == name { - (*n, component_value) - } else { - (*n, *highest_range_values.get(idx).unwrap_or(h)) - } - ) - .collect(); - - // Run the benchmark `repeat` times. - for _ in 0..repeat { - // Set up the externalities environment for the setup we want to benchmark. - let (call, caller) = , RawOrigin>>::instance(&selected_benchmark, &c)?; - // Commit the externalities to the database, flushing the DB cache. - // This will enable worst case scenario for reading from the database. - $crate::benchmarking::commit_db(); - // Time the extrinsic logic. - let start_extrinsic = $crate::benchmarking::current_time(); - call.dispatch(caller.into())?; - let finish_extrinsic = $crate::benchmarking::current_time(); - let elapsed_extrinsic = finish_extrinsic - start_extrinsic; - // Time the storage root recalculation. - let start_storage_root = $crate::benchmarking::current_time(); - $crate::storage_root(); - let finish_storage_root = $crate::benchmarking::current_time(); - let elapsed_storage_root = finish_storage_root - start_storage_root; - results.push((c.clone(), elapsed_extrinsic, elapsed_storage_root)); - // Wipe the DB back to the genesis state. - $crate::benchmarking::wipe_db(); - } - } - } - return Ok(results); - } - } - } -} - #[macro_export] #[allow(missing_docs)] macro_rules! benchmarks_iter { @@ -247,14 +156,16 @@ macro_rules! benchmarks_iter { $( $rest:tt )* ) => { $crate::benchmarks_iter! { - { $( $common )* } ( $( $names )* ) $name { $( $code )* }: { Ok((crate::Call::::$dispatch($($arg),*), $origin)) } $( $rest )* + { $( $common )* } ( $( $names )* ) $name { $( $code )* }: { + Call::::$dispatch($($arg),*).dispatch($origin.into())?; + } $( $rest )* } }; // iteration arm: ( { $( $common:tt )* } ( $( $names:ident )* ) - $name:ident { $( $code:tt )* }: { $eval:expr } + $name:ident { $( $code:tt )* }: $eval:block $( $rest:tt )* ) => { $crate::benchmark_backend! { @@ -277,7 +188,7 @@ macro_rules! benchmark_backend { $( $common:tt )* } { $( PRE { $( $pre_parsed:tt )* } )* - } { $eval:expr } { + } { $eval:block } { let $pre_id:tt : $pre_ty:ty = $pre_ex:expr; $( $rest:tt )* } ) => { @@ -292,7 +203,7 @@ macro_rules! benchmark_backend { $( $common:tt )* } { $( $parsed:tt )* - } { $eval:expr } { + } { $eval:block } { let $param:ident in ( $param_from:expr ) .. $param_to:expr => $param_instancer:expr; $( $rest:tt )* }) => { @@ -308,7 +219,7 @@ macro_rules! benchmark_backend { $( { $common:ident , $common_from:tt , $common_to:expr , $common_instancer:expr } )* } { $( $parsed:tt )* - } { $eval:expr } { + } { $eval:block } { let $param:ident in ...; $( $rest:tt )* }) => { @@ -331,7 +242,7 @@ macro_rules! benchmark_backend { $( { $common:ident , $common_from:tt , $common_to:expr , $common_instancer:expr } )* } { $( $parsed:tt )* - } { $eval:expr } { + } { $eval:block } { let $param:ident in _ .. _ => $param_instancer:expr ; $( $rest:tt )* }) => { @@ -354,7 +265,7 @@ macro_rules! benchmark_backend { $( $common:tt )* } { $( $parsed:tt )* - } { $eval:expr } { + } { $eval:block } { let $param:ident in $param_from:tt .. $param_to:expr => $param_instancer:expr ; $( $rest:tt )* }) => { @@ -370,7 +281,7 @@ macro_rules! benchmark_backend { $( $common:tt )* } { $( $parsed:tt )* - } { $eval:expr } { + } { $eval:block } { let $param:ident in $param_from:tt .. $param_to:expr; $( $rest:tt )* }) => { @@ -386,7 +297,7 @@ macro_rules! benchmark_backend { $( $common:tt )* } { $( $parsed:tt )* - } { $eval:expr } { + } { $eval:block } { let $pre_id:tt = $pre_ex:expr; $( $rest:tt )* }) => { @@ -403,11 +314,11 @@ macro_rules! benchmark_backend { } { $( PRE { $pre_id:tt , $pre_ty:ty , $pre_ex:expr } )* $( PARAM { $param:ident , $param_from:expr , $param_to:expr , $param_instancer:expr } )* - } { $eval:expr } { $( $post:tt )* } ) => { + } { $eval:block } { $( $post:tt )* } ) => { #[allow(non_camel_case_types)] struct $name; #[allow(unused_variables)] - impl $crate::BenchmarkingSetup, RawOrigin> for $name { + impl $crate::BenchmarkingSetup for $name { fn components(&self) -> Vec<($crate::BenchmarkParameter, u32, u32)> { vec! [ $( @@ -417,7 +328,7 @@ macro_rules! benchmark_backend { } fn instance(&self, components: &[($crate::BenchmarkParameter, u32)]) - -> Result<(crate::Call, RawOrigin), &'static str> + -> Result Result<(), &'static str>>, &'static str> { $( let $common = $common_from; @@ -431,7 +342,8 @@ macro_rules! benchmark_backend { )* $( $param_instancer ; )* $( $post )* - $eval + + Ok(Box::new(move || -> Result<(), &'static str> { $eval; Ok(()) })) } } } @@ -463,28 +375,116 @@ macro_rules! selected_benchmark { } // Allow us to select a benchmark from the list of available benchmarks. - impl $crate::BenchmarkingSetup, RawOrigin> for SelectedBenchmark { + impl $crate::BenchmarkingSetup for SelectedBenchmark { fn components(&self) -> Vec<($crate::BenchmarkParameter, u32, u32)> { match self { - $( Self::$bench => <$bench as $crate::BenchmarkingSetup< - T, - Call, - RawOrigin, - >>::components(&$bench), )* + $( Self::$bench => <$bench as $crate::BenchmarkingSetup>::components(&$bench), )* } } fn instance(&self, components: &[($crate::BenchmarkParameter, u32)]) - -> Result<(Call, RawOrigin), &'static str> + -> Result Result<(), &'static str>>, &'static str> { match self { - $( Self::$bench => <$bench as $crate::BenchmarkingSetup< - T, - Call, - RawOrigin, - >>::instance(&$bench, components), )* + $( Self::$bench => <$bench as $crate::BenchmarkingSetup>::instance(&$bench, components), )* } } } }; } + +#[macro_export] +macro_rules! impl_benchmark { + ( + $( $name:ident ),* + ) => { + impl $crate::Benchmarking<$crate::BenchmarkResults> for Module { + fn run_benchmark( + extrinsic: Vec, + lowest_range_values: Vec, + highest_range_values: Vec, + steps: Vec, + repeat: u32, + ) -> Result, &'static str> { + // Map the input to the selected benchmark. + let extrinsic = sp_std::str::from_utf8(extrinsic.as_slice()) + .map_err(|_| "`extrinsic` is not a valid utf8 string!")?; + let selected_benchmark = match extrinsic { + $( stringify!($name) => SelectedBenchmark::$name, )* + _ => return Err("Could not find extrinsic."), + }; + + // Warm up the DB + $crate::benchmarking::commit_db(); + $crate::benchmarking::wipe_db(); + + let components = >::components(&selected_benchmark); + let mut results: Vec<$crate::BenchmarkResults> = Vec::new(); + + // Default number of steps for a component. + let mut prev_steps = 10; + + // Select the component we will be benchmarking. Each component will be benchmarked. + for (idx, (name, low, high)) in components.iter().enumerate() { + // Get the number of steps for this component. + let steps = steps.get(idx).cloned().unwrap_or(prev_steps); + prev_steps = steps; + + let lowest = lowest_range_values.get(idx).cloned().unwrap_or(*low); + let highest = highest_range_values.get(idx).cloned().unwrap_or(*high); + + let diff = highest - lowest; + + // Create up to `STEPS` steps for that component between high and low. + let step_size = (diff / steps).max(1); + let num_of_steps = diff / step_size + 1; + + for s in 0..num_of_steps { + // This is the value we will be testing for component `name` + let component_value = lowest + step_size * s; + + // Select the max value for all the other components. + let c: Vec<($crate::BenchmarkParameter, u32)> = components.iter() + .enumerate() + .map(|(idx, (n, _, h))| + if n == name { + (*n, component_value) + } else { + (*n, *highest_range_values.get(idx).unwrap_or(h)) + } + ) + .collect(); + + // Run the benchmark `repeat` times. + for _ in 0..repeat { + // Set up the externalities environment for the setup we want to benchmark. + let closure_to_benchmark = >::instance(&selected_benchmark, &c)?; + + // Commit the externalities to the database, flushing the DB cache. + // This will enable worst case scenario for reading from the database. + $crate::benchmarking::commit_db(); + + // Time the extrinsic logic. + let start_extrinsic = $crate::benchmarking::current_time(); + closure_to_benchmark()?; + let finish_extrinsic = $crate::benchmarking::current_time(); + let elapsed_extrinsic = finish_extrinsic - start_extrinsic; + + // Time the storage root recalculation. + let start_storage_root = $crate::benchmarking::current_time(); + $crate::storage_root(); + let finish_storage_root = $crate::benchmarking::current_time(); + let elapsed_storage_root = finish_storage_root - start_storage_root; + + results.push((c.clone(), elapsed_extrinsic, elapsed_storage_root)); + + // Wipe the DB back to the genesis state. + $crate::benchmarking::wipe_db(); + } + } + } + return Ok(results); + } + } + } +} diff --git a/frame/benchmarking/src/tests.rs b/frame/benchmarking/src/tests.rs new file mode 100644 index 00000000000..d47488604ed --- /dev/null +++ b/frame/benchmarking/src/tests.rs @@ -0,0 +1,169 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Tests for the module. + +#![cfg(test)] + +use super::*; +use codec::Decode; +use sp_std::prelude::*; +use sp_runtime::{ + traits::{Dispatchable, BlakeTwo256, IdentityLookup}, + testing::{H256, Header}, +}; +use frame_support::{dispatch::DispatchResult, decl_module, impl_outer_origin}; +use frame_system::{RawOrigin, ensure_signed, ensure_none}; + +decl_module! { + pub struct Module for enum Call where origin: T::Origin { + fn dummy(origin, _n: u32) -> DispatchResult { + let _sender = ensure_signed(origin)?; + Ok(()) + } + + fn other_dummy(origin, _n: u32) -> DispatchResult { + let _sender = ensure_none(origin)?; + Ok(()) + } + } +} + +impl_outer_origin! { + pub enum Origin for Test where system = frame_system {} +} + +pub trait Trait { + type Event; + type BlockNumber; + type AccountId: 'static + Default + Decode; + type Origin: From> + Into, Self::Origin>>; +} + +#[derive(Clone, Eq, PartialEq)] +pub struct Test; + +impl frame_system::Trait for Test { + type Origin = Origin; + type Index = u64; + type BlockNumber = u64; + type Hash = H256; + type Call = (); + type Hashing = BlakeTwo256; + type AccountId = u64; + type Lookup = IdentityLookup; + type Header = Header; + type Event = (); + type BlockHashCount = (); + type MaximumBlockWeight = (); + type MaximumBlockLength = (); + type AvailableBlockRatio = (); + type Version = (); + type ModuleToIndex = (); + type AccountData = (); + type OnNewAccount = (); + type OnKilledAccount = (); +} + +impl Trait for Test { + type Event = (); + type BlockNumber = u32; + type Origin = Origin; + type AccountId = u64; +} + +// This function basically just builds a genesis storage key/value store according to +// our desired mockup. +fn new_test_ext() -> sp_io::TestExternalities { + frame_system::GenesisConfig::default().build_storage::().unwrap().into() +} + +benchmarks!{ + _ { + // Define a common range for `b`. + let b in 1 .. 1000 => (); + } + + dummy { + let b in ...; + let caller = account("caller", 0, 0); + }: _ (RawOrigin::Signed(caller), b.into()) + + other_name { + let b in ...; + let caller = account("caller", 0, 0); + }: other_dummy (RawOrigin::Signed(caller), b.into()) + + sort_vector { + let x in 0 .. 10000; + let mut m = Vec::::new(); + for i in 0..x { + m.push(i); + } + }: { + m.sort(); + } +} + +#[test] +fn benchmarks_macro_works() { + // Check benchmark creation for `dummy`. + let selected_benchmark = SelectedBenchmark::dummy; + + let components = >::components(&selected_benchmark); + assert_eq!(components, vec![(BenchmarkParameter::b, 1, 1000)]); + + let closure = >::instance( + &selected_benchmark, + &[(BenchmarkParameter::b, 1)], + ).expect("failed to create closure"); + + new_test_ext().execute_with(|| { + assert_eq!(closure(), Ok(())); + }); +} + +#[test] +fn benchmarks_macro_rename_works() { + // Check benchmark creation for `other_dummy`. + let selected_benchmark = SelectedBenchmark::other_name; + let components = >::components(&selected_benchmark); + assert_eq!(components, vec![(BenchmarkParameter::b, 1, 1000)]); + + let closure = >::instance( + &selected_benchmark, + &[(BenchmarkParameter::b, 1)], + ).expect("failed to create closure"); + + new_test_ext().execute_with(|| { + assert_eq!(closure(), Err("Bad origin")); + }); +} + +#[test] +fn benchmarks_macro_works_for_non_dispatchable() { + let selected_benchmark = SelectedBenchmark::sort_vector; + + let components = >::components(&selected_benchmark); + assert_eq!(components, vec![(BenchmarkParameter::x, 0, 10000)]); + + let closure = >::instance( + &selected_benchmark, + &[(BenchmarkParameter::x, 1)], + ).expect("failed to create closure"); + + assert_eq!(closure(), Ok(())); +} \ No newline at end of file diff --git a/frame/benchmarking/src/utils.rs b/frame/benchmarking/src/utils.rs index 87996c3f574..bc6cfbcc86e 100644 --- a/frame/benchmarking/src/utils.rs +++ b/frame/benchmarking/src/utils.rs @@ -17,7 +17,7 @@ //! Interfaces, types and utils for benchmarking a FRAME runtime. use codec::{Encode, Decode}; -use sp_std::vec::Vec; +use sp_std::{vec::Vec, prelude::Box}; use sp_io::hashing::blake2_256; use sp_runtime::RuntimeString; @@ -93,12 +93,12 @@ pub trait Benchmarking { } /// The required setup for creating a benchmark. -pub trait BenchmarkingSetup { +pub trait BenchmarkingSetup { /// Return the components and their ranges which should be tested in this benchmark. fn components(&self) -> Vec<(BenchmarkParameter, u32, u32)>; - /// Set up the storage, and prepare a call and caller to test in a single run of the benchmark. - fn instance(&self, components: &[(BenchmarkParameter, u32)]) -> Result<(Call, RawOrigin), &'static str>; + /// Set up the storage, and prepare a closure to test in a single run of the benchmark. + fn instance(&self, components: &[(BenchmarkParameter, u32)]) -> Result Result<(), &'static str>>, &'static str>; } /// Grab an account, seeded by a name and index. diff --git a/frame/example/Cargo.toml b/frame/example/Cargo.toml index 48c1fd57dc9..515d1fd8d7c 100644 --- a/frame/example/Cargo.toml +++ b/frame/example/Cargo.toml @@ -11,6 +11,7 @@ description = "FRAME example pallet" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false } +frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../benchmarking" } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } pallet-balances = { version = "2.0.0-alpha.2", default-features = false, path = "../balances" } @@ -27,6 +28,7 @@ std = [ "serde", "codec/std", "sp-runtime/std", + "frame-benchmarking/std", "frame-support/std", "frame-system/std", "pallet-balances/std", diff --git a/frame/example/src/lib.rs b/frame/example/src/lib.rs index f4139a310a6..57d6c97729a 100644 --- a/frame/example/src/lib.rs +++ b/frame/example/src/lib.rs @@ -258,10 +258,12 @@ use frame_support::{ dispatch::DispatchResult, decl_module, decl_storage, decl_event, weights::{SimpleDispatchInfo, DispatchInfo, DispatchClass, ClassifyDispatch, WeighData, Weight, PaysFee}, }; -use frame_system::{self as system, ensure_signed, ensure_root}; +use sp_std::prelude::*; +use frame_benchmarking::{benchmarks, account}; +use frame_system::{self as system, ensure_signed, ensure_root, RawOrigin}; use codec::{Encode, Decode}; use sp_runtime::{ - traits::{SignedExtension, Bounded, SaturatedConversion}, + traits::{SignedExtension, Bounded, SaturatedConversion, Dispatchable}, transaction_validity::{ ValidTransaction, TransactionValidityError, InvalidTransaction, TransactionValidity, }, @@ -642,6 +644,42 @@ impl SignedExtension for WatchDummy { } } +benchmarks!{ + _ { + // Define a common range for `b`. + let b in 1 .. 1000 => (); + } + + // This will measure the execution time of `accumulate_dummy` for b in [1..1000] range. + accumulate_dummy { + let b in ...; + let caller = account("caller", 0, 0); + }: _ (RawOrigin::Signed(caller), b.into()) + + // This will measure the execution time of `set_dummy` for b in [1..1000] range. + set_dummy { + let b in ...; + let caller = account("caller", 0, 0); + }: set_dummy (RawOrigin::Signed(caller), b.into()) + + // This will measure the execution time of `set_dummy` for b in [1..10] range. + another_set_dummy { + let b in 1 .. 10; + let caller = account("caller", 0, 0); + }: set_dummy (RawOrigin::Signed(caller), b.into()) + + // This will measure the execution time of sorting a vector. + sort_vector { + let x in 0 .. 10000; + let mut m = Vec::::new(); + for i in 0..x { + m.push(i); + } + }: { + m.sort(); + } +} + #[cfg(test)] mod tests { use super::*; -- GitLab From 23f65462114408ea58738caf8de591827dc168d4 Mon Sep 17 00:00:00 2001 From: Logan Saether Date: Wed, 4 Mar 2020 13:52:30 +0100 Subject: [PATCH 073/106] Adds more Democracy docs (#5077) * Adding more democracy docs * Remove Cargo.lock * Update docs in democracy * Update frame/democracy/src/lib.rs Co-Authored-By: Shawn Tabrizi * Update frame/democracy/src/lib.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/democracy/src/lib.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/democracy/src/lib.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/democracy/src/lib.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/democracy/src/lib.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/democracy/src/lib.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/democracy/src/lib.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/democracy/src/lib.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Resolve * Remove cargo.lock again * Add paragraph on AQB * Update frame/democracy/src/lib.rs * Update frame/democracy/src/lib.rs Co-authored-by: Shawn Tabrizi Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- frame/democracy/src/lib.rs | 322 ++++++++++++++++++++++++++++++++++++- 1 file changed, 314 insertions(+), 8 deletions(-) diff --git a/frame/democracy/src/lib.rs b/frame/democracy/src/lib.rs index 6755fabd203..b2e234c91a1 100644 --- a/frame/democracy/src/lib.rs +++ b/frame/democracy/src/lib.rs @@ -14,7 +14,140 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Democratic system: Handles administration of general stakeholder voting. +//! # Democracy Pallet +//! +//! - [`democracy::Trait`](./trait.Trait.html) +//! - [`Call`](./enum.Call.html) +//! +//! ## Overview +//! +//! The Democracy pallet handles the administration of general stakeholder voting. +//! +//! There are two different queues that a proposal can be added to before it +//! becomes a referendum, 1) the proposal queue consisting of all public proposals +//! and 2) the external queue consisting of a single proposal that originates +//! from one of the _external_ origins (such as a collective group). +//! +//! Every launch period - a length defined in the runtime - the Democracy pallet +//! launches a referendum from a proposal that it takes from either the proposal +//! queue or the external queue in turn. Any token holder in the system can vote +//! on referenda. The voting system +//! uses time-lock voting by allowing the token holder to set their _conviction_ +//! behind a vote. The conviction will dictate the length of time the tokens +//! will be locked, as well as the multiplier that scales the vote power. +//! +//! ### Terminology +//! +//! - **Enactment Period:** The minimum period of locking and the period between a proposal being +//! approved and enacted. +//! - **Lock Period:** A period of time after proposal enactment that the tokens of _winning_ voters +//! will be locked. +//! - **Conviction:** An indication of a voter's strength of belief in their vote. An increase +//! of one in conviction indicates that a token holder is willing to lock their tokens for twice +//! as many lock periods after enactment. +//! - **Vote:** A value that can either be in approval ("Aye") or rejection ("Nay") +//! of a particular referendum. +//! - **Proposal:** A submission to the chain that represents an action that a proposer (either an +//! account or an external origin) suggests that the system adopt. +//! - **Referendum:** A proposal that is in the process of being voted on for +//! either acceptance or rejection as a change to the system. +//! - **Proxy:** An account that votes on behalf of a separate "Stash" account +//! that holds the funds. +//! - **Delegation:** The act of granting your voting power to the decisions of another account. +//! +//! ### Adaptive Quorum Biasing +//! +//! A _referendum_ can be either simple majority-carries in which 50%+1 of the +//! votes decide the outcome or _adaptive quorum biased_. Adaptive quorum biasing +//! makes the threshold for passing or rejecting a referendum higher or lower +//! depending on how the referendum was originally proposed. There are two types of +//! adaptive quorum biasing: 1) _positive turnout bias_ makes a referendum +//! require a super-majority to pass that decreases as turnout increases and +//! 2) _negative turnout bias_ makes a referendum require a super-majority to +//! reject that decreases as turnout increases. Another way to think about the +//! quorum biasing is that _positive bias_ referendums will be rejected by +//! default and _negative bias_ referendums get passed by default. +//! +//! ## Interface +//! +//! ### Dispatchable Functions +//! +//! #### Public +//! +//! These calls can be made from any externally held account capable of creating +//! a signed extrinsic. +//! +//! - `propose` - Submits a sensitive action, represented as a hash. +//! Requires a deposit. +//! - `second` - Signals agreement with a proposal, moves it higher on the +//! proposal queue, and requires a matching deposit to the original. +//! - `vote` - Votes in a referendum, either the vote is "Aye" to enact the +//! proposal or "Nay" to keep the status quo. +//! - `proxy_vote` - Votes in a referendum on behalf of a stash account. +//! - `activate_proxy` - Activates a proxy that is already open to the sender. +//! - `close_proxy` - Clears the proxy status, called by the proxy. +//! - `deactivate_proxy` - Deactivates a proxy back to the open status, called by +//! the stash. +//! - `open_proxy` - Opens a proxy account on behalf of the sender. +//! - `delegate` - Delegates the voting power (tokens * conviction) to another +//! account. +//! - `undelegate` - Stops the delegation of voting power to another account. +//! - `note_preimage` - Registers the preimage for an upcoming proposal, requires +//! a deposit that is returned once the proposal is enacted. +//! - `note_imminent_preimage` - Registers the preimage for an upcoming proposal. +//! Does not require a deposit, but the proposal must be in the dispatch queue. +//! - `reap_preimage` - Removes the preimage for an expired proposal. Will only +//! work under the condition that it's the same account that noted it and +//! after the voting period, OR it's a different account after the enactment period. +//! - `unlock` - Unlocks tokens that have an expired lock. +//! +//! #### Cancellation Origin +//! +//! This call can only be made by the `CancellationOrigin`. +//! +//! - `emergency_cancel` - Schedules an emergency cancellation of a referendum. +//! Can only happen once to a specific referendum. +//! +//! #### ExternalOrigin +//! +//! This call can only be made by the `ExternalOrigin`. +//! +//! - `external_propose` - Schedules a proposal to become a referendum once it is is legal +//! for an externally proposed referendum. +//! +//! #### External Majority Origin +//! +//! This call can only be made by the `ExternalMajorityOrigin`. +//! +//! - `external_propose_majority` - Schedules a proposal to become a majority-carries +//! referendum once it is legal for an externally proposed referendum. +//! +//! #### External Default Origin +//! +//! This call can only be made by the `ExternalDefaultOrigin`. +//! +//! - `external_propose_default` - Schedules a proposal to become a negative-turnout-bias +//! referendum once it is legal for an externally proposed referendum. +//! +//! #### Fast Track Origin +//! +//! This call can only be made by the `FastTrackOrigin`. +//! +//! - `fast_track` - Schedules the current externally proposed proposal that +//! is "majority-carries" to become a referendum immediately. +//! +//! #### Veto Origin +//! +//! This call can only be made by the `VetoOrigin`. +//! +//! - `veto_external` - Vetoes and blacklists the external proposal hash. +//! +//! #### Root +//! +//! - `cancel_referendum` - Removes a referendum. +//! - `cancel_queued` - Cancels a proposal that is queued for enactment. +//! - `clear_public_proposal` - Removes all public proposals. + #![recursion_limit="128"] #![cfg_attr(not(feature = "std"), no_std)] @@ -482,8 +615,16 @@ decl_module! { /// Propose a sensitive action to be taken. /// + /// The dispatch origin of this call must be _Signed_ and the sender must + /// have funds to cover the deposit. + /// + /// - `proposal_hash`: The hash of the proposal preimage. + /// - `value`: The amount of deposit (must be at least `MinimumDeposit`). + /// + /// Emits `Proposed`. + /// /// # - /// - O(1). + /// - `O(1)`. /// - Two DB changes, one DB entry. /// # #[weight = SimpleDispatchInfo::FixedNormal(5_000_000)] @@ -505,10 +646,15 @@ decl_module! { Self::deposit_event(RawEvent::Proposed(index, value)); } - /// Propose a sensitive action to be taken. + /// Signals agreement with a particular proposal. + /// + /// The dispatch origin of this call must be _Signed_ and the sender + /// must have funds to cover the deposit, equal to the original deposit. + /// + /// - `proposal`: The index of the proposal to second. /// /// # - /// - O(1). + /// - `O(1)`. /// - One DB entry. /// # #[weight = SimpleDispatchInfo::FixedNormal(5_000_000)] @@ -524,8 +670,13 @@ decl_module! { /// Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; /// otherwise it is a vote to keep the status quo. /// + /// The dispatch origin of this call must be _Signed_. + /// + /// - `ref_index`: The index of the referendum to vote for. + /// - `vote`: The vote configuration. + /// /// # - /// - O(1). + /// - `O(1)`. /// - One DB change, one DB entry. /// # #[weight = SimpleDispatchInfo::FixedNormal(200_000)] @@ -540,8 +691,13 @@ decl_module! { /// Vote in a referendum on behalf of a stash. If `vote.is_aye()`, the vote is to enact /// the proposal; otherwise it is a vote to keep the status quo. /// + /// The dispatch origin of this call must be _Signed_. + /// + /// - `ref_index`: The index of the referendum to proxy vote for. + /// - `vote`: The vote configuration. + /// /// # - /// - O(1). + /// - `O(1)`. /// - One DB change, one DB entry. /// # #[weight = SimpleDispatchInfo::FixedNormal(200_000)] @@ -556,6 +712,14 @@ decl_module! { /// Schedule an emergency cancellation of a referendum. Cannot happen twice to the same /// referendum. + /// + /// The dispatch origin of this call must be `CancellationOrigin`. + /// + /// -`ref_index`: The index of the referendum to cancel. + /// + /// # + /// - Depends on size of storage vec `VotersFor` for this referendum. + /// # #[weight = SimpleDispatchInfo::FixedOperational(500_000)] fn emergency_cancel(origin, ref_index: ReferendumIndex) { T::CancellationOrigin::ensure_origin(origin)?; @@ -570,6 +734,15 @@ decl_module! { /// Schedule a referendum to be tabled once it is legal to schedule an external /// referendum. + /// + /// The dispatch origin of this call must be `ExternalOrigin`. + /// + /// - `proposal_hash`: The preimage hash of the proposal. + /// + /// # + /// - `O(1)`. + /// - One DB change. + /// # #[weight = SimpleDispatchInfo::FixedNormal(5_000_000)] fn external_propose(origin, proposal_hash: T::Hash) { T::ExternalOrigin::ensure_origin(origin)?; @@ -586,8 +759,17 @@ decl_module! { /// Schedule a majority-carries referendum to be tabled next once it is legal to schedule /// an external referendum. /// + /// The dispatch of this call must be `ExternalMajorityOrigin`. + /// + /// - `proposal_hash`: The preimage hash of the proposal. + /// /// Unlike `external_propose`, blacklisting has no effect on this and it may replace a /// pre-scheduled `external_propose` call. + /// + /// # + /// - `O(1)`. + /// - One DB change. + /// # #[weight = SimpleDispatchInfo::FixedNormal(5_000_000)] fn external_propose_majority(origin, proposal_hash: T::Hash) { T::ExternalMajorityOrigin::ensure_origin(origin)?; @@ -597,8 +779,17 @@ decl_module! { /// Schedule a negative-turnout-bias referendum to be tabled next once it is legal to /// schedule an external referendum. /// + /// The dispatch of this call must be `ExternalDefaultOrigin`. + /// + /// - `proposal_hash`: The preimage hash of the proposal. + /// /// Unlike `external_propose`, blacklisting has no effect on this and it may replace a /// pre-scheduled `external_propose` call. + /// + /// # + /// - `O(1)`. + /// - One DB change. + /// # #[weight = SimpleDispatchInfo::FixedNormal(5_000_000)] fn external_propose_default(origin, proposal_hash: T::Hash) { T::ExternalDefaultOrigin::ensure_origin(origin)?; @@ -609,11 +800,21 @@ decl_module! { /// immediately. If there is no externally-proposed referendum currently, or if there is one /// but it is not a majority-carries referendum then it fails. /// + /// The dispatch of this call must be `FastTrackOrigin`. + /// /// - `proposal_hash`: The hash of the current external proposal. /// - `voting_period`: The period that is allowed for voting on this proposal. Increased to /// `EmergencyVotingPeriod` if too low. /// - `delay`: The number of block after voting has ended in approval and this should be /// enacted. This doesn't have a minimum amount. + /// + /// Emits `Started`. + /// + /// # + /// - One DB clear. + /// - One DB change. + /// - One extra DB entry. + /// # #[weight = SimpleDispatchInfo::FixedNormal(200_000)] fn fast_track(origin, proposal_hash: T::Hash, @@ -636,6 +837,19 @@ decl_module! { } /// Veto and blacklist the external proposal hash. + /// + /// The dispatch origin of this call must be `VetoOrigin`. + /// + /// - `proposal_hash`: The preimage hash of the proposal to veto and blacklist. + /// + /// Emits `Vetoed`. + /// + /// # + /// - Two DB entries. + /// - One DB clear. + /// - Performs a binary search on `existing_vetoers` which should not + /// be very large. + /// # #[weight = SimpleDispatchInfo::FixedNormal(200_000)] fn veto_external(origin, proposal_hash: T::Hash) { let who = T::VetoOrigin::ensure_origin(origin)?; @@ -661,6 +875,14 @@ decl_module! { } /// Remove a referendum. + /// + /// The dispatch origin of this call must be _Root_. + /// + /// - `ref_index`: The index of the referendum to cancel. + /// + /// # + /// - `O(1)`. + /// # #[weight = SimpleDispatchInfo::FixedOperational(10_000)] fn cancel_referendum(origin, #[compact] ref_index: ReferendumIndex) { ensure_root(origin)?; @@ -668,6 +890,14 @@ decl_module! { } /// Cancel a proposal queued for enactment. + /// + /// The dispatch origin of this call must be _Root_. + /// + /// - `which`: The index of the referendum to cancel. + /// + /// # + /// - One DB change. + /// # #[weight = SimpleDispatchInfo::FixedOperational(10_000)] fn cancel_queued(origin, which: ReferendumIndex) { ensure_root(origin)?; @@ -688,6 +918,10 @@ decl_module! { /// /// NOTE: Used to be called `set_proxy`. /// + /// The dispatch origin of this call must be _Signed_. + /// + /// - `proxy`: The account that will be activated as proxy. + /// /// # /// - One extra DB entry. /// # @@ -709,6 +943,8 @@ decl_module! { /// /// NOTE: Used to be called `resign_proxy`. /// + /// The dispatch origin of this call must be _Signed_. + /// /// # /// - One DB clear. /// # @@ -729,6 +965,10 @@ decl_module! { /// /// NOTE: Used to be called `remove_proxy`. /// + /// The dispatch origin of this call must be _Signed_. + /// + /// - `proxy`: The account that will be deactivated as proxy. + /// /// # /// - One DB clear. /// # @@ -747,6 +987,16 @@ decl_module! { /// Delegate vote. /// + /// Currency is locked indefinitely for as long as it's delegated. + /// + /// The dispatch origin of this call must be _Signed_. + /// + /// - `to`: The account to make a delegate of the sender. + /// - `conviction`: The conviction that will be attached to the delegated + /// votes. + /// + /// Emits `Delegated`. + /// /// # /// - One extra DB entry. /// # @@ -767,6 +1017,14 @@ decl_module! { /// Undelegate vote. /// + /// Must be sent from an account that has called delegate previously. + /// The tokens will be reduced from an indefinite lock to the maximum + /// possible according to the conviction of the prior delegation. + /// + /// The dispatch origin of this call must be _Signed_. + /// + /// Emits `Undelegated`. + /// /// # /// - O(1). /// # @@ -788,7 +1046,14 @@ decl_module! { Self::deposit_event(RawEvent::Undelegated(who)); } - /// Veto and blacklist the proposal hash. Must be from Root origin. + /// Clears all public proposals. + /// + /// The dispatch origin of this call must be _Root_. + /// + /// # + /// - `O(1)`. + /// - One DB clear. + /// # #[weight = SimpleDispatchInfo::FixedNormal(10_000)] fn clear_public_proposals(origin) { ensure_root(origin)?; @@ -798,6 +1063,17 @@ decl_module! { /// Register the preimage for an upcoming proposal. This doesn't require the proposal to be /// in the dispatch queue but does require a deposit, returned once enacted. + /// + /// The dispatch origin of this call must be _Signed_. + /// + /// - `encoded_proposal`: The preimage of a proposal. + /// + /// Emits `PreimageNoted`. + /// + /// # + /// - Dependent on the size of `encoded_proposal` but protected by a + /// required deposit. + /// # #[weight = SimpleDispatchInfo::FixedNormal(100_000)] fn note_preimage(origin, encoded_proposal: Vec) { let who = ensure_signed(origin)?; @@ -816,6 +1092,16 @@ decl_module! { /// Register the preimage for an upcoming proposal. This requires the proposal to be /// in the dispatch queue. No deposit is needed. + /// + /// The dispatch origin of this call must be _Signed_. + /// + /// - `encoded_proposal`: The preimage of a proposal. + /// + /// Emits `PreimageNoted`. + /// + /// # + /// - Dependent on the size of `encoded_proposal`. + /// # #[weight = SimpleDispatchInfo::FixedNormal(100_000)] fn note_imminent_preimage(origin, encoded_proposal: Vec) { let who = ensure_signed(origin)?; @@ -833,9 +1119,19 @@ decl_module! { /// Remove an expired proposal preimage and collect the deposit. /// + /// The dispatch origin of this call must be _Signed_. + /// + /// - `proposal_hash`: The preimage hash of a proposal. + /// /// This will only work after `VotingPeriod` blocks from the time that the preimage was /// noted, if it's the same account doing it. If it's a different account, then it'll only /// work an additional `EnactmentPeriod` later. + /// + /// Emits `PreimageReaped`. + /// + /// # + /// - One DB clear. + /// # #[weight = SimpleDispatchInfo::FixedNormal(10_000)] fn reap_preimage(origin, proposal_hash: T::Hash) { let who = ensure_signed(origin)?; @@ -855,6 +1151,17 @@ decl_module! { Self::deposit_event(RawEvent::PreimageReaped(proposal_hash, old, deposit, who)); } + /// Unlock tokens that have an expired lock. + /// + /// The dispatch origin of this call must be _Signed_. + /// + /// - `target`: The account to remove the lock on. + /// + /// Emits `Unlocked`. + /// + /// # + /// - `O(1)`. + /// # #[weight = SimpleDispatchInfo::FixedNormal(10_000)] fn unlock(origin, target: T::AccountId) { ensure_signed(origin)?; @@ -1066,7 +1373,6 @@ impl Module { fn clear_referendum(ref_index: ReferendumIndex) { >::remove(ref_index); - LowestUnbaked::mutate(|i| if *i == ref_index { *i += 1; let end = ReferendumCount::get(); -- GitLab From 69175fbe0beb37718c341b18191260000c61c3d9 Mon Sep 17 00:00:00 2001 From: Chevdor Date: Wed, 4 Mar 2020 14:17:50 +0100 Subject: [PATCH 074/106] Fix substrate default storage location (#5064) --- .maintain/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.maintain/Dockerfile b/.maintain/Dockerfile index 56bfc7a2cc4..2fc1532aa28 100644 --- a/.maintain/Dockerfile +++ b/.maintain/Dockerfile @@ -20,7 +20,6 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ export PATH="$PATH:$HOME/.cargo/bin" && \ rustup toolchain install nightly && \ rustup target add wasm32-unknown-unknown --toolchain nightly && \ - rustup default nightly && \ rustup default stable && \ cargo build "--$PROFILE" @@ -34,9 +33,10 @@ ARG PROFILE=release RUN mv /usr/share/ca* /tmp && \ rm -rf /usr/share/* && \ mv /tmp/ca-certificates /usr/share/ && \ - mkdir -p /root/.local/share/Polkadot && \ - ln -s /root/.local/share/Polkadot /data && \ - useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate + useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate && \ + mkdir -p /substrate/.local/share/substrate && \ + chown -R substrate:substrate /substrate/.local && \ + ln -s /substrate/.local/share/substrate /data COPY --from=builder /substrate/target/$PROFILE/substrate /usr/local/bin @@ -49,7 +49,7 @@ RUN rm -rf /usr/lib/python* && \ rm -rf /usr/bin /usr/sbin /usr/share/man USER substrate -EXPOSE 30333 9933 9944 +EXPOSE 30333 9933 9944 9615 VOLUME ["/data"] CMD ["/usr/local/bin/substrate"] -- GitLab From bb05439493dd346b54e00f295fa727fa2e0e023d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20P=C3=A1nik?= Date: Wed, 4 Mar 2020 14:19:38 +0100 Subject: [PATCH 075/106] Added subscribe_all_heads RPC function (#4979) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added subscribe_all_heads RPC function * Update client/rpc/src/chain/tests.rs Fixed style ( spacing ) Co-Authored-By: Tomasz DrwiÄ™ga Co-authored-by: Tomasz DrwiÄ™ga --- client/rpc-api/src/chain/mod.rs | 16 +++++++++++-- client/rpc/src/chain/mod.rs | 42 +++++++++++++++++++++++++++++---- client/rpc/src/chain/tests.rs | 29 +++++++++++++++++++++++ 3 files changed, 81 insertions(+), 6 deletions(-) diff --git a/client/rpc-api/src/chain/mod.rs b/client/rpc-api/src/chain/mod.rs index 0c270a3f705..2ab3851d376 100644 --- a/client/rpc-api/src/chain/mod.rs +++ b/client/rpc-api/src/chain/mod.rs @@ -54,6 +54,18 @@ pub trait ChainApi { #[rpc(name = "chain_getFinalizedHead", alias("chain_getFinalisedHead"))] fn finalized_head(&self) -> Result; + /// All head subscription + #[pubsub(subscription = "chain_allHead", subscribe, name = "chain_subscribeAllHeads")] + fn subscribe_all_heads(&self, metadata: Self::Metadata, subscriber: Subscriber

); + + /// Unsubscribe from all head subscription. + #[pubsub(subscription = "chain_allHead", unsubscribe, name = "chain_unsubscribeAllHeads")] + fn unsubscribe_all_heads( + &self, + metadata: Option, + id: SubscriptionId, + ) -> RpcResult; + /// New head subscription #[pubsub( subscription = "chain_newHead", @@ -76,7 +88,7 @@ pub trait ChainApi { id: SubscriptionId, ) -> RpcResult; - /// New head subscription + /// Finalized head subscription #[pubsub( subscription = "chain_finalizedHead", subscribe, @@ -85,7 +97,7 @@ pub trait ChainApi { )] fn subscribe_finalized_heads(&self, metadata: Self::Metadata, subscriber: Subscriber
); - /// Unsubscribe from new head subscription. + /// Unsubscribe from finalized head subscription. #[pubsub( subscription = "chain_finalizedHead", unsubscribe, diff --git a/client/rpc/src/chain/mod.rs b/client/rpc/src/chain/mod.rs index a2971983c79..5285de670d8 100644 --- a/client/rpc/src/chain/mod.rs +++ b/client/rpc/src/chain/mod.rs @@ -94,7 +94,33 @@ trait ChainBackend: Send + Sync + 'static Ok(self.client().chain_info().finalized_hash) } - /// New head subscription + /// All new head subscription + fn subscribe_all_heads( + &self, + _metadata: crate::metadata::Metadata, + subscriber: Subscriber, + ) { + subscribe_headers( + self.client(), + self.subscriptions(), + subscriber, + || self.client().chain_info().best_hash, + || self.client().import_notification_stream() + .map(|notification| Ok::<_, ()>(notification.header)) + .compat(), + ) + } + + /// Unsubscribe from all head subscription. + fn unsubscribe_all_heads( + &self, + _metadata: Option, + id: SubscriptionId, + ) -> RpcResult { + Ok(self.subscriptions().cancel(id)) + } + + /// New best head subscription fn subscribe_new_heads( &self, _metadata: crate::metadata::Metadata, @@ -112,7 +138,7 @@ trait ChainBackend: Send + Sync + 'static ) } - /// Unsubscribe from new head subscription. + /// Unsubscribe from new best head subscription. fn unsubscribe_new_heads( &self, _metadata: Option, @@ -121,7 +147,7 @@ trait ChainBackend: Send + Sync + 'static Ok(self.subscriptions().cancel(id)) } - /// New head subscription + /// Finalized head subscription fn subscribe_finalized_heads( &self, _metadata: crate::metadata::Metadata, @@ -138,7 +164,7 @@ trait ChainBackend: Send + Sync + 'static ) } - /// Unsubscribe from new head subscription. + /// Unsubscribe from finalized head subscription. fn unsubscribe_finalized_heads( &self, _metadata: Option, @@ -229,6 +255,14 @@ impl ChainApi, Block::Hash, Block::Header, Sig self.backend.finalized_head() } + fn subscribe_all_heads(&self, metadata: Self::Metadata, subscriber: Subscriber) { + self.backend.subscribe_all_heads(metadata, subscriber) + } + + fn unsubscribe_all_heads(&self, metadata: Option, id: SubscriptionId) -> RpcResult { + self.backend.unsubscribe_all_heads(metadata, id) + } + fn subscribe_new_heads(&self, metadata: Self::Metadata, subscriber: Subscriber) { self.backend.subscribe_new_heads(metadata, subscriber) } diff --git a/client/rpc/src/chain/tests.rs b/client/rpc/src/chain/tests.rs index eb056390187..02e4d2f1633 100644 --- a/client/rpc/src/chain/tests.rs +++ b/client/rpc/src/chain/tests.rs @@ -195,6 +195,35 @@ fn should_notify_about_latest_block() { let remote = core.executor(); let (subscriber, id, transport) = Subscriber::new_test("test"); + { + let mut client = Arc::new(substrate_test_runtime_client::new()); + let api = new_full(client.clone(), Subscriptions::new(Arc::new(remote))); + + api.subscribe_all_heads(Default::default(), subscriber); + + // assert id assigned + assert_eq!(core.block_on(id), Ok(Ok(SubscriptionId::Number(1)))); + + let block = client.new_block(Default::default()).unwrap().build().unwrap().block; + client.import(BlockOrigin::Own, block).unwrap(); + } + + // assert initial head sent. + let (notification, next) = core.block_on(transport.into_future()).unwrap(); + assert!(notification.is_some()); + // assert notification sent to transport + let (notification, next) = core.block_on(next.into_future()).unwrap(); + assert!(notification.is_some()); + // no more notifications on this channel + assert_eq!(core.block_on(next.into_future()).unwrap().0, None); +} + +#[test] +fn should_notify_about_best_block() { + let mut core = ::tokio::runtime::Runtime::new().unwrap(); + let remote = core.executor(); + let (subscriber, id, transport) = Subscriber::new_test("test"); + { let mut client = Arc::new(substrate_test_runtime_client::new()); let api = new_full(client.clone(), Subscriptions::new(Arc::new(remote))); -- GitLab From bad64ce5af5a2f4ca9290640867d691df2e9006d Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Wed, 4 Mar 2020 18:21:42 +0200 Subject: [PATCH 076/106] A Pallet for Benchmarking Common Runtime Operations (#4902) * Benchmark pallet * Add a bunch more benchmarks * do nothing test * new benchmarks * Clean up extra tests * Encode and Decode Vec * Starting to migrate benchmarks to macro * Use macro * Remove call and storage * Update Cargo.toml * Add storage recalc benchmark * Add support for custom functions in benchmark! macro * Reset DB for storage recalc * Feedback from review * Add more comments * Remove benchmark pallet from node * Fix cargo files * Fix comments * Change `crate` to `super` * missed one * Use results of benchmark encode/decode * Pass generic to extra functions * reset macro to master * Update lib.rs * Update to use standard syntax --- Cargo.lock | 14 ++ Cargo.toml | 1 + client/network/src/protocol/sync/blocks.rs | 1 - frame/balances/src/benchmarking.rs | 2 +- frame/benchmark/Cargo.toml | 29 ++++ frame/benchmark/src/benchmarking.rs | 131 +++++++++++++++ frame/benchmark/src/lib.rs | 177 +++++++++++++++++++++ frame/benchmarking/src/lib.rs | 7 +- frame/example/src/lib.rs | 2 +- frame/identity/src/benchmarking.rs | 2 +- frame/timestamp/src/benchmarking.rs | 1 - 11 files changed, 359 insertions(+), 8 deletions(-) create mode 100644 frame/benchmark/Cargo.toml create mode 100644 frame/benchmark/src/benchmarking.rs create mode 100644 frame/benchmark/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index a7fdd2b4c91..4489d0d280f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3966,6 +3966,20 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-benchmark" +version = "2.0.0-alpha.3" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-collective" version = "2.0.0-alpha.3" diff --git a/Cargo.toml b/Cargo.toml index 1ac2beb052f..0459bc8ebbd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -62,6 +62,7 @@ members = [ "frame/babe", "frame/balances", "frame/benchmarking", + "frame/benchmark", "frame/collective", "frame/contracts", "frame/contracts/rpc", diff --git a/client/network/src/protocol/sync/blocks.rs b/client/network/src/protocol/sync/blocks.rs index 279150a2255..31b798ace28 100644 --- a/client/network/src/protocol/sync/blocks.rs +++ b/client/network/src/protocol/sync/blocks.rs @@ -14,7 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -use std::mem; use std::cmp; use std::ops::Range; use std::collections::{HashMap, BTreeMap}; diff --git a/frame/balances/src/benchmarking.rs b/frame/balances/src/benchmarking.rs index 371692b650f..2473ce29200 100644 --- a/frame/balances/src/benchmarking.rs +++ b/frame/balances/src/benchmarking.rs @@ -20,7 +20,7 @@ use super::*; use frame_system::RawOrigin; use frame_benchmarking::{benchmarks, account}; -use sp_runtime::traits::{Bounded, Dispatchable}; +use sp_runtime::traits::Bounded; use crate::Module as Balances; diff --git a/frame/benchmark/Cargo.toml b/frame/benchmark/Cargo.toml new file mode 100644 index 00000000000..bf237d992cd --- /dev/null +++ b/frame/benchmark/Cargo.toml @@ -0,0 +1,29 @@ +[package] +name = "pallet-benchmark" +version = "2.0.0-alpha.3" +authors = ["Parity Technologies "] +edition = "2018" +license = "GPL-3.0" + +[dependencies] +serde = { version = "1.0.101", optional = true } +codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } +sp-std = { version = "2.0.0-alpha.3", default-features = false, path = "../../primitives/std" } +sp-io = { version = "2.0.0-alpha.3", default-features = false, path = "../../primitives/io" } +sp-runtime = { version = "2.0.0-alpha.3", default-features = false, path = "../../primitives/runtime" } +frame-support = { version = "2.0.0-alpha.3", default-features = false, path = "../support" } +frame-system = { version = "2.0.0-alpha.3", default-features = false, path = "../system" } +frame-benchmarking = { version = "2.0.0-alpha.3", default-features = false, path = "../benchmarking" } + +[features] +default = ["std"] +std = [ + "serde", + "codec/std", + "sp-std/std", + "sp-io/std", + "sp-runtime/std", + "frame-support/std", + "frame-system/std", + "frame-benchmarking/std", +] diff --git a/frame/benchmark/src/benchmarking.rs b/frame/benchmark/src/benchmarking.rs new file mode 100644 index 00000000000..29f9e8ee972 --- /dev/null +++ b/frame/benchmark/src/benchmarking.rs @@ -0,0 +1,131 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Benchmarks for common FRAME Pallet operations. + +use super::*; + +use frame_system::RawOrigin; +use sp_std::prelude::*; +use frame_benchmarking::{benchmarks, account}; + +use crate::Module as Benchmark; + +const SEED: u32 = 0; + +benchmarks! { + _ { + let m in 1 .. 1000 => { + let origin = RawOrigin::Signed(account("member", m, SEED)); + Benchmark::::add_member_list(origin.into())? + }; + let i in 1 .. 1000 => { + MyMap::insert(i, i); + }; + let d in 1 .. 1000 => { + for i in 0..d { + for j in 0..100 { + MyDoubleMap::insert(i, j, d); + } + } + }; + } + + add_member_list { + let m in ...; + }: _(RawOrigin::Signed(account("member", m + 1, SEED))) + + append_member_list { + let m in ...; + }: _(RawOrigin::Signed(account("member", m + 1, SEED))) + + read_value { + let n in 1 .. 1000; + MyValue::put(n); + }: _(RawOrigin::Signed(account("user", 0, SEED)), n) + + put_value { + let n in 1 .. 1000; + }: _(RawOrigin::Signed(account("user", 0, SEED)), n) + + exists_value { + let n in 1 .. 1000; + MyValue::put(n); + }: _(RawOrigin::Signed(account("user", 0, SEED)), n) + + remove_value { + let i in ...; + }: _(RawOrigin::Signed(account("user", 0, SEED)), i) + + read_map { + let i in ...; + }: _(RawOrigin::Signed(account("user", 0, SEED)), i) + + insert_map { + let n in 1 .. 1000; + }: _(RawOrigin::Signed(account("user", 0, SEED)), n) + + contains_key_map { + let i in ...; + }: _(RawOrigin::Signed(account("user", 0, SEED)), i) + + remove_prefix { + let d in ...; + }: _(RawOrigin::Signed(account("user", 0, SEED)), d) + + do_nothing { + let n in 1 .. 1000; + }: _(RawOrigin::Signed(account("user", 0, SEED)), n) + + encode_accounts { + let a in 1 .. 1000; + let mut accounts = Vec::new(); + for _ in 0..a { + accounts.push(account::("encode", a, SEED)); + } + }: _(RawOrigin::Signed(account("user", 0, SEED)), accounts) + + decode_accounts { + let a in 1 .. 1000; + let mut accounts = Vec::new(); + for _ in 0..a { + accounts.push(account::("encode", a, SEED)); + } + let bytes = accounts.encode(); + }: _(RawOrigin::Signed(account("user", 0, SEED)), bytes) + + // Custom implementation to handle benchmarking of storage recalculation. + // Puts `repeat` number of items into random storage keys, and then times how + // long it takes to recalculate the storage root. + storage_root { + let z in 0 .. 10000; + }: { + for index in 0 .. z { + let random = (index).using_encoded(sp_io::hashing::blake2_256); + sp_io::storage::set(&random, &random); + } + } + + // Custom implementation to handle benchmarking of calling a host function. + // Will check how long it takes to call `current_time()`. + current_time { + let z in 0 .. 1000; + }: { + for _ in 0 .. z { + let _ = frame_benchmarking::benchmarking::current_time(); + } + } +} diff --git a/frame/benchmark/src/lib.rs b/frame/benchmark/src/lib.rs new file mode 100644 index 00000000000..ef7731eea43 --- /dev/null +++ b/frame/benchmark/src/lib.rs @@ -0,0 +1,177 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! A pallet that contains common runtime patterns in an isolated manner. +//! This pallet is **not** meant to be used in a production blockchain, just +//! for benchmarking and testing purposes. + +#![cfg_attr(not(feature = "std"), no_std)] + +use frame_support::{decl_module, decl_storage, decl_event, decl_error}; +use frame_support::traits::Currency; +use frame_system::{self as system, ensure_signed}; +use codec::{Encode, Decode}; +use sp_std::prelude::Vec; + +pub mod benchmarking; + +/// Type alias for currency balance. +pub type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; + +/// The pallet's configuration trait. +pub trait Trait: system::Trait { + type Event: From> + Into<::Event>; + type Currency: Currency; +} + +// This pallet's storage items. +decl_storage! { + trait Store for Module as Benchmark { + MyMemberList: Vec; + MyMemberMap: map hasher(blake2_256) T::AccountId => bool; + MyValue: u32; + MyMap: map hasher(blake2_256) u32 => u32; + MyDoubleMap: double_map hasher(blake2_256) u32, hasher(blake2_256) u32 => u32; + } +} + +// The pallet's events +decl_event!( + pub enum Event where AccountId = ::AccountId { + Dummy(u32, AccountId), + } +); + +// The pallet's errors +decl_error! { + pub enum Error for Module { + } +} + +// The pallet's dispatchable functions. +decl_module! { + /// The module declaration. + pub struct Module for enum Call where origin: T::Origin { + type Error = Error; + + fn deposit_event() = default; + + /// Do nothing. + pub fn do_nothing(_origin, input: u32) { + if input > 0 { + return Ok(()); + } + } + + /// Read a value from storage value `repeat` number of times. + /// Note the first `get()` read here will pull from the underlying + /// storage database, however, the `repeat` calls will all pull from the + /// storage overlay cache. You must consider this when analyzing the + /// results of the benchmark. + pub fn read_value(_origin, repeat: u32) { + for _ in 0..repeat { + MyValue::get(); + } + } + + /// Put a value into a storage value. + pub fn put_value(_origin, repeat: u32) { + for r in 0..repeat { + MyValue::put(r); + } + } + + /// Read a value from storage `repeat` number of times. + /// Note the first `exists()` read here will pull from the underlying + /// storage database, however, the `repeat` calls will all pull from the + /// storage overlay cache. You must consider this when analyzing the + /// results of the benchmark. + pub fn exists_value(_origin, repeat: u32) { + for _ in 0..repeat { + MyValue::exists(); + } + } + + /// Remove a value from storage `repeat` number of times. + pub fn remove_value(_origin, repeat: u32) { + for r in 0..repeat { + MyMap::remove(r); + } + } + + /// Read a value from storage map `repeat` number of times. + pub fn read_map(_origin, repeat: u32) { + for r in 0..repeat { + MyMap::get(r); + } + } + + /// Insert a value into a map. + pub fn insert_map(_origin, repeat: u32) { + for r in 0..repeat { + MyMap::insert(r, r); + } + } + + /// Check is a map contains a value `repeat` number of times. + pub fn contains_key_map(_origin, repeat: u32) { + for r in 0..repeat { + MyMap::contains_key(r); + } + } + + /// Read a value from storage `repeat` number of times. + pub fn remove_prefix(_origin, repeat: u32) { + for r in 0..repeat { + MyDoubleMap::remove_prefix(r); + } + } + + // Add user to the list. + pub fn add_member_list(origin) { + let who = ensure_signed(origin)?; + MyMemberList::::mutate(|x| x.push(who)); + } + + // Append user to the list. + pub fn append_member_list(origin) { + let who = ensure_signed(origin)?; + MyMemberList::::append(&[who])?; + } + + // Encode a vector of accounts to bytes. + pub fn encode_accounts(_origin, accounts: Vec) { + let bytes = accounts.encode(); + + // In an attempt to tell the compiler not to optimize away this benchmark, we will use + // the result of encoding the accounts. + if bytes.is_empty() { + frame_support::print("You are encoding zero accounts."); + } + } + + // Decode bytes into a vector of accounts. + pub fn decode_accounts(_origin, bytes: Vec) { + let accounts: Vec = Decode::decode(&mut bytes.as_slice()).map_err(|_| "Could not decode")?; + + // In an attempt to tell the compiler not to optimize away this benchmark, we will use + // the result of decoding the bytes. + if accounts.is_empty() { + frame_support::print("You are decoding zero bytes."); + } + } + } +} diff --git a/frame/benchmarking/src/lib.rs b/frame/benchmarking/src/lib.rs index f7e98336b29..a18048d3053 100644 --- a/frame/benchmarking/src/lib.rs +++ b/frame/benchmarking/src/lib.rs @@ -23,6 +23,7 @@ mod utils; pub use utils::*; #[doc(hidden)] pub use sp_io::storage::root as storage_root; +pub use sp_runtime::traits::Dispatchable; /// Construct pallet benchmarks for weighing dispatchables. /// @@ -79,14 +80,14 @@ pub use sp_io::storage::root as storage_root; /// } /// /// // first dispatchable: foo; this is a user dispatchable and operates on a `u8` vector of -/// // size `l`, which we allow to be initialised as usual. +/// // size `l`, which we allow to be initialized as usual. /// foo { /// let caller = account::(b"caller", 0, benchmarks_seed); /// let l = ...; /// }: _(Origin::Signed(caller), vec![0u8; l]) /// /// // second dispatchable: bar; this is a root dispatchable and accepts a `u8` vector of size -/// // `l`. We don't want it preininitialised like before so we override using the `=> ()` notation. +/// // `l`. We don't want it pre-initialized like before so we override using the `=> ()` notation. /// // In this case, we explicitly name the call using `bar` instead of `_`. /// bar { /// let l = _ .. _ => (); @@ -157,7 +158,7 @@ macro_rules! benchmarks_iter { ) => { $crate::benchmarks_iter! { { $( $common )* } ( $( $names )* ) $name { $( $code )* }: { - Call::::$dispatch($($arg),*).dispatch($origin.into())?; + as $crate::Dispatchable>::dispatch(Call::::$dispatch($($arg),*), $origin.into())?; } $( $rest )* } }; diff --git a/frame/example/src/lib.rs b/frame/example/src/lib.rs index 57d6c97729a..826538ae582 100644 --- a/frame/example/src/lib.rs +++ b/frame/example/src/lib.rs @@ -263,7 +263,7 @@ use frame_benchmarking::{benchmarks, account}; use frame_system::{self as system, ensure_signed, ensure_root, RawOrigin}; use codec::{Encode, Decode}; use sp_runtime::{ - traits::{SignedExtension, Bounded, SaturatedConversion, Dispatchable}, + traits::{SignedExtension, Bounded, SaturatedConversion}, transaction_validity::{ ValidTransaction, TransactionValidityError, InvalidTransaction, TransactionValidity, }, diff --git a/frame/identity/src/benchmarking.rs b/frame/identity/src/benchmarking.rs index 20ff66f0db8..b7a81956a55 100644 --- a/frame/identity/src/benchmarking.rs +++ b/frame/identity/src/benchmarking.rs @@ -21,7 +21,7 @@ use super::*; use frame_system::RawOrigin; use sp_io::hashing::blake2_256; use frame_benchmarking::benchmarks; -use sp_runtime::traits::{Bounded, Dispatchable}; +use sp_runtime::traits::Bounded; use crate::Module as Identity; diff --git a/frame/timestamp/src/benchmarking.rs b/frame/timestamp/src/benchmarking.rs index 52b589773e9..5f69cdbe7e0 100644 --- a/frame/timestamp/src/benchmarking.rs +++ b/frame/timestamp/src/benchmarking.rs @@ -22,7 +22,6 @@ use sp_std::prelude::*; use frame_system::RawOrigin; use frame_benchmarking::benchmarks; -use sp_runtime::traits::Dispatchable; const MAX_TIME: u32 = 100; -- GitLab From c3ff85d13b8b660c2c4eb850209c06a9397bed3e Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Wed, 4 Mar 2020 17:22:02 +0100 Subject: [PATCH 077/106] Drop db-cache default from 1gig to 32mb (#5128) --- client/cli/src/params/import_params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/params/import_params.rs b/client/cli/src/params/import_params.rs index 36c62bc979c..f7f68d68fb0 100644 --- a/client/cli/src/params/import_params.rs +++ b/client/cli/src/params/import_params.rs @@ -55,7 +55,7 @@ pub struct ImportParams { pub execution_strategies: ExecutionStrategies, /// Limit the memory the database cache can use. - #[structopt(long = "db-cache", value_name = "MiB", default_value = "1024")] + #[structopt(long = "db-cache", value_name = "MiB", default_value = "32")] pub database_cache_size: u32, /// Specify the state cache size. -- GitLab From 046c22c133baadd57f8aa60e601be4d4ac9b9f86 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Wed, 4 Mar 2020 20:24:17 +0100 Subject: [PATCH 078/106] Forget peerset manager nodes after 5mn (#5108) * Forget peerstore nodes after 5mn * Bump to one hour * Also bump on rediscover --- client/peerset/src/lib.rs | 27 +++++++--- client/peerset/src/peersstate.rs | 84 ++++++++++++++++++++++++++++---- 2 files changed, 95 insertions(+), 16 deletions(-) diff --git a/client/peerset/src/lib.rs b/client/peerset/src/lib.rs index 53e3b35297b..bd6c19a62d1 100644 --- a/client/peerset/src/lib.rs +++ b/client/peerset/src/lib.rs @@ -23,7 +23,7 @@ use std::{collections::{HashSet, HashMap}, collections::VecDeque}; use futures::{prelude::*, channel::mpsc}; use log::{debug, error, trace}; use serde_json::json; -use std::{pin::Pin, task::Context, task::Poll}; +use std::{pin::Pin, task::{Context, Poll}, time::Duration}; use wasm_timer::Instant; pub use libp2p::PeerId; @@ -34,6 +34,9 @@ const BANNED_THRESHOLD: i32 = 82 * (i32::min_value() / 100); const DISCONNECT_REPUTATION_CHANGE: i32 = -256; /// Reserved peers group ID const RESERVED_NODES: &'static str = "reserved"; +/// Amount of time between the moment we disconnect from a node and the moment we remove it from +/// the list. +const FORGET_AFTER: Duration = Duration::from_secs(3600); #[derive(Debug)] enum Action { @@ -310,10 +313,11 @@ impl Peerset { /// Updates the value of `self.latest_time_update` and performs all the updates that happen /// over time, such as reputation increases for staying connected. fn update_time(&mut self) { + let now = Instant::now(); + // We basically do `(now - self.latest_update).as_secs()`, except that by the way we do it // we know that we're not going to miss seconds because of rounding to integers. let secs_diff = { - let now = Instant::now(); let elapsed_latest = self.latest_time_update - self.created; let elapsed_now = now - self.created; self.latest_time_update = now; @@ -345,10 +349,16 @@ impl Peerset { peer.set_reputation(after) } peersstate::Peer::NotConnected(mut peer) => { - let before = peer.reputation(); - let after = reput_tick(before); - trace!(target: "peerset", "Fleeting {}: {} -> {}", peer_id, before, after); - peer.set_reputation(after) + if peer.reputation() == 0 && + peer.last_connected_or_discovered() + FORGET_AFTER < now + { + peer.forget_peer(); + } else { + let before = peer.reputation(); + let after = reput_tick(before); + trace!(target: "peerset", "Fleeting {}: {} -> {}", peer_id, before, after); + peer.set_reputation(after) + } } peersstate::Peer::Unknown(_) => unreachable!("We iterate over known peers; qed") }; @@ -414,7 +424,10 @@ impl Peerset { let not_connected = match self.data.peer(&peer_id) { // If we're already connected, don't answer, as the docs mention. peersstate::Peer::Connected(_) => return, - peersstate::Peer::NotConnected(entry) => entry, + peersstate::Peer::NotConnected(mut entry) => { + entry.bump_last_connected_or_discovered(); + entry + }, peersstate::Peer::Unknown(entry) => entry.discover(), }; diff --git a/client/peerset/src/peersstate.rs b/client/peerset/src/peersstate.rs index 96a6698734b..7abf17a5f83 100644 --- a/client/peerset/src/peersstate.rs +++ b/client/peerset/src/peersstate.rs @@ -17,8 +17,9 @@ //! Contains the state storage behind the peerset. use libp2p::PeerId; +use log::{error, warn}; use std::{borrow::Cow, collections::{HashSet, HashMap}}; -use log::warn; +use wasm_timer::Instant; /// State storage behind the peerset. /// @@ -69,7 +70,9 @@ struct Node { impl Default for Node { fn default() -> Node { Node { - connection_state: ConnectionState::NotConnected, + connection_state: ConnectionState::NotConnected { + last_connected: Instant::now(), + }, reputation: 0, } } @@ -83,7 +86,11 @@ enum ConnectionState { /// We are connected through an outgoing connection. Out, /// We are not connected to this node. - NotConnected, + NotConnected { + /// When we were last connected to the node, or if we were never connected when we + /// discovered it. + last_connected: Instant, + }, } impl ConnectionState { @@ -92,7 +99,7 @@ impl ConnectionState { match self { ConnectionState::In => true, ConnectionState::Out => true, - ConnectionState::NotConnected => false, + ConnectionState::NotConnected { .. } => false, } } } @@ -212,11 +219,13 @@ impl PeersState { match node.connection_state { ConnectionState::In => self.num_in -= 1, ConnectionState::Out => self.num_out -= 1, - ConnectionState::NotConnected => + ConnectionState::NotConnected { .. } => debug_assert!(false, "State inconsistency: disconnecting a disconnected node") } } - node.connection_state = ConnectionState::NotConnected; + node.connection_state = ConnectionState::NotConnected { + last_connected: Instant::now(), + }; } else { warn!(target: "peerset", "Attempting to disconnect unknown peer {}", peer_id); } @@ -292,7 +301,7 @@ impl PeersState { match peer.connection_state { ConnectionState::In => self.num_in += 1, ConnectionState::Out => self.num_out += 1, - ConnectionState::NotConnected => {}, + ConnectionState::NotConnected { .. } => {}, } } } @@ -305,7 +314,7 @@ impl PeersState { match peer.connection_state { ConnectionState::In => self.num_in -= 1, ConnectionState::Out => self.num_out -= 1, - ConnectionState::NotConnected => {}, + ConnectionState::NotConnected { .. } => {}, } } } @@ -467,6 +476,45 @@ impl<'a> NotConnectedPeer<'a> { self.peer_id.into_owned() } + /// Bumps the value that `last_connected_or_discovered` would return to now, even if we + /// didn't connect or disconnect. + pub fn bump_last_connected_or_discovered(&mut self) { + let state = match self.state.nodes.get_mut(&*self.peer_id) { + Some(s) => s, + None => return, + }; + + if let ConnectionState::NotConnected { last_connected } = &mut state.connection_state { + *last_connected = Instant::now(); + } + } + + /// Returns when we were last connected to this peer, or when we discovered it if we were + /// never connected. + /// + /// Guaranteed to be earlier than calling `Instant::now()` after the function returns. + pub fn last_connected_or_discovered(&self) -> Instant { + let state = match self.state.nodes.get(&*self.peer_id) { + Some(s) => s, + None => { + error!( + target: "peerset", + "State inconsistency with {}; not connected after borrow", + self.peer_id + ); + return Instant::now(); + } + }; + + match state.connection_state { + ConnectionState::NotConnected { last_connected } => last_connected, + _ => { + error!(target: "peerset", "State inconsistency with {}", self.peer_id); + Instant::now() + } + } + } + /// Tries to set the peer as connected as an outgoing connection. /// /// If there are enough slots available, switches the node to "connected" and returns `Ok`. If @@ -518,6 +566,22 @@ impl<'a> NotConnectedPeer<'a> { pub fn add_reputation(&mut self, modifier: i32) { self.state.add_reputation(&self.peer_id, modifier) } + + /// Un-discovers the peer. Removes it from the list. + pub fn forget_peer(self) -> UnknownPeer<'a> { + if self.state.nodes.remove(&*self.peer_id).is_none() { + error!( + target: "peerset", + "State inconsistency with {} when forgetting peer", + self.peer_id + ); + } + + UnknownPeer { + parent: self.state, + peer_id: self.peer_id, + } + } } /// A peer that we have never heard of. @@ -533,7 +597,9 @@ impl<'a> UnknownPeer<'a> { /// values using the `NotConnectedPeer` that this method returns. pub fn discover(self) -> NotConnectedPeer<'a> { self.parent.nodes.insert(self.peer_id.clone().into_owned(), Node { - connection_state: ConnectionState::NotConnected, + connection_state: ConnectionState::NotConnected { + last_connected: Instant::now(), + }, reputation: 0, }); -- GitLab From a193a19d57c894ddec17b95dc8f2b8f379be0d11 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Wed, 4 Mar 2020 20:26:16 +0100 Subject: [PATCH 079/106] Don't include `:code` by default in storage proofs (#5060) * Adds test to verify that the runtime currently is always contained in the proof * Start passing the runtime wasm code from the outside * Fix compilation * More build fixes * Make the test work as expected now :) * Last fixes * Fixes benchmarks * Review feedback * Apply suggestions from code review Co-Authored-By: Sergei Pepyakin * Review feedback * Fix compilation Co-authored-by: Sergei Pepyakin --- Cargo.lock | 4 + bin/node/executor/benches/bench.rs | 16 ++- bin/node/executor/tests/common.rs | 6 +- .../basic-authorship/src/basic_authorship.rs | 3 +- client/block-builder/Cargo.toml | 4 + client/block-builder/src/lib.rs | 54 ++++++++- client/executor/src/lib.rs | 8 +- client/executor/src/native_executor.rs | 16 ++- client/executor/src/wasm_runtime.rs | 41 +++---- client/network/src/chain.rs | 22 ++-- .../src/protocol/light_client_handler.rs | 19 +-- client/network/src/protocol/light_dispatch.rs | 6 +- client/src/call_executor.rs | 11 +- client/src/client.rs | 16 ++- client/src/genesis.rs | 14 +++ client/src/light/backend.rs | 4 +- client/src/light/call_executor.rs | 12 +- client/src/light/fetcher.rs | 11 +- frame/system/benches/bench.rs | 2 +- primitives/api/test/Cargo.toml | 1 + primitives/api/test/tests/runtime_calls.rs | 7 ++ primitives/core/src/traits.rs | 65 +++++++++++ primitives/runtime/src/generic/block.rs | 11 +- primitives/state-machine/src/backend.rs | 23 +++- primitives/state-machine/src/lib.rs | 66 +++++++++-- .../state-machine/src/proving_backend.rs | 100 +--------------- primitives/trie/src/lib.rs | 2 + primitives/trie/src/storage_proof.rs | 109 ++++++++++++++++++ test-utils/runtime/src/system.rs | 8 +- utils/frame/benchmarking-cli/Cargo.toml | 1 + utils/frame/benchmarking-cli/src/lib.rs | 1 + 31 files changed, 480 insertions(+), 183 deletions(-) create mode 100644 primitives/trie/src/storage_proof.rs diff --git a/Cargo.lock b/Cargo.lock index 4489d0d280f..ee69ca599eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1478,6 +1478,7 @@ dependencies = [ "sc-executor", "sc-service", "sp-runtime", + "sp-state-machine", "structopt", ] @@ -5652,6 +5653,8 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", + "sp-trie", + "substrate-test-runtime-client", ] [[package]] @@ -6955,6 +6958,7 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", + "sp-core", "sp-runtime", "sp-state-machine", "sp-version", diff --git a/bin/node/executor/benches/bench.rs b/bin/node/executor/benches/bench.rs index 034c7c6759e..c411bec851c 100644 --- a/bin/node/executor/benches/bench.rs +++ b/bin/node/executor/benches/bench.rs @@ -25,8 +25,8 @@ use node_runtime::constants::currency::*; use node_testing::keyring::*; use sp_core::{Blake2Hasher, NativeOrEncoded, NeverNativeValue}; use sp_core::storage::well_known_keys; -use sp_core::traits::CodeExecutor; -use frame_support::Hashable; +use sp_core::traits::{CodeExecutor, RuntimeCode}; +use frame_support::Hashable; use sp_state_machine::TestExternalities as CoreTestExternalities; use sc_executor::{NativeExecutor, RuntimeInfo, WasmExecutionMethod, Externalities}; @@ -89,9 +89,12 @@ fn construct_block( digest: Default::default(), }; + let runtime_code = RuntimeCode::from_externalities(ext).expect("`ext` provides `:code`"); + // execute the block to get the real header. executor.call::<_, NeverNativeValue, fn() -> _>( ext, + &runtime_code, "Core_initialize_block", &header.encode(), true, @@ -101,6 +104,7 @@ fn construct_block( for i in extrinsics.iter() { executor.call::<_, NeverNativeValue, fn() -> _>( ext, + &runtime_code, "BlockBuilder_apply_extrinsic", &i.encode(), true, @@ -110,6 +114,7 @@ fn construct_block( let header = match executor.call::<_, NeverNativeValue, fn() -> _>( ext, + &runtime_code, "BlockBuilder_finalize_block", &[0u8;0], true, @@ -165,7 +170,9 @@ fn bench_execute_block(c: &mut Criterion) { // Get the runtime version to initialize the runtimes cache. { let mut test_ext = new_test_ext(&genesis_config); - executor.runtime_version(&mut test_ext.ext()); + let runtime_code = RuntimeCode::from_externalities(&test_ext.ext()) + .expect("`test_ext` provides `:code`"); + executor.runtime_version(&mut test_ext.ext(), &runtime_code).unwrap(); } let blocks = test_blocks(&genesis_config, &executor); @@ -173,9 +180,12 @@ fn bench_execute_block(c: &mut Criterion) { b.iter_batched_ref( || new_test_ext(&genesis_config), |test_ext| { + let runtime_code = RuntimeCode::from_externalities(&test_ext.ext()) + .expect("`test_ext` provides `:code`"); for block in blocks.iter() { executor.call::<_, NeverNativeValue, fn() -> _>( &mut test_ext.ext(), + &runtime_code, "Core_execute_block", &block.0, use_native, diff --git a/bin/node/executor/tests/common.rs b/bin/node/executor/tests/common.rs index 090d2ee5d4a..4b838257222 100644 --- a/bin/node/executor/tests/common.rs +++ b/bin/node/executor/tests/common.rs @@ -18,8 +18,7 @@ use codec::{Encode, Decode}; use frame_support::Hashable; use sp_state_machine::TestExternalities as CoreTestExternalities; use sp_core::{ - Blake2Hasher, NeverNativeValue, NativeOrEncoded, - traits::CodeExecutor, + Blake2Hasher, NeverNativeValue, NativeOrEncoded, traits::{CodeExecutor, RuntimeCode}, }; use sp_runtime::{ApplyExtrinsicResult, traits::Header as HeaderT}; use sc_executor::{NativeExecutor, WasmExecutionMethod}; @@ -74,8 +73,11 @@ pub fn executor_call< native_call: Option, ) -> (Result>, bool) { let mut t = t.ext(); + let runtime_code = RuntimeCode::from_externalities(&t) + .expect("Code should be part of the externalities"); executor().call::<_, R, NC>( &mut t, + &runtime_code, method, data, use_native, diff --git a/client/basic-authorship/src/basic_authorship.rs b/client/basic-authorship/src/basic_authorship.rs index 231d0255919..a816a5498f8 100644 --- a/client/basic-authorship/src/basic_authorship.rs +++ b/client/basic-authorship/src/basic_authorship.rs @@ -231,7 +231,8 @@ impl ProposerInner debug!("[{:?}] Pushed to the block.", pending_tx_hash); } Err(sp_blockchain::Error::ApplyExtrinsicFailed(sp_blockchain::ApplyExtrinsicFailed::Validity(e))) - if e.exhausted_resources() => { + if e.exhausted_resources() => + { if is_first { debug!("[{:?}] Invalid transaction: FullBlock on empty block", pending_tx_hash); unqueue_invalid.push(pending_tx_hash); diff --git a/client/block-builder/Cargo.toml b/client/block-builder/Cargo.toml index 745669c033e..dd4ebcb07f8 100644 --- a/client/block-builder/Cargo.toml +++ b/client/block-builder/Cargo.toml @@ -19,3 +19,7 @@ sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } sp-block-builder = { version = "2.0.0-alpha.2", path = "../../primitives/block-builder" } sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] } + +[dev-dependencies] +substrate-test-runtime-client = { path = "../../test-utils/runtime/client" } +sp-trie = { version = "2.0.0-alpha.2", path = "../../primitives/trie" } diff --git a/client/block-builder/src/lib.rs b/client/block-builder/src/lib.rs index 4c14f3716f2..c9b2efbea9a 100644 --- a/client/block-builder/src/lib.rs +++ b/client/block-builder/src/lib.rs @@ -152,12 +152,20 @@ where /// Push onto the block's list of extrinsics. /// - /// This will treat incoming extrinsic `xt` as trusted and skip signature check (for signed transactions). - pub fn push_trusted(&mut self, xt: ::Extrinsic) -> Result<(), ApiErrorFor> { + /// This will treat incoming extrinsic `xt` as trusted and skip signature check + /// (for signed transactions). + pub fn push_trusted( + &mut self, + xt: ::Extrinsic, + ) -> Result<(), ApiErrorFor> { self.push_internal(xt, true) } - fn push_internal(&mut self, xt: ::Extrinsic, skip_signature: bool) -> Result<(), ApiErrorFor> { + fn push_internal( + &mut self, + xt: ::Extrinsic, + skip_signature: bool, + ) -> Result<(), ApiErrorFor> { let block_id = &self.block_id; let extrinsics = &mut self.extrinsics; @@ -175,7 +183,7 @@ where ExecutionContext::BlockConstruction, xt.clone(), )? - } else { + } else { api.apply_extrinsic_with_context( block_id, ExecutionContext::BlockConstruction, @@ -241,3 +249,41 @@ where }) } } + +#[cfg(test)] +mod tests { + use super::*; + use sp_blockchain::HeaderBackend; + use sp_core::Blake2Hasher; + use sp_state_machine::Backend; + use substrate_test_runtime_client::{DefaultTestClientBuilderExt, TestClientBuilderExt}; + + #[test] + fn block_building_storage_proof_does_not_include_runtime_by_default() { + let builder = substrate_test_runtime_client::TestClientBuilder::new(); + let backend = builder.backend(); + let client = builder.build(); + + let block = BlockBuilder::new( + &client, + client.info().best_hash, + client.info().best_number, + RecordProof::Yes, + Default::default(), + &*backend, + ).unwrap().build().unwrap(); + + let proof = block.proof.expect("Proof is build on request"); + + let backend = sp_state_machine::create_proof_check_backend::( + block.storage_changes.transaction_storage_root, + proof, + ).unwrap(); + + assert!( + backend.storage(&sp_core::storage::well_known_keys::CODE) + .unwrap_err() + .contains("Database missing expected key"), + ); + } +} diff --git a/client/executor/src/lib.rs b/client/executor/src/lib.rs index af53ed91838..f8761caa983 100644 --- a/client/executor/src/lib.rs +++ b/client/executor/src/lib.rs @@ -110,8 +110,12 @@ pub trait RuntimeInfo { /// Native runtime information. fn native_version(&self) -> &NativeVersion; - /// Extract RuntimeVersion of given :code block - fn runtime_version (&self, ext: &mut E) -> error::Result; + /// Extract [`RuntimeVersion`](sp_version::RuntimeVersion) of the given `runtime_code`. + fn runtime_version( + &self, + ext: &mut E, + runtime_code: &sp_core::traits::RuntimeCode, + ) -> error::Result; } #[cfg(test)] diff --git a/client/executor/src/native_executor.rs b/client/executor/src/native_executor.rs index 1364b753dbe..5a41b659717 100644 --- a/client/executor/src/native_executor.rs +++ b/client/executor/src/native_executor.rs @@ -20,7 +20,7 @@ use crate::{ }; use sp_version::{NativeVersion, RuntimeVersion}; use codec::{Decode, Encode}; -use sp_core::{NativeOrEncoded, traits::{CodeExecutor, Externalities}}; +use sp_core::{NativeOrEncoded, traits::{CodeExecutor, Externalities, RuntimeCode}}; use log::trace; use std::{result, cell::RefCell, panic::{UnwindSafe, AssertUnwindSafe}, sync::Arc}; use sp_wasm_interface::{HostFunctions, Function}; @@ -130,6 +130,7 @@ impl NativeExecutor { fn with_runtime( &self, ext: &mut E, + runtime_code: &RuntimeCode, f: impl for<'a> FnOnce( AssertUnwindSafe<&'a mut (dyn WasmRuntime + 'static)>, &'a RuntimeVersion, @@ -138,8 +139,9 @@ impl NativeExecutor { ) -> Result where E: Externalities { RUNTIMES_CACHE.with(|cache| { let mut cache = cache.borrow_mut(); - let (runtime, version, code_hash) = cache.fetch_runtime( + let (runtime, version) = cache.fetch_runtime( ext, + runtime_code, self.fallback_method, self.default_heap_pages, &*self.host_functions, @@ -151,7 +153,7 @@ impl NativeExecutor { match f(runtime, version, ext) { Ok(res) => res, Err(e) => { - cache.invalidate_runtime(self.fallback_method, code_hash); + cache.invalidate_runtime(self.fallback_method, runtime_code.hash.clone()); Err(e) } } @@ -179,8 +181,9 @@ impl RuntimeInfo for NativeExecutor { fn runtime_version( &self, ext: &mut E, + runtime_code: &RuntimeCode, ) -> Result { - self.with_runtime(ext, |_runtime, version, _ext| Ok(Ok(version.clone()))) + self.with_runtime(ext, runtime_code, |_runtime, version, _ext| Ok(Ok(version.clone()))) } } @@ -195,13 +198,14 @@ impl CodeExecutor for NativeExecutor { >( &self, ext: &mut E, + runtime_code: &RuntimeCode, method: &str, data: &[u8], use_native: bool, native_call: Option, - ) -> (Result>, bool){ + ) -> (Result>, bool) { let mut used_native = false; - let result = self.with_runtime(ext, |mut runtime, onchain_version, mut ext| { + let result = self.with_runtime(ext, runtime_code, |mut runtime, onchain_version, mut ext| { match ( use_native, onchain_version.can_call_with(&self.native_version.runtime_version), diff --git a/client/executor/src/wasm_runtime.rs b/client/executor/src/wasm_runtime.rs index 9d54246ee07..ab7b219dbf8 100644 --- a/client/executor/src/wasm_runtime.rs +++ b/client/executor/src/wasm_runtime.rs @@ -22,7 +22,7 @@ use crate::error::{Error, WasmError}; use log::{trace, warn}; use codec::Decode; -use sp_core::{storage::well_known_keys, traits::Externalities}; +use sp_core::traits::{Externalities, RuntimeCode}; use sp_version::RuntimeVersion; use std::{collections::hash_map::{Entry, HashMap}, panic::AssertUnwindSafe}; use sc_executor_common::wasm_runtime::WasmRuntime; @@ -86,8 +86,9 @@ impl RuntimesCache { /// /// # Parameters /// - /// `ext` - Externalities to use for the runtime. This is used for setting - /// up an initial runtime instance. + /// `ext` - Externalities to use for the getting the runtime's version call. + /// + /// `runtime_code` - The runtime wasm code used setup the runtime. /// /// `default_heap_pages` - Number of 64KB pages to allocate for Wasm execution. /// @@ -95,8 +96,8 @@ impl RuntimesCache { /// /// # Return value /// - /// If no error occurred a tuple `(&mut WasmRuntime, H256)` is - /// returned. `H256` is the hash of the runtime code. + /// If no error occurred a tuple `(&mut WasmRuntime, RuntimeVerion)` is + /// returned. /// /// In case of failure one of two errors can be returned: /// @@ -107,20 +108,14 @@ impl RuntimesCache { pub fn fetch_runtime( &mut self, ext: &mut E, + runtime_code: &RuntimeCode, wasm_method: WasmExecutionMethod, default_heap_pages: u64, host_functions: &[&'static dyn Function], - ) -> Result<(&mut (dyn WasmRuntime + 'static), &RuntimeVersion, Vec), Error> { - let code_hash = ext - .original_storage_hash(well_known_keys::CODE) - .ok_or(Error::InvalidCode("`CODE` not found in storage.".into()))?; - - let heap_pages = ext - .storage(well_known_keys::HEAP_PAGES) - .and_then(|pages| u64::decode(&mut &pages[..]).ok()) - .unwrap_or(default_heap_pages); + ) -> Result<(&mut (dyn WasmRuntime + 'static), &RuntimeVersion), Error> { + let heap_pages = runtime_code.heap_pages.unwrap_or(default_heap_pages); - let result = match self.instances.entry((wasm_method, code_hash.clone())) { + let result = match self.instances.entry((wasm_method, runtime_code.hash.clone())) { Entry::Occupied(o) => { let result = o.into_mut(); if let Ok(ref mut cached_runtime) = result { @@ -142,6 +137,7 @@ impl RuntimesCache { *result = create_versioned_wasm_runtime( ext, wasm_method, + runtime_code, heap_pages, host_functions.into(), ); @@ -157,6 +153,7 @@ impl RuntimesCache { let result = create_versioned_wasm_runtime( ext, wasm_method, + runtime_code, heap_pages, host_functions.into(), ); @@ -168,7 +165,7 @@ impl RuntimesCache { }; result.as_mut() - .map(|entry| (entry.runtime.as_mut(), &entry.version, code_hash)) + .map(|entry| (entry.runtime.as_mut(), &entry.version)) .map_err(|ref e| Error::InvalidCode(format!("{:?}", e))) } @@ -209,13 +206,17 @@ pub fn create_wasm_runtime_with_code( fn create_versioned_wasm_runtime( ext: &mut E, wasm_method: WasmExecutionMethod, + runtime_code: &RuntimeCode, heap_pages: u64, host_functions: Vec<&'static dyn Function>, ) -> Result { - let code = ext - .original_storage(well_known_keys::CODE) - .ok_or(WasmError::CodeNotFound)?; - let mut runtime = create_wasm_runtime_with_code(wasm_method, heap_pages, &code, host_functions, false)?; + let mut runtime = create_wasm_runtime_with_code( + wasm_method, + heap_pages, + &runtime_code.code, + host_functions, + false, + )?; // Call to determine runtime version. let version_result = { diff --git a/client/network/src/chain.rs b/client/network/src/chain.rs index b991a0e6520..e85b5af79b9 100644 --- a/client/network/src/chain.rs +++ b/client/network/src/chain.rs @@ -62,7 +62,12 @@ pub trait Client: Send + Sync { ) -> Result; /// Get method execution proof. - fn execution_proof(&self, block: &Block::Hash, method: &str, data: &[u8]) -> Result<(Vec, StorageProof), Error>; + fn execution_proof( + &self, + block: &Block::Hash, + method: &str, + data: &[u8], + ) -> Result<(Vec, StorageProof), Error>; /// Get key changes proof. fn key_changes_proof( @@ -152,11 +157,7 @@ impl Client for SubstrateClient where method: &str, data: &[u8], ) -> Result<(Vec, StorageProof), Error> { - (self as &SubstrateClient).execution_proof( - &BlockId::Hash(block.clone()), - method, - data, - ) + SubstrateClient::execution_proof(self, &BlockId::Hash(block.clone()), method, data) } fn key_changes_proof( @@ -168,7 +169,14 @@ impl Client for SubstrateClient where storage_key: Option<&StorageKey>, key: &StorageKey, ) -> Result, Error> { - (self as &SubstrateClient).key_changes_proof(first, last, min, max, storage_key, key) + (self as &SubstrateClient).key_changes_proof( + first, + last, + min, + max, + storage_key, + key, + ) } fn is_descendent_of(&self, base: &Block::Hash, block: &Block::Hash) -> Result { diff --git a/client/network/src/protocol/light_client_handler.rs b/client/network/src/protocol/light_client_handler.rs index b531f3515a6..e4996b7c8b5 100644 --- a/client/network/src/protocol/light_client_handler.rs +++ b/client/network/src/protocol/light_client_handler.rs @@ -254,13 +254,12 @@ where B: Block, { /// Construct a new light client handler. - pub fn new - ( cfg: Config - , chain: Arc> - , checker: Arc> - , peerset: sc_peerset::PeersetHandle - ) -> Self - { + pub fn new( + cfg: Config, + chain: Arc>, + checker: Arc>, + peerset: sc_peerset::PeersetHandle, + ) -> Self { LightClientHandler { config: cfg, chain, @@ -425,7 +424,8 @@ where log::trace!("remote call request from {} ({} at {:?})", peer, request.method, - request.block); + request.block, + ); let block = Decode::decode(&mut request.block.as_ref())?; @@ -436,7 +436,8 @@ where peer, request.method, request.block, - e); + e, + ); StorageProof::empty() } }; diff --git a/client/network/src/protocol/light_dispatch.rs b/client/network/src/protocol/light_dispatch.rs index aff220b6e03..f3da2c2a96c 100644 --- a/client/network/src/protocol/light_dispatch.rs +++ b/client/network/src/protocol/light_dispatch.rs @@ -750,7 +750,11 @@ pub mod tests { } } - fn check_execution_proof(&self, _: &RemoteCallRequest, _: StorageProof) -> ClientResult> { + fn check_execution_proof( + &self, + _: &RemoteCallRequest, + _: StorageProof, + ) -> ClientResult> { match self.ok { true => Ok(vec![42]), false => Err(ClientError::Backend("Test error".into())), diff --git a/client/src/call_executor.rs b/client/src/call_executor.rs index 18ad5b113e9..659e0152399 100644 --- a/client/src/call_executor.rs +++ b/client/src/call_executor.rs @@ -25,7 +25,7 @@ use sp_state_machine::{ }; use sc_executor::{RuntimeVersion, RuntimeInfo, NativeVersion}; use sp_externalities::Extensions; -use sp_core::{NativeOrEncoded, NeverNativeValue, traits::CodeExecutor}; +use sp_core::{NativeOrEncoded, NeverNativeValue, traits::{CodeExecutor, RuntimeCode}}; use sp_api::{ProofRecorder, InitializeBlock, StorageTransactionCache}; use sc_client_api::{backend, call_executor::CallExecutor}; @@ -90,6 +90,7 @@ where method, call_data, extensions.unwrap_or_default(), + &sp_state_machine::backend::get_runtime_code(&state)?, ).execute_using_consensus_failure_handler::<_, NeverNativeValue, fn() -> _>( strategy.get_manager(), None, @@ -140,6 +141,8 @@ where // make sure to destroy state before exiting this function let mut state = self.backend.state_at(*at)?; + let runtime_code = sp_state_machine::backend::get_runtime_code(&state)?; + let result = match recorder { Some(recorder) => state.as_trie_backend() .ok_or_else(|| @@ -160,6 +163,7 @@ where method, call_data, extensions.unwrap_or_default(), + &runtime_code, ) // TODO: https://github.com/paritytech/substrate/issues/4455 // .with_storage_transaction_cache(storage_transaction_cache.as_mut().map(|c| &mut **c)) @@ -173,6 +177,7 @@ where method, call_data, extensions.unwrap_or_default(), + &runtime_code, ) .with_storage_transaction_cache(storage_transaction_cache.as_mut().map(|c| &mut **c)) .execute_using_consensus_failure_handler(execution_manager, native_call) @@ -197,7 +202,8 @@ where changes_trie_state, None, ); - let version = self.executor.runtime_version(&mut ext); + let wasm_code = RuntimeCode::from_externalities(&ext).map_err(|e| e.to_string().into()); + let version = wasm_code.and_then(|c| self.executor.runtime_version(&mut ext, &c)); { let _lock = self.backend.get_import_lock().read(); self.backend.destroy_state(state)?; @@ -218,6 +224,7 @@ where &self.executor, method, call_data, + &sp_state_machine::backend::get_runtime_code(trie_state)?, ) .map_err(Into::into) } diff --git a/client/src/client.rs b/client/src/client.rs index d461a17ded7..68970cbb2ac 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -41,8 +41,7 @@ use sp_runtime::{ use sp_state_machine::{ DBValue, Backend as StateBackend, ChangesTrieAnchorBlockId, prove_read, prove_child_read, ChangesTrieRootsStorage, ChangesTrieStorage, - ChangesTrieConfigurationRange, key_changes, key_changes_proof, StorageProof, - merge_storage_proofs, + ChangesTrieConfigurationRange, key_changes, key_changes_proof, }; use sc_executor::{RuntimeVersion, RuntimeInfo}; use sp_consensus::{ @@ -55,6 +54,7 @@ use sp_blockchain::{self as blockchain, well_known_cache_keys::Id as CacheKeyId, HeaderMetadata, CachedHeaderMetadata, }; +use sp_trie::StorageProof; use sp_api::{ CallApiAt, ConstructRuntimeApi, Core as CoreApi, ApiExt, ApiRef, ProvideRuntimeApi, @@ -482,9 +482,19 @@ impl Client where method: &str, call_data: &[u8] ) -> sp_blockchain::Result<(Vec, StorageProof)> { + // Make sure we include the `:code` and `:heap_pages` in the execution proof to be + // backwards compatible. + // + // TODO: Remove when solved: https://github.com/paritytech/substrate/issues/5047 + let code_proof = self.read_proof( + id, + &[well_known_keys::CODE.to_vec(), well_known_keys::HEAP_PAGES.to_vec()], + )?; + let state = self.state_at(id)?; let header = self.prepare_environment_block(id)?; prove_execution(state, header, &self.executor, method, call_data) + .map(|p| (p.0, StorageProof::merge(vec![p.1, code_proof]))) } /// Reads given header and generates CHT-based header proof. @@ -769,7 +779,7 @@ impl Client where Ok(()) }, ())?; - Ok(merge_storage_proofs(proofs)) + Ok(StorageProof::merge(proofs)) } /// Generates CHT-based proof for roots of changes tries at given blocks (that are part of single CHT). diff --git a/client/src/genesis.rs b/client/src/genesis.rs index fccdd71817e..006ed00c436 100644 --- a/client/src/genesis.rs +++ b/client/src/genesis.rs @@ -89,6 +89,8 @@ mod tests { }; let hash = header.hash(); let mut overlay = OverlayedChanges::default(); + let runtime_code = sp_state_machine::backend::get_runtime_code(&backend) + .expect("Code is part of the backend"); StateMachine::new( backend, @@ -98,6 +100,7 @@ mod tests { "Core_initialize_block", &header.encode(), Default::default(), + &runtime_code, ).execute( ExecutionStrategy::NativeElseWasm, ).unwrap(); @@ -111,6 +114,7 @@ mod tests { "BlockBuilder_apply_extrinsic", &tx.encode(), Default::default(), + &runtime_code, ).execute( ExecutionStrategy::NativeElseWasm, ).unwrap(); @@ -124,6 +128,7 @@ mod tests { "BlockBuilder_finalize_block", &[], Default::default(), + &runtime_code, ).execute( ExecutionStrategy::NativeElseWasm, ).unwrap(); @@ -161,6 +166,8 @@ mod tests { let backend = InMemoryBackend::from(storage); let (b1data, _b1hash) = block1(genesis_hash, &backend); + let runtime_code = sp_state_machine::backend::get_runtime_code(&backend) + .expect("Code is part of the backend"); let mut overlay = OverlayedChanges::default(); let _ = StateMachine::new( @@ -171,6 +178,7 @@ mod tests { "Core_execute_block", &b1data, Default::default(), + &runtime_code, ).execute( ExecutionStrategy::NativeElseWasm, ).unwrap(); @@ -189,6 +197,8 @@ mod tests { let backend = InMemoryBackend::from(storage); let (b1data, _b1hash) = block1(genesis_hash, &backend); + let runtime_code = sp_state_machine::backend::get_runtime_code(&backend) + .expect("Code is part of the backend"); let mut overlay = OverlayedChanges::default(); let _ = StateMachine::new( @@ -199,6 +209,7 @@ mod tests { "Core_execute_block", &b1data, Default::default(), + &runtime_code, ).execute( ExecutionStrategy::AlwaysWasm, ).unwrap(); @@ -217,6 +228,8 @@ mod tests { let backend = InMemoryBackend::from(storage); let (b1data, _b1hash) = block1(genesis_hash, &backend); + let runtime_code = sp_state_machine::backend::get_runtime_code(&backend) + .expect("Code is part of the backend"); let mut overlay = OverlayedChanges::default(); let r = StateMachine::new( @@ -227,6 +240,7 @@ mod tests { "Core_execute_block", &b1data, Default::default(), + &runtime_code, ).execute( ExecutionStrategy::NativeElseWasm, ); diff --git a/client/src/light/backend.rs b/client/src/light/backend.rs index ad9f43587e4..48434bb41d1 100644 --- a/client/src/light/backend.rs +++ b/client/src/light/backend.rs @@ -172,9 +172,9 @@ impl ClientBackend for Backend> match maybe_val { Some(val) => self.blockchain.storage().insert_aux( &[(&key[..], &val[..])], - ::std::iter::empty(), + std::iter::empty(), )?, - None => self.blockchain.storage().insert_aux(::std::iter::empty(), &[&key[..]])?, + None => self.blockchain.storage().insert_aux(std::iter::empty(), &[&key[..]])?, } } } diff --git a/client/src/light/call_executor.rs b/client/src/light/call_executor.rs index 01a93c78219..a440f5ad679 100644 --- a/client/src/light/call_executor.rs +++ b/client/src/light/call_executor.rs @@ -29,7 +29,6 @@ use sp_externalities::Extensions; use sp_state_machine::{ self, Backend as StateBackend, OverlayedChanges, ExecutionStrategy, create_proof_check_backend, execution_proof_check_on_trie_backend, ExecutionManager, StorageProof, - merge_storage_proofs, }; use hash_db::Hasher; @@ -206,7 +205,7 @@ pub fn prove_execution( method, call_data, )?; - let total_proof = merge_storage_proofs(vec![init_proof, exec_proof]); + let total_proof = StorageProof::merge(vec![init_proof, exec_proof]); Ok((result, total_proof)) } @@ -259,12 +258,17 @@ fn check_execution_proof_with_make_header( &trie_backend, &mut changes, executor, "Core_initialize_block", &next_header.encode(), + &runtime_code, )?; // execute method @@ -274,7 +278,9 @@ fn check_execution_proof_with_make_header> LightDataChecker { H::Out: Ord + codec::Codec, { // all the checks are sharing the same storage - let storage = create_proof_check_backend_storage(remote_roots_proof); + let storage = remote_roots_proof.into_memory_db(); // remote_roots.keys() are sorted => we can use this to group changes tries roots // that are belongs to the same CHT @@ -187,7 +187,8 @@ impl> LightDataChecker { local_cht_root, block, remote_changes_trie_root, - &proving_backend)?; + &proving_backend, + )?; // and return the storage to use in following checks storage = proving_backend.into_storage(); @@ -270,7 +271,7 @@ impl FetchChecker for LightDataChecker body: Vec ) -> ClientResult> { // TODO: #2621 - let extrinsics_root = HashFor::::ordered_trie_root( + let extrinsics_root = HashFor::::ordered_trie_root( body.iter().map(Encode::encode).collect(), ); if *request.header.extrinsics_root() == extrinsics_root { @@ -294,7 +295,7 @@ struct RootsStorage<'a, Number: AtLeast32Bit, Hash: 'a> { impl<'a, H, Number, Hash> ChangesTrieRootsStorage for RootsStorage<'a, Number, Hash> where H: Hasher, - Number: ::std::fmt::Display + ::std::hash::Hash + Clone + AtLeast32Bit + Encode + Decode + Send + Sync + 'static, + Number: std::fmt::Display + std::hash::Hash + Clone + AtLeast32Bit + Encode + Decode + Send + Sync + 'static, Hash: 'a + Send + Sync + Clone + AsRef<[u8]>, { fn build_anchor( diff --git a/frame/system/benches/bench.rs b/frame/system/benches/bench.rs index cfcaa6f64ac..90a4ad1d34d 100644 --- a/frame/system/benches/bench.rs +++ b/frame/system/benches/bench.rs @@ -18,7 +18,7 @@ use criterion::{Criterion, criterion_group, criterion_main, black_box}; use frame_system as system; use frame_support::{decl_module, decl_event, impl_outer_origin, impl_outer_event, weights::Weight}; use sp_core::H256; -use sp_runtime::{Perbill, PerThing, traits::{BlakeTwo256, IdentityLookup}, testing::Header}; +use sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header}; mod module { use super::*; diff --git a/primitives/api/test/Cargo.toml b/primitives/api/test/Cargo.toml index 6d2207c178a..3b41e28cf3b 100644 --- a/primitives/api/test/Cargo.toml +++ b/primitives/api/test/Cargo.toml @@ -24,6 +24,7 @@ rustversion = "1.0.0" [dev-dependencies] criterion = "0.3.0" substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } +sp-core = { version = "2.0.0-alpha.1", path = "../../core" } [[bench]] name = "bench" diff --git a/primitives/api/test/tests/runtime_calls.rs b/primitives/api/test/tests/runtime_calls.rs index 6a3af7469cc..64c20473d1c 100644 --- a/primitives/api/test/tests/runtime_calls.rs +++ b/primitives/api/test/tests/runtime_calls.rs @@ -164,6 +164,12 @@ fn record_proof_works() { let block_id = BlockId::Number(client.chain_info().best_number); let storage_root = longest_chain.best_chain().unwrap().state_root().clone(); + let runtime_code = sp_core::traits::RuntimeCode { + code: client.code_at(&block_id).unwrap(), + hash: vec![1], + heap_pages: None, + }; + let transaction = Transfer { amount: 1000, nonce: 0, @@ -192,5 +198,6 @@ fn record_proof_works() { &executor, "Core_execute_block", &block.encode(), + &runtime_code, ).expect("Executes block while using the proof backend"); } diff --git a/primitives/core/src/traits.rs b/primitives/core/src/traits.rs index bd02d39fb55..297430cfa63 100644 --- a/primitives/core/src/traits.rs +++ b/primitives/core/src/traits.rs @@ -98,6 +98,7 @@ pub trait CodeExecutor: Sized + Send + Sync + CallInWasm + Clone + 'static { >( &self, ext: &mut E, + runtime_code: &RuntimeCode, method: &str, data: &[u8], use_native: bool, @@ -105,6 +106,70 @@ pub trait CodeExecutor: Sized + Send + Sync + CallInWasm + Clone + 'static { ) -> (Result, Self::Error>, bool); } + +/// The Wasm code of a Substrate runtime. +#[derive(Debug, Clone, codec::Encode, codec::Decode)] +pub struct RuntimeCode { + /// The actual Wasm code as binary blob. + pub code: Vec, + /// The optional heap pages this `code` should be executed with. + /// + /// If `None` are given, the default value of the executor will be used. + pub heap_pages: Option, + /// The SCALE encoded hash of `code`. + /// + /// The hashing algorithm isn't that important, as long as all runtime + /// code instances use the same. + pub hash: Vec, +} + +impl PartialEq for RuntimeCode { + fn eq(&self, other: &Self) -> bool { + self.hash == other.hash + } +} + +impl RuntimeCode { + /// Create an `RuntimeCode` instance from the given `Externalities`. + /// + /// Extracts the code and the heap pages using the well known keys. + /// + /// Returns an error if the code could not be found. + pub fn from_externalities(ext: &dyn Externalities) -> Result { + let code = ext.storage(sp_storage::well_known_keys::CODE).ok_or(CodeNotFound)?; + let hash = ext.storage_hash(sp_storage::well_known_keys::CODE).ok_or(CodeNotFound)?; + let heap_pages = ext.storage(sp_storage::well_known_keys::HEAP_PAGES) + .and_then(|hp| codec::Decode::decode(&mut &hp[..]).ok()); + + Ok(Self { + code, + hash, + heap_pages, + }) + } + + /// Create an empty instance. + /// + /// This is only useful for tests that don't want to execute any code. + pub fn empty() -> Self { + Self { + code: Vec::new(), + hash: Vec::new(), + heap_pages: None, + } + } +} + +/// Could not find the `:code` in the externalities while initializing the [`RuntimeCode`]. +#[derive(Debug)] +pub struct CodeNotFound; + +impl std::fmt::Display for CodeNotFound { + fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { + write!(f, "the storage entry `:code` doesn't have any code") + } +} + /// Something that can call a method in a WASM blob. pub trait CallInWasm: Send + Sync { /// Call the given `method` in the given `wasm_blob` using `call_data` (SCALE encoded arguments) diff --git a/primitives/runtime/src/generic/block.rs b/primitives/runtime/src/generic/block.rs index a46396dce08..fb07d6c215d 100644 --- a/primitives/runtime/src/generic/block.rs +++ b/primitives/runtime/src/generic/block.rs @@ -25,7 +25,10 @@ use serde::{Deserialize, Serialize}; use sp_std::prelude::*; use sp_core::RuntimeDebug; use crate::codec::{Codec, Encode, Decode}; -use crate::traits::{self, Member, Block as BlockT, Header as HeaderT, MaybeSerialize, MaybeMallocSizeOf}; +use crate::traits::{ + self, Member, Block as BlockT, Header as HeaderT, MaybeSerialize, MaybeMallocSizeOf, + NumberFor, +}; use crate::Justification; /// Something to identify a block. @@ -35,9 +38,9 @@ use crate::Justification; #[cfg_attr(feature = "std", serde(deny_unknown_fields))] pub enum BlockId { /// Identify by block header hash. - Hash(<::Header as HeaderT>::Hash), + Hash(Block::Hash), /// Identify by block number. - Number(<::Header as HeaderT>::Number), + Number(NumberFor), } impl BlockId { @@ -47,7 +50,7 @@ impl BlockId { } /// Create a block ID from a number. - pub fn number(number: ::Number) -> Self { + pub fn number(number: NumberFor) -> Self { BlockId::Number(number) } } diff --git a/primitives/state-machine/src/backend.rs b/primitives/state-machine/src/backend.rs index ca6612a5e92..9db41718ee0 100644 --- a/primitives/state-machine/src/backend.rs +++ b/primitives/state-machine/src/backend.rs @@ -18,9 +18,9 @@ use log::warn; use hash_db::Hasher; -use codec::Encode; +use codec::{Decode, Encode}; -use sp_core::storage::{ChildInfo, OwnedChildInfo}; +use sp_core::{traits::RuntimeCode, storage::{ChildInfo, OwnedChildInfo, well_known_keys}}; use sp_trie::{TrieMut, MemoryDB, trie_types::TrieDBMut}; use crate::{ @@ -359,3 +359,22 @@ pub(crate) fn insert_into_memory_db(mdb: &mut MemoryDB, input: I) -> Op Some(root) } + +/// Get the runtime code from the given `backend`. +/// +/// Returns an error if the `:code` could not be found. +pub fn get_runtime_code>(backend: &B) -> Result + where H::Out: Encode, +{ + let code = backend.storage(well_known_keys::CODE) + .ok() + .flatten() + .ok_or("`:code` not found")?; + let hash = H::hash(&code).encode(); + let heap_pages = backend.storage(well_known_keys::HEAP_PAGES) + .ok() + .flatten() + .and_then(|d| Decode::decode(&mut &d[..]).ok()); + + Ok(RuntimeCode { code, hash, heap_pages }) +} diff --git a/primitives/state-machine/src/lib.rs b/primitives/state-machine/src/lib.rs index bb2bb2c52c8..2c6245c70d5 100644 --- a/primitives/state-machine/src/lib.rs +++ b/primitives/state-machine/src/lib.rs @@ -23,8 +23,8 @@ use log::{warn, trace}; use hash_db::Hasher; use codec::{Decode, Encode, Codec}; use sp_core::{ - storage::ChildInfo, NativeOrEncoded, NeverNativeValue, - traits::{CodeExecutor, CallInWasmExt}, hexdisplay::HexDisplay, + storage::ChildInfo, NativeOrEncoded, NeverNativeValue, hexdisplay::HexDisplay, + traits::{CodeExecutor, CallInWasmExt, RuntimeCode}, }; use overlayed_changes::OverlayedChangeSet; use sp_externalities::Extensions; @@ -42,7 +42,7 @@ mod trie_backend; mod trie_backend_essence; mod stats; -pub use sp_trie::{trie_types::{Layout, TrieDBMut}, TrieMut, DBValue, MemoryDB}; +pub use sp_trie::{trie_types::{Layout, TrieDBMut}, StorageProof, TrieMut, DBValue, MemoryDB}; pub use testing::TestExternalities; pub use basic::BasicExternalities; pub use ext::Ext; @@ -67,8 +67,7 @@ pub use overlayed_changes::{ StorageCollection, ChildStorageCollection, }; pub use proving_backend::{ - create_proof_check_backend, create_proof_check_backend_storage, merge_storage_proofs, - ProofRecorder, ProvingBackend, ProvingBackendRecorder, StorageProof, + create_proof_check_backend, ProofRecorder, ProvingBackend, ProvingBackendRecorder, }; pub use trie_backend_essence::{TrieBackendStorage, Storage}; pub use trie_backend::TrieBackend; @@ -191,6 +190,7 @@ pub struct StateMachine<'a, B, H, N, Exec> changes_trie_state: Option>, _marker: PhantomData<(H, N)>, storage_transaction_cache: Option<&'a mut StorageTransactionCache>, + runtime_code: &'a RuntimeCode, } impl<'a, B, H, N, Exec> StateMachine<'a, B, H, N, Exec> where @@ -209,6 +209,7 @@ impl<'a, B, H, N, Exec> StateMachine<'a, B, H, N, Exec> where method: &'a str, call_data: &'a [u8], mut extensions: Extensions, + runtime_code: &'a RuntimeCode, ) -> Self { extensions.register(CallInWasmExt::new(exec.clone())); @@ -222,6 +223,7 @@ impl<'a, B, H, N, Exec> StateMachine<'a, B, H, N, Exec> where changes_trie_state, _marker: PhantomData, storage_transaction_cache: None, + runtime_code, } } @@ -292,6 +294,7 @@ impl<'a, B, H, N, Exec> StateMachine<'a, B, H, N, Exec> where let (result, was_native) = self.exec.call( &mut ext, + self.runtime_code, self.method, self.call_data, use_native, @@ -436,6 +439,7 @@ pub fn prove_execution( exec: &Exec, method: &str, call_data: &[u8], + runtime_code: &RuntimeCode, ) -> Result<(Vec, StorageProof), Box> where B: Backend, @@ -446,7 +450,14 @@ where { let trie_backend = backend.as_trie_backend() .ok_or_else(|| Box::new(ExecutionError::UnableToGenerateProof) as Box)?; - prove_execution_on_trie_backend::<_, _, N, _>(trie_backend, overlay, exec, method, call_data) + prove_execution_on_trie_backend::<_, _, N, _>( + trie_backend, + overlay, + exec, + method, + call_data, + runtime_code, + ) } /// Prove execution using the given trie backend, overlayed changes, and call executor. @@ -464,6 +475,7 @@ pub fn prove_execution_on_trie_backend( exec: &Exec, method: &str, call_data: &[u8], + runtime_code: &RuntimeCode, ) -> Result<(Vec, StorageProof), Box> where S: trie_backend_essence::TrieBackendStorage, @@ -474,7 +486,14 @@ where { let proving_backend = proving_backend::ProvingBackend::new(trie_backend); let mut sm = StateMachine::<_, H, N, Exec>::new( - &proving_backend, None, overlay, exec, method, call_data, Extensions::default(), + &proving_backend, + None, + overlay, + exec, + method, + call_data, + Extensions::default(), + runtime_code, ); let result = sm.execute_using_consensus_failure_handler::<_, NeverNativeValue, fn() -> _>( @@ -493,6 +512,7 @@ pub fn execution_proof_check( exec: &Exec, method: &str, call_data: &[u8], + runtime_code: &RuntimeCode, ) -> Result, Box> where H: Hasher, @@ -501,7 +521,14 @@ where N: crate::changes_trie::BlockNumber, { let trie_backend = create_proof_check_backend::(root.into(), proof)?; - execution_proof_check_on_trie_backend::<_, N, _>(&trie_backend, overlay, exec, method, call_data) + execution_proof_check_on_trie_backend::<_, N, _>( + &trie_backend, + overlay, + exec, + method, + call_data, + runtime_code, + ) } /// Check execution proof on proving backend, generated by `prove_execution` call. @@ -511,6 +538,7 @@ pub fn execution_proof_check_on_trie_backend( exec: &Exec, method: &str, call_data: &[u8], + runtime_code: &RuntimeCode, ) -> Result, Box> where H: Hasher, @@ -519,7 +547,14 @@ where N: crate::changes_trie::BlockNumber, { let mut sm = StateMachine::<_, H, N, Exec>::new( - trie_backend, None, overlay, exec, method, call_data, Extensions::default(), + trie_backend, + None, + overlay, + exec, + method, + call_data, + Extensions::default(), + runtime_code, ); sm.execute_using_consensus_failure_handler::<_, NeverNativeValue, fn() -> _>( @@ -692,7 +727,9 @@ mod tests { use super::*; use super::ext::Ext; use super::changes_trie::Configuration as ChangesTrieConfig; - use sp_core::{Blake2Hasher, map, traits::Externalities, storage::ChildStorageKey}; + use sp_core::{ + Blake2Hasher, map, traits::{Externalities, RuntimeCode}, storage::ChildStorageKey, + }; #[derive(Clone)] struct DummyCodeExecutor { @@ -714,6 +751,7 @@ mod tests { >( &self, ext: &mut E, + _: &RuntimeCode, _method: &str, _data: &[u8], use_native: bool, @@ -767,6 +805,7 @@ mod tests { fn execute_works() { let backend = trie_backend::tests::test_trie(); let mut overlayed_changes = Default::default(); + let wasm_code = RuntimeCode::empty(); let mut state_machine = StateMachine::new( &backend, @@ -781,6 +820,7 @@ mod tests { "test", &[], Default::default(), + &wasm_code, ); assert_eq!( @@ -794,6 +834,7 @@ mod tests { fn execute_works_with_native_else_wasm() { let backend = trie_backend::tests::test_trie(); let mut overlayed_changes = Default::default(); + let wasm_code = RuntimeCode::empty(); let mut state_machine = StateMachine::new( &backend, @@ -808,6 +849,7 @@ mod tests { "test", &[], Default::default(), + &wasm_code, ); assert_eq!(state_machine.execute(ExecutionStrategy::NativeElseWasm).unwrap(), vec![66]); @@ -818,6 +860,7 @@ mod tests { let mut consensus_failed = false; let backend = trie_backend::tests::test_trie(); let mut overlayed_changes = Default::default(); + let wasm_code = RuntimeCode::empty(); let mut state_machine = StateMachine::new( &backend, @@ -832,6 +875,7 @@ mod tests { "test", &[], Default::default(), + &wasm_code, ); assert!( @@ -864,6 +908,7 @@ mod tests { &executor, "test", &[], + &RuntimeCode::empty(), ).unwrap(); // check proof locally @@ -874,6 +919,7 @@ mod tests { &executor, "test", &[], + &RuntimeCode::empty(), ).unwrap(); // check that both results are correct diff --git a/primitives/state-machine/src/proving_backend.rs b/primitives/state-machine/src/proving_backend.rs index 672ec6ea794..60d891a3f00 100644 --- a/primitives/state-machine/src/proving_backend.rs +++ b/primitives/state-machine/src/proving_backend.rs @@ -18,19 +18,19 @@ use std::sync::Arc; use parking_lot::RwLock; -use codec::{Decode, Encode, Codec}; +use codec::{Decode, Codec}; use log::debug; use hash_db::{Hasher, HashDB, EMPTY_PREFIX, Prefix}; use sp_trie::{ MemoryDB, default_child_trie_root, read_trie_value_with, read_child_trie_value_with, - record_all_keys + record_all_keys, StorageProof, }; pub use sp_trie::Recorder; pub use sp_trie::trie_types::{Layout, TrieError}; use crate::trie_backend::TrieBackend; use crate::trie_backend_essence::{Ephemeral, TrieBackendEssence, TrieBackendStorage}; use crate::{Error, ExecutionError, Backend}; -use std::collections::{HashMap, HashSet}; +use std::collections::HashMap; use crate::DBValue; use sp_core::storage::ChildInfo; @@ -40,82 +40,6 @@ pub struct ProvingBackendRecorder<'a, S: 'a + TrieBackendStorage, H: 'a + Has pub(crate) proof_recorder: &'a mut Recorder, } -/// A proof that some set of key-value pairs are included in the storage trie. The proof contains -/// the storage values so that the partial storage backend can be reconstructed by a verifier that -/// does not already have access to the key-value pairs. -/// -/// The proof consists of the set of serialized nodes in the storage trie accessed when looking up -/// the keys covered by the proof. Verifying the proof requires constructing the partial trie from -/// the serialized nodes and performing the key lookups. -#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode)] -pub struct StorageProof { - trie_nodes: Vec>, -} - -impl StorageProof { - /// Constructs a storage proof from a subset of encoded trie nodes in a storage backend. - pub fn new(trie_nodes: Vec>) -> Self { - StorageProof { trie_nodes } - } - - /// Returns a new empty proof. - /// - /// An empty proof is capable of only proving trivial statements (ie. that an empty set of - /// key-value pairs exist in storage). - pub fn empty() -> Self { - StorageProof { - trie_nodes: Vec::new(), - } - } - - /// Returns whether this is an empty proof. - pub fn is_empty(&self) -> bool { - self.trie_nodes.is_empty() - } - - /// Create an iterator over trie nodes constructed from the proof. The nodes are not guaranteed - /// to be traversed in any particular order. - pub fn iter_nodes(self) -> StorageProofNodeIterator { - StorageProofNodeIterator::new(self) - } -} - -/// An iterator over trie nodes constructed from a storage proof. The nodes are not guaranteed to -/// be traversed in any particular order. -pub struct StorageProofNodeIterator { - inner: > as IntoIterator>::IntoIter, -} - -impl StorageProofNodeIterator { - fn new(proof: StorageProof) -> Self { - StorageProofNodeIterator { - inner: proof.trie_nodes.into_iter(), - } - } -} - -impl Iterator for StorageProofNodeIterator { - type Item = Vec; - - fn next(&mut self) -> Option { - self.inner.next() - } -} - -/// Merges multiple storage proofs covering potentially different sets of keys into one proof -/// covering all keys. The merged proof output may be smaller than the aggregate size of the input -/// proofs due to deduplication of trie nodes. -pub fn merge_storage_proofs(proofs: I) -> StorageProof - where I: IntoIterator -{ - let trie_nodes = proofs.into_iter() - .flat_map(|proof| proof.iter_nodes()) - .collect::>() - .into_iter() - .collect(); - StorageProof { trie_nodes } -} - impl<'a, S, H> ProvingBackendRecorder<'a, S, H> where S: TrieBackendStorage, @@ -222,7 +146,7 @@ impl<'a, S: 'a + TrieBackendStorage, H: 'a + Hasher> ProvingBackend<'a, S, H> let root = essence.root().clone(); let recorder = ProofRecorderBackend { backend: essence.backend_storage(), - proof_recorder: proof_recorder, + proof_recorder, }; ProvingBackend(TrieBackend::new(recorder, root)) } @@ -370,7 +294,7 @@ where H: Hasher, H::Out: Codec, { - let db = create_proof_check_backend_storage(proof); + let db = proof.into_memory_db(); if db.contains(&root, EMPTY_PREFIX) { Ok(TrieBackend::new(db, root)) @@ -379,20 +303,6 @@ where } } -/// Create in-memory storage of proof check backend. -pub fn create_proof_check_backend_storage( - proof: StorageProof, -) -> MemoryDB -where - H: Hasher, -{ - let mut db = MemoryDB::default(); - for item in proof.iter_nodes() { - db.insert(EMPTY_PREFIX, &item); - } - db -} - #[cfg(test)] mod tests { use crate::InMemoryBackend; diff --git a/primitives/trie/src/lib.rs b/primitives/trie/src/lib.rs index f6131c8ed5e..80570a9792b 100644 --- a/primitives/trie/src/lib.rs +++ b/primitives/trie/src/lib.rs @@ -21,6 +21,7 @@ mod error; mod node_header; mod node_codec; +mod storage_proof; mod trie_stream; use sp_std::boxed::Box; @@ -35,6 +36,7 @@ pub use error::Error; pub use trie_stream::TrieStream; /// The Substrate format implementation of `NodeCodec`. pub use node_codec::NodeCodec; +pub use storage_proof::StorageProof; /// Various re-exports from the `trie-db` crate. pub use trie_db::{ Trie, TrieMut, DBValue, Recorder, CError, Query, TrieLayout, TrieConfiguration, nibble_ops, TrieDBIterator, diff --git a/primitives/trie/src/storage_proof.rs b/primitives/trie/src/storage_proof.rs new file mode 100644 index 00000000000..254adc2fcb4 --- /dev/null +++ b/primitives/trie/src/storage_proof.rs @@ -0,0 +1,109 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +use sp_std::vec::Vec; +use codec::{Encode, Decode}; +use hash_db::{Hasher, HashDB}; + +/// A proof that some set of key-value pairs are included in the storage trie. The proof contains +/// the storage values so that the partial storage backend can be reconstructed by a verifier that +/// does not already have access to the key-value pairs. +/// +/// The proof consists of the set of serialized nodes in the storage trie accessed when looking up +/// the keys covered by the proof. Verifying the proof requires constructing the partial trie from +/// the serialized nodes and performing the key lookups. +#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode)] +pub struct StorageProof { + trie_nodes: Vec>, +} + +impl StorageProof { + /// Constructs a storage proof from a subset of encoded trie nodes in a storage backend. + pub fn new(trie_nodes: Vec>) -> Self { + StorageProof { trie_nodes } + } + + /// Returns a new empty proof. + /// + /// An empty proof is capable of only proving trivial statements (ie. that an empty set of + /// key-value pairs exist in storage). + pub fn empty() -> Self { + StorageProof { + trie_nodes: Vec::new(), + } + } + + /// Returns whether this is an empty proof. + pub fn is_empty(&self) -> bool { + self.trie_nodes.is_empty() + } + + /// Create an iterator over trie nodes constructed from the proof. The nodes are not guaranteed + /// to be traversed in any particular order. + pub fn iter_nodes(self) -> StorageProofNodeIterator { + StorageProofNodeIterator::new(self) + } + + /// Creates a `MemoryDB` from `Self`. + pub fn into_memory_db(self) -> crate::MemoryDB { + self.into() + } + + /// Merges multiple storage proofs covering potentially different sets of keys into one proof + /// covering all keys. The merged proof output may be smaller than the aggregate size of the input + /// proofs due to deduplication of trie nodes. + pub fn merge(proofs: I) -> Self where I: IntoIterator { + let trie_nodes = proofs.into_iter() + .flat_map(|proof| proof.iter_nodes()) + .collect::>() + .into_iter() + .collect(); + + Self { trie_nodes } + } +} + +/// An iterator over trie nodes constructed from a storage proof. The nodes are not guaranteed to +/// be traversed in any particular order. +pub struct StorageProofNodeIterator { + inner: > as IntoIterator>::IntoIter, +} + +impl StorageProofNodeIterator { + fn new(proof: StorageProof) -> Self { + StorageProofNodeIterator { + inner: proof.trie_nodes.into_iter(), + } + } +} + +impl Iterator for StorageProofNodeIterator { + type Item = Vec; + + fn next(&mut self) -> Option { + self.inner.next() + } +} + +impl From for crate::MemoryDB { + fn from(proof: StorageProof) -> Self { + let mut db = crate::MemoryDB::default(); + for item in proof.iter_nodes() { + db.insert(crate::EMPTY_PREFIX, &item); + } + db + } +} diff --git a/test-utils/runtime/src/system.rs b/test-utils/runtime/src/system.rs index b410d317a1b..073e06de81d 100644 --- a/test-utils/runtime/src/system.rs +++ b/test-utils/runtime/src/system.rs @@ -338,7 +338,7 @@ mod tests { use sp_io::TestExternalities; use substrate_test_runtime_client::{AccountKeyring, Sr25519Keyring}; use crate::{Header, Transfer, WASM_BINARY}; - use sp_core::{NeverNativeValue, map, traits::CodeExecutor}; + use sp_core::{NeverNativeValue, map, traits::{CodeExecutor, RuntimeCode}}; use sc_executor::{NativeExecutor, WasmExecutionMethod, native_executor_instance}; use sp_io::hashing::twox_128; @@ -401,8 +401,11 @@ mod tests { fn block_import_works_wasm() { block_import_works(|b, ext| { let mut ext = ext.ext(); + let runtime_code = RuntimeCode::from_externalities(&ext) + .expect("Code is part of the externalities"); executor().call::<_, NeverNativeValue, fn() -> _>( &mut ext, + &runtime_code, "Core_execute_block", &b.encode(), false, @@ -494,8 +497,11 @@ mod tests { fn block_import_with_transaction_works_wasm() { block_import_with_transaction_works(|b, ext| { let mut ext = ext.ext(); + let runtime_code = RuntimeCode::from_externalities(&ext) + .expect("Code is part of the externalities"); executor().call::<_, NeverNativeValue, fn() -> _>( &mut ext, + &runtime_code, "Core_execute_block", &b.encode(), false, diff --git a/utils/frame/benchmarking-cli/Cargo.toml b/utils/frame/benchmarking-cli/Cargo.toml index 93c62c3f965..89143ee9fe0 100644 --- a/utils/frame/benchmarking-cli/Cargo.toml +++ b/utils/frame/benchmarking-cli/Cargo.toml @@ -16,5 +16,6 @@ sc-client = { version = "0.8.0-alpha.2", path = "../../../client" } sc-client-db = { version = "0.8.0-alpha.2", path = "../../../client/db" } sc-executor = { version = "0.8.0-alpha.2", path = "../../../client/executor" } sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } +sp-state-machine = { version = "0.8.0-alpha.2", path = "../../../primitives/state-machine" } structopt = "0.3.8" codec = { version = "1.2.0", package = "parity-scale-codec" } diff --git a/utils/frame/benchmarking-cli/src/lib.rs b/utils/frame/benchmarking-cli/src/lib.rs index 899419e5de5..1074944554a 100644 --- a/utils/frame/benchmarking-cli/src/lib.rs +++ b/utils/frame/benchmarking-cli/src/lib.rs @@ -121,6 +121,7 @@ impl BenchmarkCmd { self.repeat, ).encode(), Default::default(), + &sp_state_machine::backend::get_runtime_code(&state)?, ) .execute(strategy.into()) .map_err(|e| format!("Error executing runtime benchmark: {:?}", e))?; -- GitLab From b9206e1f969c44270c0ca32f0781863e43418839 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Wed, 4 Mar 2020 20:34:33 +0100 Subject: [PATCH 080/106] add ss58 prefix for Acala & Laminar (#5061) --- primitives/core/src/crypto.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/primitives/core/src/crypto.rs b/primitives/core/src/crypto.rs index 3833c8a912c..40b9a5ec318 100644 --- a/primitives/core/src/crypto.rs +++ b/primitives/core/src/crypto.rs @@ -436,12 +436,20 @@ ss58_address_format!( (0, "polkadot", "Polkadot Relay-chain, direct checksum, standard account (*25519).") KusamaAccountDirect => (2, "kusama", "Kusama Relay-chain, direct checksum, standard account (*25519).") - DothereumAccountDirect => - (20, "dothereum", "Dothereum Para-chain, direct checksum, standard account (*25519).") - KulupuAccountDirect => - (16, "kulupu", "Kulupu mainnet, direct checksum, standard account (*25519).") EdgewareAccountDirect => (7, "edgeware", "Edgeware mainnet, direct checksum, standard account (*25519).") + KaruraAccountDirect => + (8, "karura", "Acala Karura canary network, direct checksum, standard account (*25519).") + ReynoldsAccountDirect => + (9, "reynolds", "Laminar Reynolds canary network, direct checksum, standard account (*25519).") + AcalaAccountDirect => + (10, "acala", "Acala mainnet, direct checksum, standard account (*25519).") + LaminarAccountDirect => + (11, "laminar", "Laminar mainnet, direct checksum, standard account (*25519).") + KulupuAccountDirect => + (16, "kulupu", "Kulupu mainnet, direct checksum, standard account (*25519).") + DothereumAccountDirect => + (20, "dothereum", "Dothereum Para-chain, direct checksum, standard account (*25519).") CentrifugeAccountDirect => (36, "centrifuge", "Centrifuge Chain mainnet, direct checksum, standard account (*25519).") SubstraTeeAccountDirect => -- GitLab From 76acf5d6a609407bee27cc3c66b5586faac8f09b Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Thu, 5 Mar 2020 08:51:03 +0100 Subject: [PATCH 081/106] Reduce usage of `Blake2Hasher` (#5132) This reduces the usage of `Blake2Hasher` in the code base and replaces it with `BlakeTwo256`. The most important change is the removal of the custom extern function for `Blake2Hasher`. The runtime `Hash` trait is now also simplified and directly requires that the implementing type implements `Hashable`. --- Cargo.lock | 6 +- bin/node/executor/benches/bench.rs | 7 +- bin/node/executor/tests/basic.rs | 19 ++-- bin/node/executor/tests/common.rs | 14 ++- bin/node/executor/tests/fees.rs | 12 +-- client/api/src/backend.rs | 16 +-- client/api/src/call_executor.rs | 8 +- client/authority-discovery/src/tests.rs | 2 +- client/block-builder/src/lib.rs | 8 +- client/consensus/slots/src/lib.rs | 4 +- client/db/src/bench.rs | 30 +++--- client/db/src/changes_tries_storage.rs | 12 +-- client/db/src/lib.rs | 50 ++++----- client/db/src/light.rs | 6 +- client/db/src/storage_cache.rs | 100 +++++++++--------- client/executor/Cargo.toml | 1 + client/executor/src/integration_tests/mod.rs | 7 +- client/finality-grandpa/src/tests.rs | 8 +- client/rpc/src/state/state_light.rs | 6 +- client/service/src/builder.rs | 8 +- client/src/call_executor.rs | 6 +- client/src/cht.rs | 8 +- client/src/client.rs | 20 ++-- client/src/genesis.rs | 8 +- client/src/in_mem.rs | 16 +-- client/src/lib.rs | 1 - client/src/light/backend.rs | 26 +++-- client/src/light/call_executor.rs | 19 ++-- client/src/light/fetcher.rs | 16 +-- client/src/light/mod.rs | 14 +-- client/transaction-pool/src/api.rs | 3 +- frame/benchmarking/src/tests.rs | 7 +- frame/contracts/src/lib.rs | 2 +- frame/session/src/historical.rs | 6 +- .../api/proc-macro/src/impl_runtime_apis.rs | 18 ++-- primitives/api/src/lib.rs | 22 ++-- primitives/api/test/tests/runtime_calls.rs | 6 +- .../consensus/common/src/block_import.rs | 4 +- primitives/consensus/common/src/lib.rs | 4 +- primitives/core/src/hasher.rs | 26 +---- primitives/core/src/lib.rs | 4 +- primitives/io/src/lib.rs | 51 --------- .../runtime-interface/test-wasm/src/lib.rs | 10 -- primitives/runtime-interface/test/Cargo.toml | 2 +- primitives/runtime-interface/test/src/lib.rs | 7 +- primitives/runtime/Cargo.toml | 2 + .../runtime/src/random_number_generator.rs | 2 +- primitives/runtime/src/traits.rs | 29 ++--- primitives/state-machine/Cargo.toml | 1 + primitives/state-machine/src/basic.rs | 2 +- .../src/changes_trie/changes_iterator.rs | 34 +++--- .../state-machine/src/changes_trie/prune.rs | 26 ++--- .../state-machine/src/in_memory_backend.rs | 3 +- primitives/state-machine/src/lib.rs | 19 ++-- .../state-machine/src/proving_backend.rs | 19 ++-- primitives/state-machine/src/testing.rs | 10 +- primitives/state-machine/src/trie_backend.rs | 11 +- primitives/trie/Cargo.toml | 1 + primitives/trie/benches/bench.rs | 4 +- test-utils/client/src/lib.rs | 6 +- .../runtime/client/src/block_builder_ext.rs | 4 +- test-utils/runtime/client/src/lib.rs | 6 +- test-utils/runtime/client/src/trait_tests.rs | 8 +- test-utils/runtime/src/lib.rs | 6 +- 64 files changed, 372 insertions(+), 451 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ee69ca599eb..6b3fca15e43 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6045,6 +6045,7 @@ dependencies = [ "sp-externalities", "sp-io", "sp-panic-handler", + "sp-runtime", "sp-runtime-interface", "sp-serializer", "sp-state-machine", @@ -7273,6 +7274,7 @@ dependencies = [ name = "sp-runtime" version = "2.0.0-alpha.3" dependencies = [ + "hash256-std-hasher", "impl-trait-for-tuples", "log 0.4.8", "parity-scale-codec", @@ -7324,8 +7326,8 @@ name = "sp-runtime-interface-test" version = "2.0.0-dev" dependencies = [ "sc-executor", - "sp-core", "sp-io", + "sp-runtime", "sp-runtime-interface", "sp-runtime-interface-test-wasm", "sp-state-machine", @@ -7397,6 +7399,7 @@ dependencies = [ "sp-core", "sp-externalities", "sp-panic-handler", + "sp-runtime", "sp-trie", "trie-db", "trie-root", @@ -7464,6 +7467,7 @@ dependencies = [ "memory-db", "parity-scale-codec", "sp-core", + "sp-runtime", "sp-std", "trie-bench", "trie-db", diff --git a/bin/node/executor/benches/bench.rs b/bin/node/executor/benches/bench.rs index c411bec851c..faebdd302a8 100644 --- a/bin/node/executor/benches/bench.rs +++ b/bin/node/executor/benches/bench.rs @@ -23,12 +23,13 @@ use node_runtime::{ }; use node_runtime::constants::currency::*; use node_testing::keyring::*; -use sp_core::{Blake2Hasher, NativeOrEncoded, NeverNativeValue}; +use sp_core::{NativeOrEncoded, NeverNativeValue}; use sp_core::storage::well_known_keys; use sp_core::traits::{CodeExecutor, RuntimeCode}; use frame_support::Hashable; use sp_state_machine::TestExternalities as CoreTestExternalities; use sc_executor::{NativeExecutor, RuntimeInfo, WasmExecutionMethod, Externalities}; +use sp_runtime::traits::BlakeTwo256; criterion_group!(benches, bench_execute_block); criterion_main!(benches); @@ -54,7 +55,7 @@ fn sign(xt: CheckedExtrinsic) -> UncheckedExtrinsic { node_testing::keyring::sign(xt, VERSION, GENESIS_HASH) } -fn new_test_ext(genesis_config: &GenesisConfig) -> TestExternalities { +fn new_test_ext(genesis_config: &GenesisConfig) -> TestExternalities { let mut test_ext = TestExternalities::new_with_code( COMPACT_CODE, genesis_config.build_storage().unwrap(), @@ -76,7 +77,7 @@ fn construct_block( let extrinsics = extrinsics.into_iter().map(sign).collect::>(); // calculate the header fields that we can. - let extrinsics_root = Layout::::ordered_trie_root( + let extrinsics_root = Layout::::ordered_trie_root( extrinsics.iter().map(Encode::encode) ).to_fixed_bytes() .into(); diff --git a/bin/node/executor/tests/basic.rs b/bin/node/executor/tests/basic.rs index eb629029c6d..1ee0a17c811 100644 --- a/bin/node/executor/tests/basic.rs +++ b/bin/node/executor/tests/basic.rs @@ -21,13 +21,11 @@ use frame_support::{ weights::{GetDispatchInfo, DispatchInfo, DispatchClass}, }; use sp_core::{ - Blake2Hasher, NeverNativeValue, map, - traits::Externalities, - storage::{well_known_keys, Storage}, + NeverNativeValue, map, traits::Externalities, storage::{well_known_keys, Storage}, }; use sp_runtime::{ ApplyExtrinsicResult, Fixed64, - traits::{Hash as HashT, Convert}, + traits::{Hash as HashT, Convert, BlakeTwo256}, transaction_validity::InvalidTransaction, }; use pallet_contracts::ContractAddressFor; @@ -93,7 +91,6 @@ fn changes_trie_block() -> (Vec, Hash) { ) } - /// block 1 and 2 must be created together to ensure transactions are only signed once (since they /// are not guaranteed to be deterministic) and to ensure that the correct state is propagated /// from block1's execution to block2 to derive the correct storage_root. @@ -161,7 +158,7 @@ fn block_with_size(time: u64, nonce: u32, size: usize) -> (Vec, Hash) { #[test] fn panic_execution_with_foreign_code_gives_error() { - let mut t = TestExternalities::::new_with_code(BLOATY_CODE, Storage { + let mut t = TestExternalities::::new_with_code(BLOATY_CODE, Storage { top: map![ >::hashed_key_for(alice()) => { (69u128, 0u8, 0u128, 0u128, 0u128).encode() @@ -197,7 +194,7 @@ fn panic_execution_with_foreign_code_gives_error() { #[test] fn bad_extrinsic_with_native_equivalent_code_gives_error() { - let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage { + let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage { top: map![ >::hashed_key_for(alice()) => { (0u32, 0u8, 69u128, 0u128, 0u128, 0u128).encode() @@ -233,7 +230,7 @@ fn bad_extrinsic_with_native_equivalent_code_gives_error() { #[test] fn successful_execution_with_native_equivalent_code_gives_ok() { - let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage { + let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage { top: map![ >::hashed_key_for(alice()) => { (0u32, 0u8, 111 * DOLLARS, 0u128, 0u128, 0u128).encode() @@ -275,7 +272,7 @@ fn successful_execution_with_native_equivalent_code_gives_ok() { #[test] fn successful_execution_with_foreign_code_gives_ok() { - let mut t = TestExternalities::::new_with_code(BLOATY_CODE, Storage { + let mut t = TestExternalities::::new_with_code(BLOATY_CODE, Storage { top: map![ >::hashed_key_for(alice()) => { (0u32, 0u8, 111 * DOLLARS, 0u128, 0u128, 0u128).encode() @@ -700,7 +697,7 @@ fn native_big_block_import_fails_on_fallback() { #[test] fn panic_execution_gives_error() { - let mut t = TestExternalities::::new_with_code(BLOATY_CODE, Storage { + let mut t = TestExternalities::::new_with_code(BLOATY_CODE, Storage { top: map![ >::hashed_key().to_vec() => { 0_u128.encode() @@ -731,7 +728,7 @@ fn panic_execution_gives_error() { #[test] fn successful_execution_gives_ok() { - let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage { + let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage { top: map![ >::hashed_key_for(alice()) => { (0u32, 0u8, 111 * DOLLARS, 0u128, 0u128, 0u128).encode() diff --git a/bin/node/executor/tests/common.rs b/bin/node/executor/tests/common.rs index 4b838257222..25ada87a971 100644 --- a/bin/node/executor/tests/common.rs +++ b/bin/node/executor/tests/common.rs @@ -17,10 +17,8 @@ use codec::{Encode, Decode}; use frame_support::Hashable; use sp_state_machine::TestExternalities as CoreTestExternalities; -use sp_core::{ - Blake2Hasher, NeverNativeValue, NativeOrEncoded, traits::{CodeExecutor, RuntimeCode}, -}; -use sp_runtime::{ApplyExtrinsicResult, traits::Header as HeaderT}; +use sp_core::{NeverNativeValue, NativeOrEncoded, traits::{CodeExecutor, RuntimeCode}}; +use sp_runtime::{ApplyExtrinsicResult, traits::{Header as HeaderT, BlakeTwo256}}; use sc_executor::{NativeExecutor, WasmExecutionMethod}; use sc_executor::error::Result; @@ -66,7 +64,7 @@ pub fn executor_call< R:Decode + Encode + PartialEq, NC: FnOnce() -> std::result::Result + std::panic::UnwindSafe >( - t: &mut TestExternalities, + t: &mut TestExternalities, method: &str, data: &[u8], use_native: bool, @@ -85,7 +83,7 @@ pub fn executor_call< ) } -pub fn new_test_ext(code: &[u8], support_changes_trie: bool) -> TestExternalities { +pub fn new_test_ext(code: &[u8], support_changes_trie: bool) -> TestExternalities { let mut ext = TestExternalities::new_with_code( code, node_testing::genesis::config(support_changes_trie, Some(code)).build_storage().unwrap(), @@ -99,7 +97,7 @@ pub fn new_test_ext(code: &[u8], support_changes_trie: bool) -> TestExternalitie /// `extrinsics` must be a list of valid extrinsics, i.e. none of the extrinsics for example /// can report `ExhaustResources`. Otherwise, this function panics. pub fn construct_block( - env: &mut TestExternalities, + env: &mut TestExternalities, number: BlockNumber, parent_hash: Hash, extrinsics: Vec, @@ -111,7 +109,7 @@ pub fn construct_block( // calculate the header fields that we can. let extrinsics_root = - Layout::::ordered_trie_root(extrinsics.iter().map(Encode::encode)) + Layout::::ordered_trie_root(extrinsics.iter().map(Encode::encode)) .to_fixed_bytes() .into(); diff --git a/bin/node/executor/tests/fees.rs b/bin/node/executor/tests/fees.rs index 024c02bd6aa..ea9d740a05e 100644 --- a/bin/node/executor/tests/fees.rs +++ b/bin/node/executor/tests/fees.rs @@ -20,14 +20,8 @@ use frame_support::{ traits::Currency, weights::GetDispatchInfo, }; -use sp_core::{ - Blake2Hasher, NeverNativeValue, map, - storage::Storage, -}; -use sp_runtime::{ - Fixed64, Perbill, - traits::Convert, -}; +use sp_core::{NeverNativeValue, map, storage::Storage}; +use sp_runtime::{Fixed64, Perbill, traits::{Convert, BlakeTwo256}}; use node_runtime::{ CheckedExtrinsic, Call, Runtime, Balances, TransactionPayment, TransactionBaseFee, TransactionByteFee, WeightFeeCoefficient, @@ -136,7 +130,7 @@ fn transaction_fee_is_correct_ultimate() { // - 1 MILLICENTS in substrate node. // - 1 milli-dot based on current polkadot runtime. // (this baed on assigning 0.1 CENT to the cheapest tx with `weight = 100`) - let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage { + let mut t = TestExternalities::::new_with_code(COMPACT_CODE, Storage { top: map![ >::hashed_key_for(alice()) => { (0u32, 0u8, 100 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS).encode() diff --git a/client/api/src/backend.rs b/client/api/src/backend.rs index c3e56e7f8b2..1f76aa8c1af 100644 --- a/client/api/src/backend.rs +++ b/client/api/src/backend.rs @@ -21,7 +21,7 @@ use std::collections::HashMap; use sp_core::ChangesTrieConfigurationRange; use sp_core::offchain::OffchainStorage; use sp_runtime::{generic::BlockId, Justification, Storage}; -use sp_runtime::traits::{Block as BlockT, NumberFor, HasherFor}; +use sp_runtime::traits::{Block as BlockT, NumberFor, HashFor}; use sp_state_machine::{ ChangesTrieState, ChangesTrieStorage as StateChangesTrieStorage, ChangesTrieTransaction, StorageCollection, ChildStorageCollection, @@ -43,7 +43,7 @@ pub use sp_state_machine::Backend as StateBackend; pub type StateBackendFor = >::State; /// Extracts the transaction for the given state backend. -pub type TransactionForSB = >>::Transaction; +pub type TransactionForSB = >>::Transaction; /// Extracts the transaction for the given backend. pub type TransactionFor = TransactionForSB, Block>; @@ -111,7 +111,7 @@ impl NewBlockState { /// Keeps hold if the inserted block state and data. pub trait BlockImportOperation { /// Associated state backend type. - type State: StateBackend>; + type State: StateBackend>; /// Returns pending state. /// @@ -149,7 +149,7 @@ pub trait BlockImportOperation { /// Inject changes trie data into the database. fn update_changes_trie( &mut self, - update: ChangesTrieTransaction, NumberFor>, + update: ChangesTrieTransaction, NumberFor>, ) -> sp_blockchain::Result<()>; /// Insert auxiliary keys. @@ -253,7 +253,7 @@ pub trait Backend: AuxStore + Send + Sync { /// Associated blockchain backend type. type Blockchain: BlockchainBackend; /// Associated state backend type. - type State: StateBackend> + Send; + type State: StateBackend> + Send; /// Offchain workers local storage. type OffchainStorage: OffchainStorage; @@ -344,10 +344,10 @@ pub trait Backend: AuxStore + Send + Sync { /// Changes trie storage that supports pruning. pub trait PrunableStateChangesTrieStorage: - StateChangesTrieStorage, NumberFor> + StateChangesTrieStorage, NumberFor> { /// Get reference to StateChangesTrieStorage. - fn storage(&self) -> &dyn StateChangesTrieStorage, NumberFor>; + fn storage(&self) -> &dyn StateChangesTrieStorage, NumberFor>; /// Get configuration at given block. fn configuration_at(&self, at: &BlockId) -> sp_blockchain::Result< ChangesTrieConfigurationRange, Block::Hash> @@ -377,7 +377,7 @@ pub trait RemoteBackend: Backend { pub fn changes_tries_state_at_block<'a, Block: BlockT>( block: &BlockId, maybe_storage: Option<&'a dyn PrunableStateChangesTrieStorage>, -) -> sp_blockchain::Result, NumberFor>>> { +) -> sp_blockchain::Result, NumberFor>>> { let storage = match maybe_storage { Some(storage) => storage, None => return Ok(None), diff --git a/client/api/src/call_executor.rs b/client/api/src/call_executor.rs index aff38a26aad..1a7b53d5415 100644 --- a/client/api/src/call_executor.rs +++ b/client/api/src/call_executor.rs @@ -19,7 +19,7 @@ use std::{panic::UnwindSafe, result, cell::RefCell}; use codec::{Encode, Decode}; use sp_runtime::{ - generic::BlockId, traits::{Block as BlockT, HasherFor}, + generic::BlockId, traits::{Block as BlockT, HashFor}, }; use sp_state_machine::{ OverlayedChanges, ExecutionManager, ExecutionStrategy, StorageProof, @@ -89,7 +89,7 @@ pub trait CallExecutor { /// Execute a call to a contract on top of given state, gathering execution proof. /// /// No changes are made. - fn prove_at_state>>( + fn prove_at_state>>( &self, mut state: S, overlay: &mut OverlayedChanges, @@ -107,9 +107,9 @@ pub trait CallExecutor { /// Execute a call to a contract on top of given trie state, gathering execution proof. /// /// No changes are made. - fn prove_at_trie_state>>( + fn prove_at_trie_state>>( &self, - trie_state: &sp_state_machine::TrieBackend>, + trie_state: &sp_state_machine::TrieBackend>, overlay: &mut OverlayedChanges, method: &str, call_data: &[u8] diff --git a/client/authority-discovery/src/tests.rs b/client/authority-discovery/src/tests.rs index 77ed6a1d948..55ee6c7aac1 100644 --- a/client/authority-discovery/src/tests.rs +++ b/client/authority-discovery/src/tests.rs @@ -215,7 +215,7 @@ impl ApiExt for RuntimeApi { fn into_storage_changes( &self, _: &Self::StateBackend, - _: Option<&sp_api::ChangesTrieState, sp_api::NumberFor>>, + _: Option<&sp_api::ChangesTrieState, sp_api::NumberFor>>, _: ::Hash, ) -> std::result::Result, String> where Self: Sized diff --git a/client/block-builder/src/lib.rs b/client/block-builder/src/lib.rs index c9b2efbea9a..82c7c91159b 100644 --- a/client/block-builder/src/lib.rs +++ b/client/block-builder/src/lib.rs @@ -28,9 +28,7 @@ use codec::Encode; use sp_runtime::{ generic::BlockId, - traits::{ - Header as HeaderT, Hash, Block as BlockT, HashFor, DigestFor, NumberFor, One, HasherFor, - }, + traits::{Header as HeaderT, Hash, Block as BlockT, HashFor, DigestFor, NumberFor, One}, }; use sp_blockchain::{ApplyExtrinsicFailed, Error}; use sp_core::ExecutionContext; @@ -47,7 +45,7 @@ use sc_client_api::backend; /// backend to get the state of the block. Furthermore an optional `proof` is included which /// can be used to proof that the build block contains the expected data. The `proof` will /// only be set when proof recording was activated. -pub struct BuiltBlock>> { +pub struct BuiltBlock>> { /// The actual block that was build. pub block: Block, /// The changes that need to be applied to the backend to get the state of the build block. @@ -56,7 +54,7 @@ pub struct BuiltBlock, } -impl>> BuiltBlock { +impl>> BuiltBlock { /// Convert into the inner values. pub fn into_inner(self) -> (Block, StorageChanges, Option) { (self.block, self.storage_changes, self.proof) diff --git a/client/consensus/slots/src/lib.rs b/client/consensus/slots/src/lib.rs index 892c8b13643..e23b2fb321a 100644 --- a/client/consensus/slots/src/lib.rs +++ b/client/consensus/slots/src/lib.rs @@ -37,7 +37,7 @@ use futures_timer::Delay; use sp_inherents::{InherentData, InherentDataProviders}; use log::{debug, error, info, warn}; use sp_runtime::generic::BlockId; -use sp_runtime::traits::{Block as BlockT, Header, HasherFor, NumberFor}; +use sp_runtime::traits::{Block as BlockT, Header, HashFor, NumberFor}; use sp_api::{ProvideRuntimeApi, ApiRef}; use std::{fmt::Debug, ops::Deref, pin::Pin, sync::Arc, time::{Instant, Duration}}; use sc_telemetry::{telemetry, CONSENSUS_DEBUG, CONSENSUS_WARN, CONSENSUS_INFO}; @@ -47,7 +47,7 @@ use parking_lot::Mutex; /// /// See [`sp_state_machine::StorageChanges`] for more information. pub type StorageChanges = - sp_state_machine::StorageChanges, NumberFor>; + sp_state_machine::StorageChanges, NumberFor>; /// A worker that should be invoked at every new slot. pub trait SlotWorker { diff --git a/client/db/src/bench.rs b/client/db/src/bench.rs index 9858a5c148b..b6a6b3f8d49 100644 --- a/client/db/src/bench.rs +++ b/client/db/src/bench.rs @@ -24,14 +24,14 @@ use rand::Rng; use hash_db::{Prefix, Hasher}; use sp_trie::{MemoryDB, prefixed_key}; use sp_core::storage::ChildInfo; -use sp_runtime::traits::{Block as BlockT, HasherFor}; +use sp_runtime::traits::{Block as BlockT, HashFor}; use sp_runtime::Storage; use sp_state_machine::{DBValue, backend::Backend as StateBackend}; use kvdb::{KeyValueDB, DBTransaction}; use kvdb_rocksdb::{Database, DatabaseConfig}; type DbState = sp_state_machine::TrieBackend< - Arc>>, HasherFor + Arc>>, HashFor >; struct StorageDb { @@ -39,9 +39,9 @@ struct StorageDb { _block: std::marker::PhantomData, } -impl sp_state_machine::Storage> for StorageDb { +impl sp_state_machine::Storage> for StorageDb { fn get(&self, key: &Block::Hash, prefix: Prefix) -> Result, String> { - let key = prefixed_key::>(key, prefix); + let key = prefixed_key::>(key, prefix); self.db.get(0, &key) .map_err(|e| format!("Database backend error: {:?}", e)) } @@ -53,7 +53,7 @@ pub struct BenchmarkingState { root: Cell, state: RefCell>>, db: Cell>>, - genesis: as StateBackend>>::Transaction, + genesis: as StateBackend>>::Transaction, } impl BenchmarkingState { @@ -64,8 +64,8 @@ impl BenchmarkingState { let path = temp_dir.join(&name); let mut root = B::Hash::default(); - let mut mdb = MemoryDB::>::default(); - sp_state_machine::TrieDBMut::>::new(&mut mdb, &mut root); + let mut mdb = MemoryDB::>::default(); + sp_state_machine::TrieDBMut::>::new(&mut mdb, &mut root); std::fs::create_dir(&path).map_err(|_| String::from("Error creating temp dir"))?; let mut state = BenchmarkingState { @@ -108,8 +108,8 @@ impl BenchmarkingState { self.db.set(None); *self.state.borrow_mut() = None; let mut root = B::Hash::default(); - let mut mdb = MemoryDB::>::default(); - sp_state_machine::TrieDBMut::>::new(&mut mdb, &mut root); + let mut mdb = MemoryDB::>::default(); + sp_state_machine::TrieDBMut::>::new(&mut mdb, &mut root); self.root.set(root); std::fs::remove_dir_all(&self.path).map_err(|_| "Error removing database dir".into()) @@ -126,10 +126,10 @@ fn state_err() -> String { "State is not open".into() } -impl StateBackend> for BenchmarkingState { - type Error = as StateBackend>>::Error; - type Transaction = as StateBackend>>::Transaction; - type TrieBackendStorage = as StateBackend>>::TrieBackendStorage; +impl StateBackend> for BenchmarkingState { + type Error = as StateBackend>>::Error; + type Transaction = as StateBackend>>::Transaction; + type TrieBackendStorage = as StateBackend>>::TrieBackendStorage; fn storage(&self, key: &[u8]) -> Result>, Self::Error> { self.state.borrow().as_ref().ok_or_else(state_err)?.storage(key) @@ -244,12 +244,12 @@ impl StateBackend> for BenchmarkingState { } fn as_trie_backend(&mut self) - -> Option<&sp_state_machine::TrieBackend>> + -> Option<&sp_state_machine::TrieBackend>> { None } - fn commit(&self, storage_root: as Hasher>::Out, mut transaction: Self::Transaction) + fn commit(&self, storage_root: as Hasher>::Out, mut transaction: Self::Transaction) -> Result<(), Self::Error> { if let Some(db) = self.db.take() { diff --git a/client/db/src/changes_tries_storage.rs b/client/db/src/changes_tries_storage.rs index 99488bbaed0..a28cd604fe3 100644 --- a/client/db/src/changes_tries_storage.rs +++ b/client/db/src/changes_tries_storage.rs @@ -28,7 +28,7 @@ use sc_client_api::backend::PrunableStateChangesTrieStorage; use sp_blockchain::{well_known_cache_keys, Cache as BlockchainCache}; use sp_core::{ChangesTrieConfiguration, ChangesTrieConfigurationRange, convert_hash}; use sp_runtime::traits::{ - Block as BlockT, Header as HeaderT, HasherFor, NumberFor, One, Zero, CheckedSub, + Block as BlockT, Header as HeaderT, HashFor, NumberFor, One, Zero, CheckedSub, }; use sp_runtime::generic::{BlockId, DigestItem, ChangesTrieSignal}; use sp_state_machine::{DBValue, ChangesTrieBuildCache, ChangesTrieCacheAction}; @@ -150,7 +150,7 @@ impl DbChangesTrieStorage { pub fn commit( &self, tx: &mut DBTransaction, - mut changes_trie: MemoryDB>, + mut changes_trie: MemoryDB>, parent_block: ComplexBlockId, block: ComplexBlockId, new_header: &Block::Header, @@ -377,7 +377,7 @@ impl DbChangesTrieStorage { } impl PrunableStateChangesTrieStorage for DbChangesTrieStorage { - fn storage(&self) -> &dyn sp_state_machine::ChangesTrieStorage, NumberFor> { + fn storage(&self) -> &dyn sp_state_machine::ChangesTrieStorage, NumberFor> { self } @@ -396,7 +396,7 @@ impl PrunableStateChangesTrieStorage for DbChangesTrieStor } } -impl sp_state_machine::ChangesTrieRootsStorage, NumberFor> +impl sp_state_machine::ChangesTrieRootsStorage, NumberFor> for DbChangesTrieStorage { fn build_anchor( @@ -469,12 +469,12 @@ impl sp_state_machine::ChangesTrieRootsStorage, } } -impl sp_state_machine::ChangesTrieStorage, NumberFor> +impl sp_state_machine::ChangesTrieStorage, NumberFor> for DbChangesTrieStorage where Block: BlockT, { - fn as_roots_storage(&self) -> &dyn sp_state_machine::ChangesTrieRootsStorage, NumberFor> { + fn as_roots_storage(&self) -> &dyn sp_state_machine::ChangesTrieRootsStorage, NumberFor> { self } diff --git a/client/db/src/lib.rs b/client/db/src/lib.rs index b4dd98457d4..d4c157986f5 100644 --- a/client/db/src/lib.rs +++ b/client/db/src/lib.rs @@ -67,7 +67,7 @@ use sp_runtime::{ BuildStorage, }; use sp_runtime::traits::{ - Block as BlockT, Header as HeaderT, NumberFor, Zero, One, SaturatedConversion, HasherFor, + Block as BlockT, Header as HeaderT, NumberFor, Zero, One, SaturatedConversion, HashFor, }; use sc_executor::RuntimeInfo; use sp_state_machine::{ @@ -99,7 +99,7 @@ const DEFAULT_CHILD_RATIO: (usize, usize) = (1, 10); /// DB-backed patricia trie state, transaction type is an overlay of changes to commit. pub type DbState = sp_state_machine::TrieBackend< - Arc>>, HasherFor + Arc>>, HashFor >; /// Re-export the KVDB trait so that one can pass an implementation of it. @@ -139,10 +139,10 @@ impl std::fmt::Debug for RefTrackingState { } } -impl StateBackend> for RefTrackingState { - type Error = as StateBackend>>::Error; - type Transaction = as StateBackend>>::Transaction; - type TrieBackendStorage = as StateBackend>>::TrieBackendStorage; +impl StateBackend> for RefTrackingState { + type Error = as StateBackend>>::Error; + type Transaction = as StateBackend>>::Transaction; + type TrieBackendStorage = as StateBackend>>::TrieBackendStorage; fn storage(&self, key: &[u8]) -> Result>, Self::Error> { self.state.storage(key) @@ -251,7 +251,7 @@ impl StateBackend> for RefTrackingState { } fn as_trie_backend(&mut self) - -> Option<&sp_state_machine::TrieBackend>> + -> Option<&sp_state_machine::TrieBackend>> { self.state.as_trie_backend() } @@ -521,10 +521,10 @@ impl HeaderMetadata for BlockchainDb { /// Database transaction pub struct BlockImportOperation { old_state: CachingState, Block>, - db_updates: PrefixedMemoryDB>, + db_updates: PrefixedMemoryDB>, storage_updates: StorageCollection, child_storage_updates: ChildStorageCollection, - changes_trie_updates: MemoryDB>, + changes_trie_updates: MemoryDB>, changes_trie_build_cache_update: Option>>, changes_trie_config_update: Option>, pending_block: Option>, @@ -576,7 +576,7 @@ impl sc_client_api::backend::BlockImportOperation for Bloc // Currently cache isn't implemented on full nodes. } - fn update_db_storage(&mut self, update: PrefixedMemoryDB>) -> ClientResult<()> { + fn update_db_storage(&mut self, update: PrefixedMemoryDB>) -> ClientResult<()> { self.db_updates = update; Ok(()) } @@ -623,7 +623,7 @@ impl sc_client_api::backend::BlockImportOperation for Bloc fn update_changes_trie( &mut self, - update: ChangesTrieTransaction, NumberFor>, + update: ChangesTrieTransaction, NumberFor>, ) -> ClientResult<()> { self.changes_trie_updates = update.0; self.changes_trie_build_cache_update = Some(update.1); @@ -668,9 +668,9 @@ struct StorageDb { pub state_db: StateDb>, } -impl sp_state_machine::Storage> for StorageDb { +impl sp_state_machine::Storage> for StorageDb { fn get(&self, key: &Block::Hash, prefix: Prefix) -> Result, String> { - let key = prefixed_key::>(key, prefix); + let key = prefixed_key::>(key, prefix); self.state_db.get(&key, self) .map_err(|e| format!("Database backend error: {:?}", e)) } @@ -690,13 +690,13 @@ struct DbGenesisStorage(pub Block::Hash); impl DbGenesisStorage { pub fn new() -> Self { let mut root = Block::Hash::default(); - let mut mdb = MemoryDB::>::default(); - sp_state_machine::TrieDBMut::>::new(&mut mdb, &mut root); + let mut mdb = MemoryDB::>::default(); + sp_state_machine::TrieDBMut::>::new(&mut mdb, &mut root); DbGenesisStorage(root) } } -impl sp_state_machine::Storage> for DbGenesisStorage { +impl sp_state_machine::Storage> for DbGenesisStorage { fn get(&self, _key: &Block::Hash, _prefix: Prefix) -> Result, String> { Ok(None) } @@ -1653,7 +1653,7 @@ pub(crate) mod tests { use hash_db::{HashDB, EMPTY_PREFIX}; use super::*; use crate::columns; - use sp_core::{Blake2Hasher, H256}; + use sp_core::H256; use sc_client_api::backend::{Backend as BTrait, BlockImportOperation as Op}; use sc_client::blockchain::Backend as BLBTrait; use sp_runtime::testing::{Header, Block as RawBlock, ExtrinsicWrapper}; @@ -1664,11 +1664,11 @@ pub(crate) mod tests { pub(crate) type Block = RawBlock>; - pub fn prepare_changes(changes: Vec<(Vec, Vec)>) -> (H256, MemoryDB) { + pub fn prepare_changes(changes: Vec<(Vec, Vec)>) -> (H256, MemoryDB) { let mut changes_root = H256::default(); - let mut changes_trie_update = MemoryDB::::default(); + let mut changes_trie_update = MemoryDB::::default(); { - let mut trie = TrieDBMut::::new( + let mut trie = TrieDBMut::::new( &mut changes_trie_update, &mut changes_root ); @@ -1900,7 +1900,7 @@ pub(crate) mod tests { backend.commit_operation(op).unwrap(); assert_eq!(backend.storage.db.get( columns::STATE, - &sp_trie::prefixed_key::(&key, EMPTY_PREFIX) + &sp_trie::prefixed_key::(&key, EMPTY_PREFIX) ).unwrap().unwrap(), &b"hello"[..]); hash }; @@ -1937,7 +1937,7 @@ pub(crate) mod tests { backend.commit_operation(op).unwrap(); assert_eq!(backend.storage.db.get( columns::STATE, - &sp_trie::prefixed_key::(&key, EMPTY_PREFIX) + &sp_trie::prefixed_key::(&key, EMPTY_PREFIX) ).unwrap().unwrap(), &b"hello"[..]); hash }; @@ -1975,7 +1975,7 @@ pub(crate) mod tests { assert!(backend.storage.db.get( columns::STATE, - &sp_trie::prefixed_key::(&key, EMPTY_PREFIX) + &sp_trie::prefixed_key::(&key, EMPTY_PREFIX) ).unwrap().is_some()); hash }; @@ -2009,7 +2009,7 @@ pub(crate) mod tests { backend.commit_operation(op).unwrap(); assert!(backend.storage.db.get( columns::STATE, - &sp_trie::prefixed_key::(&key, EMPTY_PREFIX) + &sp_trie::prefixed_key::(&key, EMPTY_PREFIX) ).unwrap().is_none()); } @@ -2018,7 +2018,7 @@ pub(crate) mod tests { backend.finalize_block(BlockId::Number(3), None).unwrap(); assert!(backend.storage.db.get( columns::STATE, - &sp_trie::prefixed_key::(&key, EMPTY_PREFIX) + &sp_trie::prefixed_key::(&key, EMPTY_PREFIX) ).unwrap().is_none()); } diff --git a/client/db/src/light.rs b/client/db/src/light.rs index 3d30598b19e..cda1a119526 100644 --- a/client/db/src/light.rs +++ b/client/db/src/light.rs @@ -36,7 +36,7 @@ use sp_blockchain::{ use sc_client::light::blockchain::Storage as LightBlockchainStorage; use codec::{Decode, Encode}; use sp_runtime::generic::{DigestItem, BlockId}; -use sp_runtime::traits::{Block as BlockT, Header as HeaderT, Zero, One, NumberFor, HasherFor}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, Zero, One, NumberFor, HashFor}; use crate::cache::{DbCacheSync, DbCache, ComplexBlockId, EntryType as CacheEntryType}; use crate::utils::{self, meta_keys, DatabaseType, Meta, db_err, read_db, block_id_to_lookup_key, read_meta}; use crate::{DatabaseSettings, FrozenForDuration}; @@ -305,7 +305,7 @@ impl LightStorage { Some(old_current_num) }); - let new_header_cht_root = cht::compute_root::, _>( + let new_header_cht_root = cht::compute_root::, _>( cht::size(), new_cht_number, cht_range.map(|num| self.hash(num)) )?; transaction.put( @@ -322,7 +322,7 @@ impl LightStorage { current_num = current_num + One::one(); Some(old_current_num) }); - let new_changes_trie_cht_root = cht::compute_root::, _>( + let new_changes_trie_cht_root = cht::compute_root::, _>( cht::size(), new_cht_number, cht_range .map(|num| self.changes_trie_root(BlockId::Number(num))) )?; diff --git a/client/db/src/storage_cache.rs b/client/db/src/storage_cache.rs index 6ef29f47b8c..6f289369e2e 100644 --- a/client/db/src/storage_cache.rs +++ b/client/db/src/storage_cache.rs @@ -21,7 +21,7 @@ use std::sync::Arc; use parking_lot::{Mutex, RwLock, RwLockUpgradableReadGuard}; use linked_hash_map::{LinkedHashMap, Entry}; use hash_db::Hasher; -use sp_runtime::traits::{Block as BlockT, Header, HasherFor, NumberFor}; +use sp_runtime::traits::{Block as BlockT, Header, HashFor, NumberFor}; use sp_core::hexdisplay::HexDisplay; use sp_core::storage::ChildInfo; use sp_state_machine::{ @@ -281,7 +281,7 @@ pub struct CacheChanges { /// Shared canonical state cache. shared_cache: SharedCache, /// Local cache of values for this state. - local_cache: RwLock>>, + local_cache: RwLock>>, /// Hash of the block on top of which this instance was created or /// `None` if cache is disabled pub parent_hash: Option, @@ -296,7 +296,7 @@ pub struct CacheChanges { /// For canonical instances local cache is accumulated and applied /// in `sync_cache` along with the change overlay. /// For non-canonical clones local cache and changes are dropped. -pub struct CachingState>, B: BlockT> { +pub struct CachingState>, B: BlockT> { /// Usage statistics usage: StateUsageStats, /// Backing state. @@ -305,7 +305,7 @@ pub struct CachingState>, B: BlockT> { pub cache: CacheChanges, } -impl>, B: BlockT> std::fmt::Debug for CachingState { +impl>, B: BlockT> std::fmt::Debug for CachingState { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "Block {:?}", self.cache.parent_hash) } @@ -420,7 +420,7 @@ impl CacheChanges { } -impl>, B: BlockT> CachingState { +impl>, B: BlockT> CachingState { /// Create a new instance wrapping generic State and shared cache. pub fn new(state: S, shared_cache: SharedCache, parent_hash: Option) -> Self { CachingState { @@ -489,7 +489,7 @@ impl>, B: BlockT> CachingState { } } -impl>, B: BlockT> StateBackend> for CachingState { +impl>, B: BlockT> StateBackend> for CachingState { type Error = S::Error; type Transaction = S::Transaction; type TrieBackendStorage = S::TrieBackendStorage; @@ -659,7 +659,7 @@ impl>, B: BlockT> StateBackend> for Ca self.state.child_keys(storage_key, child_info, prefix) } - fn as_trie_backend(&mut self) -> Option<&TrieBackend>> { + fn as_trie_backend(&mut self) -> Option<&TrieBackend>> { self.state.as_trie_backend() } @@ -671,9 +671,11 @@ impl>, B: BlockT> StateBackend> for Ca #[cfg(test)] mod tests { use super::*; - use sp_runtime::testing::{H256, Block as RawBlock, ExtrinsicWrapper}; + use sp_runtime::{ + traits::BlakeTwo256, + testing::{H256, Block as RawBlock, ExtrinsicWrapper}, + }; use sp_state_machine::InMemoryBackend; - use sp_core::Blake2Hasher; type Block = RawBlock>; @@ -695,7 +697,7 @@ mod tests { // blocks [ 3a(c) 2a(c) 2b 1b 1a(c) 0 ] // state [ 5 5 4 3 2 2 ] let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(root_parent), ); @@ -710,14 +712,14 @@ mod tests { ); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h0), ); s.cache.sync_cache(&[], &[], vec![], vec![], Some(h1a), Some(1), true); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h0), ); @@ -732,7 +734,7 @@ mod tests { ); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h1b), ); @@ -747,7 +749,7 @@ mod tests { ); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h1a), ); @@ -762,35 +764,35 @@ mod tests { ); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h2a), ); s.cache.sync_cache(&[], &[], vec![], vec![], Some(h3a), Some(3), true); let s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h3a), ); assert_eq!(s.storage(&key).unwrap().unwrap(), vec![5]); let s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h1a), ); assert!(s.storage(&key).unwrap().is_none()); let s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h2b), ); assert!(s.storage(&key).unwrap().is_none()); let s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h1b), ); @@ -799,7 +801,7 @@ mod tests { // reorg to 3b // blocks [ 3b(c) 3a 2a 2b(c) 1b 1a 0 ] let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h2b), ); @@ -813,7 +815,7 @@ mod tests { true, ); let s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h3a), ); @@ -834,7 +836,7 @@ mod tests { let shared = new_shared_cache::(256*1024, (0,1)); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(root_parent), ); @@ -849,14 +851,14 @@ mod tests { ); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h1), ); s.cache.sync_cache(&[], &[], vec![], vec![], Some(h2a), Some(2), true); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h1), ); @@ -871,7 +873,7 @@ mod tests { ); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h2b), ); @@ -886,7 +888,7 @@ mod tests { ); let s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h2a), ); @@ -906,21 +908,21 @@ mod tests { let shared = new_shared_cache::(256*1024, (0,1)); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(root_parent), ); s.cache.sync_cache(&[], &[], vec![], vec![], Some(h1), Some(1), true); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h1), ); s.cache.sync_cache(&[], &[], vec![], vec![], Some(h2a), Some(2), true); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h2a), ); @@ -935,14 +937,14 @@ mod tests { ); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h1), ); s.cache.sync_cache(&[], &[], vec![], vec![], Some(h2b), Some(2), false); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h2b), ); @@ -957,7 +959,7 @@ mod tests { ); let s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h3a), ); @@ -971,7 +973,7 @@ mod tests { let h0 = H256::random(); let mut s = CachingState::new( - InMemoryBackend::::default(), shared.clone(), Some(root_parent.clone()), + InMemoryBackend::::default(), shared.clone(), Some(root_parent.clone()), ); let key = H256::random()[..].to_vec(); @@ -1009,7 +1011,7 @@ mod tests { let h0 = H256::random(); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(root_parent), ); @@ -1053,7 +1055,7 @@ mod tests { let shared = new_shared_cache::(256 * 1024, (0, 1)); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(root_parent.clone()), ); @@ -1068,7 +1070,7 @@ mod tests { ); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h0), ); @@ -1083,7 +1085,7 @@ mod tests { ); let mut s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h1), ); @@ -1106,7 +1108,7 @@ mod tests { s.cache.sync_cache(&[], &[], vec![], vec![], None, None, true); let s = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), shared.clone(), Some(h1), ); @@ -1121,9 +1123,11 @@ mod qc { use quickcheck::{quickcheck, TestResult, Arbitrary}; use super::*; - use sp_runtime::testing::{H256, Block as RawBlock, ExtrinsicWrapper}; + use sp_runtime::{ + traits::BlakeTwo256, + testing::{H256, Block as RawBlock, ExtrinsicWrapper}, + }; use sp_state_machine::InMemoryBackend; - use sp_core::Blake2Hasher; type Block = RawBlock>; @@ -1250,22 +1254,22 @@ mod qc { } } - fn head_state(&self, hash: H256) -> CachingState, Block> { + fn head_state(&self, hash: H256) -> CachingState, Block> { CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), self.shared.clone(), Some(hash) ) } - fn canon_head_state(&self) -> CachingState, Block> { + fn canon_head_state(&self) -> CachingState, Block> { self.head_state(self.canon.last().expect("Expected to be one commit").hash) } fn mutate_static( &mut self, action: Action, - ) -> CachingState, Block> { + ) -> CachingState, Block> { self.mutate(action).expect("Expected to provide only valid actions to the mutate_static") } @@ -1284,7 +1288,7 @@ mod qc { fn mutate( &mut self, action: Action, - ) -> Result, Block>, ()> { + ) -> Result, Block>, ()> { let state = match action { Action::Fork { depth, hash, changes } => { let pos = self.canon.len() as isize - depth as isize; @@ -1321,7 +1325,7 @@ mod qc { }; let mut state = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), self.shared.clone(), Some(parent) ); @@ -1360,7 +1364,7 @@ mod qc { } let mut state = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), self.shared.clone(), Some(parent_hash) ); @@ -1407,7 +1411,7 @@ mod qc { self.canon.push(node); let mut state = CachingState::new( - InMemoryBackend::::default(), + InMemoryBackend::::default(), self.shared.clone(), Some(fork_at) ); diff --git a/client/executor/Cargo.toml b/client/executor/Cargo.toml index 46e4bb04bb9..1353bc57307 100644 --- a/client/executor/Cargo.toml +++ b/client/executor/Cargo.toml @@ -39,6 +39,7 @@ sc-runtime-test = { version = "2.0.0-dev", path = "runtime-test" } substrate-test-runtime = { version = "2.0.0-dev", path = "../../test-utils/runtime" } sp-state-machine = { version = "0.8.0-alpha.2", path = "../../primitives/state-machine" } test-case = "0.3.3" +sp-runtime = { version = "2.0.0-alpha.2", path = "../../primitives/runtime" } [features] default = [ "std" ] diff --git a/client/executor/src/integration_tests/mod.rs b/client/executor/src/integration_tests/mod.rs index c0516d3ac7d..87ca33c4da7 100644 --- a/client/executor/src/integration_tests/mod.rs +++ b/client/executor/src/integration_tests/mod.rs @@ -19,7 +19,7 @@ mod sandbox; use codec::{Encode, Decode}; use hex_literal::hex; use sp_core::{ - Blake2Hasher, blake2_128, blake2_256, ed25519, sr25519, map, Pair, + blake2_128, blake2_256, ed25519, sr25519, map, Pair, offchain::{OffchainExt, testing}, traits::Externalities, }; @@ -28,10 +28,11 @@ use sp_state_machine::TestExternalities as CoreTestExternalities; use test_case::test_case; use sp_trie::{TrieConfiguration, trie_types::Layout}; use sp_wasm_interface::HostFunctions as _; +use sp_runtime::traits::BlakeTwo256; use crate::WasmExecutionMethod; -pub type TestExternalities = CoreTestExternalities; +pub type TestExternalities = CoreTestExternalities; type HostFunctions = sp_io::SubstrateHostFunctions; fn call_in_wasm( @@ -440,7 +441,7 @@ fn ordered_trie_root_should_work(wasm_method: WasmExecutionMethod) { wasm_method, &mut ext.ext(), ).unwrap(), - Layout::::ordered_trie_root(trie_input.iter()).as_bytes().encode(), + Layout::::ordered_trie_root(trie_input.iter()).as_bytes().encode(), ); } diff --git a/client/finality-grandpa/src/tests.rs b/client/finality-grandpa/src/tests.rs index 7b5880f7ee5..2734101500a 100644 --- a/client/finality-grandpa/src/tests.rs +++ b/client/finality-grandpa/src/tests.rs @@ -42,7 +42,7 @@ use std::{ pin::Pin, task, }; use parity_scale_codec::Decode; -use sp_runtime::traits::{Block as BlockT, Header as HeaderT, HasherFor}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, HashFor}; use sp_runtime::generic::{BlockId, DigestItem}; use sp_core::{H256, NativeOrEncoded, ExecutionContext, crypto::Public}; use sp_finality_grandpa::{GRANDPA_ENGINE_ID, AuthorityList, GrandpaApi}; @@ -289,7 +289,7 @@ impl ApiExt for RuntimeApi { fn into_storage_changes( &self, _: &Self::StateBackend, - _: Option<&sp_api::ChangesTrieState, sp_api::NumberFor>>, + _: Option<&sp_api::ChangesTrieState, sp_api::NumberFor>>, _: ::Hash, ) -> std::result::Result, String> where Self: Sized @@ -323,7 +323,7 @@ impl AuthoritySetForFinalityProver for TestApi { fn prove_authorities(&self, block: &BlockId) -> Result { let authorities = self.authorities(block)?; - let backend = >>::from(vec![ + let backend = >>::from(vec![ (None, vec![(b"authorities".to_vec(), Some(authorities.encode()))]) ]); let proof = prove_read(backend, vec![b"authorities"]) @@ -339,7 +339,7 @@ impl AuthoritySetForFinalityChecker for TestApi { header: ::Header, proof: StorageProof, ) -> Result { - let results = read_proof_check::, _>( + let results = read_proof_check::, _>( *header.state_root(), proof, vec![b"authorities"] ) .expect("failure checking read proof for authorities"); diff --git a/client/rpc/src/state/state_light.rs b/client/rpc/src/state/state_light.rs index 7b2455a8fce..4d2e8fbb05e 100644 --- a/client/rpc/src/state/state_light.rs +++ b/client/rpc/src/state/state_light.rs @@ -52,7 +52,7 @@ use sp_core::{ Bytes, OpaqueMetadata, storage::{StorageKey, StorageData, StorageChangeSet}, }; use sp_version::RuntimeVersion; -use sp_runtime::{generic::BlockId, traits::{Block as BlockT, HasherFor}}; +use sp_runtime::{generic::BlockId, traits::{Block as BlockT, HashFor}}; use super::{StateBackend, error::{FutureResult, Error}, client_err}; @@ -241,7 +241,7 @@ impl StateBackend for LightState::hash(&storage.0)))) + result(Ok(maybe_storage.map(|storage| HashFor::::hash(&storage.0)))) ) ) } @@ -302,7 +302,7 @@ impl StateBackend for LightState::hash(&storage.0)))) + result(Ok(maybe_storage.map(|storage| HashFor::::hash(&storage.0)))) ) ) } diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index 01bba286c64..bc731dd2de8 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -39,7 +39,7 @@ use sc_network::{NetworkService, NetworkStateInfo}; use parking_lot::{Mutex, RwLock}; use sp_runtime::generic::BlockId; use sp_runtime::traits::{ - Block as BlockT, NumberFor, SaturatedConversion, HasherFor, UniqueSaturatedInto, + Block as BlockT, NumberFor, SaturatedConversion, HashFor, UniqueSaturatedInto, }; use sp_api::ProvideRuntimeApi; use sc_executor::{NativeExecutor, NativeExecutionDispatch}; @@ -159,19 +159,19 @@ pub type TLightClient = Client< /// Light client backend type. pub type TLightBackend = sc_client::light::backend::Backend< sc_client_db::light::LightStorage, - HasherFor, + HashFor, >; /// Light call executor type. pub type TLightCallExecutor = sc_client::light::call_executor::GenesisCallExecutor< sc_client::light::backend::Backend< sc_client_db::light::LightStorage, - HasherFor + HashFor >, sc_client::LocalCallExecutor< sc_client::light::backend::Backend< sc_client_db::light::LightStorage, - HasherFor + HashFor >, NativeExecutor >, diff --git a/client/src/call_executor.rs b/client/src/call_executor.rs index 659e0152399..db95309458f 100644 --- a/client/src/call_executor.rs +++ b/client/src/call_executor.rs @@ -17,7 +17,7 @@ use std::{sync::Arc, panic::UnwindSafe, result, cell::RefCell}; use codec::{Encode, Decode}; use sp_runtime::{ - generic::BlockId, traits::{Block as BlockT, HasherFor, NumberFor}, + generic::BlockId, traits::{Block as BlockT, HashFor, NumberFor}, }; use sp_state_machine::{ self, OverlayedChanges, Ext, ExecutionManager, StateMachine, ExecutionStrategy, @@ -211,9 +211,9 @@ where version.map_err(|e| sp_blockchain::Error::VersionInvalid(format!("{:?}", e)).into()) } - fn prove_at_trie_state>>( + fn prove_at_trie_state>>( &self, - trie_state: &sp_state_machine::TrieBackend>, + trie_state: &sp_state_machine::TrieBackend>, overlay: &mut OverlayedChanges, method: &str, call_data: &[u8] diff --git a/client/src/cht.rs b/client/src/cht.rs index 1435b77ec59..de672806323 100644 --- a/client/src/cht.rs +++ b/client/src/cht.rs @@ -331,8 +331,8 @@ pub fn decode_cht_value(value: &[u8]) -> Option { #[cfg(test)] mod tests { - use sp_core::Blake2Hasher; use substrate_test_runtime_client::runtime::Header; + use sp_runtime::traits::BlakeTwo256; use super::*; #[test] @@ -398,7 +398,7 @@ mod tests { #[test] fn compute_root_works() { - assert!(compute_root::( + assert!(compute_root::( SIZE as _, 42, ::std::iter::repeat_with(|| Ok(Some(H256::from_low_u64_be(1)))) @@ -409,7 +409,7 @@ mod tests { #[test] #[should_panic] fn build_proof_panics_when_querying_wrong_block() { - assert!(build_proof::( + assert!(build_proof::( SIZE as _, 0, vec![(SIZE * 1000) as u64], @@ -420,7 +420,7 @@ mod tests { #[test] fn build_proof_works() { - assert!(build_proof::( + assert!(build_proof::( SIZE as _, 0, vec![(SIZE / 2) as u64], diff --git a/client/src/client.rs b/client/src/client.rs index 68970cbb2ac..5a0093308e6 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -34,7 +34,7 @@ use sp_runtime::{ Justification, BuildStorage, generic::{BlockId, SignedBlock, DigestItem}, traits::{ - Block as BlockT, Header as HeaderT, Zero, NumberFor, HasherFor, SaturatedConversion, One, + Block as BlockT, Header as HeaderT, Zero, NumberFor, HashFor, SaturatedConversion, One, DigestFor, }, }; @@ -120,7 +120,7 @@ impl <'a, State, Block> KeyIterator<'a, State, Block> { impl<'a, State, Block> Iterator for KeyIterator<'a, State, Block> where Block: BlockT, - State: StateBackend>, + State: StateBackend>, { type Item = StorageKey; @@ -527,7 +527,7 @@ impl Client where Some(old_current_num) }); let headers = cht_range.map(|num| self.block_hash(num)); - let proof = cht::build_proof::, _, _>( + let proof = cht::build_proof::, _, _>( cht_size, cht_num, std::iter::once(block_num), @@ -600,7 +600,7 @@ impl Client where zero: config_zero.clone(), end: config_end.map(|(config_end_number, _)| config_end_number), }; - let result_range: Vec<(NumberFor, u32)> = key_changes::, _>( + let result_range: Vec<(NumberFor, u32)> = key_changes::, _>( config_range, storage.storage(), range_first, @@ -654,12 +654,12 @@ impl Client where cht_size: NumberFor, ) -> sp_blockchain::Result> { struct AccessedRootsRecorder<'a, Block: BlockT> { - storage: &'a dyn ChangesTrieStorage, NumberFor>, + storage: &'a dyn ChangesTrieStorage, NumberFor>, min: NumberFor, required_roots_proofs: Mutex, Block::Hash>>, }; - impl<'a, Block: BlockT> ChangesTrieRootsStorage, NumberFor> for + impl<'a, Block: BlockT> ChangesTrieRootsStorage, NumberFor> for AccessedRootsRecorder<'a, Block> { fn build_anchor(&self, hash: Block::Hash) @@ -686,11 +686,11 @@ impl Client where } } - impl<'a, Block: BlockT> ChangesTrieStorage, NumberFor> for + impl<'a, Block: BlockT> ChangesTrieStorage, NumberFor> for AccessedRootsRecorder<'a, Block> { fn as_roots_storage(&self) - -> &dyn sp_state_machine::ChangesTrieRootsStorage, NumberFor> + -> &dyn sp_state_machine::ChangesTrieRootsStorage, NumberFor> { self } @@ -734,7 +734,7 @@ impl Client where zero: config_zero, end: config_end.map(|(config_end_number, _)| config_end_number), }; - let proof_range = key_changes_proof::, _>( + let proof_range = key_changes_proof::, _>( config_range, &recording_storage, first_number, @@ -801,7 +801,7 @@ impl Client where .map(|block| block.and_then(|block| block.digest().log(DigestItem::as_changes_trie_root).cloned())) ); - let proof = cht::build_proof::, _, _>( + let proof = cht::build_proof::, _, _>( cht_size, cht_num, blocks, diff --git a/client/src/genesis.rs b/client/src/genesis.rs index 006ed00c436..c3ca82292dc 100644 --- a/client/src/genesis.rs +++ b/client/src/genesis.rs @@ -53,7 +53,7 @@ mod tests { runtime::{Hash, Transfer, Block, BlockNumber, Header, Digest}, AccountKeyring, Sr25519Keyring, }; - use sp_core::Blake2Hasher; + use sp_runtime::traits::BlakeTwo256; use hex_literal::*; native_executor_instance!( @@ -67,7 +67,7 @@ mod tests { } fn construct_block( - backend: &InMemoryBackend, + backend: &InMemoryBackend, number: BlockNumber, parent_hash: Hash, state_root: Hash, @@ -78,7 +78,7 @@ mod tests { let transactions = txs.into_iter().map(|tx| tx.into_signed_tx()).collect::>(); let iter = transactions.iter().map(Encode::encode); - let extrinsics_root = Layout::::ordered_trie_root(iter).into(); + let extrinsics_root = Layout::::ordered_trie_root(iter).into(); let mut header = Header { parent_hash, @@ -137,7 +137,7 @@ mod tests { (vec![].and(&Block { header, extrinsics: transactions }), hash) } - fn block1(genesis_hash: Hash, backend: &InMemoryBackend) -> (Vec, Hash) { + fn block1(genesis_hash: Hash, backend: &InMemoryBackend) -> (Vec, Hash) { construct_block( backend, 1, diff --git a/client/src/in_mem.rs b/client/src/in_mem.rs index dcff8102aeb..bdbfdbc7ec8 100644 --- a/client/src/in_mem.rs +++ b/client/src/in_mem.rs @@ -24,7 +24,7 @@ use sp_core::offchain::storage::{ InMemOffchainStorage as OffchainStorage }; use sp_runtime::generic::BlockId; -use sp_runtime::traits::{Block as BlockT, Header as HeaderT, Zero, NumberFor, HasherFor}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, Zero, NumberFor, HashFor}; use sp_runtime::{Justification, Storage}; use sp_state_machine::{ ChangesTrieTransaction, InMemoryBackend, Backend as StateBackend, StorageCollection, @@ -462,8 +462,8 @@ impl sc_client_api::light::Storage for Blockchain pub struct BlockImportOperation { pending_block: Option>, pending_cache: HashMap>, - old_state: InMemoryBackend>, - new_state: Option>>, + old_state: InMemoryBackend>, + new_state: Option>>, aux: Vec<(Vec, Option>)>, finalized_blocks: Vec<(BlockId, Option)>, set_head: Option>, @@ -472,7 +472,7 @@ pub struct BlockImportOperation { impl backend::BlockImportOperation for BlockImportOperation where Block::Hash: Ord, { - type State = InMemoryBackend>; + type State = InMemoryBackend>; fn state(&self) -> sp_blockchain::Result> { Ok(Some(&self.old_state)) @@ -499,7 +499,7 @@ impl backend::BlockImportOperation for BlockImportOperatio fn update_db_storage( &mut self, - update: > as StateBackend>>::Transaction, + update: > as StateBackend>>::Transaction, ) -> sp_blockchain::Result<()> { self.new_state = Some(self.old_state.update(update)); Ok(()) @@ -507,7 +507,7 @@ impl backend::BlockImportOperation for BlockImportOperatio fn update_changes_trie( &mut self, - _update: ChangesTrieTransaction, NumberFor>, + _update: ChangesTrieTransaction, NumberFor>, ) -> sp_blockchain::Result<()> { Ok(()) } @@ -564,7 +564,7 @@ impl backend::BlockImportOperation for BlockImportOperatio /// > **Warning**: Doesn't support all the features necessary for a proper database. Only use this /// > struct for testing purposes. Do **NOT** use in production. pub struct Backend where Block::Hash: Ord { - states: RwLock>>>, + states: RwLock>>>, blockchain: Blockchain, import_lock: RwLock<()>, } @@ -599,7 +599,7 @@ impl backend::AuxStore for Backend where Block::Hash: Ord impl backend::Backend for Backend where Block::Hash: Ord { type BlockImportOperation = BlockImportOperation; type Blockchain = Blockchain; - type State = InMemoryBackend>; + type State = InMemoryBackend>; type OffchainStorage = OffchainStorage; fn begin_operation(&self) -> sp_blockchain::Result { diff --git a/client/src/lib.rs b/client/src/lib.rs index 1d279cabad4..f282449c276 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -47,7 +47,6 @@ //! ``` //! use std::sync::Arc; //! use sc_client::{Client, in_mem::Backend, LocalCallExecutor}; -//! use sp_core::Blake2Hasher; //! use sp_runtime::Storage; //! use sc_executor::{NativeExecutor, WasmExecutionMethod}; //! diff --git a/client/src/light/backend.rs b/client/src/light/backend.rs index 48434bb41d1..749e24af046 100644 --- a/client/src/light/backend.rs +++ b/client/src/light/backend.rs @@ -31,7 +31,7 @@ use sp_state_machine::{ StorageCollection, ChildStorageCollection, }; use sp_runtime::{generic::BlockId, Justification, Storage}; -use sp_runtime::traits::{Block as BlockT, NumberFor, Zero, Header, HasherFor}; +use sp_runtime::traits::{Block as BlockT, NumberFor, Zero, Header, HashFor}; use crate::in_mem::check_genesis_storage; use sp_blockchain::{Error as ClientError, Result as ClientResult}; use sc_client_api::{ @@ -65,7 +65,7 @@ pub struct ImportOperation { aux_ops: Vec<(Vec, Option>)>, finalized_blocks: Vec>, set_head: Option>, - storage_update: Option>>, + storage_update: Option>>, changes_trie_config_update: Option>, _phantom: std::marker::PhantomData, } @@ -111,7 +111,7 @@ impl AuxStore for Backend { } } -impl ClientBackend for Backend> +impl ClientBackend for Backend> where Block: BlockT, S: BlockchainStorage, @@ -119,7 +119,7 @@ impl ClientBackend for Backend> { type BlockImportOperation = ImportOperation; type Blockchain = Blockchain; - type State = GenesisOrUnavailableState>; + type State = GenesisOrUnavailableState>; type OffchainStorage = InMemOffchainStorage; fn begin_operation(&self) -> ClientResult { @@ -238,7 +238,7 @@ impl ClientBackend for Backend> } } -impl RemoteBackend for Backend> +impl RemoteBackend for Backend> where Block: BlockT, S: BlockchainStorage + 'static, @@ -262,7 +262,7 @@ impl BlockImportOperation for ImportOperation S: BlockchainStorage, Block::Hash: Ord, { - type State = GenesisOrUnavailableState>; + type State = GenesisOrUnavailableState>; fn state(&self) -> ClientResult> { // None means 'locally-stateless' backend @@ -287,7 +287,7 @@ impl BlockImportOperation for ImportOperation fn update_db_storage( &mut self, - _update: >>::Transaction, + _update: >>::Transaction, ) -> ClientResult<()> { // we're not storing anything locally => ignore changes Ok(()) @@ -295,7 +295,7 @@ impl BlockImportOperation for ImportOperation fn update_changes_trie( &mut self, - _update: ChangesTrieTransaction, NumberFor>, + _update: ChangesTrieTransaction, NumberFor>, ) -> ClientResult<()> { // we're not storing anything locally => ignore changes Ok(()) @@ -515,10 +515,10 @@ impl StateBackend for GenesisOrUnavailableState #[cfg(test)] mod tests { - use sp_core::Blake2Hasher; use substrate_test_runtime_client::{self, runtime::Block}; use sc_client_api::backend::NewBlockState; use crate::light::blockchain::tests::{DummyBlockchain, DummyStorage}; + use sp_runtime::traits::BlakeTwo256; use super::*; #[test] @@ -526,7 +526,9 @@ mod tests { let def = Default::default(); let header0 = substrate_test_runtime_client::runtime::Header::new(0, def, def, def, Default::default()); - let backend: Backend<_, Blake2Hasher> = Backend::new(Arc::new(DummyBlockchain::new(DummyStorage::new()))); + let backend: Backend<_, BlakeTwo256> = Backend::new( + Arc::new(DummyBlockchain::new(DummyStorage::new())), + ); let mut op = backend.begin_operation().unwrap(); op.set_block_data(header0, None, None, NewBlockState::Final).unwrap(); op.reset_storage(Default::default()).unwrap(); @@ -540,7 +542,9 @@ mod tests { #[test] fn unavailable_state_is_created_when_genesis_state_is_unavailable() { - let backend: Backend<_, Blake2Hasher> = Backend::new(Arc::new(DummyBlockchain::new(DummyStorage::new()))); + let backend: Backend<_, BlakeTwo256> = Backend::new( + Arc::new(DummyBlockchain::new(DummyStorage::new())), + ); match backend.state_at(BlockId::Number(0)).unwrap() { GenesisOrUnavailableState::Unavailable => (), diff --git a/client/src/light/call_executor.rs b/client/src/light/call_executor.rs index a440f5ad679..613d88045d8 100644 --- a/client/src/light/call_executor.rs +++ b/client/src/light/call_executor.rs @@ -23,7 +23,7 @@ use std::{ use codec::{Encode, Decode}; use sp_core::{convert_hash, NativeOrEncoded, traits::CodeExecutor}; use sp_runtime::{ - generic::BlockId, traits::{One, Block as BlockT, Header as HeaderT, HasherFor}, + generic::BlockId, traits::{One, Block as BlockT, Header as HeaderT, HashFor}, }; use sp_externalities::Extensions; use sp_state_machine::{ @@ -152,9 +152,9 @@ impl CallExecutor for } } - fn prove_at_trie_state>>( + fn prove_at_trie_state>>( &self, - _state: &sp_state_machine::TrieBackend>, + _state: &sp_state_machine::TrieBackend>, _changes: &mut OverlayedChanges, _method: &str, _call_data: &[u8], @@ -180,7 +180,7 @@ pub fn prove_execution( ) -> ClientResult<(Vec, StorageProof)> where Block: BlockT, - S: StateBackend>, + S: StateBackend>, E: CallExecutor, { let trie_state = state.as_trie_backend() @@ -291,9 +291,10 @@ mod tests { runtime::{Header, Digest, Block}, TestClient, ClientBlockImportExt, }; use sc_executor::{NativeExecutor, WasmExecutionMethod}; - use sp_core::{Blake2Hasher, H256}; + use sp_core::H256; use sc_client_api::backend::{Backend, NewBlockState}; use crate::in_mem::Backend as InMemBackend; + use sp_runtime::traits::BlakeTwo256; struct DummyCallExecutor; @@ -348,9 +349,9 @@ mod tests { unreachable!() } - fn prove_at_trie_state>>( + fn prove_at_trie_state>>( &self, - _trie_state: &sp_state_machine::TrieBackend>, + _trie_state: &sp_state_machine::TrieBackend>, _overlay: &mut OverlayedChanges, _method: &str, _call_data: &[u8] @@ -381,7 +382,7 @@ mod tests { ).unwrap(); // check remote execution proof locally - let local_result = check_execution_proof::<_, _, Blake2Hasher>( + let local_result = check_execution_proof::<_, _, BlakeTwo256>( &local_executor(), &RemoteCallRequest { block: substrate_test_runtime_client::runtime::Hash::default(), @@ -408,7 +409,7 @@ mod tests { ).unwrap(); // check remote execution proof locally - let execution_result = check_execution_proof_with_make_header::<_, _, Blake2Hasher, _>( + let execution_result = check_execution_proof_with_make_header::<_, _, BlakeTwo256, _>( &local_executor(), &RemoteCallRequest { block: substrate_test_runtime_client::runtime::Hash::default(), diff --git a/client/src/light/fetcher.rs b/client/src/light/fetcher.rs index b5fccb455a8..00e3eef2b60 100644 --- a/client/src/light/fetcher.rs +++ b/client/src/light/fetcher.rs @@ -342,12 +342,12 @@ pub mod tests { }; use sp_consensus::BlockOrigin; - use crate::in_mem::{Blockchain as InMemoryBlockchain}; + use crate::in_mem::Blockchain as InMemoryBlockchain; use crate::light::fetcher::{FetchChecker, LightDataChecker, RemoteHeaderRequest}; use crate::light::blockchain::tests::{DummyStorage, DummyBlockchain}; - use sp_core::{blake2_256, Blake2Hasher, ChangesTrieConfiguration, H256}; + use sp_core::{blake2_256, ChangesTrieConfiguration, H256}; use sp_core::storage::{well_known_keys, StorageKey, ChildInfo}; - use sp_runtime::generic::BlockId; + use sp_runtime::{generic::BlockId, traits::BlakeTwo256}; use sp_state_machine::Backend; use super::*; @@ -355,7 +355,7 @@ pub mod tests { type TestChecker = LightDataChecker< NativeExecutor, - Blake2Hasher, + BlakeTwo256, Block, DummyStorage, >; @@ -465,7 +465,7 @@ pub mod tests { // check remote read proof locally let local_storage = InMemoryBlockchain::::new(); - let local_cht_root = cht::compute_root::(4, 0, local_headers_hashes).unwrap(); + let local_cht_root = cht::compute_root::(4, 0, local_headers_hashes).unwrap(); if insert_cht { local_storage.insert_cht_root(1, local_cht_root); } @@ -479,7 +479,7 @@ pub mod tests { fn header_with_computed_extrinsics_root(extrinsics: Vec) -> Header { use sp_trie::{TrieConfiguration, trie_types::Layout}; let iter = extrinsics.iter().map(Encode::encode); - let extrinsics_root = Layout::::ordered_trie_root(iter); + let extrinsics_root = Layout::::ordered_trie_root(iter); // only care about `extrinsics_root` Header::new(0, extrinsics_root, H256::zero(), H256::zero(), Default::default()) @@ -625,7 +625,7 @@ pub mod tests { ).unwrap(); // prepare local checker, having a root of changes trie CHT#0 - let local_cht_root = cht::compute_root::(4, 0, remote_roots.iter().cloned().map(|ct| Ok(Some(ct)))).unwrap(); + let local_cht_root = cht::compute_root::(4, 0, remote_roots.iter().cloned().map(|ct| Ok(Some(ct)))).unwrap(); let mut local_storage = DummyStorage::new(); local_storage.changes_tries_cht_roots.insert(0, local_cht_root); let local_checker = TestChecker::new( @@ -732,7 +732,7 @@ pub mod tests { // we're testing this test case here: // (1, 4, dave.clone(), vec![(4, 0), (1, 1), (1, 0)]), let (remote_client, remote_roots, _) = prepare_client_with_key_changes(); - let local_cht_root = cht::compute_root::( + let local_cht_root = cht::compute_root::( 4, 0, remote_roots.iter().cloned().map(|ct| Ok(Some(ct)))).unwrap(); let dave = blake2_256(&runtime::system::balance_of_key(AccountKeyring::Dave.into())).to_vec(); let dave = StorageKey(dave); diff --git a/client/src/light/mod.rs b/client/src/light/mod.rs index d65fdef7119..ca1a3a50c6b 100644 --- a/client/src/light/mod.rs +++ b/client/src/light/mod.rs @@ -26,7 +26,7 @@ use std::sync::Arc; use sc_executor::RuntimeInfo; use sp_core::traits::CodeExecutor; use sp_runtime::BuildStorage; -use sp_runtime::traits::{Block as BlockT, HasherFor}; +use sp_runtime::traits::{Block as BlockT, HashFor}; use sp_blockchain::Result as ClientResult; use crate::call_executor::LocalCallExecutor; @@ -45,7 +45,7 @@ pub fn new_light_blockchain>(storage: S) -> A } /// Create an instance of light client backend. -pub fn new_light_backend(blockchain: Arc>) -> Arc>> +pub fn new_light_backend(blockchain: Arc>) -> Arc>> where B: BlockT, S: BlockchainStorage, @@ -55,15 +55,15 @@ pub fn new_light_backend(blockchain: Arc>) -> Arc( - backend: Arc>>, + backend: Arc>>, genesis_storage: &GS, code_executor: E, ) -> ClientResult< Client< - Backend>, + Backend>, GenesisCallExecutor< - Backend>, - LocalCallExecutor>, E> + Backend>, + LocalCallExecutor>, E> >, B, RA @@ -91,7 +91,7 @@ pub fn new_light( pub fn new_fetch_checker>( blockchain: Arc>, executor: E, -) -> LightDataChecker, B, S> +) -> LightDataChecker, B, S> where E: CodeExecutor, { diff --git a/client/transaction-pool/src/api.rs b/client/transaction-pool/src/api.rs index 84e06cc33e4..d14f532435f 100644 --- a/client/transaction-pool/src/api.rs +++ b/client/transaction-pool/src/api.rs @@ -27,7 +27,6 @@ use sc_client_api::{ light::{Fetcher, RemoteCallRequest, RemoteBodyRequest}, BlockBody, }; -use sp_core::Hasher; use sp_runtime::{ generic::BlockId, traits::{self, Block as BlockT, BlockIdTo, Header as HeaderT, Hash as HashT}, transaction_validity::TransactionValidity, @@ -120,7 +119,7 @@ impl sc_transaction_graph::ChainApi for FullChainApi) -> (Self::Hash, usize) { ex.using_encoded(|x| { - (traits::HasherFor::::hash(x), x.len()) + ( as traits::Hash>::hash(x), x.len()) }) } } diff --git a/frame/benchmarking/src/tests.rs b/frame/benchmarking/src/tests.rs index d47488604ed..4327476c4a6 100644 --- a/frame/benchmarking/src/tests.rs +++ b/frame/benchmarking/src/tests.rs @@ -21,10 +21,7 @@ use super::*; use codec::Decode; use sp_std::prelude::*; -use sp_runtime::{ - traits::{Dispatchable, BlakeTwo256, IdentityLookup}, - testing::{H256, Header}, -}; +use sp_runtime::{traits::{BlakeTwo256, IdentityLookup}, testing::{H256, Header}}; use frame_support::{dispatch::DispatchResult, decl_module, impl_outer_origin}; use frame_system::{RawOrigin, ensure_signed, ensure_none}; @@ -166,4 +163,4 @@ fn benchmarks_macro_works_for_non_dispatchable() { ).expect("failed to create closure"); assert_eq!(closure(), Ok(())); -} \ No newline at end of file +} diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 571ae9700cf..93e470a51bb 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -254,7 +254,7 @@ where let mut buf = Vec::new(); storage_root.using_encoded(|encoded| buf.extend_from_slice(encoded)); buf.extend_from_slice(code_hash.as_ref()); - RawTombstoneContractInfo(Hasher::hash(&buf[..]), PhantomData) + RawTombstoneContractInfo(::hash(&buf[..]), PhantomData) } } diff --git a/frame/session/src/historical.rs b/frame/session/src/historical.rs index 6c305a1a1d6..5b492d8d21d 100644 --- a/frame/session/src/historical.rs +++ b/frame/session/src/historical.rs @@ -28,7 +28,7 @@ use sp_std::prelude::*; use codec::{Encode, Decode}; use sp_runtime::KeyTypeId; -use sp_runtime::traits::{Convert, OpaqueKeys, Hash as HashT}; +use sp_runtime::traits::{Convert, OpaqueKeys}; use frame_support::{decl_module, decl_storage}; use frame_support::{Parameter, print}; use sp_trie::{MemoryDB, Trie, TrieMut, Recorder, EMPTY_PREFIX}; @@ -155,14 +155,12 @@ impl crate::SessionManager for NoteHistoricalRoot = <::Hashing as HashT>::Hasher; - /// A tuple of the validator's ID and their full identification. pub type IdentificationTuple = (::ValidatorId, ::FullIdentification); /// a trie instance for checking and generating proofs. pub struct ProvingTrie { - db: MemoryDB>, + db: MemoryDB, root: T::Hash, } diff --git a/primitives/api/proc-macro/src/impl_runtime_apis.rs b/primitives/api/proc-macro/src/impl_runtime_apis.rs index 770a843bfa6..07d7ae40401 100644 --- a/primitives/api/proc-macro/src/impl_runtime_apis.rs +++ b/primitives/api/proc-macro/src/impl_runtime_apis.rs @@ -237,7 +237,7 @@ fn generate_runtime_api_base_structures() -> Result { pub struct RuntimeApiImpl + 'static> where // Rust bug: https://github.com/rust-lang/rust/issues/24159 - C::StateBackend: #crate_::StateBackend<#crate_::HasherFor>, + C::StateBackend: #crate_::StateBackend<#crate_::HashFor>, { call: &'static C, commit_on_success: std::cell::RefCell, @@ -257,7 +257,7 @@ fn generate_runtime_api_base_structures() -> Result { for RuntimeApiImpl where // Rust bug: https://github.com/rust-lang/rust/issues/24159 - C::StateBackend: #crate_::StateBackend<#crate_::HasherFor>, + C::StateBackend: #crate_::StateBackend<#crate_::HashFor>, {} #[cfg(any(feature = "std", test))] @@ -265,7 +265,7 @@ fn generate_runtime_api_base_structures() -> Result { for RuntimeApiImpl where // Rust bug: https://github.com/rust-lang/rust/issues/24159 - C::StateBackend: #crate_::StateBackend<#crate_::HasherFor>, + C::StateBackend: #crate_::StateBackend<#crate_::HashFor>, {} #[cfg(any(feature = "std", test))] @@ -273,7 +273,7 @@ fn generate_runtime_api_base_structures() -> Result { for RuntimeApiImpl where // Rust bug: https://github.com/rust-lang/rust/issues/24159 - C::StateBackend: #crate_::StateBackend<#crate_::HasherFor>, + C::StateBackend: #crate_::StateBackend<#crate_::HashFor>, { type Error = C::Error; } @@ -283,7 +283,7 @@ fn generate_runtime_api_base_structures() -> Result { RuntimeApiImpl where // Rust bug: https://github.com/rust-lang/rust/issues/24159 - C::StateBackend: #crate_::StateBackend<#crate_::HasherFor>, + C::StateBackend: #crate_::StateBackend<#crate_::HashFor>, { type StateBackend = C::StateBackend; @@ -327,7 +327,7 @@ fn generate_runtime_api_base_structures() -> Result { &self, backend: &Self::StateBackend, changes_trie_state: Option<&#crate_::ChangesTrieState< - #crate_::HasherFor, + #crate_::HashFor, #crate_::NumberFor, >>, parent_hash: Block::Hash, @@ -351,7 +351,7 @@ fn generate_runtime_api_base_structures() -> Result { where C: #crate_::CallApiAt + 'static, // Rust bug: https://github.com/rust-lang/rust/issues/24159 - C::StateBackend: #crate_::StateBackend<#crate_::HasherFor>, + C::StateBackend: #crate_::StateBackend<#crate_::HashFor>, { type RuntimeApi = RuntimeApiImpl; @@ -373,7 +373,7 @@ fn generate_runtime_api_base_structures() -> Result { impl> RuntimeApiImpl where // Rust bug: https://github.com/rust-lang/rust/issues/24159 - C::StateBackend: #crate_::StateBackend<#crate_::HasherFor>, + C::StateBackend: #crate_::StateBackend<#crate_::HashFor>, { fn call_api_at< R: #crate_::Encode + #crate_::Decode + PartialEq, @@ -603,7 +603,7 @@ impl<'a> Fold for ApiRuntimeImplToApiRuntimeApiImpl<'a> { where_clause.predicates.push( parse_quote! { RuntimeApiImplCall::StateBackend: - #crate_::StateBackend<#crate_::HasherFor<__SR_API_BLOCK__>> + #crate_::StateBackend<#crate_::HashFor<__SR_API_BLOCK__>> } ); diff --git a/primitives/api/src/lib.rs b/primitives/api/src/lib.rs index bde00d48172..0901be5831d 100644 --- a/primitives/api/src/lib.rs +++ b/primitives/api/src/lib.rs @@ -50,7 +50,7 @@ pub use sp_core::to_substrate_wasm_fn_return_value; #[doc(hidden)] pub use sp_runtime::{ traits::{ - Block as BlockT, GetNodeBlockType, GetRuntimeBlockType, HasherFor, NumberFor, + Block as BlockT, GetNodeBlockType, GetRuntimeBlockType, HashFor, NumberFor, Header as HeaderT, Hash as HashT, }, generic::BlockId, transaction_validity::TransactionValidity, @@ -228,22 +228,20 @@ pub use sp_api_proc_macro::impl_runtime_apis; /// A type that records all accessed trie nodes and generates a proof out of it. #[cfg(feature = "std")] -pub type ProofRecorder = sp_state_machine::ProofRecorder< - <<::Header as HeaderT>::Hashing as HashT>::Hasher ->; +pub type ProofRecorder = sp_state_machine::ProofRecorder>; /// A type that is used as cache for the storage transactions. #[cfg(feature = "std")] pub type StorageTransactionCache = sp_state_machine::StorageTransactionCache< - >>::Transaction, HasherFor, NumberFor + >>::Transaction, HashFor, NumberFor >; #[cfg(feature = "std")] pub type StorageChanges = sp_state_machine::StorageChanges< - >>::Transaction, - HasherFor, + >>::Transaction, + HashFor, NumberFor >; @@ -255,7 +253,7 @@ pub type StateBackendFor = /// Extract the state backend transaction type for a type that implements `ProvideRuntimeApi`. #[cfg(feature = "std")] pub type TransactionFor = - as StateBackend>>::Transaction; + as StateBackend>>::Transaction; /// Something that can be constructed to a runtime api. #[cfg(feature = "std")] @@ -279,7 +277,7 @@ pub trait ApiErrorExt { #[cfg(feature = "std")] pub trait ApiExt: ApiErrorExt { /// The state backend that is used to store the block states. - type StateBackend: StateBackend>; + type StateBackend: StateBackend>; /// The given closure will be called with api instance. Inside the closure any api call is /// allowed. After doing the api call, the closure is allowed to map the `Result` to a @@ -328,7 +326,7 @@ pub trait ApiExt: ApiErrorExt { fn into_storage_changes( &self, backend: &Self::StateBackend, - changes_trie_state: Option<&ChangesTrieState, NumberFor>>, + changes_trie_state: Option<&ChangesTrieState, NumberFor>>, parent_hash: Block::Hash, ) -> Result, String> where Self: Sized; } @@ -355,7 +353,7 @@ pub enum InitializeBlock<'a, Block: BlockT> { /// Parameters for [`CallApiAt::call_api_at`]. #[cfg(feature = "std")] -pub struct CallApiAtParams<'a, Block: BlockT, C, NC, Backend: StateBackend>> { +pub struct CallApiAtParams<'a, Block: BlockT, C, NC, Backend: StateBackend>> { /// A reference to something that implements the [`Core`] api. pub core_api: &'a C, /// The block id that determines the state that should be setup when calling the function. @@ -389,7 +387,7 @@ pub trait CallApiAt { type Error: std::fmt::Debug + From; /// The state backend that is used to store the block states. - type StateBackend: StateBackend>; + type StateBackend: StateBackend>; /// Calls the given api function with the given encoded arguments at the given block and returns /// the encoded result. diff --git a/primitives/api/test/tests/runtime_calls.rs b/primitives/api/test/tests/runtime_calls.rs index 64c20473d1c..9088f182658 100644 --- a/primitives/api/test/tests/runtime_calls.rs +++ b/primitives/api/test/tests/runtime_calls.rs @@ -18,9 +18,9 @@ use sp_api::ProvideRuntimeApi; use substrate_test_runtime_client::{ prelude::*, DefaultTestClientBuilderExt, TestClientBuilder, - runtime::{TestAPI, DecodeFails, Transfer, Header}, + runtime::{TestAPI, DecodeFails, Transfer, Block}, }; -use sp_runtime::{generic::BlockId, traits::{Header as HeaderT, Hash as HashT}}; +use sp_runtime::{generic::BlockId, traits::{Header as HeaderT, HashFor}}; use sp_state_machine::{ ExecutionStrategy, create_proof_check_backend, execution_proof_check_on_trie_backend, @@ -184,7 +184,7 @@ fn record_proof_works() { builder.push(transaction.clone()).unwrap(); let (block, _, proof) = builder.build().expect("Bake block").into_inner(); - let backend = create_proof_check_backend::<<
::Hashing as HashT>::Hasher>( + let backend = create_proof_check_backend::>( storage_root, proof.expect("Proof was generated"), ).expect("Creates proof backend."); diff --git a/primitives/consensus/common/src/block_import.rs b/primitives/consensus/common/src/block_import.rs index 3000477ded5..eb90ac9f1d4 100644 --- a/primitives/consensus/common/src/block_import.rs +++ b/primitives/consensus/common/src/block_import.rs @@ -16,7 +16,7 @@ //! Block import helpers. -use sp_runtime::traits::{Block as BlockT, DigestItemFor, Header as HeaderT, NumberFor, HasherFor}; +use sp_runtime::traits::{Block as BlockT, DigestItemFor, Header as HeaderT, NumberFor, HashFor}; use sp_runtime::Justification; use serde::{Serialize, Deserialize}; use std::borrow::Cow; @@ -139,7 +139,7 @@ pub struct BlockImportParams { /// The changes to the storage to create the state for the block. If this is `Some(_)`, /// the block import will not need to re-execute the block for importing it. pub storage_changes: Option< - sp_state_machine::StorageChanges, NumberFor> + sp_state_machine::StorageChanges, NumberFor> >, /// Is this block finalized already? /// `true` implies instant finality. diff --git a/primitives/consensus/common/src/lib.rs b/primitives/consensus/common/src/lib.rs index 4927faede06..09dc031dc9b 100644 --- a/primitives/consensus/common/src/lib.rs +++ b/primitives/consensus/common/src/lib.rs @@ -32,7 +32,7 @@ use std::sync::Arc; use std::time::Duration; use sp_runtime::{ - generic::BlockId, traits::{Block as BlockT, DigestFor, NumberFor, HasherFor}, + generic::BlockId, traits::{Block as BlockT, DigestFor, NumberFor, HashFor}, }; use futures::prelude::*; pub use sp_inherents::InherentData; @@ -93,7 +93,7 @@ pub struct Proposal { /// Optional proof that was recorded while building the block. pub proof: Option, /// The storage changes while building this block. - pub storage_changes: sp_state_machine::StorageChanges, NumberFor>, + pub storage_changes: sp_state_machine::StorageChanges, NumberFor>, } /// Used as parameter to [`Proposer`] to tell the requirement on recording a proof. diff --git a/primitives/core/src/hasher.rs b/primitives/core/src/hasher.rs index 68fce90644b..28da432da71 100644 --- a/primitives/core/src/hasher.rs +++ b/primitives/core/src/hasher.rs @@ -16,27 +16,10 @@ //! Substrate Blake2b Hasher implementation -use hash_db::Hasher; -use hash256_std_hasher::Hash256StdHasher; -use crate::hash::H256; - pub mod blake2 { - use super::{Hasher, Hash256StdHasher, H256}; - #[cfg(feature = "std")] - use crate::hashing::blake2_256; - - #[cfg(not(feature = "std"))] - extern "C" { - fn ext_blake2_256(data: *const u8, len: u32, out: *mut u8); - } - #[cfg(not(feature = "std"))] - fn blake2_256(data: &[u8]) -> [u8; 32] { - let mut result: [u8; 32] = Default::default(); - unsafe { - ext_blake2_256(data.as_ptr(), data.len() as u32, result.as_mut_ptr()); - } - result - } + use hash_db::Hasher; + use hash256_std_hasher::Hash256StdHasher; + use crate::hash::H256; /// Concrete implementation of Hasher using Blake2b 256-bit hashes #[derive(Debug)] @@ -46,8 +29,9 @@ pub mod blake2 { type Out = H256; type StdHasher = Hash256StdHasher; const LENGTH: usize = 32; + fn hash(x: &[u8]) -> Self::Out { - blake2_256(x).into() + crate::hashing::blake2_256(x).into() } } } diff --git a/primitives/core/src/lib.rs b/primitives/core/src/lib.rs index 01a96d8853a..79721b9b769 100644 --- a/primitives/core/src/lib.rs +++ b/primitives/core/src/lib.rs @@ -61,6 +61,7 @@ pub mod ed25519; pub mod sr25519; pub mod ecdsa; pub mod hash; +#[cfg(feature = "std")] mod hasher; pub mod offchain; pub mod sandbox; @@ -77,8 +78,7 @@ pub use changes_trie::{ChangesTrieConfiguration, ChangesTrieConfigurationRange}; pub use crypto::{DeriveJunction, Pair, Public}; pub use hash_db::Hasher; -// Switch back to Blake after PoC-3 is out -// pub use self::hasher::blake::BlakeHasher; +#[cfg(feature = "std")] pub use self::hasher::blake2::Blake2Hasher; pub use sp_storage as storage; diff --git a/primitives/io/src/lib.rs b/primitives/io/src/lib.rs index aef3eed5aa6..4b520a240a9 100644 --- a/primitives/io/src/lib.rs +++ b/primitives/io/src/lib.rs @@ -915,56 +915,6 @@ pub fn oom(_: core::alloc::Layout) -> ! { #[cfg(feature = "std")] pub type TestExternalities = sp_state_machine::TestExternalities; -#[cfg(feature = "std")] -mod ext_blake2_256 { - use sp_wasm_interface::{Signature, Function, HostFunctions, ValueType, Value, FunctionContext}; - - /// There is a custom `extern function` in `sp_core::hasher` for `ext_blake2_256` hasher. This - /// custom extern was missed to remove and requires us to support this now. This type is a custom - /// implementation for the wasm function in native. - pub struct ExtBlake2_256; - - impl HostFunctions for ExtBlake2_256 { - fn host_functions() -> Vec<&'static dyn Function> { - vec![&ExtBlake2_256] - } - } - - impl Function for ExtBlake2_256 { - fn name(&self) -> &str { - "ext_blake2_256" - } - - fn signature(&self) -> Signature { - Signature::new_with_args(&[ValueType::I32, ValueType::I32, ValueType::I32][..]) - } - - fn execute( - &self, - context: &mut dyn FunctionContext, - args: &mut dyn Iterator, - ) -> sp_wasm_interface::Result> { - let data = args.next().and_then(|v| v.as_i32()) - .ok_or_else(|| "`data` not present or not an `i32`")? as u32; - let len = args.next().and_then(|v| v.as_i32()) - .ok_or_else(|| "`len` not present or not an `i32`")? as u32; - let out = args.next().and_then(|v| v.as_i32()) - .ok_or_else(|| "`out` not present or not an `i32`")? as u32; - - let result: [u8; 32] = if len == 0 { - sp_core::hashing::blake2_256(&[0u8; 0]) - } else { - let mem = context.read_memory(data.into(), len) - .map_err(|_| "Invalid attempt to get data in ext_blake2_256")?; - sp_core::hashing::blake2_256(&mem) - }; - context.write_memory(out.into(), &result) - .map_err(|_| "Invalid attempt to set result in ext_blake2_256")?; - Ok(None) - } - } -} - /// The host functions Substrate provides for the Wasm runtime environment. /// /// All these host functions will be callable from inside the Wasm environment. @@ -979,7 +929,6 @@ pub type SubstrateHostFunctions = ( logging::HostFunctions, sandbox::HostFunctions, crate::trie::HostFunctions, - ext_blake2_256::ExtBlake2_256, ); #[cfg(test)] diff --git a/primitives/runtime-interface/test-wasm/src/lib.rs b/primitives/runtime-interface/test-wasm/src/lib.rs index 2e1ab52d677..ee7120b1b8c 100644 --- a/primitives/runtime-interface/test-wasm/src/lib.rs +++ b/primitives/runtime-interface/test-wasm/src/lib.rs @@ -231,14 +231,4 @@ wasm_export_functions! { } assert_eq!(0, len); } - - fn test_ext_blake2_256() { - use sp_core::Hasher; - - let data = "hey, hash me please!"; - let hash = sp_core::Blake2Hasher::hash(data.as_bytes()); - - let expected = sp_io::hashing::blake2_256(data.as_bytes()); - assert_eq!(&expected, hash.as_ref()); - } } diff --git a/primitives/runtime-interface/test/Cargo.toml b/primitives/runtime-interface/test/Cargo.toml index 66942725292..53c05b68b3d 100644 --- a/primitives/runtime-interface/test/Cargo.toml +++ b/primitives/runtime-interface/test/Cargo.toml @@ -13,5 +13,5 @@ sp-runtime-interface = { version = "2.0.0-alpha.2", path = "../" } sc-executor = { version = "0.8.0-alpha.2", path = "../../../client/executor" } sp-runtime-interface-test-wasm = { version = "2.0.0-dev", path = "../test-wasm" } sp-state-machine = { version = "0.8.0-alpha.2", path = "../../../primitives/state-machine" } -sp-core = { version = "2.0.0-alpha.2", path = "../../core" } +sp-runtime = { version = "2.0.0-alpha.2", path = "../../runtime" } sp-io = { version = "2.0.0-alpha.2", path = "../../io" } diff --git a/primitives/runtime-interface/test/src/lib.rs b/primitives/runtime-interface/test/src/lib.rs index 5c5d1db9705..01fc0a46b77 100644 --- a/primitives/runtime-interface/test/src/lib.rs +++ b/primitives/runtime-interface/test/src/lib.rs @@ -23,7 +23,7 @@ use sp_runtime_interface::*; use sp_runtime_interface_test_wasm::{WASM_BINARY, test_api::HostFunctions}; use sp_wasm_interface::HostFunctions as HostFunctionsT; -type TestExternalities = sp_state_machine::TestExternalities; +type TestExternalities = sp_state_machine::TestExternalities; fn call_wasm_method(method: &str) -> TestExternalities { let mut ext = TestExternalities::default(); @@ -127,8 +127,3 @@ fn test_encoded_return_value_memory_is_freed() { fn test_array_return_value_memory_is_freed() { call_wasm_method::("test_array_return_value_memory_is_freed"); } - -#[test] -fn test_ext_blake2_256() { - call_wasm_method::("test_ext_blake2_256"); -} diff --git a/primitives/runtime/Cargo.toml b/primitives/runtime/Cargo.toml index 430d29d8e22..84e452a5b49 100644 --- a/primitives/runtime/Cargo.toml +++ b/primitives/runtime/Cargo.toml @@ -24,6 +24,7 @@ rand = { version = "0.7.2", optional = true } impl-trait-for-tuples = "0.1.3" sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../inherents" } parity-util-mem = { version = "0.5.1", default-features = false, features = ["primitive-types"] } +hash256-std-hasher = { version = "0.15.2", default-features = false } [dev-dependencies] serde_json = "1.0.41" @@ -44,4 +45,5 @@ std = [ "serde", "sp-inherents/std", "parity-util-mem/std", + "hash256-std-hasher/std", ] diff --git a/primitives/runtime/src/random_number_generator.rs b/primitives/runtime/src/random_number_generator.rs index e741aac0976..c3cd3dfb90f 100644 --- a/primitives/runtime/src/random_number_generator.rs +++ b/primitives/runtime/src/random_number_generator.rs @@ -66,7 +66,7 @@ impl RandomNumberGenerator { loop { if self.offset() + needed > self.current.as_ref().len() { // rehash - self.current = Hashing::hash(self.current.as_ref()); + self.current = ::hash(self.current.as_ref()); self.offset = 0; } let data = &self.current.as_ref()[self.offset()..self.offset() + needed]; diff --git a/primitives/runtime/src/traits.rs b/primitives/runtime/src/traits.rs index fef20c826af..d9c32d221c0 100644 --- a/primitives/runtime/src/traits.rs +++ b/primitives/runtime/src/traits.rs @@ -25,7 +25,7 @@ use std::fmt::Display; use std::str::FromStr; #[cfg(feature = "std")] use serde::{Serialize, Deserialize, de::DeserializeOwned}; -use sp_core::{self, Hasher, Blake2Hasher, TypeId, RuntimeDebug}; +use sp_core::{self, Hasher, TypeId, RuntimeDebug}; use crate::codec::{Codec, Encode, Decode}; use crate::transaction_validity::{ ValidTransaction, TransactionValidity, TransactionValidityError, UnknownTransaction, @@ -369,20 +369,19 @@ pub trait OffchainWorker { /// Abstraction around hashing // Stupid bug in the Rust compiler believes derived // traits must be fulfilled by all type parameters. -pub trait Hash: 'static + MaybeSerializeDeserialize + Debug + Clone + Eq + PartialEq { +pub trait Hash: 'static + MaybeSerializeDeserialize + Debug + Clone + Eq + PartialEq + Hasher::Output> { /// The hash type produced. type Output: Member + MaybeSerializeDeserialize + Debug + sp_std::hash::Hash + AsRef<[u8]> + AsMut<[u8]> + Copy + Default + Encode + Decode; - /// The associated hash_db Hasher type. - type Hasher: Hasher; - /// Produce the hash of some byte-slice. - fn hash(s: &[u8]) -> Self::Output; + fn hash(s: &[u8]) -> Self::Output { + ::hash(s) + } /// Produce the hash of some codec-encodable value. fn hash_of(s: &S) -> Self::Output { - Encode::using_encoded(s, Self::hash) + Encode::using_encoded(s, ::hash) } /// The ordered Patricia tree root of the given `input`. @@ -397,12 +396,18 @@ pub trait Hash: 'static + MaybeSerializeDeserialize + Debug + Clone + Eq + Parti #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct BlakeTwo256; -impl Hash for BlakeTwo256 { - type Output = sp_core::H256; - type Hasher = Blake2Hasher; - fn hash(s: &[u8]) -> Self::Output { +impl Hasher for BlakeTwo256 { + type Out = sp_core::H256; + type StdHasher = hash256_std_hasher::Hash256StdHasher; + const LENGTH: usize = 32; + + fn hash(s: &[u8]) -> Self::Out { sp_io::hashing::blake2_256(s).into() } +} + +impl Hash for BlakeTwo256 { + type Output = sp_core::H256; fn trie_root(input: Vec<(Vec, Vec)>) -> Self::Output { sp_io::trie::blake2_256_root(input) @@ -616,8 +621,6 @@ pub trait ExtrinsicMetadata { type SignedExtensions: SignedExtension; } -/// Extract the hasher type for a block. -pub type HasherFor = as Hash>::Hasher; /// Extract the hashing type for a block. pub type HashFor = <::Header as Header>::Hashing; /// Extract the number type for a block. diff --git a/primitives/state-machine/Cargo.toml b/primitives/state-machine/Cargo.toml index 51f311e44af..16f921c3ac1 100644 --- a/primitives/state-machine/Cargo.toml +++ b/primitives/state-machine/Cargo.toml @@ -25,6 +25,7 @@ sp-externalities = { version = "0.8.0-alpha.2", path = "../externalities" } [dev-dependencies] hex-literal = "0.2.1" +sp-runtime = { version = "2.0.0-alpha.2", path = "../runtime" } [features] default = [] diff --git a/primitives/state-machine/src/basic.rs b/primitives/state-machine/src/basic.rs index 966648bc824..7252ae10e90 100644 --- a/primitives/state-machine/src/basic.rs +++ b/primitives/state-machine/src/basic.rs @@ -350,7 +350,7 @@ mod tests { top: Default::default(), children: map![ child_storage.clone() => StorageChild { - data: map![ b"doe".to_vec() => b"reindeer".to_vec() ], + data: map![ b"doe".to_vec() => b"reindeer".to_vec() ], child_info: CHILD_INFO_1.to_owned(), } ] diff --git a/primitives/state-machine/src/changes_trie/changes_iterator.rs b/primitives/state-machine/src/changes_trie/changes_iterator.rs index 9f2d44967d7..685786218c7 100644 --- a/primitives/state-machine/src/changes_trie/changes_iterator.rs +++ b/primitives/state-machine/src/changes_trie/changes_iterator.rs @@ -376,13 +376,13 @@ impl<'a, H, Number> Iterator for ProvingDrilldownIterator<'a, H, Number> #[cfg(test)] mod tests { use std::iter::FromIterator; - use sp_core::Blake2Hasher; use crate::changes_trie::Configuration; use crate::changes_trie::input::InputPair; use crate::changes_trie::storage::InMemoryStorage; + use sp_runtime::traits::BlakeTwo256; use super::*; - fn prepare_for_drilldown() -> (Configuration, InMemoryStorage) { + fn prepare_for_drilldown() -> (Configuration, InMemoryStorage) { let config = Configuration { digest_interval: 4, digest_levels: 2 }; let backend = InMemoryStorage::with_inputs(vec![ // digest: 1..4 => [(3, 0)] @@ -447,7 +447,7 @@ mod tests { #[test] fn drilldown_iterator_works() { let (config, storage) = prepare_for_drilldown(); - let drilldown_result = key_changes::( + let drilldown_result = key_changes::( configuration_range(&config, 0), &storage, 1, @@ -458,7 +458,7 @@ mod tests { ).and_then(Result::from_iter); assert_eq!(drilldown_result, Ok(vec![(8, 2), (8, 1), (6, 3), (3, 0)])); - let drilldown_result = key_changes::( + let drilldown_result = key_changes::( configuration_range(&config, 0), &storage, 1, @@ -469,7 +469,7 @@ mod tests { ).and_then(Result::from_iter); assert_eq!(drilldown_result, Ok(vec![])); - let drilldown_result = key_changes::( + let drilldown_result = key_changes::( configuration_range(&config, 0), &storage, 1, @@ -480,7 +480,7 @@ mod tests { ).and_then(Result::from_iter); assert_eq!(drilldown_result, Ok(vec![(3, 0)])); - let drilldown_result = key_changes::( + let drilldown_result = key_changes::( configuration_range(&config, 0), &storage, 1, @@ -491,7 +491,7 @@ mod tests { ).and_then(Result::from_iter); assert_eq!(drilldown_result, Ok(vec![(6, 3), (3, 0)])); - let drilldown_result = key_changes::( + let drilldown_result = key_changes::( configuration_range(&config, 0), &storage, 7, @@ -502,7 +502,7 @@ mod tests { ).and_then(Result::from_iter); assert_eq!(drilldown_result, Ok(vec![(8, 2), (8, 1)])); - let drilldown_result = key_changes::( + let drilldown_result = key_changes::( configuration_range(&config, 0), &storage, 5, @@ -519,7 +519,7 @@ mod tests { let (config, storage) = prepare_for_drilldown(); storage.clear_storage(); - assert!(key_changes::( + assert!(key_changes::( configuration_range(&config, 0), &storage, 1, @@ -529,7 +529,7 @@ mod tests { &[42], ).and_then(|i| i.collect::, _>>()).is_err()); - assert!(key_changes::( + assert!(key_changes::( configuration_range(&config, 0), &storage, 1, @@ -543,7 +543,7 @@ mod tests { #[test] fn drilldown_iterator_fails_when_range_is_invalid() { let (config, storage) = prepare_for_drilldown(); - assert!(key_changes::( + assert!(key_changes::( configuration_range(&config, 0), &storage, 1, @@ -552,7 +552,7 @@ mod tests { None, &[42], ).is_err()); - assert!(key_changes::( + assert!(key_changes::( configuration_range(&config, 0), &storage, 20, @@ -570,12 +570,12 @@ mod tests { // create drilldown iterator that records all trie nodes during drilldown let (remote_config, remote_storage) = prepare_for_drilldown(); - let remote_proof = key_changes_proof::( + let remote_proof = key_changes_proof::( configuration_range(&remote_config, 0), &remote_storage, 1, &AnchorBlockId { hash: Default::default(), number: 16 }, 16, None, &[42]).unwrap(); let (remote_config, remote_storage) = prepare_for_drilldown(); - let remote_proof_child = key_changes_proof::( + let remote_proof_child = key_changes_proof::( configuration_range(&remote_config, 0), &remote_storage, 1, &AnchorBlockId { hash: Default::default(), number: 16 }, 16, Some(&b"1"[..]), &[42]).unwrap(); @@ -584,13 +584,13 @@ mod tests { // create drilldown iterator that works the same, but only depends on trie let (local_config, local_storage) = prepare_for_drilldown(); local_storage.clear_storage(); - let local_result = key_changes_proof_check::( + let local_result = key_changes_proof_check::( configuration_range(&local_config, 0), &local_storage, remote_proof, 1, &AnchorBlockId { hash: Default::default(), number: 16 }, 16, None, &[42]); let (local_config, local_storage) = prepare_for_drilldown(); local_storage.clear_storage(); - let local_result_child = key_changes_proof_check::( + let local_result_child = key_changes_proof_check::( configuration_range(&local_config, 0), &local_storage, remote_proof_child, 1, &AnchorBlockId { hash: Default::default(), number: 16 }, 16, Some(&b"1"[..]), &[42]); @@ -621,7 +621,7 @@ mod tests { input[91 - 1].1.push(InputPair::DigestIndex(DigestIndex { block: 91, key: vec![42] }, vec![80])); let storage = InMemoryStorage::with_inputs(input, vec![]); - let drilldown_result = key_changes::( + let drilldown_result = key_changes::( config_range, &storage, 1, diff --git a/primitives/state-machine/src/changes_trie/prune.rs b/primitives/state-machine/src/changes_trie/prune.rs index f6be3223ae9..87923dc2f59 100644 --- a/primitives/state-machine/src/changes_trie/prune.rs +++ b/primitives/state-machine/src/changes_trie/prune.rs @@ -114,14 +114,15 @@ fn prune_trie( mod tests { use std::collections::HashSet; use sp_trie::MemoryDB; - use sp_core::{H256, Blake2Hasher}; + use sp_core::H256; use crate::backend::insert_into_memory_db; use crate::changes_trie::storage::InMemoryStorage; use codec::Encode; + use sp_runtime::traits::BlakeTwo256; use super::*; fn prune_by_collect( - storage: &dyn Storage, + storage: &dyn Storage, first: u64, last: u64, current_block: u64, @@ -135,27 +136,26 @@ mod tests { #[test] fn prune_works() { - fn prepare_storage() -> InMemoryStorage { - + fn prepare_storage() -> InMemoryStorage { let child_key = ChildIndex { block: 67u64, storage_key: b"1".to_vec() }.encode(); - let mut mdb1 = MemoryDB::::default(); - let root1 = insert_into_memory_db::( + let mut mdb1 = MemoryDB::::default(); + let root1 = insert_into_memory_db::( &mut mdb1, vec![(vec![10], vec![20])]).unwrap(); - let mut mdb2 = MemoryDB::::default(); - let root2 = insert_into_memory_db::( + let mut mdb2 = MemoryDB::::default(); + let root2 = insert_into_memory_db::( &mut mdb2, vec![(vec![11], vec![21]), (vec![12], vec![22])], ).unwrap(); - let mut mdb3 = MemoryDB::::default(); - let ch_root3 = insert_into_memory_db::( + let mut mdb3 = MemoryDB::::default(); + let ch_root3 = insert_into_memory_db::( &mut mdb3, vec![(vec![110], vec![120])]).unwrap(); - let root3 = insert_into_memory_db::(&mut mdb3, vec![ + let root3 = insert_into_memory_db::(&mut mdb3, vec![ (vec![13], vec![23]), (vec![14], vec![24]), (child_key, ch_root3.as_ref().encode()), ]).unwrap(); - let mut mdb4 = MemoryDB::::default(); - let root4 = insert_into_memory_db::( + let mut mdb4 = MemoryDB::::default(); + let root4 = insert_into_memory_db::( &mut mdb4, vec![(vec![15], vec![25])], ).unwrap(); diff --git a/primitives/state-machine/src/in_memory_backend.rs b/primitives/state-machine/src/in_memory_backend.rs index 0a29468bbc4..7e474d45b65 100644 --- a/primitives/state-machine/src/in_memory_backend.rs +++ b/primitives/state-machine/src/in_memory_backend.rs @@ -362,11 +362,12 @@ impl Backend for InMemory where H::Out: Codec { #[cfg(test)] mod tests { use super::*; + use sp_runtime::traits::BlakeTwo256; /// Assert in memory backend with only child trie keys works as trie backend. #[test] fn in_memory_with_child_trie_only() { - let storage = InMemory::::default(); + let storage = InMemory::::default(); let child_info = OwnedChildInfo::new_default(b"unique_id_1".to_vec()); let mut storage = storage.update( vec![( diff --git a/primitives/state-machine/src/lib.rs b/primitives/state-machine/src/lib.rs index 2c6245c70d5..31d4f3a8045 100644 --- a/primitives/state-machine/src/lib.rs +++ b/primitives/state-machine/src/lib.rs @@ -727,9 +727,8 @@ mod tests { use super::*; use super::ext::Ext; use super::changes_trie::Configuration as ChangesTrieConfig; - use sp_core::{ - Blake2Hasher, map, traits::{Externalities, RuntimeCode}, storage::ChildStorageKey, - }; + use sp_core::{map, traits::{Externalities, RuntimeCode}, storage::ChildStorageKey}; + use sp_runtime::traits::BlakeTwo256; #[derive(Clone)] struct DummyCodeExecutor { @@ -912,7 +911,7 @@ mod tests { ).unwrap(); // check proof locally - let local_result = execution_proof_check::( + let local_result = execution_proof_check::( remote_root, remote_proof, &mut Default::default(), @@ -935,7 +934,7 @@ mod tests { b"abc".to_vec() => b"2".to_vec(), b"bbb".to_vec() => b"3".to_vec() ]; - let mut state = InMemoryBackend::::from(initial); + let mut state = InMemoryBackend::::from(initial); let backend = state.as_trie_backend().unwrap(); let mut overlay = OverlayedChanges { committed: map![ @@ -978,7 +977,7 @@ mod tests { #[test] fn set_child_storage_works() { - let mut state = InMemoryBackend::::default(); + let mut state = InMemoryBackend::::default(); let backend = state.as_trie_backend().unwrap(); let mut overlay = OverlayedChanges::default(); let mut cache = StorageTransactionCache::default(); @@ -1025,12 +1024,12 @@ mod tests { let remote_root = remote_backend.storage_root(::std::iter::empty()).0; let remote_proof = prove_read(remote_backend, &[b"value2"]).unwrap(); // check proof locally - let local_result1 = read_proof_check::( + let local_result1 = read_proof_check::( remote_root, remote_proof.clone(), &[b"value2"], ).unwrap(); - let local_result2 = read_proof_check::( + let local_result2 = read_proof_check::( remote_root, remote_proof.clone(), &[&[0xff]], @@ -1050,13 +1049,13 @@ mod tests { CHILD_INFO_1, &[b"value3"], ).unwrap(); - let local_result1 = read_child_proof_check::( + let local_result1 = read_child_proof_check::( remote_root, remote_proof.clone(), b":child_storage:default:sub1", &[b"value3"], ).unwrap(); - let local_result2 = read_child_proof_check::( + let local_result2 = read_child_proof_check::( remote_root, remote_proof.clone(), b":child_storage:default:sub1", diff --git a/primitives/state-machine/src/proving_backend.rs b/primitives/state-machine/src/proving_backend.rs index 60d891a3f00..119fb59a723 100644 --- a/primitives/state-machine/src/proving_backend.rs +++ b/primitives/state-machine/src/proving_backend.rs @@ -308,16 +308,17 @@ mod tests { use crate::InMemoryBackend; use crate::trie_backend::tests::test_trie; use super::*; - use sp_core::{Blake2Hasher, storage::ChildStorageKey}; + use sp_core::storage::ChildStorageKey; use crate::proving_backend::create_proof_check_backend; use sp_trie::PrefixedMemoryDB; + use sp_runtime::traits::BlakeTwo256; const CHILD_INFO_1: ChildInfo<'static> = ChildInfo::new_default(b"unique_id_1"); const CHILD_INFO_2: ChildInfo<'static> = ChildInfo::new_default(b"unique_id_2"); fn test_proving<'a>( - trie_backend: &'a TrieBackend,Blake2Hasher>, - ) -> ProvingBackend<'a, PrefixedMemoryDB, Blake2Hasher> { + trie_backend: &'a TrieBackend,BlakeTwo256>, + ) -> ProvingBackend<'a, PrefixedMemoryDB, BlakeTwo256> { ProvingBackend::new(trie_backend) } @@ -338,7 +339,7 @@ mod tests { #[test] fn proof_is_invalid_when_does_not_contains_root() { use sp_core::H256; - let result = create_proof_check_backend::( + let result = create_proof_check_backend::( H256::from_low_u64_be(1), StorageProof::empty() ); @@ -361,7 +362,7 @@ mod tests { #[test] fn proof_recorded_and_checked() { let contents = (0..64).map(|i| (vec![i], Some(vec![i]))).collect::>(); - let in_memory = InMemoryBackend::::default(); + let in_memory = InMemoryBackend::::default(); let mut in_memory = in_memory.update(vec![(None, contents)]); let in_memory_root = in_memory.storage_root(::std::iter::empty()).0; (0..64).for_each(|i| assert_eq!(in_memory.storage(&[i]).unwrap().unwrap(), vec![i])); @@ -376,7 +377,7 @@ mod tests { let proof = proving.extract_proof(); - let proof_check = create_proof_check_backend::(in_memory_root.into(), proof).unwrap(); + let proof_check = create_proof_check_backend::(in_memory_root.into(), proof).unwrap(); assert_eq!(proof_check.storage(&[42]).unwrap().unwrap(), vec![42]); } @@ -393,7 +394,7 @@ mod tests { (Some((own2.clone(), CHILD_INFO_2.to_owned())), (10..15).map(|i| (vec![i], Some(vec![i]))).collect()), ]; - let in_memory = InMemoryBackend::::default(); + let in_memory = InMemoryBackend::::default(); let mut in_memory = in_memory.update(contents); let in_memory_root = in_memory.full_storage_root::<_, Vec<_>, _>( ::std::iter::empty(), @@ -425,7 +426,7 @@ mod tests { let proof = proving.extract_proof(); - let proof_check = create_proof_check_backend::( + let proof_check = create_proof_check_backend::( in_memory_root.into(), proof ).unwrap(); @@ -439,7 +440,7 @@ mod tests { assert_eq!(proving.child_storage(&own1[..], CHILD_INFO_1, &[64]), Ok(Some(vec![64]))); let proof = proving.extract_proof(); - let proof_check = create_proof_check_backend::( + let proof_check = create_proof_check_backend::( in_memory_root.into(), proof ).unwrap(); diff --git a/primitives/state-machine/src/testing.rs b/primitives/state-machine/src/testing.rs index 39a34509b72..aec42c76787 100644 --- a/primitives/state-machine/src/testing.rs +++ b/primitives/state-machine/src/testing.rs @@ -34,13 +34,12 @@ use sp_core::{ well_known_keys::{CHANGES_TRIE_CONFIG, CODE, HEAP_PAGES, is_child_storage_key}, Storage, }, - Blake2Hasher, }; use codec::Encode; use sp_externalities::{Extensions, Extension}; /// Simple HashMap-based Externalities impl. -pub struct TestExternalities +pub struct TestExternalities where H::Out: codec::Codec, { @@ -198,11 +197,12 @@ impl sp_externalities::ExtensionStore for TestExternalities where mod tests { use super::*; use sp_core::traits::Externalities; + use sp_runtime::traits::BlakeTwo256; use hex_literal::hex; #[test] fn commit_should_work() { - let mut ext = TestExternalities::::default(); + let mut ext = TestExternalities::::default(); let mut ext = ext.ext(); ext.set_storage(b"doe".to_vec(), b"reindeer".to_vec()); ext.set_storage(b"dog".to_vec(), b"puppy".to_vec()); @@ -213,7 +213,7 @@ mod tests { #[test] fn set_and_retrieve_code() { - let mut ext = TestExternalities::::default(); + let mut ext = TestExternalities::::default(); let mut ext = ext.ext(); let code = vec![1, 2, 3]; @@ -225,6 +225,6 @@ mod tests { #[test] fn check_send() { fn assert_send() {} - assert_send::>(); + assert_send::>(); } } diff --git a/primitives/state-machine/src/trie_backend.rs b/primitives/state-machine/src/trie_backend.rs index dbaae323c09..e64dd590e51 100644 --- a/primitives/state-machine/src/trie_backend.rs +++ b/primitives/state-machine/src/trie_backend.rs @@ -245,9 +245,10 @@ impl, H: Hasher> Backend for TrieBackend where #[cfg(test)] pub mod tests { use std::collections::HashSet; - use sp_core::{Blake2Hasher, H256}; + use sp_core::H256; use codec::Encode; use sp_trie::{TrieMut, PrefixedMemoryDB, trie_types::TrieDBMut, KeySpacedDBMut}; + use sp_runtime::traits::BlakeTwo256; use super::*; const CHILD_KEY_1: &[u8] = b":child_storage:default:sub1"; @@ -255,9 +256,9 @@ pub mod tests { const CHILD_UUID_1: &[u8] = b"unique_id_1"; const CHILD_INFO_1: ChildInfo<'static> = ChildInfo::new_default(CHILD_UUID_1); - fn test_db() -> (PrefixedMemoryDB, H256) { + fn test_db() -> (PrefixedMemoryDB, H256) { let mut root = H256::default(); - let mut mdb = PrefixedMemoryDB::::default(); + let mut mdb = PrefixedMemoryDB::::default(); { let mut mdb = KeySpacedDBMut::new(&mut mdb, CHILD_UUID_1); let mut trie = TrieDBMut::new(&mut mdb, &mut root); @@ -281,7 +282,7 @@ pub mod tests { (mdb, root) } - pub(crate) fn test_trie() -> TrieBackend, Blake2Hasher> { + pub(crate) fn test_trie() -> TrieBackend, BlakeTwo256> { let (mdb, root) = test_db(); TrieBackend::new(mdb, root) } @@ -312,7 +313,7 @@ pub mod tests { #[test] fn pairs_are_empty_on_empty_storage() { - assert!(TrieBackend::, Blake2Hasher>::new( + assert!(TrieBackend::, BlakeTwo256>::new( PrefixedMemoryDB::default(), Default::default(), ).pairs().is_empty()); diff --git a/primitives/trie/Cargo.toml b/primitives/trie/Cargo.toml index ddce910609d..ff3c04b5419 100644 --- a/primitives/trie/Cargo.toml +++ b/primitives/trie/Cargo.toml @@ -27,6 +27,7 @@ trie-bench = "0.20.0" trie-standardmap = "0.15.2" criterion = "0.2.11" hex-literal = "0.2.1" +sp-runtime = { version = "2.0.0-alpha.2", path = "../runtime" } [features] default = ["std"] diff --git a/primitives/trie/benches/bench.rs b/primitives/trie/benches/bench.rs index 72a53c18d25..d385b4bacd4 100644 --- a/primitives/trie/benches/bench.rs +++ b/primitives/trie/benches/bench.rs @@ -20,11 +20,11 @@ criterion_main!(benches); fn benchmark(c: &mut Criterion) { trie_bench::standard_benchmark::< - sp_trie::Layout, + sp_trie::Layout, sp_trie::TrieStream, >(c, "substrate-blake2"); trie_bench::standard_benchmark::< - sp_trie::Layout, + sp_trie::Layout, sp_trie::TrieStream, >(c, "substrate-keccak"); } diff --git a/test-utils/client/src/lib.rs b/test-utils/client/src/lib.rs index afe11903d5b..7d22abf3d87 100644 --- a/test-utils/client/src/lib.rs +++ b/test-utils/client/src/lib.rs @@ -33,7 +33,7 @@ pub use sp_keyring::{ ed25519::Keyring as Ed25519Keyring, sr25519::Keyring as Sr25519Keyring, }; -pub use sp_core::{Blake2Hasher, traits::BareCryptoStorePtr}; +pub use sp_core::traits::BareCryptoStorePtr; pub use sp_runtime::{Storage, StorageChild}; pub use sp_state_machine::ExecutionStrategy; pub use self::client_ext::{ClientExt, ClientBlockImportExt}; @@ -41,13 +41,13 @@ pub use self::client_ext::{ClientExt, ClientBlockImportExt}; use std::sync::Arc; use std::collections::HashMap; use sp_core::storage::{well_known_keys, ChildInfo}; -use sp_runtime::traits::Block as BlockT; +use sp_runtime::traits::{Block as BlockT, BlakeTwo256}; use sc_client::LocalCallExecutor; /// Test client light database backend. pub type LightBackend = sc_client::light::backend::Backend< sc_client_db::light::LightStorage, - Blake2Hasher, + BlakeTwo256, >; /// A genesis storage initialization trait. diff --git a/test-utils/runtime/client/src/block_builder_ext.rs b/test-utils/runtime/client/src/block_builder_ext.rs index 6b9a6f79ab1..3a9f54d06cb 100644 --- a/test-utils/runtime/client/src/block_builder_ext.rs +++ b/test-utils/runtime/client/src/block_builder_ext.rs @@ -19,7 +19,7 @@ use sp_api::{ApiExt, ProvideRuntimeApi}; use sp_core::ChangesTrieConfiguration; use sc_client_api::backend; -use sp_runtime::traits::HasherFor; +use sp_runtime::traits::HashFor; use sc_block_builder::BlockBuilderApi; @@ -50,7 +50,7 @@ impl<'a, A, B> BlockBuilderExt for sc_block_builder::BlockBuilder<'a, substrate_ B: backend::Backend, // Rust bug: https://github.com/rust-lang/rust/issues/24159 backend::StateBackendFor: - sp_api::StateBackend>, + sp_api::StateBackend>, { fn push_transfer(&mut self, transfer: substrate_test_runtime::Transfer) -> Result<(), sp_blockchain::Error> { self.push(transfer.into_signed_tx()) diff --git a/test-utils/runtime/client/src/lib.rs b/test-utils/runtime/client/src/lib.rs index 21cf94dfa67..9a508930247 100644 --- a/test-utils/runtime/client/src/lib.rs +++ b/test-utils/runtime/client/src/lib.rs @@ -33,7 +33,7 @@ pub use self::block_builder_ext::BlockBuilderExt; use sp_core::{sr25519, ChangesTrieConfiguration}; use sp_core::storage::{ChildInfo, Storage, StorageChild}; use substrate_test_runtime::genesismap::{GenesisConfig, additional_storage_with_genesis}; -use sp_runtime::traits::{Block as BlockT, Header as HeaderT, Hash as HashT, NumberFor, HasherFor}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, Hash as HashT, NumberFor, HashFor}; use sc_client::{ light::fetcher::{ Fetcher, @@ -82,7 +82,7 @@ pub type LightExecutor = sc_client::light::call_executor::GenesisCallExecutor< sc_client::LocalCallExecutor< sc_client::light::backend::Backend< sc_client_db::light::LightStorage, - HasherFor + HashFor >, NativeExecutor > @@ -243,7 +243,7 @@ impl TestClientBuilderExt for TestClientBuilder< B: sc_client_api::backend::Backend + 'static, // Rust bug: https://github.com/rust-lang/rust/issues/24159 >::State: - sp_api::StateBackend>, + sp_api::StateBackend>, { fn genesis_init_mut(&mut self) -> &mut GenesisParameters { Self::genesis_init_mut(self) diff --git a/test-utils/runtime/client/src/trait_tests.rs b/test-utils/runtime/client/src/trait_tests.rs index 5ceab4355d8..4af8aa37b64 100644 --- a/test-utils/runtime/client/src/trait_tests.rs +++ b/test-utils/runtime/client/src/trait_tests.rs @@ -29,7 +29,7 @@ use sc_client_api::blockchain::{Backend as BlockChainBackendT, HeaderBackend}; use substrate_test_client::sp_consensus::BlockOrigin; use substrate_test_runtime::{self, Transfer}; use sp_runtime::generic::BlockId; -use sp_runtime::traits::{Block as BlockT, HasherFor}; +use sp_runtime::traits::{Block as BlockT, HashFor}; use sc_block_builder::BlockBuilderProvider; /// helper to test the `leaves` implementation for various backends @@ -37,7 +37,7 @@ pub fn test_leaves_for_backend(backend: Arc) where B: backend::Backend, // Rust bug: https://github.com/rust-lang/rust/issues/24159 backend::StateBackendFor: - sp_api::StateBackend>, + sp_api::StateBackend>, { // block tree: // G -> A1 -> A2 -> A3 -> A4 -> A5 @@ -206,7 +206,7 @@ pub fn test_children_for_backend(backend: Arc) where B: backend::LocalBackend, // Rust bug: https://github.com/rust-lang/rust/issues/24159 >::State: - sp_api::StateBackend>, + sp_api::StateBackend>, { // block tree: // G -> A1 -> A2 -> A3 -> A4 -> A5 @@ -336,7 +336,7 @@ pub fn test_blockchain_query_by_number_gets_canonical(backend: Arc, // Rust bug: https://github.com/rust-lang/rust/issues/24159 >::State: - sp_api::StateBackend>, + sp_api::StateBackend>, { // block tree: // G -> A1 -> A2 -> A3 -> A4 -> A5 diff --git a/test-utils/runtime/src/lib.rs b/test-utils/runtime/src/lib.rs index 55e153103d9..497de36c8b7 100644 --- a/test-utils/runtime/src/lib.rs +++ b/test-utils/runtime/src/lib.rs @@ -25,7 +25,7 @@ pub mod system; use sp_std::{prelude::*, marker::PhantomData}; use codec::{Encode, Decode, Input, Error}; -use sp_core::{Blake2Hasher, OpaqueMetadata, RuntimeDebug, ChangesTrieConfiguration}; +use sp_core::{OpaqueMetadata, RuntimeDebug, ChangesTrieConfiguration}; use sp_application_crypto::{ed25519, sr25519, RuntimeAppPublic}; use trie_db::{TrieMut, Trie}; use sp_trie::PrefixedMemoryDB; @@ -419,7 +419,7 @@ fn code_using_trie() -> u64 { let mut root = sp_std::default::Default::default(); let _ = { let v = &pairs; - let mut t = TrieDBMut::::new(&mut mdb, &mut root); + let mut t = TrieDBMut::::new(&mut mdb, &mut root); for i in 0..v.len() { let key: &[u8]= &v[i].0; let val: &[u8] = &v[i].1; @@ -430,7 +430,7 @@ fn code_using_trie() -> u64 { t }; - if let Ok(trie) = TrieDB::::new(&mdb, &root) { + if let Ok(trie) = TrieDB::::new(&mdb, &root) { if let Ok(iter) = trie.iter() { let mut iter_pairs = Vec::new(); for pair in iter { -- GitLab From f633e4614a9bf62448f9a1e2c4fc9deb08c9e5e5 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Thu, 5 Mar 2020 08:52:23 +0100 Subject: [PATCH 082/106] Support enabling features with `wasm-builder` (#5131) This adds support for enabling features in the wasm build. The `default` and `std` feature are ignored in the build. --- Cargo.lock | 1 + utils/wasm-builder/Cargo.toml | 1 + utils/wasm-builder/src/wasm_project.rs | 66 +++++++++++++++++++++----- 3 files changed, 55 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6b3fca15e43..79872ffc6e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7819,6 +7819,7 @@ dependencies = [ "build-helper", "cargo_metadata", "fs2", + "itertools", "tempfile", "toml", "walkdir", diff --git a/utils/wasm-builder/Cargo.toml b/utils/wasm-builder/Cargo.toml index 245ec631141..1aac8913939 100644 --- a/utils/wasm-builder/Cargo.toml +++ b/utils/wasm-builder/Cargo.toml @@ -18,3 +18,4 @@ walkdir = "2.2.9" fs2 = "0.4.3" wasm-gc-api = "0.1.11" atty = "0.2.13" +itertools = "0.8.2" diff --git a/utils/wasm-builder/src/wasm_project.rs b/utils/wasm-builder/src/wasm_project.rs index c4f00b9cf43..1e6d7fa463d 100644 --- a/utils/wasm-builder/src/wasm_project.rs +++ b/utils/wasm-builder/src/wasm_project.rs @@ -28,6 +28,8 @@ use walkdir::WalkDir; use fs2::FileExt; +use itertools::Itertools; + /// Holds the path to the bloaty WASM binary. pub struct WasmBinaryBloaty(PathBuf); @@ -87,8 +89,13 @@ pub fn create_and_compile( // Lock the workspace exclusively for us let _lock = WorkspaceLock::new(&wasm_workspace_root); - let project = create_project(cargo_manifest, &wasm_workspace); - create_wasm_workspace_project(&wasm_workspace, cargo_manifest); + let crate_metadata = MetadataCommand::new() + .manifest_path(cargo_manifest) + .exec() + .expect("`cargo metadata` can not fail on project `Cargo.toml`; qed"); + + let project = create_project(cargo_manifest, &wasm_workspace, &crate_metadata); + create_wasm_workspace_project(&wasm_workspace, &crate_metadata.workspace_root); build_project(&project, default_rustflags); let (wasm_binary, bloaty) = compact_wasm_file( @@ -232,15 +239,9 @@ fn find_and_clear_workspace_members(wasm_workspace: &Path) -> Vec { members } -fn create_wasm_workspace_project(wasm_workspace: &Path, cargo_manifest: &Path) { +fn create_wasm_workspace_project(wasm_workspace: &Path, workspace_root_path: &Path) { let members = find_and_clear_workspace_members(wasm_workspace); - let crate_metadata = MetadataCommand::new() - .manifest_path(cargo_manifest) - .exec() - .expect("`cargo metadata` can not fail on project `Cargo.toml`; qed"); - let workspace_root_path = crate_metadata.workspace_root; - let mut workspace_toml: Table = toml::from_str( &fs::read_to_string( workspace_root_path.join("Cargo.toml"), @@ -281,8 +282,10 @@ fn create_wasm_workspace_project(wasm_workspace: &Path, cargo_manifest: &Path) { p.iter_mut() .filter(|(k, _)| k == &"path") .for_each(|(_, v)| { - if let Some(path) = v.as_str() { - *v = workspace_root_path.join(path).display().to_string().into(); + if let Some(path) = v.as_str().map(PathBuf::from) { + if path.is_relative() { + *v = workspace_root_path.join(path).display().to_string().into(); + } } }) ); @@ -296,11 +299,45 @@ fn create_wasm_workspace_project(wasm_workspace: &Path, cargo_manifest: &Path) { ).expect("WASM workspace `Cargo.toml` writing can not fail; qed"); } +/// Get a list of enabled features for the project. +fn project_enabled_features( + cargo_manifest: &Path, + crate_metadata: &cargo_metadata::Metadata, +) -> Vec { + let package = crate_metadata.packages + .iter() + .find(|p| p.manifest_path == cargo_manifest) + .expect("Wasm project exists in its own metadata; qed"); + + let mut enabled_features = package.features.keys() + .filter(|f| { + let mut feature_env = f.replace("-", "_"); + feature_env.make_ascii_uppercase(); + + // We don't want to enable the `std`/`default` feature for the wasm build and + // we need to check if the feature is enabled by checking the env variable. + *f != "std" + && *f != "default" + && env::var(format!("CARGO_FEATURE_{}", feature_env)) + .map(|v| v == "1") + .unwrap_or_default() + }) + .cloned() + .collect::>(); + + enabled_features.sort(); + enabled_features +} + /// Create the project used to build the wasm binary. /// /// # Returns /// The path to the created project. -fn create_project(cargo_manifest: &Path, wasm_workspace: &Path) -> PathBuf { +fn create_project( + cargo_manifest: &Path, + wasm_workspace: &Path, + crate_metadata: &cargo_metadata::Metadata, +) -> PathBuf { let crate_name = get_crate_name(cargo_manifest); let crate_path = cargo_manifest.parent().expect("Parent path exists; qed"); let wasm_binary = get_wasm_binary_name(cargo_manifest); @@ -308,6 +345,8 @@ fn create_project(cargo_manifest: &Path, wasm_workspace: &Path) -> PathBuf { fs::create_dir_all(project_folder.join("src")).expect("Wasm project dir create can not fail; qed"); + let enabled_features = project_enabled_features(&cargo_manifest, &crate_metadata); + write_file_if_changed( project_folder.join("Cargo.toml"), format!( @@ -322,11 +361,12 @@ fn create_project(cargo_manifest: &Path, wasm_workspace: &Path) -> PathBuf { crate-type = ["cdylib"] [dependencies] - wasm_project = {{ package = "{crate_name}", path = "{crate_path}", default-features = false }} + wasm_project = {{ package = "{crate_name}", path = "{crate_path}", default-features = false, features = [ {features} ] }} "#, crate_name = crate_name, crate_path = crate_path.display(), wasm_binary = wasm_binary, + features = enabled_features.into_iter().map(|f| format!("\"{}\"", f)).join(","), ) ); -- GitLab From e3bef607eb805d80e2ac2e71bb401f5d8ba843a1 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 09:29:12 +0100 Subject: [PATCH 083/106] Task manager for background/async tasks in service (#5092) * Reorganize tasks into task manager * move to separate file and improve api * address api issues * fix spawning inside closures * decouple executor * tasks_setup -> tasks_builder * remove drops * add deprecatiion comment * add pub(super) * fix identation --- client/service/src/builder.rs | 155 +++++++++++------------ client/service/src/lib.rs | 99 ++------------- client/service/src/task_manager.rs | 190 +++++++++++++++++++++++++++++ 3 files changed, 273 insertions(+), 171 deletions(-) create mode 100644 client/service/src/task_manager.rs diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index bc731dd2de8..db60c94997f 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -15,7 +15,7 @@ // along with Substrate. If not, see . use crate::{Service, NetworkStatus, NetworkState, error::Error, DEFAULT_PROTOCOL_ID, MallocSizeOfWasm}; -use crate::{SpawnTaskHandle, start_rpc_servers, build_network_future, TransactionPoolAdapter}; +use crate::{TaskManagerBuilder, start_rpc_servers, build_network_future, TransactionPoolAdapter}; use crate::status_sinks; use crate::config::{Configuration, DatabaseConfig, KeystoreConfig}; use sc_client_api::{ @@ -30,7 +30,7 @@ use sp_consensus::import_queue::ImportQueue; use futures::{ Future, FutureExt, StreamExt, channel::mpsc, - future::{select, ready} + future::ready, }; use sc_keystore::{Store as Keystore}; use log::{info, warn, error}; @@ -44,7 +44,6 @@ use sp_runtime::traits::{ use sp_api::ProvideRuntimeApi; use sc_executor::{NativeExecutor, NativeExecutionDispatch}; use std::{ - borrow::Cow, io::{Read, Write, Seek}, marker::PhantomData, sync::Arc, pin::Pin }; @@ -117,6 +116,7 @@ pub struct ServiceBuilder, pub (crate) client: Arc, backend: Arc, + tasks_builder: TaskManagerBuilder, keystore: Arc>, fetcher: Option, select_chain: Option, @@ -181,6 +181,7 @@ type TFullParts = ( TFullClient, Arc>, Arc>, + TaskManagerBuilder, ); /// Creates a new full client for the given config. @@ -212,6 +213,8 @@ fn new_full_parts( KeystoreConfig::None => return Err("No keystore config provided!".into()), }; + let tasks_builder = TaskManagerBuilder::new(); + let executor = NativeExecutor::::new( config.wasm_method, config.default_heap_pages, @@ -262,7 +265,7 @@ fn new_full_parts( )? }; - Ok((client, backend, keystore)) + Ok((client, backend, keystore, tasks_builder)) } impl ServiceBuilder<(), (), TGen, TCSExt, (), (), (), (), (), (), (), (), ()> @@ -285,7 +288,7 @@ where TGen: RuntimeGenesis, TCSExt: Extension { (), TFullBackend, >, Error> { - let (client, backend, keystore) = new_full_parts(&config)?; + let (client, backend, keystore, tasks_builder) = new_full_parts(&config)?; let client = Arc::new(client); @@ -294,6 +297,7 @@ where TGen: RuntimeGenesis, TCSExt: Extension { client, backend, keystore, + tasks_builder, fetcher: None, select_chain: None, import_queue: (), @@ -326,6 +330,8 @@ where TGen: RuntimeGenesis, TCSExt: Extension { (), TLightBackend, >, Error> { + let tasks_builder = TaskManagerBuilder::new(); + let keystore = match &config.keystore { KeystoreConfig::Path { path, password } => Keystore::open( path.clone(), @@ -378,6 +384,7 @@ where TGen: RuntimeGenesis, TCSExt: Extension { config, client, backend, + tasks_builder, keystore, fetcher: Some(fetcher.clone()), select_chain: None, @@ -451,6 +458,7 @@ impl + Send>>, Cow<'static, str>)>(); - // A side-channel for essential tasks to communicate shutdown. let (essential_failed_tx, essential_failed_rx) = mpsc::unbounded(); @@ -869,7 +878,7 @@ ServiceBuilder< imports_external_transactions: !config.roles.is_light(), pool: transaction_pool.clone(), client: client.clone(), - executor: SpawnTaskHandle { sender: to_spawn_tx.clone(), on_exit: exit.clone() }, + executor: tasks_builder.spawn_handle(), }); let protocol_id = { @@ -899,11 +908,9 @@ ServiceBuilder< let network_params = sc_network::config::Params { roles: config.roles, executor: { - let to_spawn_tx = to_spawn_tx.clone(); + let spawn_handle = tasks_builder.spawn_handle(); Some(Box::new(move |fut| { - if let Err(e) = to_spawn_tx.unbounded_send((fut, From::from("libp2p-node"))) { - error!("Failed to spawn libp2p background task: {:?}", e); - } + spawn_handle.spawn("libp2p-node", fut); })) }, network_config: config.network.clone(), @@ -935,20 +942,19 @@ ServiceBuilder< _ => None, }; + let spawn_handle = tasks_builder.spawn_handle(); + // Spawn background tasks which were stacked during the // service building. for (title, background_task) in background_tasks { - let _ = to_spawn_tx.unbounded_send(( - background_task, - title.into(), - )); + spawn_handle.spawn(title, background_task); } { // block notifications let txpool = Arc::downgrade(&transaction_pool); let offchain = offchain_workers.as_ref().map(Arc::downgrade); - let to_spawn_tx_ = to_spawn_tx.clone(); + let notifications_spawn_handle = tasks_builder.spawn_handle(); let network_state_info: Arc = network.clone(); let is_validator = config.roles.is_authority(); @@ -970,15 +976,14 @@ ServiceBuilder< let offchain = offchain.as_ref().and_then(|o| o.upgrade()); match offchain { Some(offchain) if is_new_best => { - let future = offchain.on_block_imported( - &header, - network_state_info.clone(), - is_validator, + notifications_spawn_handle.spawn( + "offchain-on-block", + offchain.on_block_imported( + &header, + network_state_info.clone(), + is_validator, + ), ); - let _ = to_spawn_tx_.unbounded_send(( - Box::pin(future), - From::from("offchain-on-block"), - )); }, Some(_) => log::debug!( target: "sc_offchain", @@ -991,20 +996,19 @@ ServiceBuilder< let txpool = txpool.upgrade(); if let Some(txpool) = txpool.as_ref() { - let future = txpool.maintain(event); - let _ = to_spawn_tx_.unbounded_send(( - Box::pin(future), - From::from("txpool-maintain") - )); + notifications_spawn_handle.spawn( + "txpool-maintain", + txpool.maintain(event), + ); } ready(()) }); - let _ = to_spawn_tx.unbounded_send(( - Box::pin(select(events, exit.clone()).map(drop)), - From::from("txpool-and-offchain-notif"), - )); + spawn_handle.spawn( + "txpool-and-offchain-notif", + events, + ); } { @@ -1024,28 +1028,20 @@ ServiceBuilder< ready(()) }); - let _ = to_spawn_tx.unbounded_send(( - Box::pin(select(events, exit.clone()).map(drop)), - From::from("telemetry-on-block"), - )); + spawn_handle.spawn( + "telemetry-on-block", + events, + ); } // Prometheus metrics let metrics = if let Some((registry, port)) = prometheus_registry_and_port.clone() { let metrics = ServiceMetrics::register(®istry)?; - metrics.node_roles.set(u64::from(config.roles.bits())); - - let future = select( - prometheus_endpoint::init_prometheus(port, registry).boxed(), - exit.clone() - ).map(drop); - - let _ = to_spawn_tx.unbounded_send(( - Box::pin(future), - From::from("prometheus-endpoint") - )); - + spawn_handle.spawn( + "prometheus-endpoint", + prometheus_endpoint::init_prometheus(port, registry).map(drop) + ); Some(metrics) } else { None @@ -1123,10 +1119,10 @@ ServiceBuilder< ready(()) }); - let _ = to_spawn_tx.unbounded_send(( - Box::pin(select(tel_task, exit.clone()).map(drop)), - From::from("telemetry-periodic-send"), - )); + spawn_handle.spawn( + "telemetry-periodic-send", + tel_task, + ); // Periodically send the network state to the telemetry. let (netstat_tx, netstat_rx) = mpsc::unbounded::<(NetworkStatus<_>, NetworkState)>(); @@ -1139,10 +1135,10 @@ ServiceBuilder< ); ready(()) }); - let _ = to_spawn_tx.unbounded_send(( - Box::pin(select(tel_task_2, exit.clone()).map(drop)), - From::from("telemetry-periodic-network-state"), - )); + spawn_handle.spawn( + "telemetry-periodic-network-state", + tel_task_2, + ); // RPC let (system_rpc_tx, system_rpc_rx) = mpsc::unbounded(); @@ -1156,10 +1152,7 @@ ServiceBuilder< properties: chain_spec.properties().clone(), }; - let subscriptions = sc_rpc::Subscriptions::new(Arc::new(SpawnTaskHandle { - sender: to_spawn_tx.clone(), - on_exit: exit.clone() - })); + let subscriptions = sc_rpc::Subscriptions::new(Arc::new(tasks_builder.spawn_handle())); let (chain, state) = if let (Some(remote_backend), Some(on_demand)) = (remote_backend.as_ref(), on_demand.as_ref()) { @@ -1217,18 +1210,17 @@ ServiceBuilder< let rpc_handlers = gen_handler(); let rpc = start_rpc_servers(&config, gen_handler)?; - - let _ = to_spawn_tx.unbounded_send(( - Box::pin(select(build_network_future( + spawn_handle.spawn( + "network-worker", + build_network_future( config.roles, network_mut, client.clone(), network_status_sinks.clone(), system_rpc_rx, has_bootnodes, - ), exit.clone()).map(drop)), - From::from("network-worker"), - )); + ), + ); let telemetry_connection_sinks: Arc>>> = Default::default(); @@ -1269,9 +1261,12 @@ ServiceBuilder< }); ready(()) }); - let _ = to_spawn_tx.unbounded_send((Box::pin(select( - future, exit.clone() - ).map(drop)), From::from("telemetry-worker"))); + + spawn_handle.spawn( + "telemetry-worker", + future, + ); + telemetry }); @@ -1288,21 +1283,13 @@ ServiceBuilder< Ok(Service { client, + task_manager: tasks_builder.into_task_manager(config.task_executor.ok_or(Error::TaskExecutorRequired)?), network, network_status_sinks, select_chain, transaction_pool, - exit, - signal: Some(signal), essential_failed_tx, essential_failed_rx, - to_spawn_tx, - to_spawn_rx, - task_executor: if let Some(exec) = config.task_executor { - exec - } else { - return Err(Error::TaskExecutorRequired); - }, rpc_handlers, _rpc: rpc, _telemetry: telemetry, diff --git a/client/service/src/lib.rs b/client/service/src/lib.rs index 5c59cdf91fc..db56c141db0 100644 --- a/client/service/src/lib.rs +++ b/client/service/src/lib.rs @@ -26,6 +26,7 @@ pub mod error; mod builder; mod status_sinks; +mod task_manager; use std::{borrow::Cow, io, pin::Pin}; use std::marker::PhantomData; @@ -37,10 +38,9 @@ use std::task::{Poll, Context}; use parking_lot::Mutex; use sc_client::Client; -use exit_future::Signal; use futures::{ Future, FutureExt, Stream, StreamExt, - future::select, channel::mpsc, + channel::mpsc, compat::*, sink::SinkExt, task::{Spawn, FutureObj, SpawnError}, @@ -69,6 +69,8 @@ pub use sc_executor::NativeExecutionDispatch; pub use std::{ops::Deref, result::Result, sync::Arc}; #[doc(hidden)] pub use sc_network::config::{FinalityProofProvider, OnDemand, BoxFinalityProofRequestBuilder}; +pub use task_manager::{TaskManagerBuilder, SpawnTaskHandle}; +use task_manager::TaskManager; const DEFAULT_PROTOCOL_ID: &str = "sup"; @@ -85,28 +87,18 @@ impl MallocSizeOfWasm for T {} /// Substrate service. pub struct Service { client: Arc, + task_manager: TaskManager, select_chain: Option, network: Arc, /// Sinks to propagate network status updates. /// For each element, every time the `Interval` fires we push an element on the sender. network_status_sinks: Arc>>, transaction_pool: Arc, - /// A future that resolves when the service has exited, this is useful to - /// make sure any internally spawned futures stop when the service does. - exit: exit_future::Exit, - /// A signal that makes the exit future above resolve, fired on service drop. - signal: Option, /// Send a signal when a spawned essential task has concluded. The next time /// the service future is polled it should complete with an error. essential_failed_tx: mpsc::UnboundedSender<()>, /// A receiver for spawned essential-tasks concluding. essential_failed_rx: mpsc::UnboundedReceiver<()>, - /// Sender for futures that must be spawned as background tasks. - to_spawn_tx: mpsc::UnboundedSender<(Pin + Send>>, Cow<'static, str>)>, - /// Receiver for futures that must be spawned as background tasks. - to_spawn_rx: mpsc::UnboundedReceiver<(Pin + Send>>, Cow<'static, str>)>, - /// How to spawn background tasks. - task_executor: Arc + Send>>) + Send + Sync>, rpc_handlers: sc_rpc_server::RpcHandler, _rpc: Box, _telemetry: Option, @@ -119,48 +111,6 @@ pub struct Service { impl Unpin for Service {} -/// Alias for a an implementation of `futures::future::Executor`. -pub type TaskExecutor = Arc; - -/// An handle for spawning tasks in the service. -#[derive(Clone)] -pub struct SpawnTaskHandle { - sender: mpsc::UnboundedSender<(Pin + Send>>, Cow<'static, str>)>, - on_exit: exit_future::Exit, -} - -impl SpawnTaskHandle { - /// Spawns the given task with the given name. - pub fn spawn(&self, name: impl Into>, task: impl Future + Send + 'static) { - let on_exit = self.on_exit.clone(); - let future = async move { - futures::pin_mut!(task); - let _ = select(on_exit, task).await; - }; - if self.sender.unbounded_send((Box::pin(future), name.into())).is_err() { - error!("Failed to send task to spawn over channel"); - } - } -} - -impl Spawn for SpawnTaskHandle { - fn spawn_obj(&self, future: FutureObj<'static, ()>) - -> Result<(), SpawnError> { - let future = select(self.on_exit.clone(), future).map(drop); - self.sender.unbounded_send((Box::pin(future), From::from("unnamed"))) - .map_err(|_| SpawnError::shutdown()) - } -} - -type Boxed01Future01 = Box + Send + 'static>; - -impl futures01::future::Executor for SpawnTaskHandle { - fn execute(&self, future: Boxed01Future01) -> Result<(), futures01::future::ExecuteError>{ - self.spawn("unnamed", future.compat().map(drop)); - Ok(()) - } -} - /// Abstraction over a Substrate service. pub trait AbstractService: 'static + Future> + Spawn + Send + Unpin { @@ -225,6 +175,7 @@ pub trait AbstractService: 'static + Future> + fn transaction_pool(&self) -> Arc; /// Get a handle to a future that will resolve on exit. + #[deprecated(note = "Use `spawn_task`/`spawn_essential_task` instead, those functions will attach on_exit signal.")] fn on_exit(&self) -> ::exit_future::Exit; /// Get the prometheus metrics registry, if available. @@ -265,12 +216,7 @@ where } fn spawn_task(&self, name: impl Into>, task: impl Future + Send + 'static) { - let on_exit = self.on_exit(); - let task = async move { - futures::pin_mut!(task); - let _ = select(on_exit, task).await; - }; - let _ = self.to_spawn_tx.unbounded_send((Box::pin(task), name.into())); + self.task_manager.spawn(name, task) } fn spawn_essential_task(&self, name: impl Into>, task: impl Future + Send + 'static) { @@ -281,20 +227,12 @@ where error!("Essential task failed. Shutting down service."); let _ = essential_failed.send(()); }); - let on_exit = self.on_exit(); - let task = async move { - futures::pin_mut!(essential_task); - let _ = select(on_exit, essential_task).await; - }; - let _ = self.to_spawn_tx.unbounded_send((Box::pin(task), name.into())); + let _ = self.spawn_task(name, essential_task); } fn spawn_task_handle(&self) -> SpawnTaskHandle { - SpawnTaskHandle { - sender: self.to_spawn_tx.clone(), - on_exit: self.on_exit(), - } + self.task_manager.spawn_handle() } fn rpc_query(&self, mem: &RpcSession, request: &str) -> Pin> + Send>> { @@ -330,7 +268,7 @@ where } fn on_exit(&self) -> exit_future::Exit { - self.exit.clone() + self.task_manager.on_exit() } fn prometheus_registry(&self) -> Option { @@ -355,9 +293,7 @@ impl Future for } } - while let Poll::Ready(Some((task_to_spawn, name))) = Pin::new(&mut this.to_spawn_rx).poll_next(cx) { - (this.task_executor)(Box::pin(futures_diagnose::diagnose(name, task_to_spawn))); - } + this.task_manager.process_receiver(cx); // The service future never ends. Poll::Pending @@ -371,7 +307,7 @@ impl Spawn for &self, future: FutureObj<'static, ()> ) -> Result<(), SpawnError> { - self.to_spawn_tx.unbounded_send((Box::pin(future), From::from("unnamed"))) + self.task_manager.scheduler().unbounded_send((Box::pin(future), From::from("unnamed"))) .map_err(|_| SpawnError::shutdown()) } } @@ -525,17 +461,6 @@ pub struct NetworkStatus { pub average_upload_per_sec: u64, } -impl Drop for - Service -{ - fn drop(&mut self) { - debug!(target: "service", "Substrate service shutdown"); - if let Some(signal) = self.signal.take() { - let _ = signal.fire(); - } - } -} - #[cfg(not(target_os = "unknown"))] // Wrapper for HTTP and WS servers that makes sure they are properly shut down. mod waiting { diff --git a/client/service/src/task_manager.rs b/client/service/src/task_manager.rs new file mode 100644 index 00000000000..d7041e44b9c --- /dev/null +++ b/client/service/src/task_manager.rs @@ -0,0 +1,190 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +//! Substrate service tasks management module. + +use std::{ + result::Result, sync::Arc, + task::{Poll, Context}, + borrow::Cow, pin::Pin, +}; +use exit_future::Signal; +use log::{debug, error}; +use futures::{ + Future, FutureExt, Stream, + future::select, channel::mpsc, + compat::*, + task::{Spawn, FutureObj, SpawnError}, +}; + +/// Type alias for service task executor (usually runtime). +pub type ServiceTaskExecutor = Arc + Send>>) + Send + Sync>; + +/// Type alias for the task scheduler. +pub type TaskScheduler = mpsc::UnboundedSender<(Pin + Send>>, Cow<'static, str>)>; + +/// Helper struct to setup background tasks execution for service. +pub struct TaskManagerBuilder { + /// A future that resolves when the service has exited, this is useful to + /// make sure any internally spawned futures stop when the service does. + on_exit: exit_future::Exit, + /// A signal that makes the exit future above resolve, fired on service drop. + signal: Option, + /// Sender for futures that must be spawned as background tasks. + to_spawn_tx: TaskScheduler, + /// Receiver for futures that must be spawned as background tasks. + to_spawn_rx: mpsc::UnboundedReceiver<(Pin + Send>>, Cow<'static, str>)>, +} + +impl TaskManagerBuilder { + /// New asynchronous task manager setup. + pub fn new() -> Self { + let (signal, on_exit) = exit_future::signal(); + let (to_spawn_tx, to_spawn_rx) = mpsc::unbounded(); + Self { + on_exit, + signal: Some(signal), + to_spawn_tx, + to_spawn_rx, + } + } + + /// Get spawn handle. + /// + /// Tasks spawned through this handle will get scheduled once + /// service is up and running. + pub fn spawn_handle(&self) -> SpawnTaskHandle { + SpawnTaskHandle { + on_exit: self.on_exit.clone(), + sender: self.to_spawn_tx.clone(), + } + } + + /// Convert into actual task manager from initial setup. + pub(crate) fn into_task_manager(self, executor: ServiceTaskExecutor) -> TaskManager { + let TaskManagerBuilder { + on_exit, + signal, + to_spawn_rx, + to_spawn_tx + } = self; + TaskManager { + on_exit, + signal, + to_spawn_tx, + to_spawn_rx, + executor, + } + } +} + +/// An handle for spawning tasks in the service. +#[derive(Clone)] +pub struct SpawnTaskHandle { + sender: TaskScheduler, + on_exit: exit_future::Exit, +} + +impl SpawnTaskHandle { + /// Spawns the given task with the given name. + pub fn spawn(&self, name: impl Into>, task: impl Future + Send + 'static) { + let on_exit = self.on_exit.clone(); + let future = async move { + futures::pin_mut!(task); + let _ = select(on_exit, task).await; + }; + if self.sender.unbounded_send((Box::pin(future), name.into())).is_err() { + error!("Failed to send task to spawn over channel"); + } + } +} + +impl Spawn for SpawnTaskHandle { + fn spawn_obj(&self, future: FutureObj<'static, ()>) + -> Result<(), SpawnError> { + let future = select(self.on_exit.clone(), future).map(drop); + self.sender.unbounded_send((Box::pin(future), From::from("unnamed"))) + .map_err(|_| SpawnError::shutdown()) + } +} + +type Boxed01Future01 = Box + Send + 'static>; + +impl futures01::future::Executor for SpawnTaskHandle { + fn execute(&self, future: Boxed01Future01) -> Result<(), futures01::future::ExecuteError>{ + self.spawn("unnamed", future.compat().map(drop)); + Ok(()) + } +} + +/// Helper struct to manage background/async tasks in Service. +pub struct TaskManager { + /// A future that resolves when the service has exited, this is useful to + /// make sure any internally spawned futures stop when the service does. + on_exit: exit_future::Exit, + /// A signal that makes the exit future above resolve, fired on service drop. + signal: Option, + /// Sender for futures that must be spawned as background tasks. + to_spawn_tx: TaskScheduler, + /// Receiver for futures that must be spawned as background tasks. + to_spawn_rx: mpsc::UnboundedReceiver<(Pin + Send>>, Cow<'static, str>)>, + /// How to spawn background tasks. + executor: ServiceTaskExecutor, +} + +impl TaskManager { + /// Spawn background/async task, which will be aware on exit signal. + pub(super) fn spawn(&self, name: impl Into>, task: impl Future + Send + 'static) { + let on_exit = self.on_exit.clone(); + let future = async move { + futures::pin_mut!(task); + let _ = select(on_exit, task).await; + }; + if self.to_spawn_tx.unbounded_send((Box::pin(future), name.into())).is_err() { + error!("Failed to send task to spawn over channel"); + } + } + + pub(super) fn spawn_handle(&self) -> SpawnTaskHandle { + SpawnTaskHandle { + on_exit: self.on_exit.clone(), + sender: self.to_spawn_tx.clone(), + } + } + + /// Get sender where background/async tasks can be sent. + pub(super) fn scheduler(&self) -> TaskScheduler { + self.to_spawn_tx.clone() + } + + /// Process background task receiver. + pub(super) fn process_receiver(&mut self, cx: &mut Context) { + while let Poll::Ready(Some((task_to_spawn, name))) = Pin::new(&mut self.to_spawn_rx).poll_next(cx) { + (self.executor)(Box::pin(futures_diagnose::diagnose(name, task_to_spawn))); + } + } + + /// Clone on exit signal. + pub(super) fn on_exit(&self) -> exit_future::Exit { + self.on_exit.clone() + } +} + +impl Drop for TaskManager { + fn drop(&mut self) { + debug!(target: "service", "Tasks manager shutdown"); + if let Some(signal) = self.signal.take() { + let _ = signal.fire(); + } + } +} -- GitLab From bea883b3592106f2e2c1ef413b3503fa983c55a8 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 10:29:38 +0100 Subject: [PATCH 084/106] use fixed quote (#5135) --- client/chain-spec/derive/Cargo.toml | 2 +- frame/staking/reward-curve/Cargo.toml | 2 +- frame/support/procedural/Cargo.toml | 2 +- frame/support/procedural/tools/Cargo.toml | 2 +- frame/support/procedural/tools/derive/Cargo.toml | 2 +- primitives/api/proc-macro/Cargo.toml | 2 +- primitives/debug-derive/Cargo.toml | 2 +- primitives/runtime-interface/proc-macro/Cargo.toml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/chain-spec/derive/Cargo.toml b/client/chain-spec/derive/Cargo.toml index c76949011aa..801d86c754c 100644 --- a/client/chain-spec/derive/Cargo.toml +++ b/client/chain-spec/derive/Cargo.toml @@ -14,7 +14,7 @@ proc-macro = true [dependencies] proc-macro-crate = "0.1.4" proc-macro2 = "1.0.6" -quote = "1.0.2" +quote = "=1.0.2" syn = "1.0.7" [dev-dependencies] diff --git a/frame/staking/reward-curve/Cargo.toml b/frame/staking/reward-curve/Cargo.toml index 3d0920e644f..bca5a13fe60 100644 --- a/frame/staking/reward-curve/Cargo.toml +++ b/frame/staking/reward-curve/Cargo.toml @@ -13,7 +13,7 @@ proc-macro = true [dependencies] syn = { version = "1.0.7", features = ["full", "visit"] } -quote = "1.0" +quote = "=1.0.2" proc-macro2 = "1.0.6" proc-macro-crate = "0.1.4" diff --git a/frame/support/procedural/Cargo.toml b/frame/support/procedural/Cargo.toml index 1f5ec04d25e..a4187673cce 100644 --- a/frame/support/procedural/Cargo.toml +++ b/frame/support/procedural/Cargo.toml @@ -14,5 +14,5 @@ proc-macro = true [dependencies] frame-support-procedural-tools = { version = "2.0.0-alpha.2", path = "./tools" } proc-macro2 = "1.0.6" -quote = "1.0.2" +quote = "=1.0.2" syn = { version = "1.0.7", features = ["full"] } diff --git a/frame/support/procedural/tools/Cargo.toml b/frame/support/procedural/tools/Cargo.toml index 8f0ce7b06a0..4aa32de9c0d 100644 --- a/frame/support/procedural/tools/Cargo.toml +++ b/frame/support/procedural/tools/Cargo.toml @@ -11,6 +11,6 @@ description = "Proc macro helpers for procedural macros" [dependencies] frame-support-procedural-tools-derive = { version = "2.0.0-alpha.2", path = "./derive" } proc-macro2 = "1.0.6" -quote = "1.0.2" +quote = "=1.0.2" syn = { version = "1.0.7", features = ["full", "visit"] } proc-macro-crate = "0.1.4" diff --git a/frame/support/procedural/tools/derive/Cargo.toml b/frame/support/procedural/tools/derive/Cargo.toml index 872185d19fc..8691b1d3968 100644 --- a/frame/support/procedural/tools/derive/Cargo.toml +++ b/frame/support/procedural/tools/derive/Cargo.toml @@ -13,5 +13,5 @@ proc-macro = true [dependencies] proc-macro2 = "1.0.6" -quote = { version = "1.0.2", features = ["proc-macro"] } +quote = { version = "=1.0.2", features = ["proc-macro"] } syn = { version = "1.0.7", features = ["proc-macro" ,"full", "extra-traits", "parsing"] } diff --git a/primitives/api/proc-macro/Cargo.toml b/primitives/api/proc-macro/Cargo.toml index e031f97ba9b..2667a2642e9 100644 --- a/primitives/api/proc-macro/Cargo.toml +++ b/primitives/api/proc-macro/Cargo.toml @@ -14,7 +14,7 @@ documentation = "https://docs.rs/sp-api-proc-macro" proc-macro = true [dependencies] -quote = "1.0.2" +quote = "=1.0.2" syn = { version = "1.0.8", features = ["full", "fold", "extra-traits", "visit"] } proc-macro2 = "1.0.6" blake2-rfc = { version = "0.2.18", default-features = false } diff --git a/primitives/debug-derive/Cargo.toml b/primitives/debug-derive/Cargo.toml index e15ef594d31..bce3fbbbe34 100644 --- a/primitives/debug-derive/Cargo.toml +++ b/primitives/debug-derive/Cargo.toml @@ -13,7 +13,7 @@ documentation = "https://docs.rs/sp-debug-derive" proc-macro = true [dependencies] -quote = "1.0.2" +quote = "=1.0.2" syn = "1.0.7" proc-macro2 = "1.0" diff --git a/primitives/runtime-interface/proc-macro/Cargo.toml b/primitives/runtime-interface/proc-macro/Cargo.toml index b18254f62fd..ca37c46c7fa 100644 --- a/primitives/runtime-interface/proc-macro/Cargo.toml +++ b/primitives/runtime-interface/proc-macro/Cargo.toml @@ -14,7 +14,7 @@ proc-macro = true [dependencies] syn = { version = "1.0.5", features = ["full", "visit", "fold", "extra-traits"] } -quote = "1.0.2" +quote = "=1.0.2" proc-macro2 = "1.0.3" Inflector = "0.11.4" proc-macro-crate = "0.1.4" -- GitLab From 5cbc17a9683f19d0f5d2e241949466b0a8572808 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Thu, 5 Mar 2020 10:40:55 +0100 Subject: [PATCH 085/106] Hide benchmarks behind a feature flag (#5024) * Hide benchmarks behind a feature flag * Propage attributes in impl_runtime_apis macro * Bump impl_version * Fillter cfg attributes * Hide more things under the feature * Fix set_block_number availability * Rename filter_attrs -> filter_cfg_attrs * Rename runtime_benchmarks to runtime-benchmarks --- bin/node/runtime/Cargo.toml | 3 +- bin/node/runtime/src/lib.rs | 3 +- frame/balances/Cargo.toml | 3 +- frame/balances/src/lib.rs | 1 + frame/identity/Cargo.toml | 3 +- frame/identity/src/lib.rs | 1 + frame/system/Cargo.toml | 1 + frame/system/src/lib.rs | 2 +- frame/timestamp/Cargo.toml | 5 +- frame/timestamp/src/lib.rs | 1 + .../api/proc-macro/src/impl_runtime_apis.rs | 61 ++++++++++++++++--- 11 files changed, 68 insertions(+), 16 deletions(-) diff --git a/bin/node/runtime/Cargo.toml b/bin/node/runtime/Cargo.toml index 8a901660ce9..b92e9bc8ae0 100644 --- a/bin/node/runtime/Cargo.toml +++ b/bin/node/runtime/Cargo.toml @@ -35,7 +35,7 @@ sp-version = { version = "2.0.0-alpha.2", default-features = false, path = "../. # frame dependencies frame-executive = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/executive" } -frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/benchmarking" } +frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/benchmarking", optional = true } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/support" } frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/system" } frame-system-rpc-runtime-api = { version = "2.0.0-alpha.2", default-features = false, path = "../../../frame/system/rpc/runtime-api/" } @@ -132,3 +132,4 @@ std = [ "pallet-recovery/std", "pallet-vesting/std", ] +runtime-benchmarks = ["frame-benchmarking"] diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index be5ca25630d..3a7df27466c 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -83,7 +83,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. spec_version: 227, - impl_version: 0, + impl_version: 1, apis: RUNTIME_API_VERSIONS, }; @@ -818,6 +818,7 @@ impl_runtime_apis! { } } + #[cfg(feature = "runtime-benchmarks")] impl frame_benchmarking::Benchmark for Runtime { fn dispatch_benchmark( module: Vec, diff --git a/frame/balances/Cargo.toml b/frame/balances/Cargo.toml index 9d26c5b957e..6bb551c9c6f 100644 --- a/frame/balances/Cargo.toml +++ b/frame/balances/Cargo.toml @@ -14,7 +14,7 @@ codec = { package = "parity-scale-codec", version = "1.2.0", default-features = sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } -frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../benchmarking" } +frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../benchmarking", optional = true } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } @@ -34,3 +34,4 @@ std = [ "frame-support/std", "frame-system/std", ] +runtime-benchmarks = ["frame-benchmarking"] diff --git a/frame/balances/src/lib.rs b/frame/balances/src/lib.rs index 4dbaf4b8a88..b4a1b810df3 100644 --- a/frame/balances/src/lib.rs +++ b/frame/balances/src/lib.rs @@ -155,6 +155,7 @@ mod tests_composite; #[cfg(test)] #[macro_use] mod tests; +#[cfg(feature = "runtime-benchmarks")] mod benchmarking; use sp_std::prelude::*; diff --git a/frame/identity/Cargo.toml b/frame/identity/Cargo.toml index 7ea53f776ed..3dbffedffcd 100644 --- a/frame/identity/Cargo.toml +++ b/frame/identity/Cargo.toml @@ -15,7 +15,7 @@ enumflags2 = { version = "0.6.2" } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } -frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../benchmarking" } +frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../benchmarking", optional = true } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } @@ -35,3 +35,4 @@ std = [ "frame-support/std", "frame-system/std", ] +runtime-benchmarks = ["frame-benchmarking"] diff --git a/frame/identity/src/lib.rs b/frame/identity/src/lib.rs index 68b7905961d..cb2071d5d9e 100644 --- a/frame/identity/src/lib.rs +++ b/frame/identity/src/lib.rs @@ -78,6 +78,7 @@ use frame_support::{ }; use frame_system::{self as system, ensure_signed, ensure_root}; +#[cfg(feature = "runtime-benchmarks")] pub mod benchmarking; type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; diff --git a/frame/system/Cargo.toml b/frame/system/Cargo.toml index 6a418cab8ec..4e350be1a90 100644 --- a/frame/system/Cargo.toml +++ b/frame/system/Cargo.toml @@ -36,6 +36,7 @@ std = [ "sp-runtime/std", "sp-version/std", ] +runtime-benchmarks = [] [[bench]] name = "bench" diff --git a/frame/system/src/lib.rs b/frame/system/src/lib.rs index f89c9efbd29..6cac08117af 100644 --- a/frame/system/src/lib.rs +++ b/frame/system/src/lib.rs @@ -885,7 +885,7 @@ impl Module { /// Set the block number to something in particular. Can be used as an alternative to /// `initialize` for tests that don't need to bother with the other environment entries. - #[cfg(any(feature = "std", test))] + #[cfg(any(feature = "std", feature = "runtime-benchmarks", test))] pub fn set_block_number(n: T::BlockNumber) { >::put(n); } diff --git a/frame/timestamp/Cargo.toml b/frame/timestamp/Cargo.toml index db1d9aaf37a..ff5b72de670 100644 --- a/frame/timestamp/Cargo.toml +++ b/frame/timestamp/Cargo.toml @@ -14,10 +14,10 @@ documentation = "https://docs.rs/pallet-timestamp" serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.2.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/std" } -sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io" } +sp-io = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/io", optional = true } sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/runtime" } sp-inherents = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/inherents" } -frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../benchmarking" } +frame-benchmarking = { version = "2.0.0-alpha.2", default-features = false, path = "../benchmarking", optional = true } frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" } frame-system = { version = "2.0.0-alpha.2", default-features = false, path = "../system" } sp-timestamp = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/timestamp" } @@ -40,3 +40,4 @@ std = [ "frame-system/std", "sp-timestamp/std" ] +runtime-benchmarks = ["frame-benchmarking", "sp-io"] diff --git a/frame/timestamp/src/lib.rs b/frame/timestamp/src/lib.rs index 1c3fec2112a..2a37dfdddb6 100644 --- a/frame/timestamp/src/lib.rs +++ b/frame/timestamp/src/lib.rs @@ -90,6 +90,7 @@ #![cfg_attr(not(feature = "std"), no_std)] +#[cfg(feature = "runtime-benchmarks")] mod benchmarking; use sp_std::{result, cmp}; diff --git a/primitives/api/proc-macro/src/impl_runtime_apis.rs b/primitives/api/proc-macro/src/impl_runtime_apis.rs index 07d7ae40401..e16cf3b5c46 100644 --- a/primitives/api/proc-macro/src/impl_runtime_apis.rs +++ b/primitives/api/proc-macro/src/impl_runtime_apis.rs @@ -27,7 +27,7 @@ use proc_macro2::{Span, TokenStream}; use quote::quote; use syn::{ - spanned::Spanned, parse_macro_input, Ident, Type, ItemImpl, Path, Signature, + spanned::Spanned, parse_macro_input, Ident, Type, ItemImpl, Path, Signature, Attribute, ImplItem, parse::{Parse, ParseStream, Result, Error}, PathArguments, GenericArgument, TypePath, fold::{self, Fold}, parse_quote, }; @@ -141,7 +141,7 @@ fn extract_runtime_block_ident(trait_: &Path) -> Result<&TypePath> { fn generate_impl_calls( impls: &[ItemImpl], input: &Ident -) -> Result> { +) -> Result)>> { let mut impl_calls = Vec::new(); for impl_ in impls { @@ -162,9 +162,12 @@ fn generate_impl_calls( &impl_trait )?; - impl_calls.push( - (impl_trait_ident.clone(), method.sig.ident.clone(), impl_call) - ); + impl_calls.push(( + impl_trait_ident.clone(), + method.sig.ident.clone(), + impl_call, + filter_cfg_attrs(&impl_.attrs), + )); } } } @@ -178,9 +181,12 @@ fn generate_dispatch_function(impls: &[ItemImpl]) -> Result { let c = generate_crate_access(HIDDEN_INCLUDES_ID); let impl_calls = generate_impl_calls(impls, &data)? .into_iter() - .map(|(trait_, fn_name, impl_)| { + .map(|(trait_, fn_name, impl_, attrs)| { let name = prefix_function_with_trait(&trait_, &fn_name); - quote!( #name => Some(#c::Encode::encode(&{ #impl_ })), ) + quote!( + #( #attrs )* + #name => Some(#c::Encode::encode(&{ #impl_ })), + ) }); Ok(quote!( @@ -200,13 +206,14 @@ fn generate_wasm_interface(impls: &[ItemImpl]) -> Result { let c = generate_crate_access(HIDDEN_INCLUDES_ID); let impl_calls = generate_impl_calls(impls, &input)? .into_iter() - .map(|(trait_, fn_name, impl_)| { + .map(|(trait_, fn_name, impl_, attrs)| { let fn_name = Ident::new( &prefix_function_with_trait(&trait_, &fn_name), Span::call_site() ); quote!( + #( #attrs )* #[cfg(not(feature = "std"))] #[no_mangle] pub fn #fn_name(input_data: *mut u8, input_len: usize) -> u64 { @@ -447,6 +454,7 @@ fn generate_api_impl_for_runtime(impls: &[ItemImpl]) -> Result { let trait_ = extend_with_runtime_decl_path(trait_); impl_.trait_.as_mut().unwrap().1 = trait_; + impl_.attrs = filter_cfg_attrs(&impl_.attrs); impls_prepared.push(impl_); } @@ -622,6 +630,8 @@ impl<'a> Fold for ApiRuntimeImplToApiRuntimeApiImpl<'a> { } ); + input.attrs = filter_cfg_attrs(&input.attrs); + // The implementation for the `RuntimeApiImpl` is only required when compiling with // the feature `std` or `test`. input.attrs.push(parse_quote!( #[cfg(any(feature = "std", test))] )); @@ -695,8 +705,12 @@ fn generate_runtime_api_versions(impls: &[ItemImpl]) -> Result { let id: Path = parse_quote!( #path ID ); let version: Path = parse_quote!( #path VERSION ); + let attrs = filter_cfg_attrs(&impl_.attrs); - result.push(quote!( (#id, #version) )); + result.push(quote!( + #( #attrs )* + (#id, #version) + )); } let c = generate_crate_access(HIDDEN_INCLUDES_ID); @@ -745,3 +759,32 @@ fn impl_runtime_apis_impl_inner(api_impls: &[ItemImpl]) -> Result { ) ) } + +// Filters all attributes except the cfg ones. +fn filter_cfg_attrs(attrs: &[Attribute]) -> Vec { + attrs.into_iter().filter(|a| a.path.is_ident("cfg")).cloned().collect() +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn filter_non_cfg_attributes() { + let cfg_std: Attribute = parse_quote!(#[cfg(feature = "std")]); + let cfg_benchmarks: Attribute = parse_quote!(#[cfg(feature = "runtime-benchmarks")]); + + let attrs = vec![ + cfg_std.clone(), + parse_quote!(#[derive(Debug)]), + parse_quote!(#[test]), + cfg_benchmarks.clone(), + parse_quote!(#[allow(non_camel_case_types)]), + ]; + + let filtered = filter_cfg_attrs(&attrs); + assert_eq!(filtered.len(), 2); + assert_eq!(cfg_std, filtered[0]); + assert_eq!(cfg_benchmarks, filtered[1]); + } +} -- GitLab From 1d3d688e37018f6c5da93b0aa36f75136aaccdef Mon Sep 17 00:00:00 2001 From: Arkadiy Paronyan Date: Thu, 5 Mar 2020 10:55:05 +0100 Subject: [PATCH 086/106] Revert "Don't include `:code` by default in storage proofs (#5060)" (#5136) This reverts commit a193a19d57c894ddec17b95dc8f2b8f379be0d11. --- Cargo.lock | 4 - bin/node/executor/benches/bench.rs | 16 +-- bin/node/executor/tests/common.rs | 5 +- .../basic-authorship/src/basic_authorship.rs | 3 +- client/block-builder/Cargo.toml | 4 - client/block-builder/src/lib.rs | 54 +-------- client/executor/src/lib.rs | 8 +- client/executor/src/native_executor.rs | 16 +-- client/executor/src/wasm_runtime.rs | 41 ++++--- client/network/src/chain.rs | 22 ++-- .../src/protocol/light_client_handler.rs | 19 ++- client/network/src/protocol/light_dispatch.rs | 6 +- client/src/call_executor.rs | 11 +- client/src/client.rs | 16 +-- client/src/genesis.rs | 14 --- client/src/light/backend.rs | 4 +- client/src/light/call_executor.rs | 12 +- client/src/light/fetcher.rs | 11 +- frame/system/benches/bench.rs | 2 +- primitives/api/test/Cargo.toml | 1 - primitives/api/test/tests/runtime_calls.rs | 7 -- primitives/core/src/traits.rs | 65 ----------- primitives/runtime/src/generic/block.rs | 11 +- primitives/state-machine/src/backend.rs | 23 +--- primitives/state-machine/src/lib.rs | 64 ++-------- .../state-machine/src/proving_backend.rs | 100 +++++++++++++++- primitives/trie/src/lib.rs | 2 - primitives/trie/src/storage_proof.rs | 109 ------------------ test-utils/runtime/src/system.rs | 8 +- utils/frame/benchmarking-cli/Cargo.toml | 1 - utils/frame/benchmarking-cli/src/lib.rs | 1 - 31 files changed, 182 insertions(+), 478 deletions(-) delete mode 100644 primitives/trie/src/storage_proof.rs diff --git a/Cargo.lock b/Cargo.lock index 79872ffc6e7..ca3ba91b84f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1478,7 +1478,6 @@ dependencies = [ "sc-executor", "sc-service", "sp-runtime", - "sp-state-machine", "structopt", ] @@ -5653,8 +5652,6 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-trie", - "substrate-test-runtime-client", ] [[package]] @@ -6959,7 +6956,6 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core", "sp-runtime", "sp-state-machine", "sp-version", diff --git a/bin/node/executor/benches/bench.rs b/bin/node/executor/benches/bench.rs index faebdd302a8..98aa75edfcb 100644 --- a/bin/node/executor/benches/bench.rs +++ b/bin/node/executor/benches/bench.rs @@ -25,8 +25,8 @@ use node_runtime::constants::currency::*; use node_testing::keyring::*; use sp_core::{NativeOrEncoded, NeverNativeValue}; use sp_core::storage::well_known_keys; -use sp_core::traits::{CodeExecutor, RuntimeCode}; -use frame_support::Hashable; +use sp_core::traits::CodeExecutor; +use frame_support::Hashable; use sp_state_machine::TestExternalities as CoreTestExternalities; use sc_executor::{NativeExecutor, RuntimeInfo, WasmExecutionMethod, Externalities}; use sp_runtime::traits::BlakeTwo256; @@ -90,12 +90,9 @@ fn construct_block( digest: Default::default(), }; - let runtime_code = RuntimeCode::from_externalities(ext).expect("`ext` provides `:code`"); - // execute the block to get the real header. executor.call::<_, NeverNativeValue, fn() -> _>( ext, - &runtime_code, "Core_initialize_block", &header.encode(), true, @@ -105,7 +102,6 @@ fn construct_block( for i in extrinsics.iter() { executor.call::<_, NeverNativeValue, fn() -> _>( ext, - &runtime_code, "BlockBuilder_apply_extrinsic", &i.encode(), true, @@ -115,7 +111,6 @@ fn construct_block( let header = match executor.call::<_, NeverNativeValue, fn() -> _>( ext, - &runtime_code, "BlockBuilder_finalize_block", &[0u8;0], true, @@ -171,9 +166,7 @@ fn bench_execute_block(c: &mut Criterion) { // Get the runtime version to initialize the runtimes cache. { let mut test_ext = new_test_ext(&genesis_config); - let runtime_code = RuntimeCode::from_externalities(&test_ext.ext()) - .expect("`test_ext` provides `:code`"); - executor.runtime_version(&mut test_ext.ext(), &runtime_code).unwrap(); + executor.runtime_version(&mut test_ext.ext()); } let blocks = test_blocks(&genesis_config, &executor); @@ -181,12 +174,9 @@ fn bench_execute_block(c: &mut Criterion) { b.iter_batched_ref( || new_test_ext(&genesis_config), |test_ext| { - let runtime_code = RuntimeCode::from_externalities(&test_ext.ext()) - .expect("`test_ext` provides `:code`"); for block in blocks.iter() { executor.call::<_, NeverNativeValue, fn() -> _>( &mut test_ext.ext(), - &runtime_code, "Core_execute_block", &block.0, use_native, diff --git a/bin/node/executor/tests/common.rs b/bin/node/executor/tests/common.rs index 25ada87a971..a39acbb42b7 100644 --- a/bin/node/executor/tests/common.rs +++ b/bin/node/executor/tests/common.rs @@ -17,7 +17,7 @@ use codec::{Encode, Decode}; use frame_support::Hashable; use sp_state_machine::TestExternalities as CoreTestExternalities; -use sp_core::{NeverNativeValue, NativeOrEncoded, traits::{CodeExecutor, RuntimeCode}}; +use sp_core::{NeverNativeValue, NativeOrEncoded, traits::CodeExecutor}; use sp_runtime::{ApplyExtrinsicResult, traits::{Header as HeaderT, BlakeTwo256}}; use sc_executor::{NativeExecutor, WasmExecutionMethod}; use sc_executor::error::Result; @@ -71,11 +71,8 @@ pub fn executor_call< native_call: Option, ) -> (Result>, bool) { let mut t = t.ext(); - let runtime_code = RuntimeCode::from_externalities(&t) - .expect("Code should be part of the externalities"); executor().call::<_, R, NC>( &mut t, - &runtime_code, method, data, use_native, diff --git a/client/basic-authorship/src/basic_authorship.rs b/client/basic-authorship/src/basic_authorship.rs index a816a5498f8..231d0255919 100644 --- a/client/basic-authorship/src/basic_authorship.rs +++ b/client/basic-authorship/src/basic_authorship.rs @@ -231,8 +231,7 @@ impl ProposerInner debug!("[{:?}] Pushed to the block.", pending_tx_hash); } Err(sp_blockchain::Error::ApplyExtrinsicFailed(sp_blockchain::ApplyExtrinsicFailed::Validity(e))) - if e.exhausted_resources() => - { + if e.exhausted_resources() => { if is_first { debug!("[{:?}] Invalid transaction: FullBlock on empty block", pending_tx_hash); unqueue_invalid.push(pending_tx_hash); diff --git a/client/block-builder/Cargo.toml b/client/block-builder/Cargo.toml index dd4ebcb07f8..745669c033e 100644 --- a/client/block-builder/Cargo.toml +++ b/client/block-builder/Cargo.toml @@ -19,7 +19,3 @@ sp-core = { version = "2.0.0-alpha.2", path = "../../primitives/core" } sp-block-builder = { version = "2.0.0-alpha.2", path = "../../primitives/block-builder" } sc-client-api = { version = "2.0.0-alpha.2", path = "../api" } codec = { package = "parity-scale-codec", version = "1.2.0", features = ["derive"] } - -[dev-dependencies] -substrate-test-runtime-client = { path = "../../test-utils/runtime/client" } -sp-trie = { version = "2.0.0-alpha.2", path = "../../primitives/trie" } diff --git a/client/block-builder/src/lib.rs b/client/block-builder/src/lib.rs index 82c7c91159b..9695fddf869 100644 --- a/client/block-builder/src/lib.rs +++ b/client/block-builder/src/lib.rs @@ -150,20 +150,12 @@ where /// Push onto the block's list of extrinsics. /// - /// This will treat incoming extrinsic `xt` as trusted and skip signature check - /// (for signed transactions). - pub fn push_trusted( - &mut self, - xt: ::Extrinsic, - ) -> Result<(), ApiErrorFor> { + /// This will treat incoming extrinsic `xt` as trusted and skip signature check (for signed transactions). + pub fn push_trusted(&mut self, xt: ::Extrinsic) -> Result<(), ApiErrorFor> { self.push_internal(xt, true) } - fn push_internal( - &mut self, - xt: ::Extrinsic, - skip_signature: bool, - ) -> Result<(), ApiErrorFor> { + fn push_internal(&mut self, xt: ::Extrinsic, skip_signature: bool) -> Result<(), ApiErrorFor> { let block_id = &self.block_id; let extrinsics = &mut self.extrinsics; @@ -181,7 +173,7 @@ where ExecutionContext::BlockConstruction, xt.clone(), )? - } else { + } else { api.apply_extrinsic_with_context( block_id, ExecutionContext::BlockConstruction, @@ -247,41 +239,3 @@ where }) } } - -#[cfg(test)] -mod tests { - use super::*; - use sp_blockchain::HeaderBackend; - use sp_core::Blake2Hasher; - use sp_state_machine::Backend; - use substrate_test_runtime_client::{DefaultTestClientBuilderExt, TestClientBuilderExt}; - - #[test] - fn block_building_storage_proof_does_not_include_runtime_by_default() { - let builder = substrate_test_runtime_client::TestClientBuilder::new(); - let backend = builder.backend(); - let client = builder.build(); - - let block = BlockBuilder::new( - &client, - client.info().best_hash, - client.info().best_number, - RecordProof::Yes, - Default::default(), - &*backend, - ).unwrap().build().unwrap(); - - let proof = block.proof.expect("Proof is build on request"); - - let backend = sp_state_machine::create_proof_check_backend::( - block.storage_changes.transaction_storage_root, - proof, - ).unwrap(); - - assert!( - backend.storage(&sp_core::storage::well_known_keys::CODE) - .unwrap_err() - .contains("Database missing expected key"), - ); - } -} diff --git a/client/executor/src/lib.rs b/client/executor/src/lib.rs index f8761caa983..af53ed91838 100644 --- a/client/executor/src/lib.rs +++ b/client/executor/src/lib.rs @@ -110,12 +110,8 @@ pub trait RuntimeInfo { /// Native runtime information. fn native_version(&self) -> &NativeVersion; - /// Extract [`RuntimeVersion`](sp_version::RuntimeVersion) of the given `runtime_code`. - fn runtime_version( - &self, - ext: &mut E, - runtime_code: &sp_core::traits::RuntimeCode, - ) -> error::Result; + /// Extract RuntimeVersion of given :code block + fn runtime_version (&self, ext: &mut E) -> error::Result; } #[cfg(test)] diff --git a/client/executor/src/native_executor.rs b/client/executor/src/native_executor.rs index 5a41b659717..1364b753dbe 100644 --- a/client/executor/src/native_executor.rs +++ b/client/executor/src/native_executor.rs @@ -20,7 +20,7 @@ use crate::{ }; use sp_version::{NativeVersion, RuntimeVersion}; use codec::{Decode, Encode}; -use sp_core::{NativeOrEncoded, traits::{CodeExecutor, Externalities, RuntimeCode}}; +use sp_core::{NativeOrEncoded, traits::{CodeExecutor, Externalities}}; use log::trace; use std::{result, cell::RefCell, panic::{UnwindSafe, AssertUnwindSafe}, sync::Arc}; use sp_wasm_interface::{HostFunctions, Function}; @@ -130,7 +130,6 @@ impl NativeExecutor { fn with_runtime( &self, ext: &mut E, - runtime_code: &RuntimeCode, f: impl for<'a> FnOnce( AssertUnwindSafe<&'a mut (dyn WasmRuntime + 'static)>, &'a RuntimeVersion, @@ -139,9 +138,8 @@ impl NativeExecutor { ) -> Result where E: Externalities { RUNTIMES_CACHE.with(|cache| { let mut cache = cache.borrow_mut(); - let (runtime, version) = cache.fetch_runtime( + let (runtime, version, code_hash) = cache.fetch_runtime( ext, - runtime_code, self.fallback_method, self.default_heap_pages, &*self.host_functions, @@ -153,7 +151,7 @@ impl NativeExecutor { match f(runtime, version, ext) { Ok(res) => res, Err(e) => { - cache.invalidate_runtime(self.fallback_method, runtime_code.hash.clone()); + cache.invalidate_runtime(self.fallback_method, code_hash); Err(e) } } @@ -181,9 +179,8 @@ impl RuntimeInfo for NativeExecutor { fn runtime_version( &self, ext: &mut E, - runtime_code: &RuntimeCode, ) -> Result { - self.with_runtime(ext, runtime_code, |_runtime, version, _ext| Ok(Ok(version.clone()))) + self.with_runtime(ext, |_runtime, version, _ext| Ok(Ok(version.clone()))) } } @@ -198,14 +195,13 @@ impl CodeExecutor for NativeExecutor { >( &self, ext: &mut E, - runtime_code: &RuntimeCode, method: &str, data: &[u8], use_native: bool, native_call: Option, - ) -> (Result>, bool) { + ) -> (Result>, bool){ let mut used_native = false; - let result = self.with_runtime(ext, runtime_code, |mut runtime, onchain_version, mut ext| { + let result = self.with_runtime(ext, |mut runtime, onchain_version, mut ext| { match ( use_native, onchain_version.can_call_with(&self.native_version.runtime_version), diff --git a/client/executor/src/wasm_runtime.rs b/client/executor/src/wasm_runtime.rs index ab7b219dbf8..9d54246ee07 100644 --- a/client/executor/src/wasm_runtime.rs +++ b/client/executor/src/wasm_runtime.rs @@ -22,7 +22,7 @@ use crate::error::{Error, WasmError}; use log::{trace, warn}; use codec::Decode; -use sp_core::traits::{Externalities, RuntimeCode}; +use sp_core::{storage::well_known_keys, traits::Externalities}; use sp_version::RuntimeVersion; use std::{collections::hash_map::{Entry, HashMap}, panic::AssertUnwindSafe}; use sc_executor_common::wasm_runtime::WasmRuntime; @@ -86,9 +86,8 @@ impl RuntimesCache { /// /// # Parameters /// - /// `ext` - Externalities to use for the getting the runtime's version call. - /// - /// `runtime_code` - The runtime wasm code used setup the runtime. + /// `ext` - Externalities to use for the runtime. This is used for setting + /// up an initial runtime instance. /// /// `default_heap_pages` - Number of 64KB pages to allocate for Wasm execution. /// @@ -96,8 +95,8 @@ impl RuntimesCache { /// /// # Return value /// - /// If no error occurred a tuple `(&mut WasmRuntime, RuntimeVerion)` is - /// returned. + /// If no error occurred a tuple `(&mut WasmRuntime, H256)` is + /// returned. `H256` is the hash of the runtime code. /// /// In case of failure one of two errors can be returned: /// @@ -108,14 +107,20 @@ impl RuntimesCache { pub fn fetch_runtime( &mut self, ext: &mut E, - runtime_code: &RuntimeCode, wasm_method: WasmExecutionMethod, default_heap_pages: u64, host_functions: &[&'static dyn Function], - ) -> Result<(&mut (dyn WasmRuntime + 'static), &RuntimeVersion), Error> { - let heap_pages = runtime_code.heap_pages.unwrap_or(default_heap_pages); + ) -> Result<(&mut (dyn WasmRuntime + 'static), &RuntimeVersion, Vec), Error> { + let code_hash = ext + .original_storage_hash(well_known_keys::CODE) + .ok_or(Error::InvalidCode("`CODE` not found in storage.".into()))?; + + let heap_pages = ext + .storage(well_known_keys::HEAP_PAGES) + .and_then(|pages| u64::decode(&mut &pages[..]).ok()) + .unwrap_or(default_heap_pages); - let result = match self.instances.entry((wasm_method, runtime_code.hash.clone())) { + let result = match self.instances.entry((wasm_method, code_hash.clone())) { Entry::Occupied(o) => { let result = o.into_mut(); if let Ok(ref mut cached_runtime) = result { @@ -137,7 +142,6 @@ impl RuntimesCache { *result = create_versioned_wasm_runtime( ext, wasm_method, - runtime_code, heap_pages, host_functions.into(), ); @@ -153,7 +157,6 @@ impl RuntimesCache { let result = create_versioned_wasm_runtime( ext, wasm_method, - runtime_code, heap_pages, host_functions.into(), ); @@ -165,7 +168,7 @@ impl RuntimesCache { }; result.as_mut() - .map(|entry| (entry.runtime.as_mut(), &entry.version)) + .map(|entry| (entry.runtime.as_mut(), &entry.version, code_hash)) .map_err(|ref e| Error::InvalidCode(format!("{:?}", e))) } @@ -206,17 +209,13 @@ pub fn create_wasm_runtime_with_code( fn create_versioned_wasm_runtime( ext: &mut E, wasm_method: WasmExecutionMethod, - runtime_code: &RuntimeCode, heap_pages: u64, host_functions: Vec<&'static dyn Function>, ) -> Result { - let mut runtime = create_wasm_runtime_with_code( - wasm_method, - heap_pages, - &runtime_code.code, - host_functions, - false, - )?; + let code = ext + .original_storage(well_known_keys::CODE) + .ok_or(WasmError::CodeNotFound)?; + let mut runtime = create_wasm_runtime_with_code(wasm_method, heap_pages, &code, host_functions, false)?; // Call to determine runtime version. let version_result = { diff --git a/client/network/src/chain.rs b/client/network/src/chain.rs index e85b5af79b9..b991a0e6520 100644 --- a/client/network/src/chain.rs +++ b/client/network/src/chain.rs @@ -62,12 +62,7 @@ pub trait Client: Send + Sync { ) -> Result; /// Get method execution proof. - fn execution_proof( - &self, - block: &Block::Hash, - method: &str, - data: &[u8], - ) -> Result<(Vec, StorageProof), Error>; + fn execution_proof(&self, block: &Block::Hash, method: &str, data: &[u8]) -> Result<(Vec, StorageProof), Error>; /// Get key changes proof. fn key_changes_proof( @@ -157,7 +152,11 @@ impl Client for SubstrateClient where method: &str, data: &[u8], ) -> Result<(Vec, StorageProof), Error> { - SubstrateClient::execution_proof(self, &BlockId::Hash(block.clone()), method, data) + (self as &SubstrateClient).execution_proof( + &BlockId::Hash(block.clone()), + method, + data, + ) } fn key_changes_proof( @@ -169,14 +168,7 @@ impl Client for SubstrateClient where storage_key: Option<&StorageKey>, key: &StorageKey, ) -> Result, Error> { - (self as &SubstrateClient).key_changes_proof( - first, - last, - min, - max, - storage_key, - key, - ) + (self as &SubstrateClient).key_changes_proof(first, last, min, max, storage_key, key) } fn is_descendent_of(&self, base: &Block::Hash, block: &Block::Hash) -> Result { diff --git a/client/network/src/protocol/light_client_handler.rs b/client/network/src/protocol/light_client_handler.rs index e4996b7c8b5..b531f3515a6 100644 --- a/client/network/src/protocol/light_client_handler.rs +++ b/client/network/src/protocol/light_client_handler.rs @@ -254,12 +254,13 @@ where B: Block, { /// Construct a new light client handler. - pub fn new( - cfg: Config, - chain: Arc>, - checker: Arc>, - peerset: sc_peerset::PeersetHandle, - ) -> Self { + pub fn new + ( cfg: Config + , chain: Arc> + , checker: Arc> + , peerset: sc_peerset::PeersetHandle + ) -> Self + { LightClientHandler { config: cfg, chain, @@ -424,8 +425,7 @@ where log::trace!("remote call request from {} ({} at {:?})", peer, request.method, - request.block, - ); + request.block); let block = Decode::decode(&mut request.block.as_ref())?; @@ -436,8 +436,7 @@ where peer, request.method, request.block, - e, - ); + e); StorageProof::empty() } }; diff --git a/client/network/src/protocol/light_dispatch.rs b/client/network/src/protocol/light_dispatch.rs index f3da2c2a96c..aff220b6e03 100644 --- a/client/network/src/protocol/light_dispatch.rs +++ b/client/network/src/protocol/light_dispatch.rs @@ -750,11 +750,7 @@ pub mod tests { } } - fn check_execution_proof( - &self, - _: &RemoteCallRequest, - _: StorageProof, - ) -> ClientResult> { + fn check_execution_proof(&self, _: &RemoteCallRequest, _: StorageProof) -> ClientResult> { match self.ok { true => Ok(vec![42]), false => Err(ClientError::Backend("Test error".into())), diff --git a/client/src/call_executor.rs b/client/src/call_executor.rs index db95309458f..1fdbfe981a4 100644 --- a/client/src/call_executor.rs +++ b/client/src/call_executor.rs @@ -25,7 +25,7 @@ use sp_state_machine::{ }; use sc_executor::{RuntimeVersion, RuntimeInfo, NativeVersion}; use sp_externalities::Extensions; -use sp_core::{NativeOrEncoded, NeverNativeValue, traits::{CodeExecutor, RuntimeCode}}; +use sp_core::{NativeOrEncoded, NeverNativeValue, traits::CodeExecutor}; use sp_api::{ProofRecorder, InitializeBlock, StorageTransactionCache}; use sc_client_api::{backend, call_executor::CallExecutor}; @@ -90,7 +90,6 @@ where method, call_data, extensions.unwrap_or_default(), - &sp_state_machine::backend::get_runtime_code(&state)?, ).execute_using_consensus_failure_handler::<_, NeverNativeValue, fn() -> _>( strategy.get_manager(), None, @@ -141,8 +140,6 @@ where // make sure to destroy state before exiting this function let mut state = self.backend.state_at(*at)?; - let runtime_code = sp_state_machine::backend::get_runtime_code(&state)?; - let result = match recorder { Some(recorder) => state.as_trie_backend() .ok_or_else(|| @@ -163,7 +160,6 @@ where method, call_data, extensions.unwrap_or_default(), - &runtime_code, ) // TODO: https://github.com/paritytech/substrate/issues/4455 // .with_storage_transaction_cache(storage_transaction_cache.as_mut().map(|c| &mut **c)) @@ -177,7 +173,6 @@ where method, call_data, extensions.unwrap_or_default(), - &runtime_code, ) .with_storage_transaction_cache(storage_transaction_cache.as_mut().map(|c| &mut **c)) .execute_using_consensus_failure_handler(execution_manager, native_call) @@ -202,8 +197,7 @@ where changes_trie_state, None, ); - let wasm_code = RuntimeCode::from_externalities(&ext).map_err(|e| e.to_string().into()); - let version = wasm_code.and_then(|c| self.executor.runtime_version(&mut ext, &c)); + let version = self.executor.runtime_version(&mut ext); { let _lock = self.backend.get_import_lock().read(); self.backend.destroy_state(state)?; @@ -224,7 +218,6 @@ where &self.executor, method, call_data, - &sp_state_machine::backend::get_runtime_code(trie_state)?, ) .map_err(Into::into) } diff --git a/client/src/client.rs b/client/src/client.rs index 5a0093308e6..adb3598b785 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -41,7 +41,8 @@ use sp_runtime::{ use sp_state_machine::{ DBValue, Backend as StateBackend, ChangesTrieAnchorBlockId, prove_read, prove_child_read, ChangesTrieRootsStorage, ChangesTrieStorage, - ChangesTrieConfigurationRange, key_changes, key_changes_proof, + ChangesTrieConfigurationRange, key_changes, key_changes_proof, StorageProof, + merge_storage_proofs, }; use sc_executor::{RuntimeVersion, RuntimeInfo}; use sp_consensus::{ @@ -54,7 +55,6 @@ use sp_blockchain::{self as blockchain, well_known_cache_keys::Id as CacheKeyId, HeaderMetadata, CachedHeaderMetadata, }; -use sp_trie::StorageProof; use sp_api::{ CallApiAt, ConstructRuntimeApi, Core as CoreApi, ApiExt, ApiRef, ProvideRuntimeApi, @@ -482,19 +482,9 @@ impl Client where method: &str, call_data: &[u8] ) -> sp_blockchain::Result<(Vec, StorageProof)> { - // Make sure we include the `:code` and `:heap_pages` in the execution proof to be - // backwards compatible. - // - // TODO: Remove when solved: https://github.com/paritytech/substrate/issues/5047 - let code_proof = self.read_proof( - id, - &[well_known_keys::CODE.to_vec(), well_known_keys::HEAP_PAGES.to_vec()], - )?; - let state = self.state_at(id)?; let header = self.prepare_environment_block(id)?; prove_execution(state, header, &self.executor, method, call_data) - .map(|p| (p.0, StorageProof::merge(vec![p.1, code_proof]))) } /// Reads given header and generates CHT-based header proof. @@ -779,7 +769,7 @@ impl Client where Ok(()) }, ())?; - Ok(StorageProof::merge(proofs)) + Ok(merge_storage_proofs(proofs)) } /// Generates CHT-based proof for roots of changes tries at given blocks (that are part of single CHT). diff --git a/client/src/genesis.rs b/client/src/genesis.rs index c3ca82292dc..0eecc6cdae8 100644 --- a/client/src/genesis.rs +++ b/client/src/genesis.rs @@ -89,8 +89,6 @@ mod tests { }; let hash = header.hash(); let mut overlay = OverlayedChanges::default(); - let runtime_code = sp_state_machine::backend::get_runtime_code(&backend) - .expect("Code is part of the backend"); StateMachine::new( backend, @@ -100,7 +98,6 @@ mod tests { "Core_initialize_block", &header.encode(), Default::default(), - &runtime_code, ).execute( ExecutionStrategy::NativeElseWasm, ).unwrap(); @@ -114,7 +111,6 @@ mod tests { "BlockBuilder_apply_extrinsic", &tx.encode(), Default::default(), - &runtime_code, ).execute( ExecutionStrategy::NativeElseWasm, ).unwrap(); @@ -128,7 +124,6 @@ mod tests { "BlockBuilder_finalize_block", &[], Default::default(), - &runtime_code, ).execute( ExecutionStrategy::NativeElseWasm, ).unwrap(); @@ -166,8 +161,6 @@ mod tests { let backend = InMemoryBackend::from(storage); let (b1data, _b1hash) = block1(genesis_hash, &backend); - let runtime_code = sp_state_machine::backend::get_runtime_code(&backend) - .expect("Code is part of the backend"); let mut overlay = OverlayedChanges::default(); let _ = StateMachine::new( @@ -178,7 +171,6 @@ mod tests { "Core_execute_block", &b1data, Default::default(), - &runtime_code, ).execute( ExecutionStrategy::NativeElseWasm, ).unwrap(); @@ -197,8 +189,6 @@ mod tests { let backend = InMemoryBackend::from(storage); let (b1data, _b1hash) = block1(genesis_hash, &backend); - let runtime_code = sp_state_machine::backend::get_runtime_code(&backend) - .expect("Code is part of the backend"); let mut overlay = OverlayedChanges::default(); let _ = StateMachine::new( @@ -209,7 +199,6 @@ mod tests { "Core_execute_block", &b1data, Default::default(), - &runtime_code, ).execute( ExecutionStrategy::AlwaysWasm, ).unwrap(); @@ -228,8 +217,6 @@ mod tests { let backend = InMemoryBackend::from(storage); let (b1data, _b1hash) = block1(genesis_hash, &backend); - let runtime_code = sp_state_machine::backend::get_runtime_code(&backend) - .expect("Code is part of the backend"); let mut overlay = OverlayedChanges::default(); let r = StateMachine::new( @@ -240,7 +227,6 @@ mod tests { "Core_execute_block", &b1data, Default::default(), - &runtime_code, ).execute( ExecutionStrategy::NativeElseWasm, ); diff --git a/client/src/light/backend.rs b/client/src/light/backend.rs index 749e24af046..6b5f9263009 100644 --- a/client/src/light/backend.rs +++ b/client/src/light/backend.rs @@ -172,9 +172,9 @@ impl ClientBackend for Backend> match maybe_val { Some(val) => self.blockchain.storage().insert_aux( &[(&key[..], &val[..])], - std::iter::empty(), + ::std::iter::empty(), )?, - None => self.blockchain.storage().insert_aux(std::iter::empty(), &[&key[..]])?, + None => self.blockchain.storage().insert_aux(::std::iter::empty(), &[&key[..]])?, } } } diff --git a/client/src/light/call_executor.rs b/client/src/light/call_executor.rs index 613d88045d8..f8db30194b5 100644 --- a/client/src/light/call_executor.rs +++ b/client/src/light/call_executor.rs @@ -29,6 +29,7 @@ use sp_externalities::Extensions; use sp_state_machine::{ self, Backend as StateBackend, OverlayedChanges, ExecutionStrategy, create_proof_check_backend, execution_proof_check_on_trie_backend, ExecutionManager, StorageProof, + merge_storage_proofs, }; use hash_db::Hasher; @@ -205,7 +206,7 @@ pub fn prove_execution( method, call_data, )?; - let total_proof = StorageProof::merge(vec![init_proof, exec_proof]); + let total_proof = merge_storage_proofs(vec![init_proof, exec_proof]); Ok((result, total_proof)) } @@ -258,17 +259,12 @@ fn check_execution_proof_with_make_header( &trie_backend, &mut changes, executor, "Core_initialize_block", &next_header.encode(), - &runtime_code, )?; // execute method @@ -278,9 +274,7 @@ fn check_execution_proof_with_make_header> LightDataChecker { H::Out: Ord + codec::Codec, { // all the checks are sharing the same storage - let storage = remote_roots_proof.into_memory_db(); + let storage = create_proof_check_backend_storage(remote_roots_proof); // remote_roots.keys() are sorted => we can use this to group changes tries roots // that are belongs to the same CHT @@ -187,8 +187,7 @@ impl> LightDataChecker { local_cht_root, block, remote_changes_trie_root, - &proving_backend, - )?; + &proving_backend)?; // and return the storage to use in following checks storage = proving_backend.into_storage(); @@ -271,7 +270,7 @@ impl FetchChecker for LightDataChecker body: Vec ) -> ClientResult> { // TODO: #2621 - let extrinsics_root = HashFor::::ordered_trie_root( + let extrinsics_root = HashFor::::ordered_trie_root( body.iter().map(Encode::encode).collect(), ); if *request.header.extrinsics_root() == extrinsics_root { @@ -295,7 +294,7 @@ struct RootsStorage<'a, Number: AtLeast32Bit, Hash: 'a> { impl<'a, H, Number, Hash> ChangesTrieRootsStorage for RootsStorage<'a, Number, Hash> where H: Hasher, - Number: std::fmt::Display + std::hash::Hash + Clone + AtLeast32Bit + Encode + Decode + Send + Sync + 'static, + Number: ::std::fmt::Display + ::std::hash::Hash + Clone + AtLeast32Bit + Encode + Decode + Send + Sync + 'static, Hash: 'a + Send + Sync + Clone + AsRef<[u8]>, { fn build_anchor( diff --git a/frame/system/benches/bench.rs b/frame/system/benches/bench.rs index 90a4ad1d34d..cfcaa6f64ac 100644 --- a/frame/system/benches/bench.rs +++ b/frame/system/benches/bench.rs @@ -18,7 +18,7 @@ use criterion::{Criterion, criterion_group, criterion_main, black_box}; use frame_system as system; use frame_support::{decl_module, decl_event, impl_outer_origin, impl_outer_event, weights::Weight}; use sp_core::H256; -use sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header}; +use sp_runtime::{Perbill, PerThing, traits::{BlakeTwo256, IdentityLookup}, testing::Header}; mod module { use super::*; diff --git a/primitives/api/test/Cargo.toml b/primitives/api/test/Cargo.toml index 3b41e28cf3b..6d2207c178a 100644 --- a/primitives/api/test/Cargo.toml +++ b/primitives/api/test/Cargo.toml @@ -24,7 +24,6 @@ rustversion = "1.0.0" [dev-dependencies] criterion = "0.3.0" substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" } -sp-core = { version = "2.0.0-alpha.1", path = "../../core" } [[bench]] name = "bench" diff --git a/primitives/api/test/tests/runtime_calls.rs b/primitives/api/test/tests/runtime_calls.rs index 9088f182658..18beaad9170 100644 --- a/primitives/api/test/tests/runtime_calls.rs +++ b/primitives/api/test/tests/runtime_calls.rs @@ -164,12 +164,6 @@ fn record_proof_works() { let block_id = BlockId::Number(client.chain_info().best_number); let storage_root = longest_chain.best_chain().unwrap().state_root().clone(); - let runtime_code = sp_core::traits::RuntimeCode { - code: client.code_at(&block_id).unwrap(), - hash: vec![1], - heap_pages: None, - }; - let transaction = Transfer { amount: 1000, nonce: 0, @@ -198,6 +192,5 @@ fn record_proof_works() { &executor, "Core_execute_block", &block.encode(), - &runtime_code, ).expect("Executes block while using the proof backend"); } diff --git a/primitives/core/src/traits.rs b/primitives/core/src/traits.rs index 297430cfa63..bd02d39fb55 100644 --- a/primitives/core/src/traits.rs +++ b/primitives/core/src/traits.rs @@ -98,7 +98,6 @@ pub trait CodeExecutor: Sized + Send + Sync + CallInWasm + Clone + 'static { >( &self, ext: &mut E, - runtime_code: &RuntimeCode, method: &str, data: &[u8], use_native: bool, @@ -106,70 +105,6 @@ pub trait CodeExecutor: Sized + Send + Sync + CallInWasm + Clone + 'static { ) -> (Result, Self::Error>, bool); } - -/// The Wasm code of a Substrate runtime. -#[derive(Debug, Clone, codec::Encode, codec::Decode)] -pub struct RuntimeCode { - /// The actual Wasm code as binary blob. - pub code: Vec, - /// The optional heap pages this `code` should be executed with. - /// - /// If `None` are given, the default value of the executor will be used. - pub heap_pages: Option, - /// The SCALE encoded hash of `code`. - /// - /// The hashing algorithm isn't that important, as long as all runtime - /// code instances use the same. - pub hash: Vec, -} - -impl PartialEq for RuntimeCode { - fn eq(&self, other: &Self) -> bool { - self.hash == other.hash - } -} - -impl RuntimeCode { - /// Create an `RuntimeCode` instance from the given `Externalities`. - /// - /// Extracts the code and the heap pages using the well known keys. - /// - /// Returns an error if the code could not be found. - pub fn from_externalities(ext: &dyn Externalities) -> Result { - let code = ext.storage(sp_storage::well_known_keys::CODE).ok_or(CodeNotFound)?; - let hash = ext.storage_hash(sp_storage::well_known_keys::CODE).ok_or(CodeNotFound)?; - let heap_pages = ext.storage(sp_storage::well_known_keys::HEAP_PAGES) - .and_then(|hp| codec::Decode::decode(&mut &hp[..]).ok()); - - Ok(Self { - code, - hash, - heap_pages, - }) - } - - /// Create an empty instance. - /// - /// This is only useful for tests that don't want to execute any code. - pub fn empty() -> Self { - Self { - code: Vec::new(), - hash: Vec::new(), - heap_pages: None, - } - } -} - -/// Could not find the `:code` in the externalities while initializing the [`RuntimeCode`]. -#[derive(Debug)] -pub struct CodeNotFound; - -impl std::fmt::Display for CodeNotFound { - fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { - write!(f, "the storage entry `:code` doesn't have any code") - } -} - /// Something that can call a method in a WASM blob. pub trait CallInWasm: Send + Sync { /// Call the given `method` in the given `wasm_blob` using `call_data` (SCALE encoded arguments) diff --git a/primitives/runtime/src/generic/block.rs b/primitives/runtime/src/generic/block.rs index fb07d6c215d..a46396dce08 100644 --- a/primitives/runtime/src/generic/block.rs +++ b/primitives/runtime/src/generic/block.rs @@ -25,10 +25,7 @@ use serde::{Deserialize, Serialize}; use sp_std::prelude::*; use sp_core::RuntimeDebug; use crate::codec::{Codec, Encode, Decode}; -use crate::traits::{ - self, Member, Block as BlockT, Header as HeaderT, MaybeSerialize, MaybeMallocSizeOf, - NumberFor, -}; +use crate::traits::{self, Member, Block as BlockT, Header as HeaderT, MaybeSerialize, MaybeMallocSizeOf}; use crate::Justification; /// Something to identify a block. @@ -38,9 +35,9 @@ use crate::Justification; #[cfg_attr(feature = "std", serde(deny_unknown_fields))] pub enum BlockId { /// Identify by block header hash. - Hash(Block::Hash), + Hash(<::Header as HeaderT>::Hash), /// Identify by block number. - Number(NumberFor), + Number(<::Header as HeaderT>::Number), } impl BlockId { @@ -50,7 +47,7 @@ impl BlockId { } /// Create a block ID from a number. - pub fn number(number: NumberFor) -> Self { + pub fn number(number: ::Number) -> Self { BlockId::Number(number) } } diff --git a/primitives/state-machine/src/backend.rs b/primitives/state-machine/src/backend.rs index 9db41718ee0..ca6612a5e92 100644 --- a/primitives/state-machine/src/backend.rs +++ b/primitives/state-machine/src/backend.rs @@ -18,9 +18,9 @@ use log::warn; use hash_db::Hasher; -use codec::{Decode, Encode}; +use codec::Encode; -use sp_core::{traits::RuntimeCode, storage::{ChildInfo, OwnedChildInfo, well_known_keys}}; +use sp_core::storage::{ChildInfo, OwnedChildInfo}; use sp_trie::{TrieMut, MemoryDB, trie_types::TrieDBMut}; use crate::{ @@ -359,22 +359,3 @@ pub(crate) fn insert_into_memory_db(mdb: &mut MemoryDB, input: I) -> Op Some(root) } - -/// Get the runtime code from the given `backend`. -/// -/// Returns an error if the `:code` could not be found. -pub fn get_runtime_code>(backend: &B) -> Result - where H::Out: Encode, -{ - let code = backend.storage(well_known_keys::CODE) - .ok() - .flatten() - .ok_or("`:code` not found")?; - let hash = H::hash(&code).encode(); - let heap_pages = backend.storage(well_known_keys::HEAP_PAGES) - .ok() - .flatten() - .and_then(|d| Decode::decode(&mut &d[..]).ok()); - - Ok(RuntimeCode { code, hash, heap_pages }) -} diff --git a/primitives/state-machine/src/lib.rs b/primitives/state-machine/src/lib.rs index 31d4f3a8045..ce7fc243c15 100644 --- a/primitives/state-machine/src/lib.rs +++ b/primitives/state-machine/src/lib.rs @@ -23,8 +23,8 @@ use log::{warn, trace}; use hash_db::Hasher; use codec::{Decode, Encode, Codec}; use sp_core::{ - storage::ChildInfo, NativeOrEncoded, NeverNativeValue, hexdisplay::HexDisplay, - traits::{CodeExecutor, CallInWasmExt, RuntimeCode}, + storage::ChildInfo, NativeOrEncoded, NeverNativeValue, + traits::{CodeExecutor, CallInWasmExt}, hexdisplay::HexDisplay, }; use overlayed_changes::OverlayedChangeSet; use sp_externalities::Extensions; @@ -42,7 +42,7 @@ mod trie_backend; mod trie_backend_essence; mod stats; -pub use sp_trie::{trie_types::{Layout, TrieDBMut}, StorageProof, TrieMut, DBValue, MemoryDB}; +pub use sp_trie::{trie_types::{Layout, TrieDBMut}, TrieMut, DBValue, MemoryDB}; pub use testing::TestExternalities; pub use basic::BasicExternalities; pub use ext::Ext; @@ -67,7 +67,8 @@ pub use overlayed_changes::{ StorageCollection, ChildStorageCollection, }; pub use proving_backend::{ - create_proof_check_backend, ProofRecorder, ProvingBackend, ProvingBackendRecorder, + create_proof_check_backend, create_proof_check_backend_storage, merge_storage_proofs, + ProofRecorder, ProvingBackend, ProvingBackendRecorder, StorageProof, }; pub use trie_backend_essence::{TrieBackendStorage, Storage}; pub use trie_backend::TrieBackend; @@ -190,7 +191,6 @@ pub struct StateMachine<'a, B, H, N, Exec> changes_trie_state: Option>, _marker: PhantomData<(H, N)>, storage_transaction_cache: Option<&'a mut StorageTransactionCache>, - runtime_code: &'a RuntimeCode, } impl<'a, B, H, N, Exec> StateMachine<'a, B, H, N, Exec> where @@ -209,7 +209,6 @@ impl<'a, B, H, N, Exec> StateMachine<'a, B, H, N, Exec> where method: &'a str, call_data: &'a [u8], mut extensions: Extensions, - runtime_code: &'a RuntimeCode, ) -> Self { extensions.register(CallInWasmExt::new(exec.clone())); @@ -223,7 +222,6 @@ impl<'a, B, H, N, Exec> StateMachine<'a, B, H, N, Exec> where changes_trie_state, _marker: PhantomData, storage_transaction_cache: None, - runtime_code, } } @@ -294,7 +292,6 @@ impl<'a, B, H, N, Exec> StateMachine<'a, B, H, N, Exec> where let (result, was_native) = self.exec.call( &mut ext, - self.runtime_code, self.method, self.call_data, use_native, @@ -439,7 +436,6 @@ pub fn prove_execution( exec: &Exec, method: &str, call_data: &[u8], - runtime_code: &RuntimeCode, ) -> Result<(Vec, StorageProof), Box> where B: Backend, @@ -450,14 +446,7 @@ where { let trie_backend = backend.as_trie_backend() .ok_or_else(|| Box::new(ExecutionError::UnableToGenerateProof) as Box)?; - prove_execution_on_trie_backend::<_, _, N, _>( - trie_backend, - overlay, - exec, - method, - call_data, - runtime_code, - ) + prove_execution_on_trie_backend::<_, _, N, _>(trie_backend, overlay, exec, method, call_data) } /// Prove execution using the given trie backend, overlayed changes, and call executor. @@ -475,7 +464,6 @@ pub fn prove_execution_on_trie_backend( exec: &Exec, method: &str, call_data: &[u8], - runtime_code: &RuntimeCode, ) -> Result<(Vec, StorageProof), Box> where S: trie_backend_essence::TrieBackendStorage, @@ -486,14 +474,7 @@ where { let proving_backend = proving_backend::ProvingBackend::new(trie_backend); let mut sm = StateMachine::<_, H, N, Exec>::new( - &proving_backend, - None, - overlay, - exec, - method, - call_data, - Extensions::default(), - runtime_code, + &proving_backend, None, overlay, exec, method, call_data, Extensions::default(), ); let result = sm.execute_using_consensus_failure_handler::<_, NeverNativeValue, fn() -> _>( @@ -512,7 +493,6 @@ pub fn execution_proof_check( exec: &Exec, method: &str, call_data: &[u8], - runtime_code: &RuntimeCode, ) -> Result, Box> where H: Hasher, @@ -521,14 +501,7 @@ where N: crate::changes_trie::BlockNumber, { let trie_backend = create_proof_check_backend::(root.into(), proof)?; - execution_proof_check_on_trie_backend::<_, N, _>( - &trie_backend, - overlay, - exec, - method, - call_data, - runtime_code, - ) + execution_proof_check_on_trie_backend::<_, N, _>(&trie_backend, overlay, exec, method, call_data) } /// Check execution proof on proving backend, generated by `prove_execution` call. @@ -538,7 +511,6 @@ pub fn execution_proof_check_on_trie_backend( exec: &Exec, method: &str, call_data: &[u8], - runtime_code: &RuntimeCode, ) -> Result, Box> where H: Hasher, @@ -547,14 +519,7 @@ where N: crate::changes_trie::BlockNumber, { let mut sm = StateMachine::<_, H, N, Exec>::new( - trie_backend, - None, - overlay, - exec, - method, - call_data, - Extensions::default(), - runtime_code, + trie_backend, None, overlay, exec, method, call_data, Extensions::default(), ); sm.execute_using_consensus_failure_handler::<_, NeverNativeValue, fn() -> _>( @@ -727,7 +692,7 @@ mod tests { use super::*; use super::ext::Ext; use super::changes_trie::Configuration as ChangesTrieConfig; - use sp_core::{map, traits::{Externalities, RuntimeCode}, storage::ChildStorageKey}; + use sp_core::{map, traits::Externalities, storage::ChildStorageKey}; use sp_runtime::traits::BlakeTwo256; #[derive(Clone)] @@ -750,7 +715,6 @@ mod tests { >( &self, ext: &mut E, - _: &RuntimeCode, _method: &str, _data: &[u8], use_native: bool, @@ -804,7 +768,6 @@ mod tests { fn execute_works() { let backend = trie_backend::tests::test_trie(); let mut overlayed_changes = Default::default(); - let wasm_code = RuntimeCode::empty(); let mut state_machine = StateMachine::new( &backend, @@ -819,7 +782,6 @@ mod tests { "test", &[], Default::default(), - &wasm_code, ); assert_eq!( @@ -833,7 +795,6 @@ mod tests { fn execute_works_with_native_else_wasm() { let backend = trie_backend::tests::test_trie(); let mut overlayed_changes = Default::default(); - let wasm_code = RuntimeCode::empty(); let mut state_machine = StateMachine::new( &backend, @@ -848,7 +809,6 @@ mod tests { "test", &[], Default::default(), - &wasm_code, ); assert_eq!(state_machine.execute(ExecutionStrategy::NativeElseWasm).unwrap(), vec![66]); @@ -859,7 +819,6 @@ mod tests { let mut consensus_failed = false; let backend = trie_backend::tests::test_trie(); let mut overlayed_changes = Default::default(); - let wasm_code = RuntimeCode::empty(); let mut state_machine = StateMachine::new( &backend, @@ -874,7 +833,6 @@ mod tests { "test", &[], Default::default(), - &wasm_code, ); assert!( @@ -907,7 +865,6 @@ mod tests { &executor, "test", &[], - &RuntimeCode::empty(), ).unwrap(); // check proof locally @@ -918,7 +875,6 @@ mod tests { &executor, "test", &[], - &RuntimeCode::empty(), ).unwrap(); // check that both results are correct diff --git a/primitives/state-machine/src/proving_backend.rs b/primitives/state-machine/src/proving_backend.rs index 119fb59a723..7b6e8e0e698 100644 --- a/primitives/state-machine/src/proving_backend.rs +++ b/primitives/state-machine/src/proving_backend.rs @@ -18,19 +18,19 @@ use std::sync::Arc; use parking_lot::RwLock; -use codec::{Decode, Codec}; +use codec::{Decode, Encode, Codec}; use log::debug; use hash_db::{Hasher, HashDB, EMPTY_PREFIX, Prefix}; use sp_trie::{ MemoryDB, default_child_trie_root, read_trie_value_with, read_child_trie_value_with, - record_all_keys, StorageProof, + record_all_keys }; pub use sp_trie::Recorder; pub use sp_trie::trie_types::{Layout, TrieError}; use crate::trie_backend::TrieBackend; use crate::trie_backend_essence::{Ephemeral, TrieBackendEssence, TrieBackendStorage}; use crate::{Error, ExecutionError, Backend}; -use std::collections::HashMap; +use std::collections::{HashMap, HashSet}; use crate::DBValue; use sp_core::storage::ChildInfo; @@ -40,6 +40,82 @@ pub struct ProvingBackendRecorder<'a, S: 'a + TrieBackendStorage, H: 'a + Has pub(crate) proof_recorder: &'a mut Recorder, } +/// A proof that some set of key-value pairs are included in the storage trie. The proof contains +/// the storage values so that the partial storage backend can be reconstructed by a verifier that +/// does not already have access to the key-value pairs. +/// +/// The proof consists of the set of serialized nodes in the storage trie accessed when looking up +/// the keys covered by the proof. Verifying the proof requires constructing the partial trie from +/// the serialized nodes and performing the key lookups. +#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode)] +pub struct StorageProof { + trie_nodes: Vec>, +} + +impl StorageProof { + /// Constructs a storage proof from a subset of encoded trie nodes in a storage backend. + pub fn new(trie_nodes: Vec>) -> Self { + StorageProof { trie_nodes } + } + + /// Returns a new empty proof. + /// + /// An empty proof is capable of only proving trivial statements (ie. that an empty set of + /// key-value pairs exist in storage). + pub fn empty() -> Self { + StorageProof { + trie_nodes: Vec::new(), + } + } + + /// Returns whether this is an empty proof. + pub fn is_empty(&self) -> bool { + self.trie_nodes.is_empty() + } + + /// Create an iterator over trie nodes constructed from the proof. The nodes are not guaranteed + /// to be traversed in any particular order. + pub fn iter_nodes(self) -> StorageProofNodeIterator { + StorageProofNodeIterator::new(self) + } +} + +/// An iterator over trie nodes constructed from a storage proof. The nodes are not guaranteed to +/// be traversed in any particular order. +pub struct StorageProofNodeIterator { + inner: > as IntoIterator>::IntoIter, +} + +impl StorageProofNodeIterator { + fn new(proof: StorageProof) -> Self { + StorageProofNodeIterator { + inner: proof.trie_nodes.into_iter(), + } + } +} + +impl Iterator for StorageProofNodeIterator { + type Item = Vec; + + fn next(&mut self) -> Option { + self.inner.next() + } +} + +/// Merges multiple storage proofs covering potentially different sets of keys into one proof +/// covering all keys. The merged proof output may be smaller than the aggregate size of the input +/// proofs due to deduplication of trie nodes. +pub fn merge_storage_proofs(proofs: I) -> StorageProof + where I: IntoIterator +{ + let trie_nodes = proofs.into_iter() + .flat_map(|proof| proof.iter_nodes()) + .collect::>() + .into_iter() + .collect(); + StorageProof { trie_nodes } +} + impl<'a, S, H> ProvingBackendRecorder<'a, S, H> where S: TrieBackendStorage, @@ -146,7 +222,7 @@ impl<'a, S: 'a + TrieBackendStorage, H: 'a + Hasher> ProvingBackend<'a, S, H> let root = essence.root().clone(); let recorder = ProofRecorderBackend { backend: essence.backend_storage(), - proof_recorder, + proof_recorder: proof_recorder, }; ProvingBackend(TrieBackend::new(recorder, root)) } @@ -294,7 +370,7 @@ where H: Hasher, H::Out: Codec, { - let db = proof.into_memory_db(); + let db = create_proof_check_backend_storage(proof); if db.contains(&root, EMPTY_PREFIX) { Ok(TrieBackend::new(db, root)) @@ -303,6 +379,20 @@ where } } +/// Create in-memory storage of proof check backend. +pub fn create_proof_check_backend_storage( + proof: StorageProof, +) -> MemoryDB +where + H: Hasher, +{ + let mut db = MemoryDB::default(); + for item in proof.iter_nodes() { + db.insert(EMPTY_PREFIX, &item); + } + db +} + #[cfg(test)] mod tests { use crate::InMemoryBackend; diff --git a/primitives/trie/src/lib.rs b/primitives/trie/src/lib.rs index 80570a9792b..f6131c8ed5e 100644 --- a/primitives/trie/src/lib.rs +++ b/primitives/trie/src/lib.rs @@ -21,7 +21,6 @@ mod error; mod node_header; mod node_codec; -mod storage_proof; mod trie_stream; use sp_std::boxed::Box; @@ -36,7 +35,6 @@ pub use error::Error; pub use trie_stream::TrieStream; /// The Substrate format implementation of `NodeCodec`. pub use node_codec::NodeCodec; -pub use storage_proof::StorageProof; /// Various re-exports from the `trie-db` crate. pub use trie_db::{ Trie, TrieMut, DBValue, Recorder, CError, Query, TrieLayout, TrieConfiguration, nibble_ops, TrieDBIterator, diff --git a/primitives/trie/src/storage_proof.rs b/primitives/trie/src/storage_proof.rs deleted file mode 100644 index 254adc2fcb4..00000000000 --- a/primitives/trie/src/storage_proof.rs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2020 Parity Technologies (UK) Ltd. -// This file is part of Substrate. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -use sp_std::vec::Vec; -use codec::{Encode, Decode}; -use hash_db::{Hasher, HashDB}; - -/// A proof that some set of key-value pairs are included in the storage trie. The proof contains -/// the storage values so that the partial storage backend can be reconstructed by a verifier that -/// does not already have access to the key-value pairs. -/// -/// The proof consists of the set of serialized nodes in the storage trie accessed when looking up -/// the keys covered by the proof. Verifying the proof requires constructing the partial trie from -/// the serialized nodes and performing the key lookups. -#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode)] -pub struct StorageProof { - trie_nodes: Vec>, -} - -impl StorageProof { - /// Constructs a storage proof from a subset of encoded trie nodes in a storage backend. - pub fn new(trie_nodes: Vec>) -> Self { - StorageProof { trie_nodes } - } - - /// Returns a new empty proof. - /// - /// An empty proof is capable of only proving trivial statements (ie. that an empty set of - /// key-value pairs exist in storage). - pub fn empty() -> Self { - StorageProof { - trie_nodes: Vec::new(), - } - } - - /// Returns whether this is an empty proof. - pub fn is_empty(&self) -> bool { - self.trie_nodes.is_empty() - } - - /// Create an iterator over trie nodes constructed from the proof. The nodes are not guaranteed - /// to be traversed in any particular order. - pub fn iter_nodes(self) -> StorageProofNodeIterator { - StorageProofNodeIterator::new(self) - } - - /// Creates a `MemoryDB` from `Self`. - pub fn into_memory_db(self) -> crate::MemoryDB { - self.into() - } - - /// Merges multiple storage proofs covering potentially different sets of keys into one proof - /// covering all keys. The merged proof output may be smaller than the aggregate size of the input - /// proofs due to deduplication of trie nodes. - pub fn merge(proofs: I) -> Self where I: IntoIterator { - let trie_nodes = proofs.into_iter() - .flat_map(|proof| proof.iter_nodes()) - .collect::>() - .into_iter() - .collect(); - - Self { trie_nodes } - } -} - -/// An iterator over trie nodes constructed from a storage proof. The nodes are not guaranteed to -/// be traversed in any particular order. -pub struct StorageProofNodeIterator { - inner: > as IntoIterator>::IntoIter, -} - -impl StorageProofNodeIterator { - fn new(proof: StorageProof) -> Self { - StorageProofNodeIterator { - inner: proof.trie_nodes.into_iter(), - } - } -} - -impl Iterator for StorageProofNodeIterator { - type Item = Vec; - - fn next(&mut self) -> Option { - self.inner.next() - } -} - -impl From for crate::MemoryDB { - fn from(proof: StorageProof) -> Self { - let mut db = crate::MemoryDB::default(); - for item in proof.iter_nodes() { - db.insert(crate::EMPTY_PREFIX, &item); - } - db - } -} diff --git a/test-utils/runtime/src/system.rs b/test-utils/runtime/src/system.rs index 073e06de81d..b410d317a1b 100644 --- a/test-utils/runtime/src/system.rs +++ b/test-utils/runtime/src/system.rs @@ -338,7 +338,7 @@ mod tests { use sp_io::TestExternalities; use substrate_test_runtime_client::{AccountKeyring, Sr25519Keyring}; use crate::{Header, Transfer, WASM_BINARY}; - use sp_core::{NeverNativeValue, map, traits::{CodeExecutor, RuntimeCode}}; + use sp_core::{NeverNativeValue, map, traits::CodeExecutor}; use sc_executor::{NativeExecutor, WasmExecutionMethod, native_executor_instance}; use sp_io::hashing::twox_128; @@ -401,11 +401,8 @@ mod tests { fn block_import_works_wasm() { block_import_works(|b, ext| { let mut ext = ext.ext(); - let runtime_code = RuntimeCode::from_externalities(&ext) - .expect("Code is part of the externalities"); executor().call::<_, NeverNativeValue, fn() -> _>( &mut ext, - &runtime_code, "Core_execute_block", &b.encode(), false, @@ -497,11 +494,8 @@ mod tests { fn block_import_with_transaction_works_wasm() { block_import_with_transaction_works(|b, ext| { let mut ext = ext.ext(); - let runtime_code = RuntimeCode::from_externalities(&ext) - .expect("Code is part of the externalities"); executor().call::<_, NeverNativeValue, fn() -> _>( &mut ext, - &runtime_code, "Core_execute_block", &b.encode(), false, diff --git a/utils/frame/benchmarking-cli/Cargo.toml b/utils/frame/benchmarking-cli/Cargo.toml index 89143ee9fe0..93c62c3f965 100644 --- a/utils/frame/benchmarking-cli/Cargo.toml +++ b/utils/frame/benchmarking-cli/Cargo.toml @@ -16,6 +16,5 @@ sc-client = { version = "0.8.0-alpha.2", path = "../../../client" } sc-client-db = { version = "0.8.0-alpha.2", path = "../../../client/db" } sc-executor = { version = "0.8.0-alpha.2", path = "../../../client/executor" } sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } -sp-state-machine = { version = "0.8.0-alpha.2", path = "../../../primitives/state-machine" } structopt = "0.3.8" codec = { version = "1.2.0", package = "parity-scale-codec" } diff --git a/utils/frame/benchmarking-cli/src/lib.rs b/utils/frame/benchmarking-cli/src/lib.rs index 1074944554a..899419e5de5 100644 --- a/utils/frame/benchmarking-cli/src/lib.rs +++ b/utils/frame/benchmarking-cli/src/lib.rs @@ -121,7 +121,6 @@ impl BenchmarkCmd { self.repeat, ).encode(), Default::default(), - &sp_state_machine::backend::get_runtime_code(&state)?, ) .execute(strategy.into()) .map_err(|e| format!("Error executing runtime benchmark: {:?}", e))?; -- GitLab From 69ea3c4eb9ce487b7c4f15294ec4b15981c7b671 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Thu, 5 Mar 2020 11:25:28 +0100 Subject: [PATCH 087/106] Use 128mb for db cache default (#5134) --- client/cli/src/params/import_params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/params/import_params.rs b/client/cli/src/params/import_params.rs index f7f68d68fb0..95d7623d11d 100644 --- a/client/cli/src/params/import_params.rs +++ b/client/cli/src/params/import_params.rs @@ -55,7 +55,7 @@ pub struct ImportParams { pub execution_strategies: ExecutionStrategies, /// Limit the memory the database cache can use. - #[structopt(long = "db-cache", value_name = "MiB", default_value = "32")] + #[structopt(long = "db-cache", value_name = "MiB", default_value = "128")] pub database_cache_size: u32, /// Specify the state cache size. -- GitLab From dc124bb3c43bfc878ade3e504c2faf9c7b38e24e Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 12:03:20 +0100 Subject: [PATCH 088/106] Adds `vested_transfer` to Vesting pallet (#5029) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add the vested_transfer function with tests * Add VestingDeposit for minimum amount to create a new schedule * Remove irrelevant file commit * Bump spec * Add weight comment * Fix CI build * Make the check before the transfer * Update frame/vesting/src/lib.rs Co-Authored-By: Shawn Tabrizi * Update frame/vesting/src/lib.rs Co-Authored-By: Shawn Tabrizi * Update frame/vesting/src/lib.rs Co-Authored-By: Bastian Köcher * Update frame/vesting/src/lib.rs Co-Authored-By: Bastian Köcher * Update frame/vesting/src/lib.rs Co-Authored-By: Bastian Köcher * Add tab to line 249 * Rename to `MinVestedTransfer` for clarity Co-authored-by: Shawn Tabrizi Co-authored-by: Bastian Köcher --- bin/node/runtime/src/lib.rs | 9 ++- frame/vesting/src/lib.rs | 143 +++++++++++++++++++++++++++++++++++- 2 files changed, 148 insertions(+), 4 deletions(-) diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index 3a7df27466c..0844b32f7c3 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -82,8 +82,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 227, - impl_version: 1, + spec_version: 229, + impl_version: 0, apis: RUNTIME_API_VERSIONS, }; @@ -590,10 +590,15 @@ impl pallet_society::Trait for Runtime { type ChallengePeriod = ChallengePeriod; } +parameter_types! { + pub const MinVestedTransfer: Balance = 100 * DOLLARS; +} + impl pallet_vesting::Trait for Runtime { type Event = Event; type Currency = Balances; type BlockNumberToBalance = ConvertInto; + type MinVestedTransfer = MinVestedTransfer; } construct_runtime!( diff --git a/frame/vesting/src/lib.rs b/frame/vesting/src/lib.rs index fdc480ddd04..d4a34d4e172 100644 --- a/frame/vesting/src/lib.rs +++ b/frame/vesting/src/lib.rs @@ -52,10 +52,12 @@ use codec::{Encode, Decode}; use sp_runtime::{DispatchResult, RuntimeDebug, traits::{ StaticLookup, Zero, AtLeast32Bit, MaybeSerializeDeserialize, Convert }}; -use frame_support::{decl_module, decl_event, decl_storage, decl_error}; +use frame_support::{decl_module, decl_event, decl_storage, decl_error, ensure}; use frame_support::traits::{ - Currency, LockableCurrency, VestingSchedule, WithdrawReason, LockIdentifier + Currency, LockableCurrency, VestingSchedule, WithdrawReason, LockIdentifier, ExistenceRequirement, + Get, }; +use frame_support::weights::SimpleDispatchInfo; use frame_system::{self as system, ensure_signed}; type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; @@ -69,6 +71,9 @@ pub trait Trait: frame_system::Trait { /// Convert the block number into a balance. type BlockNumberToBalance: Convert>; + + /// The minimum amount transferred to call `vested_transfer`. + type MinVestedTransfer: Get>; } const VESTING_ID: LockIdentifier = *b"vesting "; @@ -158,6 +163,8 @@ decl_error! { NotVesting, /// An existing vesting schedule already exists for this account that cannot be clobbered. ExistingVestingSchedule, + /// Amount being transferred is too low to create a vesting schedule. + AmountLow, } } @@ -166,6 +173,9 @@ decl_module! { pub struct Module for enum Call where origin: T::Origin { type Error = Error; + /// The minimum amount to be transferred to create a new vesting schedule. + const MinVestedTransfer: BalanceOf = T::MinVestedTransfer::get(); + fn deposit_event() = default; /// Unlock any vested funds of the sender account. @@ -206,6 +216,40 @@ decl_module! { ensure_signed(origin)?; Self::update_lock(T::Lookup::lookup(target)?) } + + /// Create a vested transfer. + /// + /// The dispatch origin for this call must be _Signed_. + /// + /// - `target`: The account that should be transferred the vested funds. + /// - `amount`: The amount of funds to transfer and will be vested. + /// - `schedule`: The vesting schedule attached to the transfer. + /// + /// Emits `VestingCreated`. + /// + /// # + /// - Creates a new storage entry, but is protected by a minimum transfer + /// amount needed to succeed. + /// # + #[weight = SimpleDispatchInfo::FixedNormal(1_000_000)] + pub fn vested_transfer( + origin, + target: ::Source, + schedule: VestingInfo, T::BlockNumber>, + ) -> DispatchResult { + let transactor = ensure_signed(origin)?; + ensure!(schedule.locked >= T::MinVestedTransfer::get(), Error::::AmountLow); + + let who = T::Lookup::lookup(target)?; + ensure!(!Vesting::::contains_key(&who), Error::::ExistingVestingSchedule); + + T::Currency::transfer(&transactor, &who, schedule.locked, ExistenceRequirement::AllowDeath)?; + + Self::add_vesting_schedule(&who, schedule.locked, schedule.per_block, schedule.starting_block) + .expect("user does not have an existing vesting schedule; q.e.d."); + + Ok(()) + } } } @@ -348,10 +392,14 @@ mod tests { type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; } + parameter_types! { + pub const MinVestedTransfer: u64 = 256 * 2; + } impl Trait for Test { type Event = (); type Currency = Balances; type BlockNumberToBalance = Identity; + type MinVestedTransfer = MinVestedTransfer; } type System = frame_system::Module; type Balances = pallet_balances::Module; @@ -613,4 +661,95 @@ mod tests { assert_ok!(Balances::transfer(Some(12).into(), 3, 256 * 5)); }); } + + #[test] + fn vested_transfer_works() { + ExtBuilder::default() + .existential_deposit(256) + .build() + .execute_with(|| { + assert_eq!(System::block_number(), 1); + let user3_free_balance = Balances::free_balance(&3); + let user4_free_balance = Balances::free_balance(&4); + assert_eq!(user3_free_balance, 256 * 30); + assert_eq!(user4_free_balance, 256 * 40); + // Account 4 should not have any vesting yet. + assert_eq!(Vesting::vesting(&4), None); + // Make the schedule for the new transfer. + let new_vesting_schedule = VestingInfo { + locked: 256 * 5, + per_block: 64, // Vesting over 20 blocks + starting_block: 10, + }; + assert_ok!(Vesting::vested_transfer(Some(3).into(), 4, new_vesting_schedule)); + // Now account 4 should have vesting. + assert_eq!(Vesting::vesting(&4), Some(new_vesting_schedule)); + // Ensure the transfer happened correctly. + let user3_free_balance_updated = Balances::free_balance(&3); + assert_eq!(user3_free_balance_updated, 256 * 25); + let user4_free_balance_updated = Balances::free_balance(&4); + assert_eq!(user4_free_balance_updated, 256 * 45); + // Account 4 has 5 * 256 locked. + assert_eq!(Vesting::vesting_balance(&4), Some(256 * 5)); + + System::set_block_number(20); + assert_eq!(System::block_number(), 20); + + // Account 4 has 5 * 64 units vested by block 20. + assert_eq!(Vesting::vesting_balance(&4), Some(10 * 64)); + + System::set_block_number(30); + assert_eq!(System::block_number(), 30); + + // Account 4 has fully vested. + assert_eq!(Vesting::vesting_balance(&4), Some(0)); + }); + } + + #[test] + fn vested_transfer_correctly_fails() { + ExtBuilder::default() + .existential_deposit(256) + .build() + .execute_with(|| { + assert_eq!(System::block_number(), 1); + let user2_free_balance = Balances::free_balance(&2); + let user4_free_balance = Balances::free_balance(&4); + assert_eq!(user2_free_balance, 256 * 20); + assert_eq!(user4_free_balance, 256 * 40); + // Account 2 should already have a vesting schedule. + let user2_vesting_schedule = VestingInfo { + locked: 256 * 20, + per_block: 256, // Vesting over 20 blocks + starting_block: 10, + }; + assert_eq!(Vesting::vesting(&2), Some(user2_vesting_schedule)); + + // The vesting schedule we will try to create, fails due to pre-existence of schedule. + let new_vesting_schedule = VestingInfo { + locked: 256 * 5, + per_block: 64, // Vesting over 20 blocks + starting_block: 10, + }; + assert_noop!( + Vesting::vested_transfer(Some(4).into(), 2, new_vesting_schedule), + Error::::ExistingVestingSchedule, + ); + + // Fails due to too low transfer amount. + let new_vesting_schedule_too_low = VestingInfo { + locked: 256 * 1, + per_block: 64, + starting_block: 10, + }; + assert_noop!( + Vesting::vested_transfer(Some(3).into(), 4, new_vesting_schedule_too_low), + Error::::AmountLow, + ); + + // Verify no currency transfer happened. + assert_eq!(user2_free_balance, 256 * 20); + assert_eq!(user4_free_balance, 256 * 40); + }); + } } -- GitLab From f74589ef9446d455f7258e38953bf3be9a32f416 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 13:37:59 +0100 Subject: [PATCH 089/106] Adds a session getter to historical proofs (#5125) * Adds a session getter to historical proofs * Bump spec_version * Adds some useful trait derives to Proof --- bin/node/runtime/src/lib.rs | 2 +- frame/session/src/historical.rs | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index 0844b32f7c3..1cc0a2b7251 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -82,7 +82,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 229, + spec_version: 230, impl_version: 0, apis: RUNTIME_API_VERSIONS, }; diff --git a/frame/session/src/historical.rs b/frame/session/src/historical.rs index 5b492d8d21d..91719c27f27 100644 --- a/frame/session/src/historical.rs +++ b/frame/session/src/historical.rs @@ -27,7 +27,7 @@ use sp_std::prelude::*; use codec::{Encode, Decode}; -use sp_runtime::KeyTypeId; +use sp_runtime::{KeyTypeId, RuntimeDebug}; use sp_runtime::traits::{Convert, OpaqueKeys}; use frame_support::{decl_module, decl_storage}; use frame_support::{Parameter, print}; @@ -258,12 +258,19 @@ impl ProvingTrie { } /// Proof of ownership of a specific key. -#[derive(Encode, Decode, Clone)] +#[derive(Encode, Decode, Clone, Eq, PartialEq, RuntimeDebug)] pub struct Proof { session: SessionIndex, trie_nodes: Vec>, } +impl Proof { + /// Returns a session this proof was generated for. + pub fn session(&self) -> SessionIndex { + self.session + } +} + impl> frame_support::traits::KeyOwnerProofSystem<(KeyTypeId, D)> for Module { -- GitLab From 3272f26b1d683d973fdc08580b35cf27dfe5494d Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 13:38:16 +0100 Subject: [PATCH 090/106] remove on_exit from grandpa (#5098) --- bin/node-template/node/src/service.rs | 1 - bin/node/cli/src/service.rs | 1 - client/finality-grandpa/src/lib.rs | 12 ++++-------- client/finality-grandpa/src/observer.rs | 6 +++--- client/finality-grandpa/src/tests.rs | 17 ----------------- 5 files changed, 7 insertions(+), 30 deletions(-) diff --git a/bin/node-template/node/src/service.rs b/bin/node-template/node/src/service.rs index f87aaf5ec25..fe1b3af4eb4 100644 --- a/bin/node-template/node/src/service.rs +++ b/bin/node-template/node/src/service.rs @@ -154,7 +154,6 @@ pub fn new_full(config: Configuration) link: grandpa_link, network: service.network(), inherent_data_providers: inherent_data_providers.clone(), - on_exit: service.on_exit(), telemetry_on_connect: Some(service.telemetry_on_connect_stream()), voting_rule: grandpa::VotingRulesBuilder::default().build(), prometheus_registry: service.prometheus_registry() diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs index f31fa0b9730..ca7bd431618 100644 --- a/bin/node/cli/src/service.rs +++ b/bin/node/cli/src/service.rs @@ -225,7 +225,6 @@ macro_rules! new_full { link: grandpa_link, network: service.network(), inherent_data_providers: inherent_data_providers.clone(), - on_exit: service.on_exit(), telemetry_on_connect: Some(service.telemetry_on_connect_stream()), voting_rule: grandpa::VotingRulesBuilder::default().build(), prometheus_registry: service.prometheus_registry(), diff --git a/client/finality-grandpa/src/lib.rs b/client/finality-grandpa/src/lib.rs index e9ea244a724..38c1070d770 100644 --- a/client/finality-grandpa/src/lib.rs +++ b/client/finality-grandpa/src/lib.rs @@ -536,7 +536,7 @@ fn register_finality_tracker_inherent_data_provider( } /// Parameters used to run Grandpa. -pub struct GrandpaParams { +pub struct GrandpaParams { /// Configuration for the GRANDPA service. pub config: Config, /// A link to the block import worker. @@ -545,8 +545,6 @@ pub struct GrandpaParams { pub network: N, /// The inherent data providers. pub inherent_data_providers: InherentDataProviders, - /// Handle to a future that will resolve on exit. - pub on_exit: X, /// If supplied, can be used to hook on telemetry connection established events. pub telemetry_on_connect: Option>, /// A voting rule used to potentially restrict target votes. @@ -557,8 +555,8 @@ pub struct GrandpaParams { /// Run a GRANDPA voter as a task. Provide configuration and a link to a /// block import worker that has already been instantiated with `block_import`. -pub fn run_grandpa_voter( - grandpa_params: GrandpaParams, +pub fn run_grandpa_voter( + grandpa_params: GrandpaParams, ) -> sp_blockchain::Result + Unpin + Send + 'static> where Block::Hash: Ord, BE: Backend + 'static, @@ -567,7 +565,6 @@ pub fn run_grandpa_voter( VR: VotingRule + Clone + 'static, NumberFor: BlockNumberOps, DigestFor: Encode, - X: futures::Future + Clone + Send + Unpin + 'static, C: ClientForGrandpa + 'static, { let GrandpaParams { @@ -575,7 +572,6 @@ pub fn run_grandpa_voter( link, network, inherent_data_providers, - on_exit, telemetry_on_connect, voting_rule, prometheus_registry, @@ -647,7 +643,7 @@ pub fn run_grandpa_voter( let telemetry_task = telemetry_task .then(|_| future::pending::<()>()); - Ok(future::select(future::select(voter_work, on_exit), telemetry_task).map(drop)) + Ok(future::select(voter_work, telemetry_task).map(drop)) } /// Future that powers the voter. diff --git a/client/finality-grandpa/src/observer.rs b/client/finality-grandpa/src/observer.rs index f6cf1a8aa14..97352b68e32 100644 --- a/client/finality-grandpa/src/observer.rs +++ b/client/finality-grandpa/src/observer.rs @@ -159,8 +159,8 @@ pub fn run_grandpa_observer( config: Config, link: LinkHalf, network: N, - on_exit: impl futures::Future + Clone + Send + Unpin + 'static, -) -> sp_blockchain::Result + Unpin + Send + 'static> where +) -> sp_blockchain::Result + Unpin + Send + 'static> +where BE: Backend + Unpin + 'static, N: NetworkT + Send + Clone + 'static, SC: SelectChain + 'static, @@ -194,7 +194,7 @@ pub fn run_grandpa_observer( warn!("GRANDPA Observer failed: {:?}", e); }); - Ok(future::select(observer_work, on_exit).map(drop)) + Ok(observer_work.map(drop)) } /// Future that powers the observer. diff --git a/client/finality-grandpa/src/tests.rs b/client/finality-grandpa/src/tests.rs index 2734101500a..aedcb20a598 100644 --- a/client/finality-grandpa/src/tests.rs +++ b/client/finality-grandpa/src/tests.rs @@ -190,17 +190,6 @@ impl TestNetFactory for GrandpaTestNet { } } -#[derive(Clone)] -struct Exit; - -impl futures::Future for Exit { - type Output = (); - - fn poll(self: Pin<&mut Self>, _: &mut task::Context) -> task::Poll<()> { - task::Poll::Pending - } -} - #[derive(Default, Clone)] pub(crate) struct TestApi { genesis_authorities: AuthorityList, @@ -444,7 +433,6 @@ fn run_to_completion_with( link: link, network: net_service, inherent_data_providers: InherentDataProviders::new(), - on_exit: Exit, telemetry_on_connect: None, voting_rule: (), prometheus_registry: None, @@ -576,7 +564,6 @@ fn finalize_3_voters_1_full_observer() { link: link, network: net_service, inherent_data_providers: InherentDataProviders::new(), - on_exit: Exit, telemetry_on_connect: None, voting_rule: (), prometheus_registry: None, @@ -740,7 +727,6 @@ fn transition_3_voters_twice_1_full_observer() { link: link, network: net_service, inherent_data_providers: InherentDataProviders::new(), - on_exit: Exit, telemetry_on_connect: None, voting_rule: (), prometheus_registry: None, @@ -1166,7 +1152,6 @@ fn voter_persists_its_votes() { link, network: this.net.lock().peers[0].network_service().clone(), inherent_data_providers: InherentDataProviders::new(), - on_exit: Exit, telemetry_on_connect: None, voting_rule: VotingRulesBuilder::default().build(), prometheus_registry: None, @@ -1382,7 +1367,6 @@ fn finalize_3_voters_1_light_observer() { }, link, net.lock().peers[3].network_service().clone(), - Exit, ).unwrap() ); @@ -1512,7 +1496,6 @@ fn voter_catches_up_to_latest_round_when_behind() { link, network: net.lock().peer(peer_id).network_service().clone(), inherent_data_providers: InherentDataProviders::new(), - on_exit: Exit, telemetry_on_connect: None, voting_rule: (), prometheus_registry: None, -- GitLab From 3f96ea8f7fa23f6763f92ad7638103d729852611 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 13:39:45 +0100 Subject: [PATCH 091/106] Remove `sender` from `Applyable`. (#5129) --- frame/executive/src/lib.rs | 4 ++-- primitives/runtime/src/generic/checked_extrinsic.rs | 5 ----- primitives/runtime/src/testing.rs | 3 --- primitives/runtime/src/traits.rs | 6 ------ 4 files changed, 2 insertions(+), 16 deletions(-) diff --git a/frame/executive/src/lib.rs b/frame/executive/src/lib.rs index d7fecf45909..022e26d3cb0 100644 --- a/frame/executive/src/lib.rs +++ b/frame/executive/src/lib.rs @@ -118,7 +118,7 @@ impl< where Block::Extrinsic: Checkable + Codec, CheckedOf: - Applyable + + Applyable + GetDispatchInfo, CallOf: Dispatchable, OriginOf: From>, @@ -143,7 +143,7 @@ impl< where Block::Extrinsic: Checkable + Codec, CheckedOf: - Applyable + + Applyable + GetDispatchInfo, CallOf: Dispatchable, OriginOf: From>, diff --git a/primitives/runtime/src/generic/checked_extrinsic.rs b/primitives/runtime/src/generic/checked_extrinsic.rs index 20aefbdf990..25a8274354a 100644 --- a/primitives/runtime/src/generic/checked_extrinsic.rs +++ b/primitives/runtime/src/generic/checked_extrinsic.rs @@ -45,14 +45,9 @@ where Origin: From>, Info: Clone, { - type AccountId = AccountId; type Call = Call; type DispatchInfo = Info; - fn sender(&self) -> Option<&Self::AccountId> { - self.signed.as_ref().map(|x| &x.0) - } - fn validate>( &self, info: Self::DispatchInfo, diff --git a/primitives/runtime/src/testing.rs b/primitives/runtime/src/testing.rs index 6f6ea3dd164..e840cdd100c 100644 --- a/primitives/runtime/src/testing.rs +++ b/primitives/runtime/src/testing.rs @@ -410,12 +410,9 @@ impl Applyable for TestXt where Origin: From>, Info: Clone, { - type AccountId = u64; type Call = Call; type DispatchInfo = Info; - fn sender(&self) -> Option<&Self::AccountId> { self.signature.as_ref().map(|x| &x.0) } - /// Checks to see if this is a valid *transaction*. It returns information on it if so. fn validate>( &self, diff --git a/primitives/runtime/src/traits.rs b/primitives/runtime/src/traits.rs index d9c32d221c0..c6d85b22f46 100644 --- a/primitives/runtime/src/traits.rs +++ b/primitives/runtime/src/traits.rs @@ -879,18 +879,12 @@ impl SignedExtension for () { /// Also provides information on to whom this information is attributable and an index that allows /// each piece of attributable information to be disambiguated. pub trait Applyable: Sized + Send + Sync { - /// ID of the account that is responsible for this piece of information (sender). - type AccountId: Member + MaybeDisplay; - /// Type by which we can dispatch. Restricts the `UnsignedValidator` type. type Call; /// An opaque set of information attached to the transaction. type DispatchInfo: Clone; - /// Returns a reference to the sender if any. - fn sender(&self) -> Option<&Self::AccountId>; - /// Checks to see if this is a valid *transaction*. It returns information on it if so. fn validate>( &self, -- GitLab From 32d6ed9fc4f644c407c07996cfbd6dfa4c3ba5f8 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 13:40:33 +0100 Subject: [PATCH 092/106] Pass Prometheus `Registry` into `Client` (#5120) * Add a few metrics to Client * Improve PrometheusConfig * Fix client docs --- Cargo.lock | 2 ++ bin/node/testing/src/bench.rs | 1 + client/Cargo.toml | 1 + client/cli/src/commands/runcmd.rs | 11 +++---- client/db/Cargo.toml | 1 + client/db/src/lib.rs | 3 ++ client/service/src/builder.rs | 50 ++++--------------------------- client/service/src/config.rs | 29 ++++++++++++++++-- client/service/test/src/lib.rs | 2 +- client/src/client.rs | 7 ++++- client/src/lib.rs | 1 + client/src/light/mod.rs | 3 ++ test-utils/client/src/lib.rs | 3 +- 13 files changed, 59 insertions(+), 55 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ca3ba91b84f..07ee88e1707 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5749,6 +5749,7 @@ dependencies = [ "sp-std", "sp-trie", "sp-version", + "substrate-prometheus-endpoint", "substrate-test-runtime-client", "tempfile", "tracing", @@ -5812,6 +5813,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-trie", + "substrate-prometheus-endpoint", "substrate-test-runtime-client", "tempfile", ] diff --git a/bin/node/testing/src/bench.rs b/bin/node/testing/src/bench.rs index 58a7ab933ee..19906dd6a1b 100644 --- a/bin/node/testing/src/bench.rs +++ b/bin/node/testing/src/bench.rs @@ -155,6 +155,7 @@ impl BenchDb { None, None, ExecutionExtensions::new(profile.into_execution_strategies(), None), + None, ).expect("Should not fail"); (client, backend) diff --git a/client/Cargo.toml b/client/Cargo.toml index 710cdbd128f..61199f04da9 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -34,6 +34,7 @@ sp-blockchain = { version = "2.0.0-alpha.2", path = "../primitives/blockchain" } sp-state-machine = { version = "0.8.0-alpha.2", path = "../primitives/state-machine" } sc-telemetry = { version = "2.0.0-alpha.2", path = "telemetry" } sp-trie = { version = "2.0.0-alpha.2", path = "../primitives/trie" } +prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.8.0-alpha.2", path = "../utils/prometheus" } tracing = "0.1.10" [dev-dependencies] diff --git a/client/cli/src/commands/runcmd.rs b/client/cli/src/commands/runcmd.rs index f29bc3c743b..0ad6fefcce8 100644 --- a/client/cli/src/commands/runcmd.rs +++ b/client/cli/src/commands/runcmd.rs @@ -24,7 +24,7 @@ use regex::Regex; use chrono::prelude::*; use sc_service::{ AbstractService, Configuration, ChainSpecExtension, RuntimeGenesis, ChainSpec, Roles, - config::KeystoreConfig, + config::{KeystoreConfig, PrometheusConfig}, }; use sc_telemetry::TelemetryEndpoints; @@ -423,11 +423,12 @@ impl RunCmd { // Override prometheus if self.no_prometheus { - config.prometheus_port = None; - } else if config.prometheus_port.is_none() { + config.prometheus_config = None; + } else if config.prometheus_config.is_none() { let prometheus_interface: &str = if self.prometheus_external { "0.0.0.0" } else { "127.0.0.1" }; - config.prometheus_port = Some( - parse_address(&format!("{}:{}", prometheus_interface, 9615), self.prometheus_port)?); + config.prometheus_config = Some(PrometheusConfig::new_with_default_registry( + parse_address(&format!("{}:{}", prometheus_interface, 9615), self.prometheus_port)?, + )); } config.tracing_targets = self.import_params.tracing_targets.clone().into(); diff --git a/client/db/Cargo.toml b/client/db/Cargo.toml index f92a5c48e28..8eaae24e520 100644 --- a/client/db/Cargo.toml +++ b/client/db/Cargo.toml @@ -30,6 +30,7 @@ sc-state-db = { version = "0.8.0-alpha.2", path = "../state-db" } sp-trie = { version = "2.0.0-alpha.2", path = "../../primitives/trie" } sp-consensus = { version = "0.8.0-alpha.2", path = "../../primitives/consensus/common" } sp-blockchain = { version = "2.0.0-alpha.2", path = "../../primitives/blockchain" } +prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.8.0-alpha.2", path = "../../utils/prometheus" } [dev-dependencies] sp-keyring = { version = "2.0.0-alpha.2", path = "../../primitives/keyring" } diff --git a/client/db/src/lib.rs b/client/db/src/lib.rs index d4c157986f5..eed1fc0e1d9 100644 --- a/client/db/src/lib.rs +++ b/client/db/src/lib.rs @@ -84,6 +84,7 @@ use crate::storage_cache::{CachingState, SharedCache, new_shared_cache}; use crate::stats::StateUsageStats; use log::{trace, debug, warn}; pub use sc_state_db::PruningMode; +use prometheus_endpoint::Registry; #[cfg(any(feature = "kvdb-rocksdb", test))] pub use bench::BenchmarkingState; @@ -291,6 +292,7 @@ pub fn new_client( fork_blocks: ForkBlocks, bad_blocks: BadBlocks, execution_extensions: ExecutionExtensions, + prometheus_registry: Option, ) -> Result<( sc_client::Client< Backend, @@ -317,6 +319,7 @@ pub fn new_client( fork_blocks, bad_blocks, execution_extensions, + prometheus_registry, )?, backend, )) diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index db60c94997f..bfb979c19e0 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -17,7 +17,7 @@ use crate::{Service, NetworkStatus, NetworkState, error::Error, DEFAULT_PROTOCOL_ID, MallocSizeOfWasm}; use crate::{TaskManagerBuilder, start_rpc_servers, build_network_future, TransactionPoolAdapter}; use crate::status_sinks; -use crate::config::{Configuration, DatabaseConfig, KeystoreConfig}; +use crate::config::{Configuration, DatabaseConfig, KeystoreConfig, PrometheusConfig}; use sc_client_api::{ self, BlockchainEvents, @@ -128,7 +128,6 @@ pub struct ServiceBuilder>>, marker: PhantomData<(TBl, TRtApi)>, background_tasks: Vec<(&'static str, BackgroundTask)>, - prometheus_registry: Option } /// Full client type. @@ -262,6 +261,7 @@ fn new_full_parts( fork_blocks, bad_blocks, extensions, + config.prometheus_config.as_ref().map(|config| config.registry.clone()), )? }; @@ -308,7 +308,6 @@ where TGen: RuntimeGenesis, TCSExt: Extension { remote_backend: None, background_tasks: Default::default(), marker: PhantomData, - prometheus_registry: None, }) } @@ -378,6 +377,7 @@ where TGen: RuntimeGenesis, TCSExt: Extension { backend.clone(), config.expect_chain_spec(), executor, + config.prometheus_config.as_ref().map(|config| config.registry.clone()), )?); Ok(ServiceBuilder { @@ -396,7 +396,6 @@ where TGen: RuntimeGenesis, TCSExt: Extension { remote_backend: Some(remote_blockchain), background_tasks: Default::default(), marker: PhantomData, - prometheus_registry: None, }) } } @@ -470,7 +469,6 @@ impl Self { - Self { - config: self.config, - client: self.client, - backend: self.backend, - tasks_builder: self.tasks_builder, - keystore: self.keystore, - fetcher: self.fetcher, - select_chain: self.select_chain, - import_queue: self.import_queue, - finality_proof_request_builder: self.finality_proof_request_builder, - finality_proof_provider: self.finality_proof_provider, - transaction_pool: self.transaction_pool, - rpc_extensions: self.rpc_extensions, - remote_backend: self.remote_backend, - background_tasks: self.background_tasks, - marker: self.marker, - prometheus_registry: Some(registry), - } - } } /// Implemented on `ServiceBuilder`. Allows running block commands, such as import/export/validate @@ -845,7 +816,6 @@ ServiceBuilder< rpc_extensions, remote_backend, background_tasks, - prometheus_registry, } = self; sp_session::generate_initial_session_keys( @@ -897,14 +867,6 @@ ServiceBuilder< let block_announce_validator = Box::new(sp_consensus::block_validation::DefaultBlockAnnounceValidator::new(client.clone())); - let prometheus_registry_and_port = match config.prometheus_port { - Some(port) => match prometheus_registry { - Some(registry) => Some((registry, port)), - None => Some((Registry::new_custom(Some("substrate".into()), None)?, port)) - }, - None => None - }; - let network_params = sc_network::config::Params { roles: config.roles, executor: { @@ -922,7 +884,7 @@ ServiceBuilder< import_queue, protocol_id, block_announce_validator, - metrics_registry: prometheus_registry_and_port.as_ref().map(|(r, _)| r.clone()) + metrics_registry: config.prometheus_config.as_ref().map(|config| config.registry.clone()) }; let has_bootnodes = !network_params.network_config.boot_nodes.is_empty(); @@ -1035,7 +997,7 @@ ServiceBuilder< } // Prometheus metrics - let metrics = if let Some((registry, port)) = prometheus_registry_and_port.clone() { + let metrics = if let Some(PrometheusConfig { port, registry }) = config.prometheus_config.clone() { let metrics = ServiceMetrics::register(®istry)?; metrics.node_roles.set(u64::from(config.roles.bits())); spawn_handle.spawn( @@ -1297,7 +1259,7 @@ ServiceBuilder< _telemetry_on_connect_sinks: telemetry_connection_sinks.clone(), keystore, marker: PhantomData::, - prometheus_registry: prometheus_registry_and_port.map(|(r, _)| r) + prometheus_registry: config.prometheus_config.map(|config| config.registry) }) } } diff --git a/client/service/src/config.rs b/client/service/src/config.rs index 974dac588de..6400712cad3 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -27,6 +27,7 @@ use sc_chain_spec::{ChainSpec, NoExtension}; use sp_core::crypto::Protected; use target_info::Target; use sc_telemetry::TelemetryEndpoints; +use prometheus_endpoint::Registry; /// Executable version. Used to pass version information from the root crate. #[derive(Clone)] @@ -93,8 +94,8 @@ pub struct Configuration { pub rpc_ws_max_connections: Option, /// CORS settings for HTTP & WS servers. `None` if all origins are allowed. pub rpc_cors: Option>, - /// Prometheus endpoint Port. `None` if disabled. - pub prometheus_port: Option, + /// Prometheus endpoint configuration. `None` if disabled. + pub prometheus_config: Option, /// Telemetry service URL. `None` if disabled. pub telemetry_endpoints: Option, /// External WASM transport for the telemetry. If `Some`, when connection to a telemetry @@ -165,6 +166,28 @@ pub enum DatabaseConfig { Custom(Arc), } +/// Configuration of the Prometheus endpoint. +#[derive(Clone)] +pub struct PrometheusConfig { + /// Port to use. + pub port: SocketAddr, + /// A metrics registry to use. Useful for setting the metric prefix. + pub registry: Registry, +} + +impl PrometheusConfig { + /// Create a new config using the default registry. + /// + /// The default registry prefixes metrics with `substrate`. + pub fn new_with_default_registry(port: SocketAddr) -> Self { + Self { + port, + registry: Registry::new_custom(Some("substrate".into()), None) + .expect("this can only fail if the prefix is empty") + } + } +} + impl Default for Configuration { /// Create a default config fn default() -> Self { @@ -190,7 +213,7 @@ impl Default for Configuration { rpc_ws: None, rpc_ws_max_connections: None, rpc_cors: Some(vec![]), - prometheus_port: None, + prometheus_config: None, telemetry_endpoints: None, telemetry_external_transport: None, default_heap_pages: None, diff --git a/client/service/test/src/lib.rs b/client/service/test/src/lib.rs index 5f679b82b39..03cccbe4a05 100644 --- a/client/service/test/src/lib.rs +++ b/client/service/test/src/lib.rs @@ -199,7 +199,7 @@ fn node_config ( rpc_ws: None, rpc_ws_max_connections: None, rpc_cors: None, - prometheus_port: None, + prometheus_config: None, telemetry_endpoints: None, telemetry_external_transport: None, default_heap_pages: None, diff --git a/client/src/client.rs b/client/src/client.rs index adb3598b785..89414870391 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -78,6 +78,7 @@ pub use sc_client_api::{ CallExecutor, }; use sp_blockchain::Error; +use prometheus_endpoint::Registry; use crate::{ call_executor::LocalCallExecutor, @@ -171,6 +172,7 @@ pub fn new_in_mem( executor: E, genesis_storage: &S, keystore: Option, + prometheus_registry: Option, ) -> sp_blockchain::Result, LocalCallExecutor, E>, @@ -181,7 +183,7 @@ pub fn new_in_mem( S: BuildStorage, Block: BlockT, { - new_with_backend(Arc::new(in_mem::Backend::new()), executor, genesis_storage, keystore) + new_with_backend(Arc::new(in_mem::Backend::new()), executor, genesis_storage, keystore, prometheus_registry) } /// Create a client with the explicitly provided backend. @@ -191,6 +193,7 @@ pub fn new_with_backend( executor: E, build_genesis_storage: &S, keystore: Option, + prometheus_registry: Option, ) -> sp_blockchain::Result, Block, RA>> where E: CodeExecutor + RuntimeInfo, @@ -207,6 +210,7 @@ pub fn new_with_backend( Default::default(), Default::default(), extensions, + prometheus_registry, ) } @@ -286,6 +290,7 @@ impl Client where fork_blocks: ForkBlocks, bad_blocks: BadBlocks, execution_extensions: ExecutionExtensions, + _prometheus_registry: Option, ) -> sp_blockchain::Result { if backend.blockchain().header(BlockId::Number(Zero::zero()))?.is_none() { let genesis_storage = build_genesis_storage.build_storage()?; diff --git a/client/src/lib.rs b/client/src/lib.rs index f282449c276..9c6393314f0 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -68,6 +68,7 @@ //! Default::default(), //! Default::default(), //! Default::default(), +//! None, //! ); //! ``` //! diff --git a/client/src/light/mod.rs b/client/src/light/mod.rs index ca1a3a50c6b..07816b3b356 100644 --- a/client/src/light/mod.rs +++ b/client/src/light/mod.rs @@ -28,6 +28,7 @@ use sp_core::traits::CodeExecutor; use sp_runtime::BuildStorage; use sp_runtime::traits::{Block as BlockT, HashFor}; use sp_blockchain::Result as ClientResult; +use prometheus_endpoint::Registry; use crate::call_executor::LocalCallExecutor; use crate::client::Client; @@ -58,6 +59,7 @@ pub fn new_light( backend: Arc>>, genesis_storage: &GS, code_executor: E, + prometheus_registry: Option, ) -> ClientResult< Client< Backend>, @@ -84,6 +86,7 @@ pub fn new_light( Default::default(), Default::default(), Default::default(), + prometheus_registry, ) } diff --git a/test-utils/client/src/lib.rs b/test-utils/client/src/lib.rs index 7d22abf3d87..37fa1e2b34e 100644 --- a/test-utils/client/src/lib.rs +++ b/test-utils/client/src/lib.rs @@ -210,7 +210,8 @@ impl TestClientBuilder Date: Thu, 5 Mar 2020 13:44:18 +0100 Subject: [PATCH 093/106] Introduce `on_runtime_upgrade` (#5058) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Initial idea of `on_runtime_upgrade` * Runtime storage for module version * Gui shawntabrizi runtime upgrade (#5118) * adding unleash to ci (#5020) * adding unleash to ci * fixing formatting * with a dot please * alpha.3 now * do not publish testing helpers * remove old test-helpers cruft * fix cargo.lock * with alpha 4 * do not publish runtime-interface-test either * disable more test crates from publishing * switch to alpha.5 * replace tempdir with tempfile * update lru * switch to bytes 0.5 * release script fixes * switch on and to latest alpha * BUT THE SPACES * Fix: CI failing for some CLI tests (#5043) * Initial commit Forked at: 41bb2193a267805e2093a081bc3e2aaccc64283a Parent branch: origin/master * Increase killing grace period of CLI tests and display more info * Use --dev everywhere possible * Put pruning mode to its own params struct * Add pruning params to export-blocks command * Added missing file * Removed not-dev mode in tests * Add pruning mode to the revert command * Decrease killing grace period again * Move back unsafe_pruning to import_params * Applied proposed changes * aura: remove unused tx pool (#5046) * aura: remove unused transaction pool parameter * node-template: remove transaction pool from aura * aura: fix tests * Extend rust nightly detection in `wasm-builder` (#5021) Instead of just testing `cargo` and `rustup run nightly`, we now test the `CARGO` env variable and also scan non default nightlies. The user is also now able to select the toolchain with `WASM_BUILD_TOOLCHAIN`. * Add steps setting to benchmarking CLI (#5033) * Add steps setting to CLI, use max value to hit worst case. * Bump impl_version. * Apply review suggestion. * Remove indices from node-template (#5025) * Remove indices from node-template * Use identity lookup instead * Bump impl * clean cargo.toml * Fix documentation for "BlockBuilder::push_trusted" (#5051) * fix doc * rephrase * do not check unleash on every PR, only master and tags (#5054) * do not check unleash on every PR, only master and tags * move scripts folder * add signed-tag check to CI * remove publish-to-crates-io dependencies Co-authored-by: s3krit * prepare version to alpha.1 (#5055) bump version to -alpha.1 * Sync: validate block responses for required data (#5052) * Less verbose state-db logging * Validate block responses for block bodies * Update client/network/src/protocol.rs Co-Authored-By: Bastian Köcher * Added validation test * Disconnect on missing header as well * Typo Co-Authored-By: AndrĂ© Silva Co-authored-by: Bastian Köcher Co-authored-by: AndrĂ© Silva * Make these chainspecs fields private (#5031) * Fix dockerfile (#5059) * Adds documentation for `wipe` and `commit` (#5053) * Adds documentation for `wipe` and `commit` This adds documentation to `wipe` and `commit` of `Externalities`. Besides that it removes the default implementation that would just panic and requires that all implementers of the trait implement the functions. * Update primitives/externalities/src/lib.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Fix the issue with `trybuild`'s `ui` tests (#4992) * repro ui bug * fix the tests * test with the new image * test without CARGO_HOME * test without fixes * test again * fix trybuild old versions * bump CArgo.lock * fix trybuild newest versions * bump Cargo.lock * trying on the latest image * bump Cargo.lock * run with the old image * ci will be green on the image from 2020-02-19 [skip ci] * bump Cargo.lock * Activate publishing of draft releases... (#5062) * Activate publishing of draft releases... ... And fix the message sending (missing parameter). * publish_draft_release.sh now checks latest... ... release on github rather than just a tag * Fix/div by zero (#5041) * Handle gas_price being zero separately * Bump spec_version * Add a unit & integration tests for gas price = 0 * set missing metadata fields, prepping alpha.2 (#5067) * setting first batch of descriptions * fix what I just broke * next batch * and pallets, too * last batch * set cargo.lock * keep'em dev-deps * bump version to alpha.2 * Fix revalidation not revalidating multiple times (#5065) * removes use of sc_client::Client from sc_finality_grandpa (#5030) * removes use of sc_client::Client from sc_finality_grandpa * code formatting * code formatting * removes use of sc_client::Client from sc_finality_grandpa * Remove deprecated host functions (#5038) Sadly we need to keep one function `ext_blake2_256`. This function is manually defined in `sp-core`. * removes use of sc_client::Client from sc_basic_authorship (#5050) * removes use of sc-client from sc-basic-authorship * refactor use of ProposerFactory * correct dep path * pallet-transaction-payment clean up (#5070) * Formatting clean up * Introduce separate setters for the fees. * *: Rename prometheus-exporter crate to substrate-prometheus-end… (#5076) This patch renames the crate for the following two reasons: 1. The prometheus-exporter crate introduces native in-process Prometheus style instrumentation to the Substrate project. Within the Prometheus ecosystem the term "exporter" is used for external processes exposing metrics for e.g. the Linux Kernel. In-process exposition would be described via the term "endpoint". 2. "prometheus-exporter" is generic and ignores the fact that it is only usable within the context of Substrate. In addition the name "prometheus-exporter" is already taken on crates.io. * rename `browser-utils` to `substrate-browser-utils` (#5079) * prepping for Alpha.3 (#5080) * Bump to alpha.3 * update gitlab-ci * Propagate DispatchError for benchmarks. (#5075) * Propagate DispatchError for benchmarks. * Apply review suggestions. * Use RuntimeString. * fix expect Co-Authored-By: Bastian Köcher Co-authored-by: Bastian Köcher * Add options to overwrite range bounds in benchmark command. (#5072) * Add --mins --maxs to benchmark command. * Apply review suggestions. * Update yamux to version 0.4.4. (#5086) * Remove more instances of futures01 (#4633) * Start removing last few instances of futures01 * Use to_poll on wasm * Revert "Use to_poll on wasm" This reverts commit 1c61728f10d520df5f9b28c415a0db68e478b9c7. * Fix fg test * Upgrade network test futures * Update offchain hyper version * Update service test * bump tokio to 0.2.10 * Removed some unneeded tokios * fixes * fix run_until_all_full * Make service test debuggable * Update client/offchain/src/api/http.rs Co-Authored-By: Demi Obenour <48690212+DemiMarie-parity@users.noreply.github.com> * Add service_test to test-int output * nitpicking * Finally fix test * Give up and revert client/serviec/test * Revert gitlab ci too Co-authored-by: Demi Obenour * Make export blocks default to json on stdout (#5090) * Make export blocks default to json on stdout * Multiline instead of single line to stay under 100 cols * Change --json flag to --binary, defaulting to json * Offence reporting returns a result (#5082) * Offence reporting returns a result * Bump spec_version * Use unwrap instead of assertions * Fix more review grumbles * Update to libp2p 0.16.2 (#5088) * Remove request ID from the new protocol (#5049) * Make sure we remove a peer on disconnect in gossip (#5104) * Make sure we remove peers on disconnect in gossip state machine * Clear up the code * Add a comment * Expose `state-db` memory info (#5110) This exposes memory statistics from the state-db. * Change extrinsic_count to extrinsic_index in pallet-utility (#5044) Co-authored-by: Benjamin Kampmann * Add more metrics to prometheus (#5034) * Add a few things * Add finality_grandpa_round * fix fg tests * Nitpicks * Nitpicks * Fix name of prometheus crate * Update to SCALE 1.2.0 (#5113) This updates `parity-scale-codec` to `1.2.0`, which includes multiple performance improvements and a fix that bounds the capacity of a vector at decoding. * Lazy payouts (#4474) * TODOs * Remove superfluous: * partial implementation * full implementation * fix preferences * update comments * upgrade test WIP * fix more tests * fix cutoff * fix saturation * comment * upgrade mock * upgrade test * WIP migration * WIP migration * remove slot stake stuff * fix merge * migration of ledger * remove equalize from test * add test * fix * update doc * fix compilation * improve test readibility * improve doc * fix most todo * fix migration and test * remove println * WIP * add test and spec * weight * update doc * safer end_era * fix exposure of conversion * Revert "safer end_era" This reverts commit 72ff737d27be67d87308514b13e2574bc5f09fce. * fix useless put * exposure clipped * doc * fix payout with clipped * fix node runtime * add doc * pluggable and generalized staking module * remove print * update doc * refactor * improve documentation and implementation * fix test * Fix test * fix test * fix test * fix remove lowest stake from exposure, not biggest. * nomination index arguments in nominator_payout * add test * try to fix offence * apply slashed and bond eras until active era * doc * update spec version * add test upgrade from previous test environment * Apply suggestions from code review Co-Authored-By: Shawn Tabrizi * nominators upgrade has been cleaned * dynamic history depth implementation * make current_era - history_depth included * Change equality check to start era to less than or equal * Use era specific validator prefs * Add print statement and comment about start era if < * fix next_reward overflow * make more check for bad era claim for zero cost * small refactor * code refactor + fix use of deprecated storage * fix wasm build * add comment * Fix tests * remove outdated comment * Apply suggestions from code review Co-Authored-By: Shawn Tabrizi * gather active era information into one storage Co-authored-by: thiolliere Co-authored-by: Shawn Tabrizi * impl on_runtime_upgrade Co-authored-by: Benjamin Kampmann Co-authored-by: Cecile Tonglet Co-authored-by: AndrĂ© Silva Co-authored-by: Bastian Köcher Co-authored-by: Marcio Diaz Co-authored-by: Nikolay Volf Co-authored-by: s3krit Co-authored-by: Arkadiy Paronyan Co-authored-by: Pierre Krieger Co-authored-by: Chevdor Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: Denis Pisarev Co-authored-by: Eric Co-authored-by: Seun Lanlege Co-authored-by: Sergei Pepyakin Co-authored-by: Max Inden Co-authored-by: Ashley Co-authored-by: Toralf Wittner Co-authored-by: Demi Obenour Co-authored-by: pscott <30843220+pscott@users.noreply.github.com> Co-authored-by: Fedor Sakharov Co-authored-by: Gavin Wood Co-authored-by: thiolliere * make compile * Add some tests * docs * Remove "useless" code * Fix merge and use n + 1 block number * Fix tests * unfix ui tests * Update on_initialize.stderr * fix test * Fix test * Bump spec * Remove `on_finalise` and `on_initialise` * Use bool for tracking runtime upgraded * typo * Support runtime upgrade with `set_storage` * Refactor migration code location * add trailing newlines * Remove old `IsUpgraded` flag * Update state root * Exhaustive match statement * Apply suggestions from code review Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Benjamin Kampmann Co-authored-by: Cecile Tonglet Co-authored-by: AndrĂ© Silva Co-authored-by: Bastian Köcher Co-authored-by: Marcio Diaz Co-authored-by: Nikolay Volf Co-authored-by: s3krit Co-authored-by: Arkadiy Paronyan Co-authored-by: Pierre Krieger Co-authored-by: Chevdor Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: Denis Pisarev Co-authored-by: Eric Co-authored-by: Seun Lanlege Co-authored-by: Sergei Pepyakin Co-authored-by: Max Inden Co-authored-by: Ashley Co-authored-by: Toralf Wittner Co-authored-by: Demi Obenour Co-authored-by: pscott <30843220+pscott@users.noreply.github.com> Co-authored-by: Fedor Sakharov Co-authored-by: Gavin Wood Co-authored-by: thiolliere Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> --- frame/balances/src/lib.rs | 105 ++------- frame/balances/src/migration.rs | 88 +++++++ frame/democracy/src/lib.rs | 4 +- frame/executive/src/lib.rs | 17 +- frame/staking/src/lib.rs | 185 ++------------- frame/staking/src/migration/deprecated.rs | 73 ++++++ frame/staking/src/migration/mod.rs | 119 ++++++++++ .../test_upgrade_from_master_dataset.rs | 0 frame/staking/src/migration/tests.rs | 220 ++++++++++++++++++ frame/staking/src/tests.rs | 218 ----------------- frame/support/src/dispatch.rs | 187 ++++++++++++++- frame/support/src/storage/mod.rs | 12 +- frame/support/src/storage/unhashed.rs | 4 + frame/support/src/weights.rs | 14 +- .../tests/reserved_keyword/on_initialize.rs | 2 +- .../reserved_keyword/on_initialize.stderr | 30 +-- frame/system/src/lib.rs | 28 +++ frame/vesting/src/lib.rs | 4 +- .../consensus/common/src/select_chain.rs | 4 +- primitives/runtime/src/offchain/http.rs | 2 +- primitives/runtime/src/traits.rs | 8 + 21 files changed, 811 insertions(+), 513 deletions(-) create mode 100644 frame/balances/src/migration.rs create mode 100644 frame/staking/src/migration/deprecated.rs create mode 100644 frame/staking/src/migration/mod.rs rename frame/staking/src/{tests => migration}/test_upgrade_from_master_dataset.rs (100%) create mode 100644 frame/staking/src/migration/tests.rs diff --git a/frame/balances/src/lib.rs b/frame/balances/src/lib.rs index b4a1b810df3..f91c9e82290 100644 --- a/frame/balances/src/lib.rs +++ b/frame/balances/src/lib.rs @@ -157,6 +157,7 @@ mod tests_composite; mod tests; #[cfg(feature = "runtime-benchmarks")] mod benchmarking; +mod migration; use sp_std::prelude::*; use sp_std::{cmp, result, mem, fmt::Debug, ops::BitOr, convert::Infallible}; @@ -348,6 +349,21 @@ impl AccountData { } } +// A value placed in storage that represents the current version of the Balances storage. +// This value is used by the `on_runtime_upgrade` logic to determine whether we run +// storage migration logic. This should match directly with the semantic versions of the Rust crate. +#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug)] +enum Releases { + V1_0_0, + V2_0_0, +} + +impl Default for Releases { + fn default() -> Self { + Releases::V1_0_0 + } +} + decl_storage! { trait Store for Module, I: Instance=DefaultInstance> as Balances { /// The total units issued in the system. @@ -367,10 +383,10 @@ decl_storage! { /// NOTE: Should only be accessed when setting, changing and freeing a lock. pub Locks get(fn locks): map hasher(blake2_256) T::AccountId => Vec>; - /// True if network has been upgraded to this version. + /// Storage version of the pallet. /// - /// True for new networks. - IsUpgraded build(|_: &GenesisConfig| true): bool; + /// This is set to v2.0.0 for new networks. + StorageVersion build(|_: &GenesisConfig| Releases::V2_0_0): Releases; } add_extra_genesis { config(balances): Vec<(T::AccountId, T::Balance)>; @@ -518,11 +534,8 @@ decl_module! { >::transfer(&transactor, &dest, value, KeepAlive)?; } - fn on_initialize() { - if !IsUpgraded::::get() { - IsUpgraded::::put(true); - Self::do_upgrade(); - } + fn on_runtime_upgrade() { + migration::on_runtime_upgrade::(); } } } @@ -548,82 +561,6 @@ impl OldBalanceLock { impl, I: Instance> Module { // PRIVATE MUTABLES - // Upgrade from the pre-#4649 balances/vesting into the new balances. - pub fn do_upgrade() { - sp_runtime::print("Upgrading account balances..."); - // First, migrate from old FreeBalance to new Account. - // We also move all locks across since only accounts with FreeBalance values have locks. - // FreeBalance: map T::AccountId => T::Balance - for (hash, free) in StorageIterator::::new(b"Balances", b"FreeBalance").drain() { - let mut account = AccountData { free, ..Default::default() }; - // Locks: map T::AccountId => Vec - let old_locks = get_storage_value::>>(b"Balances", b"Locks", &hash); - if let Some(locks) = old_locks { - let locks = locks.into_iter() - .map(|i| { - let (result, expiry) = i.upgraded(); - if expiry != T::BlockNumber::max_value() { - // Any `until`s that are not T::BlockNumber::max_value come from - // democracy and need to be migrated over there. - // Democracy: Locks get(locks): map T::AccountId => Option; - put_storage_value(b"Democracy", b"Locks", &hash, expiry); - } - result - }) - .collect::>(); - for l in locks.iter() { - if l.reasons == Reasons::All || l.reasons == Reasons::Misc { - account.misc_frozen = account.misc_frozen.max(l.amount); - } - if l.reasons == Reasons::All || l.reasons == Reasons::Fee { - account.fee_frozen = account.fee_frozen.max(l.amount); - } - } - put_storage_value(b"Balances", b"Locks", &hash, locks); - } - put_storage_value(b"Balances", b"Account", &hash, account); - } - // Second, migrate old ReservedBalance into new Account. - // ReservedBalance: map T::AccountId => T::Balance - for (hash, reserved) in StorageIterator::::new(b"Balances", b"ReservedBalance").drain() { - let mut account = get_storage_value::>(b"Balances", b"Account", &hash).unwrap_or_default(); - account.reserved = reserved; - put_storage_value(b"Balances", b"Account", &hash, account); - } - - // Finally, migrate vesting and ensure locks are in place. We will be lazy and just lock - // for the maximum amount (i.e. at genesis). Users will need to call "vest" to reduce the - // lock to something sensible. - // pub Vesting: map T::AccountId => Option; - for (hash, vesting) in StorageIterator::<(T::Balance, T::Balance, T::BlockNumber)>::new(b"Balances", b"Vesting").drain() { - let mut account = get_storage_value::>(b"Balances", b"Account", &hash).unwrap_or_default(); - let mut locks = get_storage_value::>>(b"Balances", b"Locks", &hash).unwrap_or_default(); - locks.push(BalanceLock { - id: *b"vesting ", - amount: vesting.0.clone(), - reasons: Reasons::Misc, - }); - account.misc_frozen = account.misc_frozen.max(vesting.0.clone()); - put_storage_value(b"Vesting", b"Vesting", &hash, vesting); - put_storage_value(b"Balances", b"Locks", &hash, locks); - put_storage_value(b"Balances", b"Account", &hash, account); - } - - for (hash, balances) in StorageIterator::>::new(b"Balances", b"Account").drain() { - let nonce = take_storage_value::(b"System", b"AccountNonce", &hash).unwrap_or_default(); - let mut refs: system::RefCount = 0; - // The items in Kusama that would result in a ref count being incremented. - if have_storage_value(b"Democracy", b"Proxy", &hash) { refs += 1 } - // We skip Recovered since it's being replaced anyway. - let mut prefixed_hash = twox_64(&b":session:keys"[..]).to_vec(); - prefixed_hash.extend(&b":session:keys"[..]); - prefixed_hash.extend(&hash[..]); - if have_storage_value(b"Session", b"NextKeys", &prefixed_hash) { refs += 1 } - if have_storage_value(b"Staking", b"Bonded", &hash) { refs += 1 } - put_storage_value(b"System", b"Account", &hash, (nonce, refs, &balances)); - } - } - /// Get the free balance of an account. pub fn free_balance(who: impl sp_std::borrow::Borrow) -> T::Balance { Self::account(who.borrow()).free diff --git a/frame/balances/src/migration.rs b/frame/balances/src/migration.rs new file mode 100644 index 00000000000..16c764d59f1 --- /dev/null +++ b/frame/balances/src/migration.rs @@ -0,0 +1,88 @@ +use super::*; + +pub fn on_runtime_upgrade, I: Instance>() { + match StorageVersion::::get() { + Releases::V2_0_0 => return, + Releases::V1_0_0 => upgrade_v1_to_v2::(), + } +} + +// Upgrade from the pre-#4649 balances/vesting into the new balances. +fn upgrade_v1_to_v2, I: Instance>() { + sp_runtime::print("Upgrading account balances..."); + // First, migrate from old FreeBalance to new Account. + // We also move all locks across since only accounts with FreeBalance values have locks. + // FreeBalance: map T::AccountId => T::Balance + for (hash, free) in StorageIterator::::new(b"Balances", b"FreeBalance").drain() { + let mut account = AccountData { free, ..Default::default() }; + // Locks: map T::AccountId => Vec + let old_locks = get_storage_value::>>(b"Balances", b"Locks", &hash); + if let Some(locks) = old_locks { + let locks = locks.into_iter() + .map(|i| { + let (result, expiry) = i.upgraded(); + if expiry != T::BlockNumber::max_value() { + // Any `until`s that are not T::BlockNumber::max_value come from + // democracy and need to be migrated over there. + // Democracy: Locks get(locks): map T::AccountId => Option; + put_storage_value(b"Democracy", b"Locks", &hash, expiry); + } + result + }) + .collect::>(); + for l in locks.iter() { + if l.reasons == Reasons::All || l.reasons == Reasons::Misc { + account.misc_frozen = account.misc_frozen.max(l.amount); + } + if l.reasons == Reasons::All || l.reasons == Reasons::Fee { + account.fee_frozen = account.fee_frozen.max(l.amount); + } + } + put_storage_value(b"Balances", b"Locks", &hash, locks); + } + put_storage_value(b"Balances", b"Account", &hash, account); + } + // Second, migrate old ReservedBalance into new Account. + // ReservedBalance: map T::AccountId => T::Balance + for (hash, reserved) in StorageIterator::::new(b"Balances", b"ReservedBalance").drain() { + let mut account = get_storage_value::>(b"Balances", b"Account", &hash).unwrap_or_default(); + account.reserved = reserved; + put_storage_value(b"Balances", b"Account", &hash, account); + } + + // Finally, migrate vesting and ensure locks are in place. We will be lazy and just lock + // for the maximum amount (i.e. at genesis). Users will need to call "vest" to reduce the + // lock to something sensible. + // pub Vesting: map T::AccountId => Option; + for (hash, vesting) in StorageIterator::<(T::Balance, T::Balance, T::BlockNumber)>::new(b"Balances", b"Vesting").drain() { + let mut account = get_storage_value::>(b"Balances", b"Account", &hash).unwrap_or_default(); + let mut locks = get_storage_value::>>(b"Balances", b"Locks", &hash).unwrap_or_default(); + locks.push(BalanceLock { + id: *b"vesting ", + amount: vesting.0.clone(), + reasons: Reasons::Misc, + }); + account.misc_frozen = account.misc_frozen.max(vesting.0.clone()); + put_storage_value(b"Vesting", b"Vesting", &hash, vesting); + put_storage_value(b"Balances", b"Locks", &hash, locks); + put_storage_value(b"Balances", b"Account", &hash, account); + } + + for (hash, balances) in StorageIterator::>::new(b"Balances", b"Account").drain() { + let nonce = take_storage_value::(b"System", b"AccountNonce", &hash).unwrap_or_default(); + let mut refs: system::RefCount = 0; + // The items in Kusama that would result in a ref count being incremented. + if have_storage_value(b"Democracy", b"Proxy", &hash) { refs += 1 } + // We skip Recovered since it's being replaced anyway. + let mut prefixed_hash = twox_64(&b":session:keys"[..]).to_vec(); + prefixed_hash.extend(&b":session:keys"[..]); + prefixed_hash.extend(&hash[..]); + if have_storage_value(b"Session", b"NextKeys", &prefixed_hash) { refs += 1 } + if have_storage_value(b"Staking", b"Bonded", &hash) { refs += 1 } + put_storage_value(b"System", b"Account", &hash, (nonce, refs, &balances)); + } + + take_storage_value::(b"Balances", b"IsUpgraded", &[]); + + StorageVersion::::put(Releases::V2_0_0); +} diff --git a/frame/democracy/src/lib.rs b/frame/democracy/src/lib.rs index b2e234c91a1..5632103ab31 100644 --- a/frame/democracy/src/lib.rs +++ b/frame/democracy/src/lib.rs @@ -1555,7 +1555,7 @@ mod tests { }; use sp_core::H256; use sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup, Bounded, BadOrigin, OnInitialize}, + traits::{BlakeTwo256, IdentityLookup, Bounded, BadOrigin, OnRuntimeUpgrade}, testing::Header, Perbill, }; use pallet_balances::{BalanceLock, Error as BalancesError}; @@ -1713,7 +1713,7 @@ mod tests { ]; s.top = data.into_iter().collect(); sp_io::TestExternalities::new(s).execute_with(|| { - Balances::on_initialize(1); + Balances::on_runtime_upgrade(); assert_eq!(Balances::free_balance(1), 5); assert_eq!(Balances::reserved_balance(1), 5); assert_eq!(Balances::usable_balance(&1), 2); diff --git a/frame/executive/src/lib.rs b/frame/executive/src/lib.rs index 022e26d3cb0..7bf39989ecc 100644 --- a/frame/executive/src/lib.rs +++ b/frame/executive/src/lib.rs @@ -75,13 +75,16 @@ #![cfg_attr(not(feature = "std"), no_std)] use sp_std::{prelude::*, marker::PhantomData}; -use frame_support::weights::{GetDispatchInfo, WeighBlock, DispatchInfo}; +use frame_support::{ + storage::StorageValue, + weights::{GetDispatchInfo, WeighBlock, DispatchInfo} +}; use sp_runtime::{ generic::Digest, ApplyExtrinsicResult, traits::{ self, Header, Zero, One, Checkable, Applyable, CheckEqual, OnFinalize, OnInitialize, - NumberFor, Block as BlockT, OffchainWorker, Dispatchable, Saturating, + NumberFor, Block as BlockT, OffchainWorker, Dispatchable, Saturating, OnRuntimeUpgrade, }, transaction_validity::TransactionValidity, }; @@ -110,6 +113,7 @@ impl< Context: Default, UnsignedValidator, AllModules: + OnRuntimeUpgrade + OnInitialize + OnFinalize + OffchainWorker + @@ -135,6 +139,7 @@ impl< Context: Default, UnsignedValidator, AllModules: + OnRuntimeUpgrade + OnInitialize + OnFinalize + OffchainWorker + @@ -176,6 +181,12 @@ where extrinsics_root: &System::Hash, digest: &Digest, ) { + if frame_system::RuntimeUpgraded::take() { + ::on_runtime_upgrade(); + >::register_extra_weight_unchecked( + >::on_runtime_upgrade() + ); + } >::initialize( block_number, parent_hash, @@ -573,7 +584,7 @@ mod tests { header: Header { parent_hash: [69u8; 32].into(), number: 1, - state_root: hex!("17caebd966d10cc6dc9659edf7fa3196511593f6c39f80f9b97cdbc3b0855cf3").into(), + state_root: hex!("8a22606e925c39bb0c8e8f6f5871c0aceab88a2fcff6b2d92660af8f6daff0b1").into(), extrinsics_root: hex!("03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314").into(), digest: Digest { logs: vec![], }, }, diff --git a/frame/staking/src/lib.rs b/frame/staking/src/lib.rs index 3609191f4cb..612efecea16 100644 --- a/frame/staking/src/lib.rs +++ b/frame/staking/src/lib.rs @@ -254,6 +254,7 @@ mod mock; #[cfg(test)] mod tests; mod slashing; +mod migration; pub mod inflation; @@ -679,6 +680,21 @@ impl Default for Forcing { fn default() -> Self { Forcing::NotForcing } } +// A value placed in storage that represents the current version of the Staking storage. +// This value is used by the `on_runtime_upgrade` logic to determine whether we run +// storage migration logic. This should match directly with the semantic versions of the Rust crate. +#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug)] +enum Releases { + V1_0_0, + V2_0_0, +} + +impl Default for Releases { + fn default() -> Self { + Releases::V1_0_0 + } +} + decl_storage! { trait Store for Module as Staking { /// Number of era to keep in history. @@ -832,10 +848,10 @@ decl_storage! { /// The earliest era for which we have a pending, unapplied slash. EarliestUnappliedSlash: Option; - /// True if network has been upgraded to this version. + /// Storage version of the pallet. /// - /// True for new networks. - IsUpgraded build(|_| true): bool; + /// This is set to v2.0.0 for new networks. + StorageVersion build(|_: &GenesisConfig| Releases::V2_0_0): Releases; } add_extra_genesis { config(stakers): @@ -927,8 +943,8 @@ decl_module! { fn deposit_event() = default; - fn on_initialize() { - Self::ensure_storage_upgraded(); + fn on_runtime_upgrade() { + migration::on_runtime_upgrade::(); } fn on_finalize() { @@ -1132,8 +1148,6 @@ decl_module! { /// # #[weight = SimpleDispatchInfo::FixedNormal(750_000)] fn validate(origin, prefs: ValidatorPrefs) { - Self::ensure_storage_upgraded(); - let controller = ensure_signed(origin)?; let ledger = Self::ledger(&controller).ok_or(Error::::NotController)?; let stash = &ledger.stash; @@ -1154,8 +1168,6 @@ decl_module! { /// # #[weight = SimpleDispatchInfo::FixedNormal(750_000)] fn nominate(origin, targets: Vec<::Source>) { - Self::ensure_storage_upgraded(); - let controller = ensure_signed(origin)?; let ledger = Self::ledger(&controller).ok_or(Error::::NotController)?; let stash = &ledger.stash; @@ -1433,7 +1445,6 @@ decl_module! { /// /// - `stash`: The stash account to reap. Its balance must be zero. fn reap_stash(_origin, stash: T::AccountId) { - Self::ensure_storage_upgraded(); ensure!(T::Currency::total_balance(&stash).is_zero(), Error::::FundedTarget); Self::kill_stash(&stash)?; T::Currency::remove_lock(STAKING_ID, &stash); @@ -1577,14 +1588,6 @@ impl Module { >::remove(stash); } - /// Ensures storage is upgraded to most recent necessary state. - fn ensure_storage_upgraded() { - if !IsUpgraded::get() { - IsUpgraded::put(true); - Self::do_upgrade(); - } - } - /// Actually make a payment to a staker. This uses the currency's reward function /// to pay the right payee for the given staker account. fn make_payout(stash: &T::AccountId, amount: BalanceOf) -> Option> { @@ -1958,147 +1961,6 @@ impl Module { _ => ForceEra::put(Forcing::ForceNew), } } - - /// Update storages to current version - /// - /// In old version the staking module has several issue about handling session delay, the - /// current era was always considered the active one. - /// - /// After the migration the current era will still be considered the active one for the era of - /// the upgrade. And the delay issue will be fixed when planning the next era. - // * create: - // * ActiveEraStart - // * ErasRewardPoints - // * ActiveEra - // * ErasStakers - // * ErasStakersClipped - // * ErasValidatorPrefs - // * ErasTotalStake - // * ErasStartSessionIndex - // * translate StakingLedger - // * removal of: - // * Stakers - // * SlotStake - // * CurrentElected - // * CurrentEraStart - // * CurrentEraStartSessionIndex - // * CurrentEraPointsEarned - fn do_upgrade() { - /// Deprecated storages used for migration only. - mod deprecated { - use crate::{Trait, BalanceOf, MomentOf, SessionIndex, Exposure}; - use codec::{Encode, Decode}; - use frame_support::{decl_module, decl_storage}; - use sp_std::prelude::*; - - /// Reward points of an era. Used to split era total payout between validators. - #[derive(Encode, Decode, Default)] - pub struct EraPoints { - /// Total number of points. Equals the sum of reward points for each validator. - pub total: u32, - /// The reward points earned by a given validator. The index of this vec corresponds to the - /// index into the current validator set. - pub individual: Vec, - } - - decl_module! { - pub struct Module for enum Call where origin: T::Origin { } - } - - decl_storage! { - pub trait Store for Module as Staking { - pub SlotStake: BalanceOf; - - /// The currently elected validator set keyed by stash account ID. - pub CurrentElected: Vec; - - /// The start of the current era. - pub CurrentEraStart: MomentOf; - - /// The session index at which the current era started. - pub CurrentEraStartSessionIndex: SessionIndex; - - /// Rewards for the current era. Using indices of current elected set. - pub CurrentEraPointsEarned: EraPoints; - - /// Nominators for a particular account that is in action right now. You can't iterate - /// through validators here, but you can find them in the Session module. - /// - /// This is keyed by the stash account. - pub Stakers: map hasher(blake2_256) T::AccountId => Exposure>; - } - } - } - - #[derive(Encode, Decode)] - struct OldStakingLedger { - stash: AccountId, - #[codec(compact)] - total: Balance, - #[codec(compact)] - active: Balance, - unlocking: Vec>, - } - - let current_era_start_index = deprecated::CurrentEraStartSessionIndex::get(); - let current_era = as Store>::CurrentEra::get().unwrap_or(0); - let current_era_start = deprecated::CurrentEraStart::::get(); - as Store>::ErasStartSessionIndex::insert(current_era, current_era_start_index); - as Store>::ActiveEra::put(ActiveEraInfo { - index: current_era, - start: Some(current_era_start), - }); - - let current_elected = deprecated::CurrentElected::::get(); - let mut current_total_stake = >::zero(); - for validator in ¤t_elected { - let exposure = deprecated::Stakers::::get(validator); - current_total_stake += exposure.total; - as Store>::ErasStakers::insert(current_era, validator, &exposure); - - let mut exposure_clipped = exposure; - let clipped_max_len = T::MaxNominatorRewardedPerValidator::get() as usize; - if exposure_clipped.others.len() > clipped_max_len { - exposure_clipped.others.sort_unstable_by(|a, b| a.value.cmp(&b.value).reverse()); - exposure_clipped.others.truncate(clipped_max_len); - } - as Store>::ErasStakersClipped::insert(current_era, validator, exposure_clipped); - - let pref = as Store>::Validators::get(validator); - as Store>::ErasValidatorPrefs::insert(current_era, validator, pref); - } - as Store>::ErasTotalStake::insert(current_era, current_total_stake); - - let points = deprecated::CurrentEraPointsEarned::get(); - as Store>::ErasRewardPoints::insert(current_era, EraRewardPoints { - total: points.total, - individual: current_elected.iter().cloned().zip(points.individual.iter().cloned()).collect(), - }); - - let res = as Store>::Ledger::translate_values( - |old: OldStakingLedger>| StakingLedger { - stash: old.stash, - total: old.total, - active: old.active, - unlocking: old.unlocking, - last_reward: None, - } - ); - if let Err(e) = res { - frame_support::print("Encountered error in migration of Staking::Ledger map."); - frame_support::print("The number of removed key/value is:"); - frame_support::print(e); - } - - - // Kill old storages - deprecated::Stakers::::remove_all(); - deprecated::SlotStake::::kill(); - deprecated::CurrentElected::::kill(); - deprecated::CurrentEraStart::::kill(); - deprecated::CurrentEraStartSessionIndex::kill(); - deprecated::CurrentEraPointsEarned::kill(); - } } /// In this implementation `new_session(session)` must be called before `end_session(session-1)` @@ -2108,7 +1970,6 @@ impl Module { /// some session can lag in between the newest session planned and the latest session started. impl pallet_session::SessionManager for Module { fn new_session(new_index: SessionIndex) -> Option> { - Self::ensure_storage_upgraded(); Self::new_session(new_index) } fn start_session(start_index: SessionIndex) { @@ -2208,8 +2069,6 @@ impl OnOffenceHandler>::ensure_storage_upgraded(); - let reward_proportion = SlashRewardFraction::get(); let active_era = { @@ -2297,8 +2156,6 @@ impl ReportOffence O: Offence, { fn report_offence(reporters: Vec, offence: O) -> Result<(), OffenceError> { - >::ensure_storage_upgraded(); - // disallow any slashing from before the current bonding period. let offence_session = offence.session_index(); let bonded_eras = BondedEras::get(); diff --git a/frame/staking/src/migration/deprecated.rs b/frame/staking/src/migration/deprecated.rs new file mode 100644 index 00000000000..41cf6652291 --- /dev/null +++ b/frame/staking/src/migration/deprecated.rs @@ -0,0 +1,73 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +/// Deprecated storages used for migration from v1.0.0 to v2.0.0 only. + +use crate::{Trait, BalanceOf, MomentOf, SessionIndex, Exposure, UnlockChunk}; +use codec::{Encode, Decode, HasCompact}; +use frame_support::{decl_module, decl_storage}; +use sp_std::prelude::*; + +/// Reward points of an era. Used to split era total payout between validators. +#[derive(Encode, Decode, Default)] +pub struct EraPoints { + /// Total number of points. Equals the sum of reward points for each validator. + pub total: u32, + /// The reward points earned by a given validator. The index of this vec corresponds to the + /// index into the current validator set. + pub individual: Vec, +} + +#[derive(Encode, Decode)] +pub struct OldStakingLedger { + pub stash: AccountId, + #[codec(compact)] + pub total: Balance, + #[codec(compact)] + pub active: Balance, + pub unlocking: Vec>, +} + +decl_module! { + pub struct Module for enum Call where origin: T::Origin { } +} + +decl_storage! { + pub trait Store for Module as Staking { + pub SlotStake: BalanceOf; + + /// The currently elected validator set keyed by stash account ID. + pub CurrentElected: Vec; + + /// The start of the current era. + pub CurrentEraStart: MomentOf; + + /// The session index at which the current era started. + pub CurrentEraStartSessionIndex: SessionIndex; + + /// Rewards for the current era. Using indices of current elected set. + pub CurrentEraPointsEarned: EraPoints; + + /// Nominators for a particular account that is in action right now. You can't iterate + /// through validators here, but you can find them in the Session module. + /// + /// This is keyed by the stash account. + pub Stakers: map hasher(blake2_256) T::AccountId => Exposure>; + + /// Old upgrade flag. + pub IsUpgraded: bool; + } +} diff --git a/frame/staking/src/migration/mod.rs b/frame/staking/src/migration/mod.rs new file mode 100644 index 00000000000..971e4091891 --- /dev/null +++ b/frame/staking/src/migration/mod.rs @@ -0,0 +1,119 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Update storage from v1.0.0 to v2.0.0 +//! +//! In old version the staking module has several issue about handling session delay, the +//! current era was always considered the active one. +//! +//! After the migration the current era will still be considered the active one for the era of +//! the upgrade. And the delay issue will be fixed when planning the next era. +// * create: +// * ActiveEraStart +// * ErasRewardPoints +// * ActiveEra +// * ErasStakers +// * ErasStakersClipped +// * ErasValidatorPrefs +// * ErasTotalStake +// * ErasStartSessionIndex +// * translate StakingLedger +// * removal of: +// * Stakers +// * SlotStake +// * CurrentElected +// * CurrentEraStart +// * CurrentEraStartSessionIndex +// * CurrentEraPointsEarned + +use super::*; +mod deprecated; +#[cfg(test)] +mod tests; +#[cfg(test)] +mod test_upgrade_from_master_dataset; + +pub fn on_runtime_upgrade() { + match StorageVersion::get() { + Releases::V2_0_0 => return, + Releases::V1_0_0 => upgrade_v1_to_v2::(), + } +} + +fn upgrade_v1_to_v2() { + deprecated::IsUpgraded::kill(); + + let current_era_start_index = deprecated::CurrentEraStartSessionIndex::get(); + let current_era = as Store>::CurrentEra::get().unwrap_or(0); + let current_era_start = deprecated::CurrentEraStart::::get(); + as Store>::ErasStartSessionIndex::insert(current_era, current_era_start_index); + as Store>::ActiveEra::put(ActiveEraInfo { + index: current_era, + start: Some(current_era_start), + }); + + let current_elected = deprecated::CurrentElected::::get(); + let mut current_total_stake = >::zero(); + for validator in ¤t_elected { + let exposure = deprecated::Stakers::::get(validator); + current_total_stake += exposure.total; + as Store>::ErasStakers::insert(current_era, validator, &exposure); + + let mut exposure_clipped = exposure; + let clipped_max_len = T::MaxNominatorRewardedPerValidator::get() as usize; + if exposure_clipped.others.len() > clipped_max_len { + exposure_clipped.others.sort_unstable_by(|a, b| a.value.cmp(&b.value).reverse()); + exposure_clipped.others.truncate(clipped_max_len); + } + as Store>::ErasStakersClipped::insert(current_era, validator, exposure_clipped); + + let pref = as Store>::Validators::get(validator); + as Store>::ErasValidatorPrefs::insert(current_era, validator, pref); + } + as Store>::ErasTotalStake::insert(current_era, current_total_stake); + + let points = deprecated::CurrentEraPointsEarned::get(); + as Store>::ErasRewardPoints::insert(current_era, EraRewardPoints { + total: points.total, + individual: current_elected.iter().cloned().zip(points.individual.iter().cloned()).collect(), + }); + + let res = as Store>::Ledger::translate_values( + |old: deprecated::OldStakingLedger>| StakingLedger { + stash: old.stash, + total: old.total, + active: old.active, + unlocking: old.unlocking, + last_reward: None, + } + ); + if let Err(e) = res { + frame_support::print("Encountered error in migration of Staking::Ledger map."); + frame_support::print("The number of removed key/value is:"); + frame_support::print(e); + } + + + // Kill old storages + deprecated::Stakers::::remove_all(); + deprecated::SlotStake::::kill(); + deprecated::CurrentElected::::kill(); + deprecated::CurrentEraStart::::kill(); + deprecated::CurrentEraStartSessionIndex::kill(); + deprecated::CurrentEraPointsEarned::kill(); + + StorageVersion::put(Releases::V2_0_0); +} diff --git a/frame/staking/src/tests/test_upgrade_from_master_dataset.rs b/frame/staking/src/migration/test_upgrade_from_master_dataset.rs similarity index 100% rename from frame/staking/src/tests/test_upgrade_from_master_dataset.rs rename to frame/staking/src/migration/test_upgrade_from_master_dataset.rs diff --git a/frame/staking/src/migration/tests.rs b/frame/staking/src/migration/tests.rs new file mode 100644 index 00000000000..d1ba35cadce --- /dev/null +++ b/frame/staking/src/migration/tests.rs @@ -0,0 +1,220 @@ +use crate::*; +use crate::mock::*; +use frame_support::storage::migration::*; +use sp_core::hashing::blake2_256; +use super::test_upgrade_from_master_dataset; +use sp_runtime::traits::OnRuntimeUpgrade; + +#[test] +fn upgrade_works() { + ExtBuilder::default().build().execute_with(|| { + start_era(3); + + assert_eq!(Session::validators(), vec![21, 11]); + + // Insert fake data to check the migration + put_storage_value::>(b"Staking", b"CurrentElected", b"", vec![21, 31]); + put_storage_value::(b"Staking", b"CurrentEraStartSessionIndex", b"", 5); + put_storage_value::>(b"Staking", b"CurrentEraStart", b"", 777); + put_storage_value( + b"Staking", b"Stakers", &blake2_256(&11u64.encode()), + Exposure:: { + total: 10, + own: 10, + others: vec![], + } + ); + put_storage_value( + b"Staking", b"Stakers", &blake2_256(&21u64.encode()), + Exposure:: { + total: 20, + own: 20, + others: vec![], + } + ); + put_storage_value( + b"Staking", b"Stakers", &blake2_256(&31u64.encode()), + Exposure:: { + total: 30, + own: 30, + others: vec![], + } + ); + put_storage_value::<(u32, Vec)>(b"Staking", b"CurrentEraPointsEarned", b"", (12, vec![2, 10])); + ::ErasStakers::remove_all(); + ::ErasStakersClipped::remove_all(); + + ::StorageVersion::put(Releases::V1_0_0); + + // Perform upgrade + Staking::on_runtime_upgrade(); + + assert_eq!(::StorageVersion::get(), Releases::V2_0_0); + + // Check migration + assert_eq!(::ErasStartSessionIndex::get(3).unwrap(), 5); + assert_eq!(::ErasRewardPoints::get(3), EraRewardPoints { + total: 12, + individual: vec![(21, 2), (31, 10)].into_iter().collect(), + }); + assert_eq!(::ActiveEra::get().unwrap().index, 3); + assert_eq!(::ActiveEra::get().unwrap().start, Some(777)); + assert_eq!(::CurrentEra::get().unwrap(), 3); + assert_eq!(::ErasStakers::get(3, 11), Exposure { + total: 0, + own: 0, + others: vec![], + }); + assert_eq!(::ErasStakers::get(3, 21), Exposure { + total: 20, + own: 20, + others: vec![], + }); + assert_eq!(::ErasStakers::get(3, 31), Exposure { + total: 30, + own: 30, + others: vec![], + }); + assert_eq!(::ErasStakersClipped::get(3, 11), Exposure { + total: 0, + own: 0, + others: vec![], + }); + assert_eq!(::ErasStakersClipped::get(3, 21), Exposure { + total: 20, + own: 20, + others: vec![], + }); + assert_eq!(::ErasStakersClipped::get(3, 31), Exposure { + total: 30, + own: 30, + others: vec![], + }); + assert_eq!(::ErasValidatorPrefs::get(3, 21), Staking::validators(21)); + assert_eq!(::ErasValidatorPrefs::get(3, 31), Staking::validators(31)); + assert_eq!(::ErasTotalStake::get(3), 50); + }) +} + +// Test that an upgrade from previous test environment works. +#[test] +fn test_upgrade_from_master_works() { + let data_sets = &[ + test_upgrade_from_master_dataset::_0, + test_upgrade_from_master_dataset::_1, + test_upgrade_from_master_dataset::_2, + test_upgrade_from_master_dataset::_3, + test_upgrade_from_master_dataset::_4, + test_upgrade_from_master_dataset::_5, + test_upgrade_from_master_dataset::_6, + test_upgrade_from_master_dataset::_7, + test_upgrade_from_master_dataset::_8, + ]; + for data_set in data_sets.iter() { + let mut storage = sp_runtime::Storage::default(); + for (key, value) in data_set.iter() { + storage.top.insert(key.to_vec(), value.to_vec()); + } + let mut ext = sp_io::TestExternalities::from(storage); + ext.execute_with(|| { + let old_stakers = + get_storage_value::>(b"Staking", b"CurrentElected", b"").unwrap(); + let old_staker_0 = old_stakers[0]; + let old_staker_1 = old_stakers[1]; + let old_current_era = + get_storage_value::(b"Staking", b"CurrentEra", b"").unwrap(); + let old_staker_0_exposure = get_storage_value::>( + b"Staking", b"Stakers", &blake2_256(&old_staker_0.encode()) + ).unwrap(); + let old_staker_1_exposure = get_storage_value::>( + b"Staking", b"Stakers", &blake2_256(&old_staker_1.encode()) + ).unwrap(); + let ( + old_era_points_earned_total, + old_era_points_earned_individual + ) = get_storage_value::<(u32, Vec)>(b"Staking", b"CurrentEraPointsEarned", b"") + .unwrap_or((0, vec![])); + + Staking::on_runtime_upgrade(); + assert!(::StorageVersion::get() == Releases::V2_0_0); + + // Check ActiveEra and CurrentEra + let active_era = Staking::active_era().unwrap().index; + let current_era = Staking::current_era().unwrap(); + assert!(current_era == active_era); + assert!(current_era == old_current_era); + + // Check ErasStartSessionIndex + let active_era_start = Staking::eras_start_session_index(active_era).unwrap(); + let current_era_start = Staking::eras_start_session_index(current_era).unwrap(); + let current_session_index = Session::current_index(); + assert!(current_era_start == active_era_start); + assert!(active_era_start <= current_session_index); + assert_eq!(::ErasStartSessionIndex::iter().count(), 1); + + // Check ErasStakers + assert_eq!(::ErasStakers::iter().count(), 2); + assert_eq!( + ::ErasStakers::get(current_era, old_staker_0), + old_staker_0_exposure + ); + assert_eq!( + ::ErasStakers::get(current_era, old_staker_1), + old_staker_1_exposure + ); + + // Check ErasStakersClipped + assert_eq!(::ErasStakersClipped::iter().count(), 2); + assert!(::ErasStakersClipped::iter().all(|exposure_clipped| { + let max = ::MaxNominatorRewardedPerValidator::get() as usize; + exposure_clipped.others.len() <= max + })); + assert_eq!( + ::ErasStakersClipped::get(current_era, old_staker_0), + old_staker_0_exposure + ); + assert_eq!( + ::ErasStakersClipped::get(current_era, old_staker_1), + old_staker_1_exposure + ); + + // Check ErasValidatorPrefs + assert_eq!(::ErasValidatorPrefs::iter().count(), 2); + assert_eq!( + ::ErasValidatorPrefs::get(current_era, old_staker_0), + Staking::validators(old_staker_0) + ); + assert_eq!( + ::ErasValidatorPrefs::get(current_era, old_staker_1), + Staking::validators(old_staker_1) + ); + + // Check ErasTotalStake + assert_eq!(::ErasTotalStake::iter().count(), 1); + assert_eq!( + ::ErasTotalStake::get(current_era), + old_staker_0_exposure.total + old_staker_1_exposure.total + ); + + // Check ErasRewardPoints + assert_eq!(::ErasRewardPoints::iter().count(), 1); + let mut individual = BTreeMap::new(); + if let Some(p) = old_era_points_earned_individual.get(0) { + individual.insert(old_staker_0, p.clone()); + } + if let Some(p) = old_era_points_earned_individual.get(1) { + individual.insert(old_staker_1, p.clone()); + } + assert_eq!( + ::ErasRewardPoints::get(current_era), + EraRewardPoints { + total: old_era_points_earned_total, + individual, + } + ); + + // Check ErasValidatorReward + assert_eq!(::ErasValidatorReward::iter().count(), 0); + }); + } +} diff --git a/frame/staking/src/tests.rs b/frame/staking/src/tests.rs index 98536a042aa..507b5591d5f 100644 --- a/frame/staking/src/tests.rs +++ b/frame/staking/src/tests.rs @@ -16,8 +16,6 @@ //! Tests for the module. -mod test_upgrade_from_master_dataset; - use super::*; use mock::*; use sp_runtime::{assert_eq_error_rate, traits::{OnInitialize, BadOrigin}}; @@ -26,10 +24,8 @@ use frame_support::{ assert_ok, assert_noop, traits::{Currency, ReservableCurrency}, StorageMap, - storage::migration::{put_storage_value, get_storage_value}, }; use pallet_balances::Error as BalancesError; -use sp_io::hashing::blake2_256; use substrate_test_utils::assert_eq_uvec; use crate::Store; @@ -2843,97 +2839,6 @@ fn claim_reward_at_the_last_era_and_no_double_claim_and_invalid_claim() { }); } -#[test] -fn upgrade_works() { - ExtBuilder::default().build().execute_with(|| { - start_era(3); - - assert_eq!(Session::validators(), vec![21, 11]); - - // Insert fake data to check the migration - put_storage_value::>(b"Staking", b"CurrentElected", b"", vec![21, 31]); - put_storage_value::(b"Staking", b"CurrentEraStartSessionIndex", b"", 5); - put_storage_value::>(b"Staking", b"CurrentEraStart", b"", 777); - put_storage_value( - b"Staking", b"Stakers", &blake2_256(&11u64.encode()), - Exposure:: { - total: 10, - own: 10, - others: vec![], - } - ); - put_storage_value( - b"Staking", b"Stakers", &blake2_256(&21u64.encode()), - Exposure:: { - total: 20, - own: 20, - others: vec![], - } - ); - put_storage_value( - b"Staking", b"Stakers", &blake2_256(&31u64.encode()), - Exposure:: { - total: 30, - own: 30, - others: vec![], - } - ); - put_storage_value::<(u32, Vec)>(b"Staking", b"CurrentEraPointsEarned", b"", (12, vec![2, 10])); - ::ErasStakers::remove_all(); - ::ErasStakersClipped::remove_all(); - - ::IsUpgraded::put(false); - - // Perform upgrade - Staking::ensure_storage_upgraded(); - - assert_eq!(::IsUpgraded::get(), true); - - // Check migration - assert_eq!(::ErasStartSessionIndex::get(3).unwrap(), 5); - assert_eq!(::ErasRewardPoints::get(3), EraRewardPoints { - total: 12, - individual: vec![(21, 2), (31, 10)].into_iter().collect(), - }); - assert_eq!(::ActiveEra::get().unwrap().index, 3); - assert_eq!(::ActiveEra::get().unwrap().start, Some(777)); - assert_eq!(::CurrentEra::get().unwrap(), 3); - assert_eq!(::ErasStakers::get(3, 11), Exposure { - total: 0, - own: 0, - others: vec![], - }); - assert_eq!(::ErasStakers::get(3, 21), Exposure { - total: 20, - own: 20, - others: vec![], - }); - assert_eq!(::ErasStakers::get(3, 31), Exposure { - total: 30, - own: 30, - others: vec![], - }); - assert_eq!(::ErasStakersClipped::get(3, 11), Exposure { - total: 0, - own: 0, - others: vec![], - }); - assert_eq!(::ErasStakersClipped::get(3, 21), Exposure { - total: 20, - own: 20, - others: vec![], - }); - assert_eq!(::ErasStakersClipped::get(3, 31), Exposure { - total: 30, - own: 30, - others: vec![], - }); - assert_eq!(::ErasValidatorPrefs::get(3, 21), Staking::validators(21)); - assert_eq!(::ErasValidatorPrefs::get(3, 31), Staking::validators(31)); - assert_eq!(::ErasTotalStake::get(3), 50); - }) -} - #[test] fn zero_slash_keeps_nominators() { ExtBuilder::default().build().execute_with(|| { @@ -3071,129 +2976,6 @@ fn test_max_nominator_rewarded_per_validator_and_cant_steal_someone_else_reward( }); } -// Test that an upgrade from previous test environment works. -#[test] -fn test_upgrade_from_master_works() { - let data_sets = &[ - test_upgrade_from_master_dataset::_0, - test_upgrade_from_master_dataset::_1, - test_upgrade_from_master_dataset::_2, - test_upgrade_from_master_dataset::_3, - test_upgrade_from_master_dataset::_4, - test_upgrade_from_master_dataset::_5, - test_upgrade_from_master_dataset::_6, - test_upgrade_from_master_dataset::_7, - test_upgrade_from_master_dataset::_8, - ]; - for data_set in data_sets.iter() { - let mut storage = sp_runtime::Storage::default(); - for (key, value) in data_set.iter() { - storage.top.insert(key.to_vec(), value.to_vec()); - } - let mut ext = sp_io::TestExternalities::from(storage); - ext.execute_with(|| { - let old_stakers = - get_storage_value::>(b"Staking", b"CurrentElected", b"").unwrap(); - let old_staker_0 = old_stakers[0]; - let old_staker_1 = old_stakers[1]; - let old_current_era = - get_storage_value::(b"Staking", b"CurrentEra", b"").unwrap(); - let old_staker_0_exposure = get_storage_value::>( - b"Staking", b"Stakers", &blake2_256(&old_staker_0.encode()) - ).unwrap(); - let old_staker_1_exposure = get_storage_value::>( - b"Staking", b"Stakers", &blake2_256(&old_staker_1.encode()) - ).unwrap(); - let ( - old_era_points_earned_total, - old_era_points_earned_individual - ) = get_storage_value::<(u32, Vec)>(b"Staking", b"CurrentEraPointsEarned", b"") - .unwrap_or((0, vec![])); - - Staking::ensure_storage_upgraded(); - assert!(::IsUpgraded::get()); - - // Check ActiveEra and CurrentEra - let active_era = Staking::active_era().unwrap().index; - let current_era = Staking::current_era().unwrap(); - assert!(current_era == active_era); - assert!(current_era == old_current_era); - - // Check ErasStartSessionIndex - let active_era_start = Staking::eras_start_session_index(active_era).unwrap(); - let current_era_start = Staking::eras_start_session_index(current_era).unwrap(); - let current_session_index = Session::current_index(); - assert!(current_era_start == active_era_start); - assert!(active_era_start <= current_session_index); - assert_eq!(::ErasStartSessionIndex::iter().count(), 1); - - // Check ErasStakers - assert_eq!(::ErasStakers::iter().count(), 2); - assert_eq!( - ::ErasStakers::get(current_era, old_staker_0), - old_staker_0_exposure - ); - assert_eq!( - ::ErasStakers::get(current_era, old_staker_1), - old_staker_1_exposure - ); - - // Check ErasStakersClipped - assert_eq!(::ErasStakersClipped::iter().count(), 2); - assert!(::ErasStakersClipped::iter().all(|exposure_clipped| { - let max = ::MaxNominatorRewardedPerValidator::get() as usize; - exposure_clipped.others.len() <= max - })); - assert_eq!( - ::ErasStakersClipped::get(current_era, old_staker_0), - old_staker_0_exposure - ); - assert_eq!( - ::ErasStakersClipped::get(current_era, old_staker_1), - old_staker_1_exposure - ); - - // Check ErasValidatorPrefs - assert_eq!(::ErasValidatorPrefs::iter().count(), 2); - assert_eq!( - ::ErasValidatorPrefs::get(current_era, old_staker_0), - Staking::validators(old_staker_0) - ); - assert_eq!( - ::ErasValidatorPrefs::get(current_era, old_staker_1), - Staking::validators(old_staker_1) - ); - - // Check ErasTotalStake - assert_eq!(::ErasTotalStake::iter().count(), 1); - assert_eq!( - ::ErasTotalStake::get(current_era), - old_staker_0_exposure.total + old_staker_1_exposure.total - ); - - // Check ErasRewardPoints - assert_eq!(::ErasRewardPoints::iter().count(), 1); - let mut individual = BTreeMap::new(); - if let Some(p) = old_era_points_earned_individual.get(0) { - individual.insert(old_staker_0, p.clone()); - } - if let Some(p) = old_era_points_earned_individual.get(1) { - individual.insert(old_staker_1, p.clone()); - } - assert_eq!( - ::ErasRewardPoints::get(current_era), - EraRewardPoints { - total: old_era_points_earned_total, - individual, - } - ); - - // Check ErasValidatorReward - assert_eq!(::ErasValidatorReward::iter().count(), 0); - }); - } -} - #[test] fn set_history_depth_works() { ExtBuilder::default().build().execute_with(|| { diff --git a/frame/support/src/dispatch.rs b/frame/support/src/dispatch.rs index 084ea285af4..a9c48097ad6 100644 --- a/frame/support/src/dispatch.rs +++ b/frame/support/src/dispatch.rs @@ -196,6 +196,10 @@ impl Parameter for T where T: Codec + EncodeLike + Clone + Eq + fmt::Debug {} /// /// The following reserved functions also take the block number (with type `T::BlockNumber`) as an optional input: /// +/// * `on_runtime_upgrade`: Executes at the beginning of a block prior to on_initialize when there +/// is a runtime upgrade. This allows each module to upgrade its storage before the storage items are used. +/// As such, **calling other modules must be avoided**!! Using this function will implement the +/// [`OnRuntimeUpgrade`](../sp_runtime/traits/trait.OnRuntimeUpgrade.html) trait. /// * `on_initialize`: Executes at the beginning of a block. Using this function will /// implement the [`OnInitialize`](../sp_runtime/traits/trait.OnInitialize.html) trait. /// * `on_finalize`: Executes at the end of a block. Using this function will @@ -229,6 +233,7 @@ macro_rules! decl_module { {} {} {} + {} [] $($t)* ); @@ -261,6 +266,7 @@ macro_rules! decl_module { {} {} {} + {} [] $($t)* ); @@ -274,6 +280,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } {} { $( $on_initialize:tt )* } + { $( $on_runtime_upgrade:tt )* } { $( $on_finalize:tt )* } { $( $offchain:tt )* } { $( $constants:tt )* } @@ -290,6 +297,7 @@ macro_rules! decl_module { { $( $other_where_bounds )* } { $vis fn deposit_event() = default; } { $( $on_initialize )* } + { $( $on_runtime_upgrade )* } { $( $on_finalize )* } { $( $offchain )* } { $( $constants )* } @@ -305,6 +313,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } {} { $( $on_initialize:tt )* } + { $( $on_runtime_upgrade:tt )* } { $( $on_finalize:tt )* } { $( $offchain:tt )* } { $( $constants:tt )* } @@ -326,6 +335,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } { $( $deposit_event:tt )* } { $( $on_initialize:tt )* } + { $( $on_runtime_upgrade:tt )* } {} { $( $offchain:tt )* } { $( $constants:tt )* } @@ -342,6 +352,7 @@ macro_rules! decl_module { { $( $other_where_bounds )* } { $( $deposit_event )* } { $( $on_initialize )* } + { $( $on_runtime_upgrade )* } { #[weight = $crate::dispatch::SimpleDispatchInfo::zero()] fn on_finalize( $( $param_name : $param ),* ) { $( $impl )* } @@ -361,6 +372,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } { $( $deposit_event:tt )* } { $( $on_initialize:tt )* } + { $( $on_runtime_upgrade:tt )* } {} { $( $offchain:tt )* } { $( $constants:tt )* } @@ -378,6 +390,7 @@ macro_rules! decl_module { { $( $other_where_bounds )* } { $( $deposit_event )* } { $( $on_initialize )* } + { $( $on_runtime_upgrade )* } { #[weight = $weight] fn on_finalize( $( $param_name : $param ),* ) { $( $impl )* } @@ -389,6 +402,85 @@ macro_rules! decl_module { $($rest)* ); }; + // Add on_runtime_upgrade, without a given weight. + (@normalize + $(#[$attr:meta])* + pub struct $mod_type:ident< + $trait_instance:ident: $trait_name:ident$(, I: $instantiable:path $(= $module_default_instance:path)?)? + > + for enum $call_type:ident where origin: $origin_type:ty, system = $system:ident + { $( $other_where_bounds:tt )* } + { $( $deposit_event:tt )* } + { $( $on_initialize:tt )* } + {} + { $( $on_finalize:tt )* } + { $( $offchain:tt )* } + { $( $constants:tt )* } + { $( $error_type:tt )* } + [ $( $dispatchables:tt )* ] + $(#[doc = $doc_attr:tt])* + fn on_runtime_upgrade( $( $param_name:ident : $param:ty ),* $(,)? ) { $( $impl:tt )* } + $($rest:tt)* + ) => { + $crate::decl_module!(@normalize + $(#[$attr])* + pub struct $mod_type<$trait_instance: $trait_name$(, I: $instantiable $(= $module_default_instance)?)?> + for enum $call_type where origin: $origin_type, system = $system + { $( $other_where_bounds )* } + { $( $deposit_event )* } + { $( $on_initialize )* } + { + #[weight = $crate::dispatch::SimpleDispatchInfo::zero()] + fn on_runtime_upgrade( $( $param_name : $param ),* ) { $( $impl )* } + } + { $( $on_finalize )* } + { $( $offchain )* } + { $( $constants )* } + { $( $error_type )* } + [ $( $dispatchables )* ] + $($rest)* + ); + }; + // Add on_runtime_upgrade, given weight. + (@normalize + $(#[$attr:meta])* + pub struct $mod_type:ident< + $trait_instance:ident: $trait_name:ident$(, I: $instantiable:path $(= $module_default_instance:path)?)? + > + for enum $call_type:ident where origin: $origin_type:ty, system = $system:ident + { $( $other_where_bounds:tt )* } + { $( $deposit_event:tt )* } + { $( $on_initialize:tt )* } + {} + { $( $on_finalize:tt )* } + { $( $offchain:tt )* } + { $( $constants:tt )* } + { $( $error_type:tt )* } + [ $( $dispatchables:tt )* ] + $(#[doc = $doc_attr:tt])* + #[weight = $weight:expr] + fn on_runtime_upgrade( $( $param_name:ident : $param:ty ),* $(,)? ) { $( $impl:tt )* } + $($rest:tt)* + ) => { + $crate::decl_module!(@normalize + $(#[$attr])* + pub struct $mod_type<$trait_instance: $trait_name$(, I: $instantiable $(= $module_default_instance)?)?> + for enum $call_type where origin: $origin_type, system = $system + { $( $other_where_bounds )* } + { $( $deposit_event )* } + { $( $on_initialize )* } + { + #[weight = $weight] + fn on_runtime_upgrade( $( $param_name : $param ),* ) { $( $impl )* } + } + { $( $on_finalize )* } + { $( $offchain )* } + { $( $constants )* } + { $( $error_type )* } + [ $( $dispatchables )* ] + $($rest)* + ); + }; // Add on_initialize, without a given weight. (@normalize $(#[$attr:meta])* @@ -399,6 +491,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } { $( $deposit_event:tt )* } {} + { $( $on_runtime_upgrade:tt )* } { $( $on_finalize:tt )* } { $( $offchain:tt )* } { $( $constants:tt )* } @@ -418,6 +511,7 @@ macro_rules! decl_module { #[weight = $crate::dispatch::SimpleDispatchInfo::zero()] fn on_initialize( $( $param_name : $param ),* ) { $( $impl )* } } + { $( $on_runtime_upgrade )* } { $( $on_finalize )* } { $( $offchain )* } { $( $constants )* } @@ -436,6 +530,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } { $( $deposit_event:tt )* } {} + { $( $on_runtime_upgrade:tt )* } { $( $on_finalize:tt )* } { $( $offchain:tt )* } { $( $constants:tt )* } @@ -456,6 +551,7 @@ macro_rules! decl_module { #[weight = $weight] fn on_initialize( $( $param_name : $param ),* ) { $( $impl )* } } + { $( $on_runtime_upgrade )* } { $( $on_finalize )* } { $( $offchain )* } { $( $constants )* } @@ -474,6 +570,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } { $( $deposit_event:tt )* } { $( $on_initialize:tt )* } + { $( $on_runtime_upgrade:tt )* } { $( $on_finalize:tt )* } { } { $( $constants:tt )* } @@ -492,6 +589,7 @@ macro_rules! decl_module { { $( $other_where_bounds )* } { $( $deposit_event )* } { $( $on_initialize )* } + { $( $on_runtime_upgrade )* } { $( $on_finalize )* } { fn offchain_worker( $( $param_name : $param ),* ) { $( $impl )* } } { $( $constants )* } @@ -512,6 +610,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } { $( $deposit_event:tt )* } { $( $on_initialize:tt )* } + { $( $on_runtime_upgrade:tt )* } { $( $on_finalize:tt )* } { $( $offchain:tt )* } { $( $constants:tt )* } @@ -531,6 +630,7 @@ macro_rules! decl_module { { $( $other_where_bounds )* } { $( $deposit_event )* } { $( $on_initialize )* } + { $( $on_runtime_upgrade )* } { $( $on_finalize )* } { $( $offchain )* } { @@ -555,6 +655,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } { $( $deposit_event:tt )* } { $( $on_initialize:tt )* } + { $( $on_runtime_upgrade:tt )* } { $( $on_finalize:tt )* } { $( $offchain:tt )* } { $( $constants:tt )* } @@ -573,6 +674,7 @@ macro_rules! decl_module { { $( $other_where_bounds )* } { $( $deposit_event )* } { $( $on_initialize )* } + { $( $on_runtime_upgrade )* } { $( $on_finalize )* } { $( $offchain )* } { $( $constants )* } @@ -592,6 +694,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } { $( $deposit_event:tt )* } { $( $on_initialize:tt )* } + { $( $on_runtime_upgrade:tt )* } { $( $on_finalize:tt )* } { $( $offchain:tt )* } { $( $constants:tt )* } @@ -608,6 +711,7 @@ macro_rules! decl_module { { $( $other_where_bounds )* } { $( $deposit_event )* } { $( $on_initialize )* } + { $( $on_runtime_upgrade )* } { $( $on_finalize )* } { $( $offchain )* } { $( $constants )* } @@ -628,6 +732,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } { $( $deposit_event:tt )* } { $( $on_initialize:tt )* } + { $( $on_runtime_upgrade:tt )* } { $( $on_finalize:tt )* } { $( $offchain:tt )* } { $( $constants:tt )* } @@ -649,6 +754,7 @@ macro_rules! decl_module { { $( $other_where_bounds )* } { $( $deposit_event )* } { $( $on_initialize )* } + { $( $on_runtime_upgrade )* } { $( $on_finalize )* } { $( $offchain )* } { $( $constants )* } @@ -676,6 +782,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } { $( $deposit_event:tt )* } { $( $on_initialize:tt )* } + { $( $on_runtime_upgrade:tt )* } { $( $on_finalize:tt )* } { $( $offchain:tt )* } { $( $constants:tt )* } @@ -696,6 +803,7 @@ macro_rules! decl_module { { $( $other_where_bounds )* } { $( $deposit_event )* } { $( $on_initialize )* } + { $( $on_runtime_upgrade )* } { $( $on_finalize )* } { $( $offchain )* } { $( $constants )* } @@ -717,6 +825,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } { $( $deposit_event:tt )* } { $( $on_initialize:tt )* } + { $( $on_runtime_upgrade:tt )* } { $( $on_finalize:tt )* } { $( $offchain:tt )* } { $( $constants:tt )* } @@ -742,6 +851,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } { $( $deposit_event:tt )* } { $( $on_initialize:tt )* } + { $( $on_runtime_upgrade:tt )* } { $( $on_finalize:tt )* } { $( $offchain:tt )* } { $( $constants:tt )* } @@ -767,6 +877,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } { $( $deposit_event:tt )* } { $( $on_initialize:tt )* } + { $( $on_runtime_upgrade:tt )* } { $( $on_finalize:tt )* } { $( $offchain:tt )* } { $( $constants:tt )* } @@ -793,6 +904,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } { $( $deposit_event:tt )* } { $( $on_initialize:tt )* } + { $( $on_runtime_upgrade:tt )* } { $( $on_finalize:tt )* } { $( $offchain:tt )* } { $( $constants:tt )* } @@ -808,6 +920,7 @@ macro_rules! decl_module { { $( $other_where_bounds )* } { $( $deposit_event )* } { $( $on_initialize )* } + { $( $on_runtime_upgrade )* } { $( $on_finalize )* } { $( $offchain )* } { $( $constants )* } @@ -903,6 +1016,39 @@ macro_rules! decl_module { {} }; + (@impl_on_runtime_upgrade + $module:ident<$trait_instance:ident: $trait_name:ident$(, $instance:ident: $instantiable:path)?>; + { $( $other_where_bounds:tt )* } + #[weight = $weight:expr] + fn on_runtime_upgrade() { $( $impl:tt )* } + ) => { + impl<$trait_instance: $trait_name$(, $instance: $instantiable)?> + $crate::sp_runtime::traits::OnRuntimeUpgrade + for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )* + { + fn on_runtime_upgrade() { + use $crate::sp_std::if_std; + if_std! { + use $crate::tracing; + let span = tracing::span!(tracing::Level::DEBUG, "on_runtime_upgrade"); + let _enter = span.enter(); + } + { $( $impl )* } + } + } + }; + + (@impl_on_runtime_upgrade + $module:ident<$trait_instance:ident: $trait_name:ident$(, $instance:ident: $instantiable:path)?>; + { $( $other_where_bounds:tt )* } + ) => { + impl<$trait_instance: $trait_name$(, $instance: $instantiable)?> + $crate::sp_runtime::traits::OnRuntimeUpgrade + for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )* + {} + }; + + (@impl_on_finalize $module:ident<$trait_instance:ident: $trait_name:ident$(, $instance:ident: $instantiable:path)?>; { $( $other_where_bounds:tt )* } @@ -961,6 +1107,10 @@ macro_rules! decl_module { (@impl_block_hooks_weight $module:ident<$trait_instance:ident: $trait_name:ident$(, $instance:ident: $instantiable:path)?>; { $( $other_where_bounds:tt )* } + @runtime_upgrade $( + #[weight = $weight_runtime_update:expr] + fn on_runtime_upgrade($( $param_runtime_upgrade:ident : $param_ty_runtime_upgrade:ty )*) { $( $impl_runtime_upgrade:tt )* } + )? @init $( #[weight = $weight_initialize:expr] fn on_initialize($( $param_initialize:ident : $param_ty_initialize:ty )*) { $( $impl_initialize:tt )* } @@ -974,6 +1124,11 @@ macro_rules! decl_module { $crate::dispatch::WeighBlock<$trait_instance::BlockNumber> for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )* { + $( + fn on_runtime_upgrade() -> $crate::dispatch::Weight { + >::weigh_data(&$weight_initialize, ()) + } + )? $( fn on_initialize(n: $trait_instance::BlockNumber) -> $crate::dispatch::Weight { >::weigh_data(&$weight_initialize, n) @@ -1208,6 +1363,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } { $( $deposit_event:tt )* } { $( $on_initialize:tt )* } + { $( $on_runtime_upgrade:tt )* } { $( $on_finalize:tt )* } { $( $offchain:tt )* } { $( $constants:tt )* } @@ -1231,6 +1387,14 @@ macro_rules! decl_module { $( $on_initialize )* } + $crate::decl_module! { + @impl_on_runtime_upgrade + $mod_type<$trait_instance: $trait_name $(, $instance: $instantiable)?>; + { $( $other_where_bounds )* } + $( $on_runtime_upgrade )* + } + + $crate::decl_module! { @impl_on_finalize $mod_type<$trait_instance: $trait_name $(, $instance: $instantiable)?>; @@ -1242,6 +1406,7 @@ macro_rules! decl_module { @impl_block_hooks_weight $mod_type<$trait_instance: $trait_name $(, $instance: $instantiable)?>; { $( $other_where_bounds )* } + @runtime_upgrade $( $on_runtime_upgrade )* @init $( $on_initialize )* @fin $( $on_finalize )* } @@ -1869,15 +2034,12 @@ macro_rules! __check_reserved_fn_name { (on_initialize $( $rest:ident )*) => { $crate::__check_reserved_fn_name!(@compile_error on_initialize); }; - (on_initialise $( $rest:ident )*) => { - $crate::__check_reserved_fn_name!(@compile_error_renamed on_initialise on_initialize); + (on_runtime_upgrade $( $rest:ident )*) => { + $crate::__check_reserved_fn_name!(@compile_error on_runtime_upgrade); }; (on_finalize $( $rest:ident )*) => { $crate::__check_reserved_fn_name!(@compile_error on_finalize); }; - (on_finalise $( $rest:ident )*) => { - $crate::__check_reserved_fn_name!(@compile_error_renamed on_finalise on_finalize); - }; (offchain_worker $( $rest:ident )*) => { $crate::__check_reserved_fn_name!(@compile_error offchain_worker); }; @@ -1914,7 +2076,7 @@ macro_rules! __check_reserved_fn_name { #[allow(dead_code)] mod tests { use super::*; - use crate::sp_runtime::traits::{OnInitialize, OnFinalize}; + use crate::sp_runtime::traits::{OnInitialize, OnFinalize, OnRuntimeUpgrade}; use crate::weights::{DispatchInfo, DispatchClass}; use crate::traits::{CallMetadata, GetCallMetadata, GetCallName}; @@ -1936,8 +2098,8 @@ mod tests { } } - struct BLockWeight; - impl> WeighData for BLockWeight { + struct BlockWeight; + impl> WeighData for BlockWeight { fn weigh_data(&self, target: BlockNumber) -> Weight { let target: u32 = target.into(); if target % 2 == 0 { 10 } else { 0 } @@ -1957,8 +2119,10 @@ mod tests { #[weight = SimpleDispatchInfo::FixedNormal(7)] fn on_initialize(n: T::BlockNumber,) { if n.into() == 42 { panic!("on_initialize") } } - #[weight = BLockWeight] + #[weight = BlockWeight] fn on_finalize(n: T::BlockNumber) { if n.into() == 42 { panic!("on_finalize") } } + #[weight = SimpleDispatchInfo::FixedOperational(69)] + fn on_runtime_upgrade() { } fn offchain_worker() {} #[weight = SimpleDispatchInfo::FixedOperational(5)] @@ -2100,6 +2264,11 @@ mod tests { as OnFinalize>::on_finalize(42); } + #[test] + fn on_runtime_upgrade_should_work() { + as OnRuntimeUpgrade>::on_runtime_upgrade(); + } + #[test] fn weight_should_attach_to_call_enum() { // operational. diff --git a/frame/support/src/storage/mod.rs b/frame/support/src/storage/mod.rs index 4bca5ea4023..c28626ad2c3 100644 --- a/frame/support/src/storage/mod.rs +++ b/frame/support/src/storage/mod.rs @@ -65,8 +65,8 @@ pub trait StorageValue { /// /// # Usage /// - /// This would typically be called inside the module implementation of on_initialize, while - /// ensuring **no usage of this storage are made before the call to `on_initialize`**. (More + /// This would typically be called inside the module implementation of on_runtime_upgrade, while + /// ensuring **no usage of this storage are made before the call to `on_runtime_upgrade`**. (More /// precisely prior initialized modules doesn't make use of this storage). fn translate) -> Option>(f: F) -> Result, ()>; @@ -265,8 +265,8 @@ pub trait StorageLinkedMap { /// /// # Usage /// - /// This would typically be called inside the module implementation of on_initialize, while - /// ensuring **no usage of this storage are made before the call to `on_initialize`**. (More + /// This would typically be called inside the module implementation of on_runtime_upgrade, while + /// ensuring **no usage of this storage are made before the call to `on_runtime_upgrade`**. (More /// precisely prior initialized modules doesn't make use of this storage). fn translate(translate_key: TK, translate_val: TV) -> Result<(), Option> where K2: FullCodec + Clone, V2: Decode, TK: Fn(K2) -> K, TV: Fn(V2) -> V; @@ -460,8 +460,8 @@ pub trait StoragePrefixedMap { /// /// # Usage /// - /// This would typically be called inside the module implementation of on_initialize, while - /// ensuring **no usage of this storage are made before the call to `on_initialize`**. (More + /// This would typically be called inside the module implementation of on_runtime_upgrade, while + /// ensuring **no usage of this storage are made before the call to `on_runtime_upgrade`**. (More /// precisely prior initialized modules doesn't make use of this storage). fn translate_values(translate_val: TV) -> Result<(), u32> where OldValue: Decode, TV: Fn(OldValue) -> Value diff --git a/frame/support/src/storage/unhashed.rs b/frame/support/src/storage/unhashed.rs index 54910e99a4d..1ecf46ef186 100644 --- a/frame/support/src/storage/unhashed.rs +++ b/frame/support/src/storage/unhashed.rs @@ -101,6 +101,10 @@ pub fn get_raw(key: &[u8]) -> Option> { } /// Put a raw byte slice into storage. +/// +/// **WARNING**: If you set the storage of the Substrate Wasm (`well_known_keys::CODE`), +/// you should also call `frame_system::RuntimeUpgraded::put(true)` to trigger the +/// `on_runtime_upgrade` logic. pub fn put_raw(key: &[u8], value: &[u8]) { sp_io::storage::set(key, value) } diff --git a/frame/support/src/weights.rs b/frame/support/src/weights.rs index c46cca683ba..8926ed94930 100644 --- a/frame/support/src/weights.rs +++ b/frame/support/src/weights.rs @@ -67,9 +67,11 @@ pub trait ClassifyDispatch { fn classify_dispatch(&self, target: T) -> DispatchClass; } -/// Means of determining the weight of a block's life cycle hooks: `on_initialize`, `on_finalize` and -/// such. +/// Means of determining the weight of a block's life cycle hooks: `on_initialize`, `on_finalize`, +/// `on_runtime_upgrade`, and such. pub trait WeighBlock { + /// Return the weight of the block's on_runtime_upgrade hook. + fn on_runtime_upgrade() -> Weight { Zero::zero() } /// Return the weight of the block's on_initialize hook. fn on_initialize(_: BlockNumber) -> Weight { Zero::zero() } /// Return the weight of the block's on_finalize hook. @@ -87,6 +89,14 @@ pub trait PaysFee { /// Maybe I can do something to remove the duplicate code here. #[impl_for_tuples(30)] impl WeighBlock for SingleModule { + fn on_runtime_upgrade() -> Weight { + let mut accumulated_weight: Weight = Zero::zero(); + for_tuples!( + #( accumulated_weight = accumulated_weight.saturating_add(SingleModule::on_runtime_upgrade()); )* + ); + accumulated_weight + } + fn on_initialize(n: BlockNumber) -> Weight { let mut accumulated_weight: Weight = Zero::zero(); for_tuples!( diff --git a/frame/support/test/tests/reserved_keyword/on_initialize.rs b/frame/support/test/tests/reserved_keyword/on_initialize.rs index e389529bca5..84feb2d93f3 100644 --- a/frame/support/test/tests/reserved_keyword/on_initialize.rs +++ b/frame/support/test/tests/reserved_keyword/on_initialize.rs @@ -27,6 +27,6 @@ macro_rules! reserved { } } -reserved!(on_finalize on_initialize on_finalise on_initialise offchain_worker deposit_event); +reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event); fn main() {} diff --git a/frame/support/test/tests/reserved_keyword/on_initialize.stderr b/frame/support/test/tests/reserved_keyword/on_initialize.stderr index 13c2ef8d2c8..d20a6e11451 100644 --- a/frame/support/test/tests/reserved_keyword/on_initialize.stderr +++ b/frame/support/test/tests/reserved_keyword/on_initialize.stderr @@ -1,47 +1,39 @@ error: Invalid call fn name: `on_finalize`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword. --> $DIR/on_initialize.rs:30:1 | -30 | reserved!(on_finalize on_initialize on_finalise on_initialise offchain_worker deposit_event); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation +30 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: Invalid call fn name: `on_initialize`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword. --> $DIR/on_initialize.rs:30:1 | -30 | reserved!(on_finalize on_initialize on_finalise on_initialise offchain_worker deposit_event); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation +30 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) -error: `on_finalise` was renamed to `on_finalize`. Please rename your function accordingly. +error: Invalid call fn name: `on_runtime_upgrade`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword. --> $DIR/on_initialize.rs:30:1 | -30 | reserved!(on_finalize on_initialize on_finalise on_initialise offchain_worker deposit_event); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation - | - = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) - -error: `on_initialise` was renamed to `on_initialize`. Please rename your function accordingly. - --> $DIR/on_initialize.rs:30:1 - | -30 | reserved!(on_finalize on_initialize on_finalise on_initialise offchain_worker deposit_event); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation +30 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: Invalid call fn name: `offchain_worker`, name is reserved and doesn't match expected signature, please refer to `decl_module!` documentation to see the appropriate usage, or rename it to an unreserved keyword. --> $DIR/on_initialize.rs:30:1 | -30 | reserved!(on_finalize on_initialize on_finalise on_initialise offchain_worker deposit_event); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation +30 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) error: `deposit_event` function is reserved and must follow the syntax: `$vis:vis fn deposit_event() = default;` --> $DIR/on_initialize.rs:30:1 | -30 | reserved!(on_finalize on_initialize on_finalise on_initialise offchain_worker deposit_event); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation +30 | reserved!(on_finalize on_initialize on_runtime_upgrade offchain_worker deposit_event); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/frame/system/src/lib.rs b/frame/system/src/lib.rs index 6cac08117af..f1286beac4e 100644 --- a/frame/system/src/lib.rs +++ b/frame/system/src/lib.rs @@ -367,6 +367,9 @@ decl_storage! { /// the `EventIndex` then in case if the topic has the same contents on the next block /// no notification will be triggered thus the event might be lost. EventTopics get(fn event_topics): map hasher(blake2_256) T::Hash => Vec<(T::BlockNumber, EventIndex)>; + + /// A bool to track if the runtime was upgraded last block. + pub RuntimeUpgraded: bool; } add_extra_genesis { config(changes_trie_config): Option; @@ -486,6 +489,7 @@ decl_module! { } storage::unhashed::put_raw(well_known_keys::CODE, &code); + RuntimeUpgraded::put(true); Self::deposit_event(RawEvent::CodeUpdated); } @@ -494,6 +498,7 @@ decl_module! { pub fn set_code_without_checks(origin, code: Vec) { ensure_root(origin)?; storage::unhashed::put_raw(well_known_keys::CODE, &code); + RuntimeUpgraded::put(true); Self::deposit_event(RawEvent::CodeUpdated); } @@ -521,6 +526,9 @@ decl_module! { ensure_root(origin)?; for i in &items { storage::unhashed::put_raw(&i.0, &i.1); + if i.0 == well_known_keys::CODE { + RuntimeUpgraded::put(true); + } } } @@ -1971,6 +1979,26 @@ mod tests { System::events(), vec![EventRecord { phase: Phase::ApplyExtrinsic(0), event: 102u16, topics: vec![] }], ); + + assert_eq!(RuntimeUpgraded::get(), true); + }); + } + + #[test] + fn runtime_upgraded_with_set_storage() { + let executor = substrate_test_runtime_client::new_native_executor(); + let mut ext = new_test_ext(); + ext.register_extension(sp_core::traits::CallInWasmExt::new(executor)); + ext.execute_with(|| { + System::set_storage( + RawOrigin::Root.into(), + vec![( + well_known_keys::CODE.to_vec(), + substrate_test_runtime_client::runtime::WASM_BINARY.to_vec() + )], + ).unwrap(); + + assert_eq!(RuntimeUpgraded::get(), true); }); } } diff --git a/frame/vesting/src/lib.rs b/frame/vesting/src/lib.rs index d4a34d4e172..02d5bebfd2c 100644 --- a/frame/vesting/src/lib.rs +++ b/frame/vesting/src/lib.rs @@ -345,7 +345,7 @@ mod tests { use sp_runtime::{ Perbill, testing::Header, - traits::{BlakeTwo256, IdentityLookup, Identity, OnInitialize}, + traits::{BlakeTwo256, IdentityLookup, Identity, OnRuntimeUpgrade}, }; use sp_storage::Storage; @@ -484,7 +484,7 @@ mod tests { ]; s.top = data.into_iter().collect(); sp_io::TestExternalities::new(s).execute_with(|| { - Balances::on_initialize(1); + Balances::on_runtime_upgrade(); assert_eq!(Balances::free_balance(6), 60); assert_eq!(Balances::usable_balance(&6), 30); System::set_block_number(2); diff --git a/primitives/consensus/common/src/select_chain.rs b/primitives/consensus/common/src/select_chain.rs index d94511c1102..fe0d3972043 100644 --- a/primitives/consensus/common/src/select_chain.rs +++ b/primitives/consensus/common/src/select_chain.rs @@ -23,11 +23,11 @@ use sp_runtime::traits::{Block as BlockT, NumberFor}; /// specific chain build. /// /// The Strategy can be customized for the two use cases of authoring new blocks -/// upon the best chain or which fork to finalise. Unless implemented differently +/// upon the best chain or which fork to finalize. Unless implemented differently /// by default finalization methods fall back to use authoring, so as a minimum /// `_authoring`-functions must be implemented. /// -/// Any particular user must make explicit, however, whether they intend to finalise +/// Any particular user must make explicit, however, whether they intend to finalize /// or author through the using the right function call, as these might differ in /// some implementations. /// diff --git a/primitives/runtime/src/offchain/http.rs b/primitives/runtime/src/offchain/http.rs index 88f4323ad7e..bbc929526b7 100644 --- a/primitives/runtime/src/offchain/http.rs +++ b/primitives/runtime/src/offchain/http.rs @@ -241,7 +241,7 @@ impl<'a, I: AsRef<[u8]>, T: IntoIterator> Request<'a, T> { sp_io::offchain::http_request_write_body(id, chunk.as_ref(), self.deadline)?; } - // finalise the request + // finalize the request sp_io::offchain::http_request_write_body(id, &[], self.deadline)?; Ok(PendingRequest { diff --git a/primitives/runtime/src/traits.rs b/primitives/runtime/src/traits.rs index c6d85b22f46..4e30e545e4e 100644 --- a/primitives/runtime/src/traits.rs +++ b/primitives/runtime/src/traits.rs @@ -345,6 +345,14 @@ pub trait OnInitialize { fn on_initialize(_n: BlockNumber) {} } +/// The runtime upgrade trait. Implementing this lets you express what should happen +/// when the runtime upgrades, and changes may need to occur to your module. +#[impl_for_tuples(30)] +pub trait OnRuntimeUpgrade { + /// Perform a module upgrade. + fn on_runtime_upgrade() {} +} + /// Off-chain computation trait. /// /// Implementing this trait on a module allows you to perform long-running tasks -- GitLab From 9a1524b879d15908b47fb004be4cc01d4026905c Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 13:47:51 +0100 Subject: [PATCH 094/106] adding a ss58 format for Darwinia Network (#5026) --- primitives/core/src/crypto.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/primitives/core/src/crypto.rs b/primitives/core/src/crypto.rs index 40b9a5ec318..574b8d417da 100644 --- a/primitives/core/src/crypto.rs +++ b/primitives/core/src/crypto.rs @@ -454,6 +454,8 @@ ss58_address_format!( (36, "centrifuge", "Centrifuge Chain mainnet, direct checksum, standard account (*25519).") SubstraTeeAccountDirect => (44, "substratee", "Any SubstraTEE off-chain network private account, direct checksum, standard account (*25519).") + DarwiniaAccountDirect => + (18, "darwinia", "Darwinia Chain mainnet, direct checksum, standard account (*25519).") ); /// Set the default "version" (actually, this is a bit of a misnomer and the version byte is -- GitLab From c37cfbf855bee9526795a1cf1b0e2fd15f100c91 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Thu, 5 Mar 2020 14:02:04 +0100 Subject: [PATCH 095/106] Better wasm instance cache (#5109) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Wasm instance cache * Reduce slot locking * Fixed test * Dispose of instance in case of error * Fixed benches * Style, comments, some renames * Replaced upgradable lock with mutex * Bump dependencies * Re-export CallInWasm * Update client/executor/src/wasm_runtime.rs Co-Authored-By: Bastian Köcher * Update client/executor/src/native_executor.rs Co-Authored-By: Bastian Köcher * Update client/executor/src/native_executor.rs Co-Authored-By: Bastian Köcher * Update client/executor/src/wasm_runtime.rs Co-Authored-By: Bastian Köcher * Update client/executor/wasmtime/src/runtime.rs Co-Authored-By: Bastian Köcher * Update client/executor/src/wasm_runtime.rs Co-Authored-By: Bastian Köcher * Update client/executor/src/wasm_runtime.rs Co-Authored-By: Bastian Köcher * Update client/executor/src/wasm_runtime.rs Co-Authored-By: Bastian Köcher * Indents * Whitespace * Formatting * Added issue link Co-authored-by: Benjamin Kampmann Co-authored-by: Gavin Wood Co-authored-by: Bastian Köcher --- Cargo.lock | 149 +++++---- bin/node/executor/benches/bench.rs | 8 +- bin/node/executor/tests/common.rs | 2 +- client/executor/common/src/wasm_runtime.rs | 23 +- client/executor/src/integration_tests/mod.rs | 56 ++-- client/executor/src/lib.rs | 80 +---- client/executor/src/native_executor.rs | 307 ++++++++++-------- client/executor/src/wasm_runtime.rs | 311 ++++++++++++------- client/executor/wasmi/src/lib.rs | 144 +++++---- client/executor/wasmtime/Cargo.toml | 5 +- client/executor/wasmtime/src/host.rs | 11 +- client/executor/wasmtime/src/imports.rs | 13 +- client/executor/wasmtime/src/lib.rs | 2 +- client/executor/wasmtime/src/runtime.rs | 104 ++++--- client/executor/wasmtime/src/state_holder.rs | 74 ++--- primitives/core/src/traits.rs | 3 +- primitives/runtime-interface/test/src/lib.rs | 28 +- primitives/state-machine/src/lib.rs | 3 +- test-utils/runtime/src/system.rs | 4 +- 19 files changed, 724 insertions(+), 603 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 07ee88e1707..4f42fa17cd4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -713,25 +713,23 @@ checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" [[package]] name = "cranelift-bforest" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd0f53d59dc9ab1c8ab68c991d8406b52b7a0aab0b15b05a3a6895579c4e5dd9" +version = "0.59.0" +source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0381a794836fb994c47006465d46d46be072483b667f36013d993b9895117fee" +version = "0.59.0" +source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e" dependencies = [ "byteorder 1.3.4", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.20.0", + "gimli", "log 0.4.8", "serde", "smallvec 1.2.0", @@ -741,9 +739,8 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "208c3c8d82bfef32a534c5020c6cfc3bc92f41388f1246b7bb98cf543331abaa" +version = "0.59.0" +source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e" dependencies = [ "cranelift-codegen-shared", "cranelift-entity", @@ -751,24 +748,21 @@ dependencies = [ [[package]] name = "cranelift-codegen-shared" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea048c456a517e56fd6df8f0e3947922897e6e6f61fbc5eb557a36c7b8ff6394" +version = "0.59.0" +source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e" [[package]] name = "cranelift-entity" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c8c7ed50812194c9e9de1fa39c77b39fc9ab48173d5e7ee88b25b6a8953e9b8" +version = "0.59.0" +source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21ceb931d9f919731df1b1ecdc716b5c66384b413a7f95909d1f45441ab9bef5" +version = "0.59.0" +source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e" dependencies = [ "cranelift-codegen", "log 0.4.8", @@ -778,9 +772,8 @@ dependencies = [ [[package]] name = "cranelift-native" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "564ee82268bc25b914fcf331edfc2452f2d9ca34f976b187b4ca668beba250c8" +version = "0.59.0" +source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e" dependencies = [ "cranelift-codegen", "raw-cpuid", @@ -789,9 +782,8 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de63e2271b374be5b07f359184e2126a08fb24d24a740cbc178b7e0107ddafa5" +version = "0.59.0" +source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -799,7 +791,7 @@ dependencies = [ "log 0.4.8", "serde", "thiserror", - "wasmparser 0.48.2", + "wasmparser", ] [[package]] @@ -1886,27 +1878,18 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "gimli" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162d18ae5f2e3b90a993d202f1ba17a5633c2484426f8bcae201f86194bacd00" -dependencies = [ - "arrayvec 0.4.12", - "byteorder 1.3.4", - "fallible-iterator", - "indexmap", - "stable_deref_trait", -] - [[package]] name = "gimli" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81dd6190aad0f05ddbbf3245c54ed14ca4aa6dd32f22312b70d8f168c3e3e633" dependencies = [ + "arrayvec 0.5.1", "byteorder 1.3.4", + "fallible-iterator", "indexmap", + "smallvec 1.2.0", + "stable_deref_trait", ] [[package]] @@ -3773,6 +3756,20 @@ dependencies = [ "libc", ] +[[package]] +name = "object" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea44a4fd660ab0f38434934ca0212e90fbeaaee54126ef20a3451c30c95bafae" +dependencies = [ + "flate2", + "goblin", + "parity-wasm 0.41.0", + "scroll", + "target-lexicon", + "uuid", +] + [[package]] name = "ole32-sys" version = "0.2.0" @@ -6096,11 +6093,11 @@ dependencies = [ "parity-scale-codec", "parity-wasm 0.41.0", "sc-executor-common", + "scoped-tls", "sp-allocator", "sp-core", "sp-runtime-interface", "sp-wasm-interface", - "wasmi", "wasmtime", ] @@ -6601,6 +6598,12 @@ dependencies = [ "zeroize 0.9.3", ] +[[package]] +name = "scoped-tls" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" + [[package]] name = "scopeguard" version = "1.1.0" @@ -8596,6 +8599,12 @@ dependencies = [ "percent-encoding 2.1.0", ] +[[package]] +name = "uuid" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11" + [[package]] name = "vcpkg" version = "0.2.8" @@ -8831,12 +8840,6 @@ dependencies = [ "parity-wasm 0.41.0", ] -[[package]] -name = "wasmparser" -version = "0.48.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "073da89bf1c84db000dd68ce660c1b4a08e3a2d28fd1e3394ab9e7abdde4a0f8" - [[package]] name = "wasmparser" version = "0.51.4" @@ -8845,9 +8848,8 @@ checksum = "aeb1956b19469d1c5e63e459d29e7b5aa0f558d9f16fcef09736f8a265e6c10a" [[package]] name = "wasmtime" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5614d964c3e7d07a13b59aca66103c52656bd80430f0d86dc7eeb3af4f03d4a2" +version = "0.12.0" +source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e" dependencies = [ "anyhow", "backtrace", @@ -8857,9 +8859,10 @@ dependencies = [ "region", "rustc-demangle", "target-lexicon", - "wasmparser 0.51.4", + "wasmparser", "wasmtime-environ", "wasmtime-jit", + "wasmtime-profiling", "wasmtime-runtime", "wat", "winapi 0.3.8", @@ -8867,25 +8870,23 @@ dependencies = [ [[package]] name = "wasmtime-debug" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feb5900275b4ef0b621ce725b9d5660b12825d7f7d79b392b97baf089ffab8c0" +version = "0.12.0" +source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e" dependencies = [ "anyhow", "faerie", - "gimli 0.19.0", + "gimli", "more-asserts", "target-lexicon", "thiserror", - "wasmparser 0.51.4", + "wasmparser", "wasmtime-environ", ] [[package]] name = "wasmtime-environ" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04661851e133fb11691c4a0f92a705766b4bbf7afc06811f949e295cc8414fc" +version = "0.12.0" +source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e" dependencies = [ "anyhow", "base64 0.11.0", @@ -8905,16 +8906,15 @@ dependencies = [ "sha2", "thiserror", "toml", - "wasmparser 0.51.4", + "wasmparser", "winapi 0.3.8", "zstd", ] [[package]] name = "wasmtime-jit" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d451353764ce55c9bb6a8b260063cfc209b7adadd277a9a872ab4563a69e357c" +version = "0.12.0" +source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e" dependencies = [ "anyhow", "cfg-if", @@ -8927,29 +8927,46 @@ dependencies = [ "region", "target-lexicon", "thiserror", - "wasmparser 0.51.4", + "wasmparser", "wasmtime-debug", "wasmtime-environ", + "wasmtime-profiling", "wasmtime-runtime", "winapi 0.3.8", ] +[[package]] +name = "wasmtime-profiling" +version = "0.12.0" +source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e" +dependencies = [ + "gimli", + "goblin", + "lazy_static", + "libc", + "object", + "scroll", + "serde", + "target-lexicon", +] + [[package]] name = "wasmtime-runtime" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dbd4fc114b828cae3e405fed413df4b3814d87a92ea029640cec9ba41f0c162" +version = "0.12.0" +source = "git+https://github.com/paritytech/wasmtime?branch=a-thread-safe-api#851887d84d03543f931f6312448d0dd5d8a9324e" dependencies = [ "backtrace", "cc", "cfg-if", "indexmap", + "lazy_static", "libc", "memoffset", "more-asserts", "region", "thiserror", "wasmtime-environ", + "wasmtime-profiling", "winapi 0.3.8", ] diff --git a/bin/node/executor/benches/bench.rs b/bin/node/executor/benches/bench.rs index 98aa75edfcb..3209bb8729a 100644 --- a/bin/node/executor/benches/bench.rs +++ b/bin/node/executor/benches/bench.rs @@ -91,7 +91,7 @@ fn construct_block( }; // execute the block to get the real header. - executor.call::<_, NeverNativeValue, fn() -> _>( + executor.call:: _>( ext, "Core_initialize_block", &header.encode(), @@ -100,7 +100,7 @@ fn construct_block( ).0.unwrap(); for i in extrinsics.iter() { - executor.call::<_, NeverNativeValue, fn() -> _>( + executor.call:: _>( ext, "BlockBuilder_apply_extrinsic", &i.encode(), @@ -109,7 +109,7 @@ fn construct_block( ).0.unwrap(); } - let header = match executor.call::<_, NeverNativeValue, fn() -> _>( + let header = match executor.call:: _>( ext, "BlockBuilder_finalize_block", &[0u8;0], @@ -175,7 +175,7 @@ fn bench_execute_block(c: &mut Criterion) { || new_test_ext(&genesis_config), |test_ext| { for block in blocks.iter() { - executor.call::<_, NeverNativeValue, fn() -> _>( + executor.call:: _>( &mut test_ext.ext(), "Core_execute_block", &block.0, diff --git a/bin/node/executor/tests/common.rs b/bin/node/executor/tests/common.rs index a39acbb42b7..34f3034208a 100644 --- a/bin/node/executor/tests/common.rs +++ b/bin/node/executor/tests/common.rs @@ -71,7 +71,7 @@ pub fn executor_call< native_call: Option, ) -> (Result>, bool) { let mut t = t.ext(); - executor().call::<_, R, NC>( + executor().call::( &mut t, method, data, diff --git a/client/executor/common/src/wasm_runtime.rs b/client/executor/common/src/wasm_runtime.rs index 7af6c2bd53c..b59ca8ba930 100644 --- a/client/executor/common/src/wasm_runtime.rs +++ b/client/executor/common/src/wasm_runtime.rs @@ -17,18 +17,25 @@ //! Definitions for a wasm runtime. use crate::error::Error; -use sp_wasm_interface::{Function, Value}; +use sp_wasm_interface::Value; -/// A trait that defines an abstract wasm runtime. +/// A trait that defines an abstract WASM runtime module. /// /// This can be implemented by an execution engine. -pub trait WasmRuntime { - /// Return the host functions that are registered for this Wasm runtime. - fn host_functions(&self) -> &[&'static dyn Function]; +pub trait WasmModule: Sync + Send { + /// Create a new instance. + fn new_instance(&self) -> Result, Error>; +} - /// Call a method in the Substrate runtime by name. Returns the encoded result on success. - fn call(&mut self, method: &str, data: &[u8]) -> Result, Error>; +/// A trait that defines an abstract wasm module instance. +/// +/// This can be implemented by an execution engine. +pub trait WasmInstance: Send { + /// Call a method on this WASM instance and reset it afterwards. + /// Returns the encoded result on success. + fn call(&self, method: &str, data: &[u8]) -> Result, Error>; /// Get the value from a global with the given `name`. - fn get_global_val(&self, name: &str) -> Result, Error>; + /// This method is only suitable for getting immutable globals. + fn get_global_const(&self, name: &str) -> Result, Error>; } diff --git a/client/executor/src/integration_tests/mod.rs b/client/executor/src/integration_tests/mod.rs index 87ca33c4da7..e787b229ec8 100644 --- a/client/executor/src/integration_tests/mod.rs +++ b/client/executor/src/integration_tests/mod.rs @@ -21,7 +21,7 @@ use hex_literal::hex; use sp_core::{ blake2_128, blake2_256, ed25519, sr25519, map, Pair, offchain::{OffchainExt, testing}, - traits::Externalities, + traits::{Externalities, CallInWasm}, }; use sc_runtime_test::WASM_BINARY; use sp_state_machine::TestExternalities as CoreTestExternalities; @@ -40,15 +40,18 @@ fn call_in_wasm( call_data: &[u8], execution_method: WasmExecutionMethod, ext: &mut E, -) -> crate::error::Result> { - crate::call_in_wasm::( +) -> Result, String> { + let executor = crate::WasmExecutor::new( + execution_method, + Some(1024), + HostFunctions::host_functions(), + true, + ); + executor.call_in_wasm( + &WASM_BINARY[..], function, call_data, - execution_method, ext, - &WASM_BINARY[..], - 1024, - true, ) } @@ -84,12 +87,12 @@ fn call_not_existing_function(wasm_method: WasmExecutionMethod) { match wasm_method { WasmExecutionMethod::Interpreted => assert_eq!( &format!("{:?}", e), - "Wasmi(Trap(Trap { kind: Host(Other(\"Function `missing_external` is only a stub. Calling a stub is not allowed.\")) }))" + "\"Trap: Trap { kind: Host(Other(\\\"Function `missing_external` is only a stub. Calling a stub is not allowed.\\\")) }\"" ), #[cfg(feature = "wasmtime")] WasmExecutionMethod::Compiled => assert_eq!( &format!("{:?}", e), - "Other(\"Wasm execution trapped: call to a missing function env:missing_external\")" + "\"Wasm execution trapped: call to a missing function env:missing_external\"" ), } } @@ -113,12 +116,12 @@ fn call_yet_another_not_existing_function(wasm_method: WasmExecutionMethod) { match wasm_method { WasmExecutionMethod::Interpreted => assert_eq!( &format!("{:?}", e), - "Wasmi(Trap(Trap { kind: Host(Other(\"Function `yet_another_missing_external` is only a stub. Calling a stub is not allowed.\")) }))" + "\"Trap: Trap { kind: Host(Other(\\\"Function `yet_another_missing_external` is only a stub. Calling a stub is not allowed.\\\")) }\"" ), #[cfg(feature = "wasmtime")] WasmExecutionMethod::Compiled => assert_eq!( &format!("{:?}", e), - "Other(\"Wasm execution trapped: call to a missing function env:yet_another_missing_external\")" + "\"Wasm execution trapped: call to a missing function env:yet_another_missing_external\"" ), } } @@ -502,29 +505,32 @@ fn offchain_http_should_work(wasm_method: WasmExecutionMethod) { fn should_trap_when_heap_exhausted(wasm_method: WasmExecutionMethod) { let mut ext = TestExternalities::default(); - crate::call_in_wasm::( + let executor = crate::WasmExecutor::new( + wasm_method, + Some(17), // `17` is the initial number of pages compiled into the binary. + HostFunctions::host_functions(), + true, + ); + executor.call_in_wasm( + &WASM_BINARY[..], "test_exhaust_heap", &[0], - wasm_method, &mut ext.ext(), - &WASM_BINARY[..], - // `17` is the initial number of pages compiled into the binary. - 17, - true, ).unwrap(); } #[test_case(WasmExecutionMethod::Interpreted)] #[cfg_attr(feature = "wasmtime", test_case(WasmExecutionMethod::Compiled))] fn returns_mutable_static(wasm_method: WasmExecutionMethod) { - let mut instance = crate::wasm_runtime::create_wasm_runtime_with_code( + let runtime = crate::wasm_runtime::create_wasm_runtime_with_code( wasm_method, 1024, &WASM_BINARY[..], HostFunctions::host_functions(), true, - ).expect("Creates instance"); + ).expect("Creates runtime"); + let instance = runtime.new_instance().unwrap(); let res = instance.call("returns_mutable_static", &[0]).unwrap(); assert_eq!(33, u64::decode(&mut &res[..]).unwrap()); @@ -550,13 +556,14 @@ fn restoration_of_globals(wasm_method: WasmExecutionMethod) { // to our allocator algorithm there are inefficiencies. const REQUIRED_MEMORY_PAGES: u64 = 32; - let mut instance = crate::wasm_runtime::create_wasm_runtime_with_code( + let runtime = crate::wasm_runtime::create_wasm_runtime_with_code( wasm_method, REQUIRED_MEMORY_PAGES, &WASM_BINARY[..], HostFunctions::host_functions(), true, - ).expect("Creates instance"); + ).expect("Creates runtime"); + let instance = runtime.new_instance().unwrap(); // On the first invocation we allocate approx. 768KB (75%) of stack and then trap. let res = instance.call("allocates_huge_stack_array", &true.encode()); @@ -569,15 +576,16 @@ fn restoration_of_globals(wasm_method: WasmExecutionMethod) { #[test_case(WasmExecutionMethod::Interpreted)] fn heap_is_reset_between_calls(wasm_method: WasmExecutionMethod) { - let mut instance = crate::wasm_runtime::create_wasm_runtime_with_code( + let runtime = crate::wasm_runtime::create_wasm_runtime_with_code( wasm_method, 1024, &WASM_BINARY[..], HostFunctions::host_functions(), true, - ).expect("Creates instance"); + ).expect("Creates runtime"); + let instance = runtime.new_instance().unwrap(); - let heap_base = instance.get_global_val("__heap_base") + let heap_base = instance.get_global_const("__heap_base") .expect("`__heap_base` is valid") .expect("`__heap_base` exists") .as_i32() diff --git a/client/executor/src/lib.rs b/client/executor/src/lib.rs index af53ed91838..1c21026fd8d 100644 --- a/client/executor/src/lib.rs +++ b/client/executor/src/lib.rs @@ -36,82 +36,24 @@ mod wasm_runtime; mod integration_tests; pub use wasmi; -pub use native_executor::{with_externalities_safe, NativeExecutor, NativeExecutionDispatch}; +pub use native_executor::{with_externalities_safe, NativeExecutor, WasmExecutor, NativeExecutionDispatch}; pub use sp_version::{RuntimeVersion, NativeVersion}; pub use codec::Codec; #[doc(hidden)] -pub use sp_core::traits::Externalities; +pub use sp_core::traits::{Externalities, CallInWasm}; #[doc(hidden)] pub use sp_wasm_interface; pub use wasm_runtime::WasmExecutionMethod; pub use sc_executor_common::{error, sandbox}; -/// Call the given `function` in the given wasm `code`. -/// -/// The signature of `function` needs to follow the default Substrate function signature. -/// -/// - `call_data`: Will be given as input parameters to `function` -/// - `execution_method`: The execution method to use. -/// - `ext`: The externalities that should be set while executing the wasm function. -/// If `None` is given, no externalities will be set. -/// - `heap_pages`: The number of heap pages to allocate. -/// -/// Returns the `Vec` that contains the return value of the function. -pub fn call_in_wasm( - function: &str, - call_data: &[u8], - execution_method: WasmExecutionMethod, - ext: &mut dyn Externalities, - code: &[u8], - heap_pages: u64, - allow_missing_func_imports: bool, -) -> error::Result> { - call_in_wasm_with_host_functions( - function, - call_data, - execution_method, - ext, - code, - heap_pages, - HF::host_functions(), - allow_missing_func_imports, - ) -} - -/// Non-generic version of [`call_in_wasm`] that takes the `host_functions` as parameter. -/// For more information please see [`call_in_wasm`]. -pub fn call_in_wasm_with_host_functions( - function: &str, - call_data: &[u8], - execution_method: WasmExecutionMethod, - ext: &mut dyn Externalities, - code: &[u8], - heap_pages: u64, - host_functions: Vec<&'static dyn sp_wasm_interface::Function>, - allow_missing_func_imports: bool, -) -> error::Result> { - let instance = wasm_runtime::create_wasm_runtime_with_code( - execution_method, - heap_pages, - code, - host_functions, - allow_missing_func_imports, - )?; - - // It is safe, as we delete the instance afterwards. - let mut instance = std::panic::AssertUnwindSafe(instance); - - with_externalities_safe(ext, move || instance.call(function, call_data)).and_then(|r| r) -} - /// Provides runtime information. pub trait RuntimeInfo { /// Native runtime information. fn native_version(&self) -> &NativeVersion; /// Extract RuntimeVersion of given :code block - fn runtime_version (&self, ext: &mut E) -> error::Result; + fn runtime_version(&self, ext: &mut dyn Externalities) -> error::Result; } #[cfg(test)] @@ -119,19 +61,25 @@ mod tests { use super::*; use sc_runtime_test::WASM_BINARY; use sp_io::TestExternalities; + use sp_wasm_interface::HostFunctions; + use sp_core::traits::CallInWasm; #[test] fn call_in_interpreted_wasm_works() { let mut ext = TestExternalities::default(); let mut ext = ext.ext(); - let res = call_in_wasm::( + + let executor = WasmExecutor::new( + WasmExecutionMethod::Interpreted, + Some(8), + sp_io::SubstrateHostFunctions::host_functions(), + true, + ); + let res = executor.call_in_wasm( + &WASM_BINARY[..], "test_empty_return", &[], - WasmExecutionMethod::Interpreted, &mut ext, - &WASM_BINARY, - 8, - true, ).unwrap(); assert_eq!(res, vec![0u8; 0]); } diff --git a/client/executor/src/native_executor.rs b/client/executor/src/native_executor.rs index 1364b753dbe..dfc88d2ede7 100644 --- a/client/executor/src/native_executor.rs +++ b/client/executor/src/native_executor.rs @@ -16,19 +16,15 @@ use crate::{ RuntimeInfo, error::{Error, Result}, - wasm_runtime::{RuntimesCache, WasmExecutionMethod}, + wasm_runtime::{RuntimeCache, WasmExecutionMethod, CodeSource}, }; use sp_version::{NativeVersion, RuntimeVersion}; use codec::{Decode, Encode}; use sp_core::{NativeOrEncoded, traits::{CodeExecutor, Externalities}}; use log::trace; -use std::{result, cell::RefCell, panic::{UnwindSafe, AssertUnwindSafe}, sync::Arc}; +use std::{result, panic::{UnwindSafe, AssertUnwindSafe}, sync::Arc}; use sp_wasm_interface::{HostFunctions, Function}; -use sc_executor_common::wasm_runtime::WasmRuntime; - -thread_local! { - static RUNTIMES_CACHE: RefCell = RefCell::new(RuntimesCache::new()); -} +use sc_executor_common::wasm_runtime::WasmInstance; /// Default num of pages for the heap const DEFAULT_HEAP_PAGES: u64 = 1024; @@ -75,42 +71,43 @@ pub trait NativeExecutionDispatch: Send + Sync { fn native_version() -> NativeVersion; } -/// A generic `CodeExecutor` implementation that uses a delegate to determine wasm code equivalence -/// and dispatch to native code when possible, falling back on `WasmExecutor` when not. -pub struct NativeExecutor { - /// Dummy field to avoid the compiler complaining about us not using `D`. - _dummy: std::marker::PhantomData, +/// An abstraction over Wasm code executor. Supports selecting execution backend and +/// manages runtime cache. +#[derive(Clone)] +pub struct WasmExecutor { /// Method used to execute fallback Wasm code. - fallback_method: WasmExecutionMethod, - /// Native runtime version info. - native_version: NativeVersion, + method: WasmExecutionMethod, /// The number of 64KB pages to allocate for Wasm execution. default_heap_pages: u64, /// The host functions registered with this instance. host_functions: Arc>, + /// WASM runtime cache. + cache: Arc, + /// Allow missing function imports. + allow_missing_func_imports: bool, } -impl NativeExecutor { +impl WasmExecutor { /// Create new instance. /// /// # Parameters /// - /// `fallback_method` - Method used to execute fallback Wasm code. + /// `method` - Method used to execute Wasm code. /// /// `default_heap_pages` - Number of 64KB pages to allocate for Wasm execution. /// Defaults to `DEFAULT_HEAP_PAGES` if `None` is provided. - pub fn new(fallback_method: WasmExecutionMethod, default_heap_pages: Option) -> Self { - let mut host_functions = sp_io::SubstrateHostFunctions::host_functions(); - - // Add the custom host functions provided by the user. - host_functions.extend(D::ExtendHostFunctions::host_functions()); - - NativeExecutor { - _dummy: Default::default(), - fallback_method, - native_version: D::native_version(), + pub fn new( + method: WasmExecutionMethod, + default_heap_pages: Option, + host_functions: Vec<&'static dyn Function>, + allow_missing_func_imports: bool, + ) -> Self { + WasmExecutor { + method, default_heap_pages: default_heap_pages.unwrap_or(DEFAULT_HEAP_PAGES), host_functions: Arc::new(host_functions), + cache: Arc::new(RuntimeCache::new()), + allow_missing_func_imports, } } @@ -127,46 +124,90 @@ impl NativeExecutor { /// runtime is invalidated on any `panic!` to prevent a poisoned state. `ext` is already /// implicitly handled as unwind safe, as we store it in a global variable while executing the /// native runtime. - fn with_runtime( + fn with_instance<'c, R, F>( &self, - ext: &mut E, - f: impl for<'a> FnOnce( - AssertUnwindSafe<&'a mut (dyn WasmRuntime + 'static)>, - &'a RuntimeVersion, - AssertUnwindSafe<&'a mut E>, + code: CodeSource<'c>, + ext: &mut dyn Externalities, + f: F, + ) -> Result + where F: FnOnce( + AssertUnwindSafe<&dyn WasmInstance>, + Option<&RuntimeVersion>, + AssertUnwindSafe<&mut dyn Externalities>, ) -> Result>, - ) -> Result where E: Externalities { - RUNTIMES_CACHE.with(|cache| { - let mut cache = cache.borrow_mut(); - let (runtime, version, code_hash) = cache.fetch_runtime( - ext, - self.fallback_method, - self.default_heap_pages, - &*self.host_functions, - )?; - - let runtime = AssertUnwindSafe(runtime); - let ext = AssertUnwindSafe(ext); - - match f(runtime, version, ext) { - Ok(res) => res, - Err(e) => { - cache.invalidate_runtime(self.fallback_method, code_hash); - Err(e) - } + { + match self.cache.with_instance( + code, + ext, + self.method, + self.default_heap_pages, + &*self.host_functions, + self.allow_missing_func_imports, + |instance, version, ext| { + let instance = AssertUnwindSafe(instance); + let ext = AssertUnwindSafe(ext); + f(instance, version, ext) } - }) + )? { + Ok(r) => r, + Err(e) => Err(e), + } } } -impl Clone for NativeExecutor { - fn clone(&self) -> Self { +impl sp_core::traits::CallInWasm for WasmExecutor { + fn call_in_wasm( + &self, + wasm_blob: &[u8], + method: &str, + call_data: &[u8], + ext: &mut dyn Externalities, + ) -> std::result::Result, String> { + self.with_instance(CodeSource::Custom(wasm_blob), ext, |instance, _, mut ext| { + with_externalities_safe( + &mut **ext, + move || instance.call(method, call_data), + ) + }).map_err(|e| e.to_string()) + } +} + +/// A generic `CodeExecutor` implementation that uses a delegate to determine wasm code equivalence +/// and dispatch to native code when possible, falling back on `WasmExecutor` when not. +pub struct NativeExecutor { + /// Dummy field to avoid the compiler complaining about us not using `D`. + _dummy: std::marker::PhantomData, + /// Native runtime version info. + native_version: NativeVersion, + /// Fallback wasm executor. + wasm: WasmExecutor, +} + +impl NativeExecutor { + /// Create new instance. + /// + /// # Parameters + /// + /// `fallback_method` - Method used to execute fallback Wasm code. + /// + /// `default_heap_pages` - Number of 64KB pages to allocate for Wasm execution. + /// Defaults to `DEFAULT_HEAP_PAGES` if `None` is provided. + pub fn new(fallback_method: WasmExecutionMethod, default_heap_pages: Option) -> Self { + let mut host_functions = sp_io::SubstrateHostFunctions::host_functions(); + + // Add the custom host functions provided by the user. + host_functions.extend(D::ExtendHostFunctions::host_functions()); + let wasm_executor = WasmExecutor::new( + fallback_method, + default_heap_pages, + host_functions, + false, + ); + NativeExecutor { _dummy: Default::default(), - fallback_method: self.fallback_method, native_version: D::native_version(), - default_heap_pages: self.default_heap_pages, - host_functions: self.host_functions.clone(), + wasm: wasm_executor, } } } @@ -176,90 +217,109 @@ impl RuntimeInfo for NativeExecutor { &self.native_version } - fn runtime_version( + fn runtime_version( &self, - ext: &mut E, + ext: &mut dyn Externalities, ) -> Result { - self.with_runtime(ext, |_runtime, version, _ext| Ok(Ok(version.clone()))) + self.wasm.with_instance(CodeSource::Externalities, ext, + |_instance, version, _ext| + Ok(version.cloned().ok_or_else(|| Error::ApiError("Unknown version".into()))) + ) } } impl CodeExecutor for NativeExecutor { type Error = Error; - fn call - < - E: Externalities, + fn call< R: Decode + Encode + PartialEq, NC: FnOnce() -> result::Result + UnwindSafe, >( &self, - ext: &mut E, + ext: &mut dyn Externalities, method: &str, data: &[u8], use_native: bool, native_call: Option, - ) -> (Result>, bool){ + ) -> (Result>, bool) { let mut used_native = false; - let result = self.with_runtime(ext, |mut runtime, onchain_version, mut ext| { - match ( - use_native, - onchain_version.can_call_with(&self.native_version.runtime_version), - native_call, - ) { - (_, false, _) => { - trace!( - target: "executor", - "Request for native execution failed (native: {}, chain: {})", - self.native_version.runtime_version, - onchain_version, - ); - - with_externalities_safe( - &mut **ext, - move || runtime.call(method, data).map(NativeOrEncoded::Encoded) - ) - } - (false, _, _) => { - with_externalities_safe( - &mut **ext, - move || runtime.call(method, data).map(NativeOrEncoded::Encoded) - ) - }, - (true, true, Some(call)) => { - trace!( - target: "executor", - "Request for native execution with native call succeeded (native: {}, chain: {}).", - self.native_version.runtime_version, - onchain_version, - ); - - used_native = true; - let res = with_externalities_safe(&mut **ext, move || (call)()) - .and_then(|r| r - .map(NativeOrEncoded::Native) - .map_err(|s| Error::ApiError(s.to_string())) + let result = self.wasm.with_instance( + CodeSource::Externalities, + ext, + |instance, onchain_version, mut ext| { + let onchain_version = onchain_version.ok_or_else( + || Error::ApiError("Unknown version".into()) + )?; + match ( + use_native, + onchain_version.can_call_with(&self.native_version.runtime_version), + native_call, + ) { + (_, false, _) => { + trace!( + target: "executor", + "Request for native execution failed (native: {}, chain: {})", + self.native_version.runtime_version, + onchain_version, ); - Ok(res) - } - _ => { - trace!( - target: "executor", - "Request for native execution succeeded (native: {}, chain: {})", - self.native_version.runtime_version, - onchain_version - ); - - used_native = true; - Ok(D::dispatch(&mut **ext, method, data).map(NativeOrEncoded::Encoded)) + with_externalities_safe( + &mut **ext, + move || instance.call(method, data).map(NativeOrEncoded::Encoded) + ) + } + (false, _, _) => { + with_externalities_safe( + &mut **ext, + move || instance.call(method, data).map(NativeOrEncoded::Encoded) + ) + }, + (true, true, Some(call)) => { + trace!( + target: "executor", + "Request for native execution with native call succeeded \ + (native: {}, chain: {}).", + self.native_version.runtime_version, + onchain_version, + ); + + used_native = true; + let res = with_externalities_safe(&mut **ext, move || (call)()) + .and_then(|r| r + .map(NativeOrEncoded::Native) + .map_err(|s| Error::ApiError(s.to_string())) + ); + + Ok(res) + } + _ => { + trace!( + target: "executor", + "Request for native execution succeeded (native: {}, chain: {})", + self.native_version.runtime_version, + onchain_version + ); + + used_native = true; + Ok(D::dispatch(&mut **ext, method, data).map(NativeOrEncoded::Encoded)) + } } } - }); + ); (result, used_native) } } +impl Clone for NativeExecutor { + fn clone(&self) -> Self { + NativeExecutor { + _dummy: Default::default(), + native_version: D::native_version(), + wasm: self.wasm.clone(), + } + } +} + impl sp_core::traits::CallInWasm for NativeExecutor { fn call_in_wasm( &self, @@ -268,16 +328,7 @@ impl sp_core::traits::CallInWasm for NativeExecutor< call_data: &[u8], ext: &mut dyn Externalities, ) -> std::result::Result, String> { - crate::call_in_wasm_with_host_functions( - method, - call_data, - self.fallback_method, - ext, - wasm_blob, - self.default_heap_pages, - (*self.host_functions).clone(), - false, - ).map_err(|e| e.to_string()) + sp_core::traits::CallInWasm::call_in_wasm(&self.wasm, wasm_blob, method, call_data, ext) } } @@ -379,7 +430,7 @@ mod tests { let executor = NativeExecutor::::new(WasmExecutionMethod::Interpreted, None); my_interface::HostFunctions::host_functions().iter().for_each(|function| { assert_eq!( - executor.host_functions.iter().filter(|f| f == &function).count(), + executor.wasm.host_functions.iter().filter(|f| f == &function).count(), 2, ); }); diff --git a/client/executor/src/wasm_runtime.rs b/client/executor/src/wasm_runtime.rs index 9d54246ee07..180baf0a2f8 100644 --- a/client/executor/src/wasm_runtime.rs +++ b/client/executor/src/wasm_runtime.rs @@ -19,13 +19,15 @@ //! The primary means of accessing the runtimes is through a cache which saves the reusable //! components of the runtime that are expensive to initialize. +use std::sync::Arc; +use std::borrow::Cow; use crate::error::{Error, WasmError}; -use log::{trace, warn}; +use parking_lot::{Mutex, RwLock}; use codec::Decode; use sp_core::{storage::well_known_keys, traits::Externalities}; use sp_version::RuntimeVersion; -use std::{collections::hash_map::{Entry, HashMap}, panic::AssertUnwindSafe}; -use sc_executor_common::wasm_runtime::WasmRuntime; +use std::panic::AssertUnwindSafe; +use sc_executor_common::wasm_runtime::{WasmModule, WasmInstance}; use sp_wasm_interface::Function; @@ -39,15 +41,33 @@ pub enum WasmExecutionMethod { Compiled, } +/// Executoed code origin. +pub enum CodeSource<'a> { + /// Take code from storage, + Externalities, + /// Use provided code, + Custom(&'a [u8]), +} + /// A Wasm runtime object along with its cached runtime version. struct VersionedRuntime { - runtime: Box, + /// Runtime code hash. + code_hash: Vec, + /// Wasm runtime type. + wasm_method: WasmExecutionMethod, + /// Shared runtime that can spawn instances. + module: Box, /// The number of WebAssembly heap pages this instance was created with. heap_pages: u64, - /// Runtime version according to `Core_version`. - version: RuntimeVersion, + /// Runtime version according to `Core_version` if any. + version: Option, + /// Cached instance pool. + instances: RwLock<[Option>>>; MAX_INSTANCES]>, } +const MAX_RUNTIMES: usize = 2; +const MAX_INSTANCES: usize = 8; + /// Cache for the runtimes. /// /// When an instance is requested for the first time it is added to this cache. Metadata is kept @@ -60,130 +80,184 @@ struct VersionedRuntime { /// /// For now the cache grows indefinitely, but that should be fine for now since runtimes can only be /// upgraded rarely and there are no other ways to make the node to execute some other runtime. -pub struct RuntimesCache { - /// A cache of runtime instances along with metadata, ready to be reused. +pub struct RuntimeCache { + /// A cache of runtimes along with metadata. /// - /// Instances are keyed by the Wasm execution method and the hash of their code. - instances: HashMap<(WasmExecutionMethod, Vec), Result>, + /// Runtimes sorted by recent usage. The most recently used is at the front. + runtimes: Mutex<[Option>; MAX_RUNTIMES]>, } -impl RuntimesCache { +impl RuntimeCache { /// Creates a new instance of a runtimes cache. - pub fn new() -> RuntimesCache { - RuntimesCache { - instances: HashMap::new(), + pub fn new() -> RuntimeCache { + RuntimeCache { + runtimes: Default::default(), } } - /// Fetches an instance of the runtime. - /// - /// On first use we create a new runtime instance, save it to the cache - /// and persist its initial memory. - /// - /// Each subsequent request will return this instance, with its memory restored - /// to the persisted initial memory. Thus, we reuse one single runtime instance - /// for every `fetch_runtime` invocation. + /// Prepares a WASM module instance and executes given function for it. /// + /// This uses internal cache to find avaiable instance or create a new one. /// # Parameters /// + /// `code` - Provides external code or tells the executor to fetch it from storage. + /// /// `ext` - Externalities to use for the runtime. This is used for setting /// up an initial runtime instance. /// /// `default_heap_pages` - Number of 64KB pages to allocate for Wasm execution. /// + /// `wasm_method` - Type of WASM backend to use. + /// /// `host_functions` - The host functions that should be registered for the Wasm runtime. /// - /// # Return value + /// `allow_missing_func_imports` - Ignore missing function imports. /// - /// If no error occurred a tuple `(&mut WasmRuntime, H256)` is - /// returned. `H256` is the hash of the runtime code. + /// `f` - Function to execute. /// + /// # Returns result of `f` wrapped in an additonal result. /// In case of failure one of two errors can be returned: /// /// `Err::InvalidCode` is returned for runtime code issues. /// /// `Error::InvalidMemoryReference` is returned if no memory export with the /// identifier `memory` can be found in the runtime. - pub fn fetch_runtime( - &mut self, - ext: &mut E, + pub fn with_instance<'c, R, F>( + &self, + code: CodeSource<'c>, + ext: &mut dyn Externalities, wasm_method: WasmExecutionMethod, default_heap_pages: u64, host_functions: &[&'static dyn Function], - ) -> Result<(&mut (dyn WasmRuntime + 'static), &RuntimeVersion, Vec), Error> { - let code_hash = ext - .original_storage_hash(well_known_keys::CODE) - .ok_or(Error::InvalidCode("`CODE` not found in storage.".into()))?; - - let heap_pages = ext - .storage(well_known_keys::HEAP_PAGES) - .and_then(|pages| u64::decode(&mut &pages[..]).ok()) - .unwrap_or(default_heap_pages); + allow_missing_func_imports: bool, + f: F, + ) -> Result, Error> + where F: FnOnce( + &dyn WasmInstance, + Option<&RuntimeVersion>, + &mut dyn Externalities) + -> Result, + { + let (code_hash, heap_pages) = match &code { + CodeSource::Externalities => { + ( + ext + .original_storage_hash(well_known_keys::CODE) + .ok_or(Error::InvalidCode("`CODE` not found in storage.".into()))?, + ext + .storage(well_known_keys::HEAP_PAGES) + .and_then(|pages| u64::decode(&mut &pages[..]).ok()) + .unwrap_or(default_heap_pages), + ) + }, + CodeSource::Custom(code) => { + (sp_core::blake2_256(code).to_vec(), default_heap_pages) + } + }; - let result = match self.instances.entry((wasm_method, code_hash.clone())) { - Entry::Occupied(o) => { - let result = o.into_mut(); - if let Ok(ref mut cached_runtime) = result { - let heap_pages_changed = cached_runtime.heap_pages != heap_pages; - let host_functions_changed = cached_runtime.runtime.host_functions() - != host_functions; - if heap_pages_changed || host_functions_changed { - let changed = if heap_pages_changed { - "heap_pages" - } else { - "host functions" - }; + let mut runtimes = self.runtimes.lock(); // this must be released prior to calling f + let pos = runtimes.iter().position(|r| r.as_ref().map_or( + false, + |r| r.wasm_method == wasm_method && + r.code_hash == code_hash && + r.heap_pages == heap_pages + )); - trace!( - target: "runtimes_cache", - "{} were changed. Reinstantiating the instance", - changed, - ); - *result = create_versioned_wasm_runtime( - ext, - wasm_method, - heap_pages, - host_functions.into(), - ); - if let Err(ref err) = result { - warn!(target: "runtimes_cache", "cannot create a runtime: {:?}", err); - } + let runtime = match pos { + Some(n) => runtimes[n] + .clone() + .expect("`position` only returns `Some` for entries that are `Some`"), + None => { + let code = match code { + CodeSource::Externalities => { + Cow::Owned(ext.original_storage(well_known_keys::CODE) + .ok_or(WasmError::CodeNotFound)?) } - } - result - }, - Entry::Vacant(v) => { - trace!(target: "runtimes_cache", "no instance found in cache, creating now."); + CodeSource::Custom(code) => { + Cow::Borrowed(code) + } + }; + let result = create_versioned_wasm_runtime( + &code, + code_hash, ext, wasm_method, heap_pages, host_functions.into(), + allow_missing_func_imports, ); if let Err(ref err) = result { - warn!(target: "runtimes_cache", "cannot create a runtime: {:?}", err); + log::warn!(target: "wasm-runtime", "Cannot create a runtime: {:?}", err); } - v.insert(result) + Arc::new(result?) } }; - result.as_mut() - .map(|entry| (entry.runtime.as_mut(), &entry.version, code_hash)) - .map_err(|ref e| Error::InvalidCode(format!("{:?}", e))) - } + // Rearrange runtimes by last recently used. + match pos { + Some(0) => {}, + Some(n) => { + for i in (1 .. n + 1).rev() { + runtimes.swap(i, i - 1); + } + } + None => { + runtimes[MAX_RUNTIMES-1] = Some(runtime.clone()); + for i in (1 .. MAX_RUNTIMES).rev() { + runtimes.swap(i, i - 1); + } + } + } + drop(runtimes); - /// Invalidate the runtime for the given `wasm_method` and `code_hash`. - /// - /// Invalidation of a runtime is useful when there was a `panic!` in native while executing it. - /// The `panic!` maybe have brought the runtime into a poisoned state and so, it is better to - /// invalidate this runtime instance. - pub fn invalidate_runtime( - &mut self, - wasm_method: WasmExecutionMethod, - code_hash: Vec, - ) { - // Just remove the instance, it will be re-created the next time it is requested. - self.instances.remove(&(wasm_method, code_hash)); + let result = { + // Find a free instance + let instance_pool = runtime.instances.read().clone(); + let instance = instance_pool + .iter() + .find_map(|i| i.as_ref().and_then(|i| i.try_lock())); + if let Some(mut locked) = instance { + let result = f(&**locked, runtime.version.as_ref(), ext); + if let Err(e) = &result { + log::warn!(target: "wasm-runtime", "Evicting failed runtime instance: {:?}", e); + *locked = runtime.module.new_instance()?; + } + result + } else { + // Allocate a new instance + let instance = runtime.module.new_instance()?; + + let result = f(&*instance, runtime.version.as_ref(), ext); + match &result { + Ok(_) => { + let mut instance_pool = runtime.instances.write(); + if let Some(ref mut slot) = instance_pool.iter_mut().find(|s| s.is_none()) { + **slot = Some(Arc::new(Mutex::new(instance))); + log::debug!( + target: "wasm-runtime", + "Allocated WASM instance {}/{}", + instance_pool.len(), + MAX_INSTANCES, + ); + } else { + log::warn!(target: "wasm-runtime", "Ran out of free WASM instances"); + } + } + Err(e) => { + log::warn!( + target: + "wasm-runtime", + "Fresh runtime instance failed with {:?}", + e, + ); + } + } + result + } + }; + + Ok(result) } } @@ -194,28 +268,43 @@ pub fn create_wasm_runtime_with_code( code: &[u8], host_functions: Vec<&'static dyn Function>, allow_missing_func_imports: bool, -) -> Result, WasmError> { +) -> Result, WasmError> { match wasm_method { WasmExecutionMethod::Interpreted => - sc_executor_wasmi::create_instance(code, heap_pages, host_functions, allow_missing_func_imports) - .map(|runtime| -> Box { Box::new(runtime) }), + sc_executor_wasmi::create_runtime( + code, + heap_pages, + host_functions, + allow_missing_func_imports + ).map(|runtime| -> Box { Box::new(runtime) }), #[cfg(feature = "wasmtime")] WasmExecutionMethod::Compiled => - sc_executor_wasmtime::create_instance(code, heap_pages, host_functions, allow_missing_func_imports) - .map(|runtime| -> Box { Box::new(runtime) }), + sc_executor_wasmtime::create_runtime( + code, + heap_pages, + host_functions, + allow_missing_func_imports + ).map(|runtime| -> Box { Box::new(runtime) }), } } -fn create_versioned_wasm_runtime( - ext: &mut E, +fn create_versioned_wasm_runtime( + code: &[u8], + code_hash: Vec, + ext: &mut dyn Externalities, wasm_method: WasmExecutionMethod, heap_pages: u64, host_functions: Vec<&'static dyn Function>, + allow_missing_func_imports: bool, ) -> Result { - let code = ext - .original_storage(well_known_keys::CODE) - .ok_or(WasmError::CodeNotFound)?; - let mut runtime = create_wasm_runtime_with_code(wasm_method, heap_pages, &code, host_functions, false)?; + let time = std::time::Instant::now(); + let mut runtime = create_wasm_runtime_with_code( + wasm_method, + heap_pages, + &code, + host_functions, + allow_missing_func_imports, + )?; // Call to determine runtime version. let version_result = { @@ -224,21 +313,33 @@ fn create_versioned_wasm_runtime( // The following unwind safety assertion is OK because if the method call panics, the // runtime will be dropped. - let mut runtime = AssertUnwindSafe(runtime.as_mut()); + let runtime = AssertUnwindSafe(runtime.as_mut()); crate::native_executor::with_externalities_safe( &mut **ext, - move || runtime.call("Core_version", &[]) + move || runtime.new_instance()?.call("Core_version", &[]) ).map_err(|_| WasmError::Instantiation("panic in call to get runtime version".into()))? }; - let encoded_version = version_result - .map_err(|e| WasmError::Instantiation(format!("failed to call \"Core_version\": {}", e)))?; - let version = RuntimeVersion::decode(&mut encoded_version.as_slice()) - .map_err(|_| WasmError::Instantiation("failed to decode \"Core_version\" result".into()))?; + let version = match version_result { + Ok(version) => Some(RuntimeVersion::decode(&mut version.as_slice()) + .map_err(|_| + WasmError::Instantiation("failed to decode \"Core_version\" result".into()) + )?), + Err(_) => None, + }; + log::debug!( + target: "wasm-runtime", + "Prepared new runtime version {:?} in {} ms.", + version, + time.elapsed().as_millis(), + ); Ok(VersionedRuntime { - runtime, + code_hash, + module: runtime, version, heap_pages, + wasm_method, + instances: Default::default(), }) } diff --git a/client/executor/wasmi/src/lib.rs b/client/executor/wasmi/src/lib.rs index a0e11dfcf8b..6348c241335 100644 --- a/client/executor/wasmi/src/lib.rs +++ b/client/executor/wasmi/src/lib.rs @@ -14,10 +14,10 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! This crate provides an implementation of `WasmRuntime` that is baked by wasmi. +//! This crate provides an implementation of `WasmModule` that is baked by wasmi. use sc_executor_common::{error::{Error, WasmError}, sandbox}; -use std::{str, mem, cell::RefCell}; +use std::{str, mem, cell::RefCell, sync::Arc}; use wasmi::{ Module, ModuleInstance, MemoryInstance, MemoryRef, TableRef, ImportsBuilder, ModuleRef, memory_units::Pages, RuntimeValue::{I32, I64, self}, @@ -30,7 +30,7 @@ use sp_wasm_interface::{ FunctionContext, Pointer, WordSize, Sandbox, MemoryId, Result as WResult, Function, }; use sp_runtime_interface::unpack_ptr_and_len; -use sc_executor_common::wasm_runtime::WasmRuntime; +use sc_executor_common::wasm_runtime::{WasmModule, WasmInstance}; struct FunctionExecutor<'a> { sandbox_store: sandbox::Store, @@ -623,9 +623,77 @@ impl StateSnapshot { } } -/// A runtime along with its initial state snapshot. -#[derive(Clone)] +/// A runtime along with initial copy of data segments. pub struct WasmiRuntime { + /// A wasm module. + module: Module, + /// The host functions registered for this instance. + host_functions: Arc>, + /// Enable stub generation for functions that are not available in `host_functions`. + /// These stubs will error when the wasm blob tries to call them. + allow_missing_func_imports: bool, + /// Numer of heap pages this runtime uses. + heap_pages: u64, + /// Data segments created for each new instance. + data_segments: Vec, +} + +impl WasmModule for WasmiRuntime { + fn new_instance(&self) -> Result, Error> { + // Instantiate this module. + let (instance, missing_functions, memory) = instantiate_module( + self.heap_pages as usize, + &self.module, + &self.host_functions, + self.allow_missing_func_imports, + ).map_err(|e| WasmError::Instantiation(e.to_string()))?; + + // Take state snapshot before executing anything. + let state_snapshot = StateSnapshot::take(&instance, self.data_segments.clone()) + .expect( + "`take` returns `Err` if the module is not valid; + we already loaded module above, thus the `Module` is proven to be valid at this point; + qed + ", + ); + + Ok(Box::new(WasmiInstance { + instance, + memory, + state_snapshot, + host_functions: self.host_functions.clone(), + allow_missing_func_imports: self.allow_missing_func_imports, + missing_functions, + })) + } +} + +/// Create a new `WasmiRuntime` given the code. This function loads the module and +/// stores it in the instance. +pub fn create_runtime( + code: &[u8], + heap_pages: u64, + host_functions: Vec<&'static dyn Function>, + allow_missing_func_imports: bool, +) -> Result { + let module = Module::from_buffer(&code).map_err(|_| WasmError::InvalidModule)?; + + // Extract the data segments from the wasm code. + // + // A return of this error actually indicates that there is a problem in logic, since + // we just loaded and validated the `module` above. + let data_segments = extract_data_segments(&code)?; + Ok(WasmiRuntime { + module, + data_segments, + host_functions: Arc::new(host_functions), + allow_missing_func_imports, + heap_pages, + }) +} + +/// Wasmi instance wrapper along with the state snapshot. +pub struct WasmiInstance { /// A wasm module instance. instance: ModuleRef, /// The memory instance of used by the wasm module. @@ -633,7 +701,7 @@ pub struct WasmiRuntime { /// The snapshot of the instance's state taken just after the instantiation. state_snapshot: StateSnapshot, /// The host functions registered for this instance. - host_functions: Vec<&'static dyn Function>, + host_functions: Arc>, /// Enable stub generation for functions that are not available in `host_functions`. /// These stubs will error when the wasm blob tries to call them. allow_missing_func_imports: bool, @@ -641,13 +709,12 @@ pub struct WasmiRuntime { missing_functions: Vec, } -impl WasmRuntime for WasmiRuntime { - fn host_functions(&self) -> &[&'static dyn Function] { - &self.host_functions - } +// This is safe because `WasmiInstance` does not leak any references to `self.memory` and `self.instance` +unsafe impl Send for WasmiInstance {} +impl WasmInstance for WasmiInstance { fn call( - &mut self, + &self, method: &str, data: &[u8], ) -> Result, Error> { @@ -664,67 +731,26 @@ impl WasmRuntime for WasmiRuntime { &self.memory, method, data, - &self.host_functions, + self.host_functions.as_ref(), self.allow_missing_func_imports, - &self.missing_functions, + self.missing_functions.as_ref(), ) } - fn get_global_val(&self, name: &str) -> Result, Error> { + fn get_global_const(&self, name: &str) -> Result, Error> { match self.instance.export_by_name(name) { Some(global) => Ok(Some( global - .as_global() - .ok_or_else(|| format!("`{}` is not a global", name))? - .get() - .into() + .as_global() + .ok_or_else(|| format!("`{}` is not a global", name))? + .get() + .into() )), None => Ok(None), } } } -pub fn create_instance( - code: &[u8], - heap_pages: u64, - host_functions: Vec<&'static dyn Function>, - allow_missing_func_imports: bool, -) -> Result { - let module = Module::from_buffer(&code).map_err(|_| WasmError::InvalidModule)?; - - // Extract the data segments from the wasm code. - // - // A return of this error actually indicates that there is a problem in logic, since - // we just loaded and validated the `module` above. - let data_segments = extract_data_segments(&code)?; - - // Instantiate this module. - let (instance, missing_functions, memory) = instantiate_module( - heap_pages as usize, - &module, - &host_functions, - allow_missing_func_imports, - ).map_err(|e| WasmError::Instantiation(e.to_string()))?; - - // Take state snapshot before executing anything. - let state_snapshot = StateSnapshot::take(&instance, data_segments) - .expect( - "`take` returns `Err` if the module is not valid; - we already loaded module above, thus the `Module` is proven to be valid at this point; - qed - ", - ); - - Ok(WasmiRuntime { - instance, - memory, - state_snapshot, - host_functions, - allow_missing_func_imports, - missing_functions, - }) -} - /// Extract the data segments from the given wasm code. /// /// Returns `Err` if the given wasm code cannot be deserialized. diff --git a/client/executor/wasmtime/Cargo.toml b/client/executor/wasmtime/Cargo.toml index 57f4c2a8423..9f8784cc981 100644 --- a/client/executor/wasmtime/Cargo.toml +++ b/client/executor/wasmtime/Cargo.toml @@ -10,7 +10,7 @@ description = "Defines a `WasmRuntime` that uses the Wasmtime JIT to execute." [dependencies] log = "0.4.8" -wasmi = "0.6.2" +scoped-tls = "1.0" parity-wasm = "0.41.0" codec = { package = "parity-scale-codec", version = "1.2.0" } sc-executor-common = { version = "0.8.0-alpha.2", path = "../common" } @@ -18,8 +18,7 @@ sp-wasm-interface = { version = "2.0.0-alpha.2", path = "../../../primitives/was sp-runtime-interface = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime-interface" } sp-core = { version = "2.0.0-alpha.2", path = "../../../primitives/core" } sp-allocator = { version = "2.0.0-alpha.2", path = "../../../primitives/allocator" } - -wasmtime = "0.11" +wasmtime = { git = "https://github.com/paritytech/wasmtime", branch = "a-thread-safe-api" } [dev-dependencies] assert_matches = "1.3.0" diff --git a/client/executor/wasmtime/src/host.rs b/client/executor/wasmtime/src/host.rs index e0cc6ecc9ae..29187ac6633 100644 --- a/client/executor/wasmtime/src/host.rs +++ b/client/executor/wasmtime/src/host.rs @@ -19,7 +19,7 @@ use crate::instance_wrapper::InstanceWrapper; use crate::util; -use std::cell::RefCell; +use std::{cell::RefCell, rc::Rc}; use log::trace; use codec::{Encode, Decode}; use sp_allocator::FreeingBumpHeapAllocator; @@ -51,12 +51,12 @@ pub struct HostState { // borrow after performing necessary queries/changes. sandbox_store: RefCell>, allocator: RefCell, - instance: InstanceWrapper, + instance: Rc, } impl HostState { /// Constructs a new `HostState`. - pub fn new(allocator: FreeingBumpHeapAllocator, instance: InstanceWrapper) -> Self { + pub fn new(allocator: FreeingBumpHeapAllocator, instance: Rc) -> Self { HostState { sandbox_store: RefCell::new(sandbox::Store::new()), allocator: RefCell::new(allocator), @@ -64,11 +64,6 @@ impl HostState { } } - /// Destruct the host state and extract the `InstanceWrapper` passed at the creation. - pub fn into_instance(self) -> InstanceWrapper { - self.instance - } - /// Materialize `HostContext` that can be used to invoke a substrate host `dyn Function`. pub fn materialize<'a>(&'a self) -> HostContext<'a> { HostContext(self) diff --git a/client/executor/wasmtime/src/imports.rs b/client/executor/wasmtime/src/imports.rs index 349f84a0d74..48299ffd62d 100644 --- a/client/executor/wasmtime/src/imports.rs +++ b/client/executor/wasmtime/src/imports.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -use crate::state_holder::StateHolder; +use crate::state_holder; use sc_executor_common::error::WasmError; use sp_wasm_interface::{Function, Value, ValueType}; use std::any::Any; @@ -34,7 +34,6 @@ pub struct Imports { /// Goes over all imports of a module and prepares a vector of `Extern`s that can be used for /// instantiation of the module. Returns an error if there are imports that cannot be satisfied. pub fn resolve_imports( - state_holder: &StateHolder, module: &Module, host_functions: &[&'static dyn Function], heap_pages: u32, @@ -58,7 +57,6 @@ pub fn resolve_imports( } _ => resolve_func_import( module, - state_holder, import_ty, host_functions, allow_missing_func_imports, @@ -112,7 +110,6 @@ fn resolve_memory_import( fn resolve_func_import( module: &Module, - state_holder: &StateHolder, import_ty: &ImportType, host_functions: &[&'static dyn Function], allow_missing_func_imports: bool, @@ -152,7 +149,7 @@ fn resolve_func_import( ))); } - Ok(HostFuncHandler::new(&state_holder, *host_func).into_extern(module)) + Ok(HostFuncHandler::new(*host_func).into_extern(module)) } /// Returns `true` if `lhs` and `rhs` represent the same signature. @@ -163,14 +160,12 @@ fn signature_matches(lhs: &wasmtime::FuncType, rhs: &wasmtime::FuncType) -> bool /// This structure implements `Callable` and acts as a bridge between wasmtime and /// substrate host functions. struct HostFuncHandler { - state_holder: StateHolder, host_func: &'static dyn Function, } impl HostFuncHandler { - fn new(state_holder: &StateHolder, host_func: &'static dyn Function) -> Self { + fn new(host_func: &'static dyn Function) -> Self { Self { - state_holder: state_holder.clone(), host_func, } } @@ -188,7 +183,7 @@ impl Callable for HostFuncHandler { wasmtime_params: &[Val], wasmtime_results: &mut [Val], ) -> Result<(), wasmtime::Trap> { - let unwind_result = self.state_holder.with_context(|host_ctx| { + let unwind_result = state_holder::with_context(|host_ctx| { let mut host_ctx = host_ctx.expect( "host functions can be called only from wasm instance; wasm instance is always called initializing context; diff --git a/client/executor/wasmtime/src/lib.rs b/client/executor/wasmtime/src/lib.rs index 8f4801e6da1..66e4e085235 100644 --- a/client/executor/wasmtime/src/lib.rs +++ b/client/executor/wasmtime/src/lib.rs @@ -23,4 +23,4 @@ mod imports; mod instance_wrapper; mod util; -pub use runtime::create_instance; +pub use runtime::create_runtime; diff --git a/client/executor/wasmtime/src/runtime.rs b/client/executor/wasmtime/src/runtime.rs index b99d3347872..02acd33e69a 100644 --- a/client/executor/wasmtime/src/runtime.rs +++ b/client/executor/wasmtime/src/runtime.rs @@ -15,57 +15,85 @@ // along with Substrate. If not, see . //! Defines the compiled Wasm runtime that uses Wasmtime internally. +use std::rc::Rc; +use std::sync::Arc; use crate::host::HostState; -use crate::imports::{resolve_imports, Imports}; +use crate::imports::{Imports, resolve_imports}; use crate::instance_wrapper::InstanceWrapper; -use crate::state_holder::StateHolder; +use crate::state_holder; use sc_executor_common::{ error::{Error, Result, WasmError}, - wasm_runtime::WasmRuntime, + wasm_runtime::{WasmModule, WasmInstance}, }; use sp_allocator::FreeingBumpHeapAllocator; use sp_runtime_interface::unpack_ptr_and_len; use sp_wasm_interface::{Function, Pointer, WordSize, Value}; use wasmtime::{Config, Engine, Module, Store}; -/// A `WasmRuntime` implementation using wasmtime to compile the runtime module to machine code +/// A `WasmModule` implementation using wasmtime to compile the runtime module to machine code /// and execute the compiled code. pub struct WasmtimeRuntime { - module: Module, - imports: Imports, - state_holder: StateHolder, + module: Arc, heap_pages: u32, + allow_missing_func_imports: bool, host_functions: Vec<&'static dyn Function>, } -impl WasmRuntime for WasmtimeRuntime { - fn host_functions(&self) -> &[&'static dyn Function] { - &self.host_functions +impl WasmModule for WasmtimeRuntime { + fn new_instance(&self) -> Result> { + // Scan all imports, find the matching host functions, and create stubs that adapt arguments + // and results. + let imports = resolve_imports( + &self.module, + &self.host_functions, + self.heap_pages, + self.allow_missing_func_imports, + )?; + + Ok(Box::new(WasmtimeInstance { + module: self.module.clone(), + imports, + heap_pages: self.heap_pages, + })) } +} + +/// A `WasmInstance` implementation that reuses compiled module and spawns instances +/// to execute the compiled code. +pub struct WasmtimeInstance { + module: Arc, + imports: Imports, + heap_pages: u32, +} + +// This is safe because `WasmtimeInstance` does not leak reference to `self.imports` +// and all imports don't reference any anything, other than host functions and memory +unsafe impl Send for WasmtimeInstance {} - fn call(&mut self, method: &str, data: &[u8]) -> Result> { +impl WasmInstance for WasmtimeInstance { + fn call(&self, method: &str, data: &[u8]) -> Result> { + // TODO: reuse the instance and reset globals after call + // https://github.com/paritytech/substrate/issues/5141 + let instance = Rc::new(InstanceWrapper::new(&self.module, &self.imports, self.heap_pages)?); call_method( - &self.module, - &mut self.imports, - &self.state_holder, + instance, method, data, - self.heap_pages, ) } - fn get_global_val(&self, name: &str) -> Result> { - // Yeah, there is no better way currently :( - InstanceWrapper::new(&self.module, &self.imports, self.heap_pages)? - .get_global_val(name) + fn get_global_const(&self, name: &str) -> Result> { + let instance = InstanceWrapper::new(&self.module, &self.imports, self.heap_pages)?; + instance.get_global_val(name) } } + /// Create a new `WasmtimeRuntime` given the code. This function performs translation from Wasm to /// machine code, which can be computationally heavy. -pub fn create_instance( +pub fn create_runtime( code: &[u8], heap_pages: u64, host_functions: Vec<&'static dyn Function>, @@ -80,55 +108,37 @@ pub fn create_instance( let module = Module::new(&store, code) .map_err(|e| WasmError::Other(format!("cannot create module: {}", e)))?; - let state_holder = StateHolder::empty(); - - // Scan all imports, find the matching host functions, and create stubs that adapt arguments - // and results. - let imports = resolve_imports( - &state_holder, - &module, - &host_functions, - heap_pages as u32, - allow_missing_func_imports, - )?; - Ok(WasmtimeRuntime { - module, - imports, - state_holder, + module: Arc::new(module), heap_pages: heap_pages as u32, + allow_missing_func_imports, host_functions, }) } /// Call a function inside a precompiled Wasm module. fn call_method( - module: &Module, - imports: &mut Imports, - state_holder: &StateHolder, + instance_wrapper: Rc, method: &str, data: &[u8], - heap_pages: u32, ) -> Result> { - let instance_wrapper = InstanceWrapper::new(module, imports, heap_pages)?; let entrypoint = instance_wrapper.resolve_entrypoint(method)?; let heap_base = instance_wrapper.extract_heap_base()?; let allocator = FreeingBumpHeapAllocator::new(heap_base); - perform_call(data, state_holder, instance_wrapper, entrypoint, allocator) + perform_call(data, instance_wrapper, entrypoint, allocator) } fn perform_call( data: &[u8], - state_holder: &StateHolder, - instance_wrapper: InstanceWrapper, + instance_wrapper: Rc, entrypoint: wasmtime::Func, mut allocator: FreeingBumpHeapAllocator, ) -> Result> { let (data_ptr, data_len) = inject_input_data(&instance_wrapper, &mut allocator, data)?; - let host_state = HostState::new(allocator, instance_wrapper); - let (ret, host_state) = state_holder.with_initialized_state(host_state, || { + let host_state = HostState::new(allocator, instance_wrapper.clone()); + let ret = state_holder::with_initialized_state(&host_state, || { match entrypoint.call(&[ wasmtime::Val::I32(u32::from(data_ptr) as i32), wasmtime::Val::I32(u32::from(data_len) as i32), @@ -146,9 +156,7 @@ fn perform_call( } }); let (output_ptr, output_len) = ret?; - - let instance = host_state.into_instance(); - let output = extract_output_data(&instance, output_ptr, output_len)?; + let output = extract_output_data(&instance_wrapper, output_ptr, output_len)?; Ok(output) } diff --git a/client/executor/wasmtime/src/state_holder.rs b/client/executor/wasmtime/src/state_holder.rs index 57564ed3ec4..42cb79e7a35 100644 --- a/client/executor/wasmtime/src/state_holder.rs +++ b/client/executor/wasmtime/src/state_holder.rs @@ -15,63 +15,29 @@ // along with Substrate. If not, see . use crate::host::{HostContext, HostState}; -use std::cell::RefCell; -use std::rc::Rc; -/// A common place to store a reference to the `HostState`. -/// -/// This structure is passed into each host function handler and retained in the implementation of -/// `WasmRuntime`. Whenever a call into a runtime method is initiated, the host state is populated -/// with the state for that runtime method call. +scoped_tls::scoped_thread_local!(static HOST_STATE: HostState); + +/// Provide `HostState` for the runtime method call and execute the given function `f`. /// -/// During the execution of the runtime method call, wasm can call imported host functions. When -/// that happens the host function handler gets a `HostContext` (obtainable through having a -/// `HostState` reference). -#[derive(Clone)] -pub struct StateHolder { - // This is `Some` only during a call. - state: Rc>>, +/// During the execution of the provided function `with_context` will be callable. +pub fn with_initialized_state(s: &HostState, f: F) -> R +where + F: FnOnce() -> R, +{ + HOST_STATE.set(s, f) } -impl StateHolder { - /// Create a placeholder `StateHolder`. - pub fn empty() -> StateHolder { - StateHolder { - state: Rc::new(RefCell::new(None)), - } - } - - /// Provide `HostState` for the runtime method call and execute the given function `f`. - /// - /// During the execution of the provided function `with_context` will be callable. - pub fn with_initialized_state(&self, state: HostState, f: F) -> (R, HostState) - where - F: FnOnce() -> R, - { - *self.state.borrow_mut() = Some(state); - - let ret = f(); - let state = self - .state - .borrow_mut() - .take() - .expect("cannot be None since was just assigned; qed"); - - (ret, state) - } - - /// Create a `HostContext` from the contained `HostState` and execute the given function `f`. - /// - /// This function is only callable within closure passed to `init_state`. Otherwise, the passed - /// context will be `None`. - pub fn with_context(&self, f: F) -> R - where - F: FnOnce(Option) -> R, - { - let state = self.state.borrow(); - match *state { - Some(ref state) => f(Some(state.materialize())), - None => f(None), - } +/// Create a `HostContext` from the contained `HostState` and execute the given function `f`. +/// +/// This function is only callable within closure passed to `init_state`. Otherwise, the passed +/// context will be `None`. +pub fn with_context(f: F) -> R +where + F: FnOnce(Option) -> R, +{ + if !HOST_STATE.is_set() { + return f(None) } + HOST_STATE.with(|state| f(Some(state.materialize()))) } diff --git a/primitives/core/src/traits.rs b/primitives/core/src/traits.rs index bd02d39fb55..e86a0234bf5 100644 --- a/primitives/core/src/traits.rs +++ b/primitives/core/src/traits.rs @@ -92,12 +92,11 @@ pub trait CodeExecutor: Sized + Send + Sync + CallInWasm + Clone + 'static { /// Call a given method in the runtime. Returns a tuple of the result (either the output data /// or an execution error) together with a `bool`, which is true if native execution was used. fn call< - E: Externalities, R: codec::Codec + PartialEq, NC: FnOnce() -> Result + UnwindSafe, >( &self, - ext: &mut E, + ext: &mut dyn Externalities, method: &str, data: &[u8], use_native: bool, diff --git a/primitives/runtime-interface/test/src/lib.rs b/primitives/runtime-interface/test/src/lib.rs index 01fc0a46b77..014a46e9d74 100644 --- a/primitives/runtime-interface/test/src/lib.rs +++ b/primitives/runtime-interface/test/src/lib.rs @@ -22,26 +22,27 @@ use sp_runtime_interface::*; use sp_runtime_interface_test_wasm::{WASM_BINARY, test_api::HostFunctions}; use sp_wasm_interface::HostFunctions as HostFunctionsT; +use sc_executor::CallInWasm; type TestExternalities = sp_state_machine::TestExternalities; fn call_wasm_method(method: &str) -> TestExternalities { let mut ext = TestExternalities::default(); let mut ext_ext = ext.ext(); + let mut host_functions = HF::host_functions(); + host_functions.extend(sp_io::SubstrateHostFunctions::host_functions()); - sc_executor::call_in_wasm::< - ( - HF, - sp_io::SubstrateHostFunctions, - ) - >( + let executor = sc_executor::WasmExecutor::new( + sc_executor::WasmExecutionMethod::Interpreted, + Some(8), + host_functions, + false, + ); + executor.call_in_wasm( + &WASM_BINARY[..], method, &[], - sc_executor::WasmExecutionMethod::Interpreted, &mut ext_ext, - &WASM_BINARY[..], - 8, - false, ).expect(&format!("Executes `{}`", method)); ext @@ -87,7 +88,7 @@ fn test_return_input_public_key() { #[test] #[should_panic( - expected = "Other(\"Instantiation: Export ext_test_api_return_input_version_1 not found\")" + expected = "\"Instantiation: Export ext_test_api_return_input_version_1 not found\"" )] fn host_function_not_found() { call_wasm_method::<()>("test_return_data"); @@ -96,8 +97,9 @@ fn host_function_not_found() { #[test] #[should_panic( expected = - "FunctionExecution(\"ext_test_api_invalid_utf8_data_version_1\", \ - \"Invalid utf8 data provided\")" + "Executes `test_invalid_utf8_data_should_return_an_error`: \ + \"Trap: Trap { kind: Host(FunctionExecution(\\\"ext_test_api_invalid_utf8_data_version_1\\\", \ + \\\"Invalid utf8 data provided\\\")) }\"" )] fn test_invalid_utf8_data_should_return_an_error() { call_wasm_method::("test_invalid_utf8_data_should_return_an_error"); diff --git a/primitives/state-machine/src/lib.rs b/primitives/state-machine/src/lib.rs index ce7fc243c15..ff41237c831 100644 --- a/primitives/state-machine/src/lib.rs +++ b/primitives/state-machine/src/lib.rs @@ -709,12 +709,11 @@ mod tests { type Error = u8; fn call< - E: Externalities, R: Encode + Decode + PartialEq, NC: FnOnce() -> result::Result, >( &self, - ext: &mut E, + ext: &mut dyn Externalities, _method: &str, _data: &[u8], use_native: bool, diff --git a/test-utils/runtime/src/system.rs b/test-utils/runtime/src/system.rs index b410d317a1b..9eb501c4c89 100644 --- a/test-utils/runtime/src/system.rs +++ b/test-utils/runtime/src/system.rs @@ -401,7 +401,7 @@ mod tests { fn block_import_works_wasm() { block_import_works(|b, ext| { let mut ext = ext.ext(); - executor().call::<_, NeverNativeValue, fn() -> _>( + executor().call:: _>( &mut ext, "Core_execute_block", &b.encode(), @@ -494,7 +494,7 @@ mod tests { fn block_import_with_transaction_works_wasm() { block_import_with_transaction_works(|b, ext| { let mut ext = ext.ext(); - executor().call::<_, NeverNativeValue, fn() -> _>( + executor().call:: _>( &mut ext, "Core_execute_block", &b.encode(), -- GitLab From 2c1ce061cead424608d52a185bd25ee569be5e17 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 15:57:03 +0100 Subject: [PATCH 096/106] Introduce default-setting prime for collective (#5137) * Introduce default-setting prime for collective * Docs. * Elections phragmen supports prime * Fix * Membership supports prime * Fix * Update frame/collective/src/lib.rs Co-Authored-By: Shawn Tabrizi Co-authored-by: Shawn Tabrizi --- bin/node/runtime/src/lib.rs | 12 + frame/collective/src/lib.rs | 279 +++++++++++++++---- frame/elections-phragmen/src/lib.rs | 32 +++ frame/membership/src/lib.rs | 102 ++++++- frame/support/src/storage/generator/value.rs | 8 + frame/support/src/storage/mod.rs | 4 + frame/support/src/traits.rs | 12 + 7 files changed, 399 insertions(+), 50 deletions(-) diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index 1cc0a2b7251..ae0de952e49 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -68,6 +68,7 @@ use impls::{CurrencyToVoteHandler, Author, LinearWeightToFee, TargetedFeeAdjustm /// Constant values used within the runtime. pub mod constants; use constants::{time::*, currency::*}; +use frame_system::Trait; // Make the WASM binary available. #[cfg(feature = "std")] @@ -330,11 +331,16 @@ impl pallet_democracy::Trait for Runtime { type Slash = Treasury; } +parameter_types! { + pub const CouncilMotionDuration: BlockNumber = 5 * DAYS; +} + type CouncilCollective = pallet_collective::Instance1; impl pallet_collective::Trait for Runtime { type Origin = Origin; type Proposal = Call; type Event = Event; + type MotionDuration = CouncilMotionDuration; } parameter_types! { @@ -360,11 +366,16 @@ impl pallet_elections_phragmen::Trait for Runtime { type TermDuration = TermDuration; } +parameter_types! { + pub const TechnicalMotionDuration: BlockNumber = 5 * DAYS; +} + type TechnicalCollective = pallet_collective::Instance2; impl pallet_collective::Trait for Runtime { type Origin = Origin; type Proposal = Call; type Event = Event; + type MotionDuration = TechnicalMotionDuration; } impl pallet_membership::Trait for Runtime { @@ -373,6 +384,7 @@ impl pallet_membership::Trait for Runtime { type RemoveOrigin = pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type SwapOrigin = pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type ResetOrigin = pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; + type PrimeOrigin = pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; type MembershipInitialized = TechnicalCommittee; type MembershipChanged = TechnicalCommittee; } diff --git a/frame/collective/src/lib.rs b/frame/collective/src/lib.rs index 605cda3cb77..b5620e34065 100644 --- a/frame/collective/src/lib.rs +++ b/frame/collective/src/lib.rs @@ -18,7 +18,20 @@ //! through dispatched calls from one of two specialized origins. //! //! The membership can be provided in one of two ways: either directly, using the Root-dispatchable -//! function `set_members`, or indirectly, through implementing the `ChangeMembers` +//! function `set_members`, or indirectly, through implementing the `ChangeMembers`. +//! +//! A "prime" member may be set allowing their vote to act as the default vote in case of any +//! abstentions after the voting period. +//! +//! Voting happens through motions comprising a proposal (i.e. a curried dispatchable) plus a +//! number of approvals required for it to pass and be called. Motions are open for members to +//! vote on for a minimum period given by `MotionDuration`. As soon as the needed number of +//! approvals is given, the motion is closed and executed. If the number of approvals is not reached +//! during the voting period, then `close` may be called by any account in order to force the end +//! the motion explicitly. If a prime member is defined then their vote is used in place of any +//! abstentions and the proposal is executed if there are enough approvals counting the new votes. +//! +//! If there are not, or if no prime is set, then the motion is dropped without being executed. #![cfg_attr(not(feature = "std"), no_std)] #![recursion_limit="128"] @@ -30,7 +43,7 @@ use sp_runtime::traits::{Hash, EnsureOrigin}; use frame_support::weights::SimpleDispatchInfo; use frame_support::{ dispatch::{Dispatchable, Parameter}, codec::{Encode, Decode}, - traits::{ChangeMembers, InitializeMembers}, decl_module, decl_event, + traits::{Get, ChangeMembers, InitializeMembers}, decl_module, decl_event, decl_storage, decl_error, ensure, }; use frame_system::{self as system, ensure_signed, ensure_root}; @@ -53,6 +66,9 @@ pub trait Trait: frame_system::Trait { /// The outer event type. type Event: From> + Into<::Event>; + + /// The time-out for council motions. + type MotionDuration: Get; } /// Origin for the collective module. @@ -71,7 +87,7 @@ pub type Origin = RawOrigin<::Ac #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] /// Info for keeping track of a motion being voted on. -pub struct Votes { +pub struct Votes { /// The proposal's unique index. index: ProposalIndex, /// The number of approval votes that are needed to pass the motion. @@ -80,6 +96,8 @@ pub struct Votes { ayes: Vec, /// The current set of voters that rejected it. nays: Vec, + /// The hard end time of this vote. + end: BlockNumber, } decl_storage! { @@ -91,11 +109,14 @@ decl_storage! { map hasher(blake2_256) T::Hash => Option<>::Proposal>; /// Votes on a given proposal, if it is ongoing. pub Voting get(fn voting): - map hasher(blake2_256) T::Hash => Option>; + map hasher(blake2_256) T::Hash => Option>; /// Proposals so far. pub ProposalCount get(fn proposal_count): u32; /// The current members of the collective. This is stored sorted (just by value). pub Members get(fn members): Vec; + /// The member who provides the default vote for any other members that do not vote before + /// the timeout. If None, then no member has that privilege. + pub Prime get(fn prime): Option; } add_extra_genesis { config(phantom): sp_std::marker::PhantomData; @@ -123,6 +144,8 @@ decl_event! { Executed(Hash, bool), /// A single member did some action; `bool` is true if returned without error. MemberExecuted(Hash, bool), + /// A proposal was closed after its duration was up. + Closed(Hash, MemberCount, MemberCount), } } @@ -140,6 +163,8 @@ decl_error! { DuplicateVote, /// Members are already initialized! AlreadyInitialized, + /// The close call is made too early, before the end of the voting. + TooEarly, } } @@ -152,19 +177,21 @@ decl_module! { fn deposit_event() = default; - /// Set the collective's membership manually to `new_members`. Be nice to the chain and - /// provide it pre-sorted. + /// Set the collective's membership. + /// + /// - `new_members`: The new member list. Be nice to the chain and + // provide it sorted. + /// - `prime`: The prime member whose vote sets the default. /// /// Requires root origin. #[weight = SimpleDispatchInfo::FixedOperational(100_000)] - fn set_members(origin, new_members: Vec) { + fn set_members(origin, new_members: Vec, prime: Option) { ensure_root(origin)?; let mut new_members = new_members; new_members.sort(); - >::mutate(|m| { - >::set_members_sorted(&new_members[..], m); - *m = new_members; - }); + let old = Members::::get(); + >::set_members_sorted(&new_members[..], &old); + Prime::::set(prime); } /// Dispatch a proposal from a member using the `Member` origin. @@ -202,7 +229,8 @@ decl_module! { >::mutate(|i| *i += 1); >::mutate(|proposals| proposals.push(proposal_hash)); >::insert(proposal_hash, *proposal); - let votes = Votes { index, threshold, ayes: vec![who.clone()], nays: vec![] }; + let end = system::Module::::block_number() + T::MotionDuration::get(); + let votes = Votes { index, threshold, ayes: vec![who.clone()], nays: vec![], end }; >::insert(proposal_hash, votes); Self::deposit_event(RawEvent::Proposed(who, index, proposal_hash, threshold)); @@ -249,32 +277,55 @@ decl_module! { Self::deposit_event(RawEvent::Voted(who, proposal, approve, yes_votes, no_votes)); let seats = Self::members().len() as MemberCount; + let approved = yes_votes >= voting.threshold; let disapproved = seats.saturating_sub(no_votes) < voting.threshold; if approved || disapproved { - if approved { - Self::deposit_event(RawEvent::Approved(proposal)); - - // execute motion, assuming it exists. - if let Some(p) = >::take(&proposal) { - let origin = RawOrigin::Members(voting.threshold, seats).into(); - let ok = p.dispatch(origin).is_ok(); - Self::deposit_event(RawEvent::Executed(proposal, ok)); - } - } else { - // disapproved - >::remove(&proposal); - Self::deposit_event(RawEvent::Disapproved(proposal)); - } - - // remove vote - >::remove(&proposal); - >::mutate(|proposals| proposals.retain(|h| h != &proposal)); + Self::finalize_proposal(approved, seats, voting, proposal); } else { - // update voting - >::insert(&proposal, voting); + Voting::::insert(&proposal, voting); } } + + /// May be called by any signed account after the voting duration has ended in order to + /// finish voting and close the proposal. + /// + /// Abstentions are counted as rejections unless there is a prime member set and the prime + /// member cast an approval. + /// + /// - the weight of `proposal` preimage. + /// - up to three events deposited. + /// - one read, two removals, one mutation. (plus three static reads.) + /// - computation and i/o `O(P + L + M)` where: + /// - `M` is number of members, + /// - `P` is number of active proposals, + /// - `L` is the encoded length of `proposal` preimage. + #[weight = SimpleDispatchInfo::FixedOperational(200_000)] + fn close(origin, proposal: T::Hash, #[compact] index: ProposalIndex) { + let _ = ensure_signed(origin)?; + + let voting = Self::voting(&proposal).ok_or(Error::::ProposalMissing)?; + ensure!(voting.index == index, Error::::WrongIndex); + ensure!(system::Module::::block_number() >= voting.end, Error::::TooEarly); + + // default to true only if there's a prime and they voted in favour. + let default = Self::prime().map_or( + false, + |who| voting.ayes.iter().any(|a| a == &who), + ); + + let mut no_votes = voting.nays.len() as MemberCount; + let mut yes_votes = voting.ayes.len() as MemberCount; + let seats = Self::members().len() as MemberCount; + let abstentions = seats - (yes_votes + no_votes); + match default { + true => yes_votes += abstentions, + false => no_votes += abstentions, + } + + Self::deposit_event(RawEvent::Closed(proposal, yes_votes, no_votes)); + Self::finalize_proposal(yes_votes >= voting.threshold, seats, voting, proposal); + } } } @@ -282,10 +333,54 @@ impl, I: Instance> Module { pub fn is_member(who: &T::AccountId) -> bool { Self::members().contains(who) } + + /// Weight: + /// If `approved`: + /// - the weight of `proposal` preimage. + /// - two events deposited. + /// - two removals, one mutation. + /// - computation and i/o `O(P + L)` where: + /// - `P` is number of active proposals, + /// - `L` is the encoded length of `proposal` preimage. + /// + /// If not `approved`: + /// - one event deposited. + /// Two removals, one mutation. + /// Computation and i/o `O(P)` where: + /// - `P` is number of active proposals + fn finalize_proposal( + approved: bool, + seats: MemberCount, + voting: Votes, + proposal: T::Hash, + ) { + if approved { + Self::deposit_event(RawEvent::Approved(proposal)); + + // execute motion, assuming it exists. + if let Some(p) = ProposalOf::::take(&proposal) { + let origin = RawOrigin::Members(voting.threshold, seats).into(); + let ok = p.dispatch(origin).is_ok(); + Self::deposit_event(RawEvent::Executed(proposal, ok)); + } + } else { + // disapproved + ProposalOf::::remove(&proposal); + Self::deposit_event(RawEvent::Disapproved(proposal)); + } + + // remove vote + Voting::::remove(&proposal); + Proposals::::mutate(|proposals| proposals.retain(|h| h != &proposal)); + } } impl, I: Instance> ChangeMembers for Module { - fn change_members_sorted(_incoming: &[T::AccountId], outgoing: &[T::AccountId], new: &[T::AccountId]) { + fn change_members_sorted( + _incoming: &[T::AccountId], + outgoing: &[T::AccountId], + new: &[T::AccountId], + ) { // remove accounts from all current voting in motions. let mut outgoing = outgoing.to_vec(); outgoing.sort_unstable(); @@ -302,7 +397,12 @@ impl, I: Instance> ChangeMembers for Module { } ); } - >::put(new); + Members::::put(new); + Prime::::kill(); + } + + fn set_prime(prime: Option) { + Prime::::set(prime); } } @@ -415,6 +515,7 @@ mod tests { pub const MaximumBlockWeight: Weight = 1024; pub const MaximumBlockLength: u32 = 2 * 1024; pub const AvailableBlockRatio: Perbill = Perbill::one(); + pub const MotionDuration: u64 = 3; } impl frame_system::Trait for Test { type Origin = Origin; @@ -441,11 +542,13 @@ mod tests { type Origin = Origin; type Proposal = Call; type Event = Event; + type MotionDuration = MotionDuration; } impl Trait for Test { type Origin = Origin; type Proposal = Call; type Event = Event; + type MotionDuration = MotionDuration; } pub type Block = sp_runtime::generic::Block; @@ -486,22 +589,101 @@ mod tests { Call::System(frame_system::Call::remark(value.encode())) } + #[test] + fn close_works() { + make_ext().execute_with(|| { + System::set_block_number(1); + let proposal = make_proposal(42); + let hash = BlakeTwo256::hash_of(&proposal); + + assert_ok!(Collective::propose(Origin::signed(1), 3, Box::new(proposal.clone()))); + assert_ok!(Collective::vote(Origin::signed(2), hash.clone(), 0, true)); + + System::set_block_number(3); + assert_noop!( + Collective::close(Origin::signed(4), hash.clone(), 0), + Error::::TooEarly + ); + + System::set_block_number(4); + assert_ok!(Collective::close(Origin::signed(4), hash.clone(), 0)); + + let record = |event| EventRecord { phase: Phase::Finalization, event, topics: vec![] }; + assert_eq!(System::events(), vec![ + record(Event::collective_Instance1(RawEvent::Proposed(1, 0, hash.clone(), 3))), + record(Event::collective_Instance1(RawEvent::Voted(2, hash.clone(), true, 2, 0))), + record(Event::collective_Instance1(RawEvent::Closed(hash.clone(), 2, 1))), + record(Event::collective_Instance1(RawEvent::Disapproved(hash.clone()))) + ]); + }); + } + + #[test] + fn close_with_prime_works() { + make_ext().execute_with(|| { + System::set_block_number(1); + let proposal = make_proposal(42); + let hash = BlakeTwo256::hash_of(&proposal); + assert_ok!(Collective::set_members(Origin::ROOT, vec![1, 2, 3], Some(3))); + + assert_ok!(Collective::propose(Origin::signed(1), 3, Box::new(proposal.clone()))); + assert_ok!(Collective::vote(Origin::signed(2), hash.clone(), 0, true)); + + System::set_block_number(4); + assert_ok!(Collective::close(Origin::signed(4), hash.clone(), 0)); + + let record = |event| EventRecord { phase: Phase::Finalization, event, topics: vec![] }; + assert_eq!(System::events(), vec![ + record(Event::collective_Instance1(RawEvent::Proposed(1, 0, hash.clone(), 3))), + record(Event::collective_Instance1(RawEvent::Voted(2, hash.clone(), true, 2, 0))), + record(Event::collective_Instance1(RawEvent::Closed(hash.clone(), 2, 1))), + record(Event::collective_Instance1(RawEvent::Disapproved(hash.clone()))) + ]); + }); + } + + #[test] + fn close_with_voting_prime_works() { + make_ext().execute_with(|| { + System::set_block_number(1); + let proposal = make_proposal(42); + let hash = BlakeTwo256::hash_of(&proposal); + assert_ok!(Collective::set_members(Origin::ROOT, vec![1, 2, 3], Some(1))); + + assert_ok!(Collective::propose(Origin::signed(1), 3, Box::new(proposal.clone()))); + assert_ok!(Collective::vote(Origin::signed(2), hash.clone(), 0, true)); + + System::set_block_number(4); + assert_ok!(Collective::close(Origin::signed(4), hash.clone(), 0)); + + let record = |event| EventRecord { phase: Phase::Finalization, event, topics: vec![] }; + assert_eq!(System::events(), vec![ + record(Event::collective_Instance1(RawEvent::Proposed(1, 0, hash.clone(), 3))), + record(Event::collective_Instance1(RawEvent::Voted(2, hash.clone(), true, 2, 0))), + record(Event::collective_Instance1(RawEvent::Closed(hash.clone(), 3, 0))), + record(Event::collective_Instance1(RawEvent::Approved(hash.clone()))), + record(Event::collective_Instance1(RawEvent::Executed(hash.clone(), false))) + ]); + }); + } + #[test] fn removal_of_old_voters_votes_works() { make_ext().execute_with(|| { System::set_block_number(1); let proposal = make_proposal(42); let hash = BlakeTwo256::hash_of(&proposal); + let end = 4; assert_ok!(Collective::propose(Origin::signed(1), 3, Box::new(proposal.clone()))); assert_ok!(Collective::vote(Origin::signed(2), hash.clone(), 0, true)); assert_eq!( Collective::voting(&hash), - Some(Votes { index: 0, threshold: 3, ayes: vec![1, 2], nays: vec![] }) + Some(Votes { index: 0, threshold: 3, ayes: vec![1, 2], nays: vec![], end }) ); Collective::change_members_sorted(&[4], &[1], &[2, 3, 4]); assert_eq!( Collective::voting(&hash), - Some(Votes { index: 0, threshold: 3, ayes: vec![2], nays: vec![] }) + Some(Votes { index: 0, threshold: 3, ayes: vec![2], nays: vec![], end }) ); let proposal = make_proposal(69); @@ -510,12 +692,12 @@ mod tests { assert_ok!(Collective::vote(Origin::signed(3), hash.clone(), 1, false)); assert_eq!( Collective::voting(&hash), - Some(Votes { index: 1, threshold: 2, ayes: vec![2], nays: vec![3] }) + Some(Votes { index: 1, threshold: 2, ayes: vec![2], nays: vec![3], end }) ); Collective::change_members_sorted(&[], &[3], &[2, 4]); assert_eq!( Collective::voting(&hash), - Some(Votes { index: 1, threshold: 2, ayes: vec![2], nays: vec![] }) + Some(Votes { index: 1, threshold: 2, ayes: vec![2], nays: vec![], end }) ); }); } @@ -526,16 +708,17 @@ mod tests { System::set_block_number(1); let proposal = make_proposal(42); let hash = BlakeTwo256::hash_of(&proposal); + let end = 4; assert_ok!(Collective::propose(Origin::signed(1), 3, Box::new(proposal.clone()))); assert_ok!(Collective::vote(Origin::signed(2), hash.clone(), 0, true)); assert_eq!( Collective::voting(&hash), - Some(Votes { index: 0, threshold: 3, ayes: vec![1, 2], nays: vec![] }) + Some(Votes { index: 0, threshold: 3, ayes: vec![1, 2], nays: vec![], end }) ); - assert_ok!(Collective::set_members(Origin::ROOT, vec![2, 3, 4])); + assert_ok!(Collective::set_members(Origin::ROOT, vec![2, 3, 4], None)); assert_eq!( Collective::voting(&hash), - Some(Votes { index: 0, threshold: 3, ayes: vec![2], nays: vec![] }) + Some(Votes { index: 0, threshold: 3, ayes: vec![2], nays: vec![], end }) ); let proposal = make_proposal(69); @@ -544,12 +727,12 @@ mod tests { assert_ok!(Collective::vote(Origin::signed(3), hash.clone(), 1, false)); assert_eq!( Collective::voting(&hash), - Some(Votes { index: 1, threshold: 2, ayes: vec![2], nays: vec![3] }) + Some(Votes { index: 1, threshold: 2, ayes: vec![2], nays: vec![3], end }) ); - assert_ok!(Collective::set_members(Origin::ROOT, vec![2, 4])); + assert_ok!(Collective::set_members(Origin::ROOT, vec![2, 4], None)); assert_eq!( Collective::voting(&hash), - Some(Votes { index: 1, threshold: 2, ayes: vec![2], nays: vec![] }) + Some(Votes { index: 1, threshold: 2, ayes: vec![2], nays: vec![], end }) ); }); } @@ -560,12 +743,13 @@ mod tests { System::set_block_number(1); let proposal = make_proposal(42); let hash = proposal.blake2_256().into(); + let end = 4; assert_ok!(Collective::propose(Origin::signed(1), 3, Box::new(proposal.clone()))); assert_eq!(Collective::proposals(), vec![hash]); assert_eq!(Collective::proposal_of(&hash), Some(proposal)); assert_eq!( Collective::voting(&hash), - Some(Votes { index: 0, threshold: 3, ayes: vec![1], nays: vec![] }) + Some(Votes { index: 0, threshold: 3, ayes: vec![1], nays: vec![], end }) ); assert_eq!(System::events(), vec![ @@ -629,10 +813,11 @@ mod tests { System::set_block_number(1); let proposal = make_proposal(42); let hash: H256 = proposal.blake2_256().into(); + let end = 4; assert_ok!(Collective::propose(Origin::signed(1), 2, Box::new(proposal.clone()))); assert_eq!( Collective::voting(&hash), - Some(Votes { index: 0, threshold: 2, ayes: vec![1], nays: vec![] }) + Some(Votes { index: 0, threshold: 2, ayes: vec![1], nays: vec![], end }) ); assert_noop!( Collective::vote(Origin::signed(1), hash.clone(), 0, true), @@ -641,7 +826,7 @@ mod tests { assert_ok!(Collective::vote(Origin::signed(1), hash.clone(), 0, false)); assert_eq!( Collective::voting(&hash), - Some(Votes { index: 0, threshold: 2, ayes: vec![], nays: vec![1] }) + Some(Votes { index: 0, threshold: 2, ayes: vec![], nays: vec![1], end }) ); assert_noop!( Collective::vote(Origin::signed(1), hash.clone(), 0, false), diff --git a/frame/elections-phragmen/src/lib.rs b/frame/elections-phragmen/src/lib.rs index a9474ae8441..55b7b3f1280 100644 --- a/frame/elections-phragmen/src/lib.rs +++ b/frame/elections-phragmen/src/lib.rs @@ -690,6 +690,7 @@ impl Module { // split new set into winners and runners up. let split_point = desired_seats.min(new_set_with_stake.len()); let mut new_members = (&new_set_with_stake[..split_point]).to_vec(); + let most_popular = new_members.first().map(|x| x.0.clone()); // save the runners up as-is. They are sorted based on desirability. // sort and save the members. @@ -722,6 +723,7 @@ impl Module { &outgoing.clone(), &new_members_ids, ); + T::ChangeMembers::set_prime(most_popular); // outgoing candidates lose their bond. let mut to_burn_bond = outgoing.to_vec(); @@ -864,6 +866,7 @@ mod tests { thread_local! { pub static MEMBERS: RefCell> = RefCell::new(vec![]); + pub static PRIME: RefCell> = RefCell::new(None); } pub struct TestChangeMembers; @@ -898,6 +901,11 @@ mod tests { assert_eq!(old_plus_incoming, new_plus_outgoing); MEMBERS.with(|m| *m.borrow_mut() = new.to_vec()); + PRIME.with(|p| *p.borrow_mut() = None); + } + + fn set_prime(who: Option) { + PRIME.with(|p| *p.borrow_mut() = who); } } @@ -1250,6 +1258,30 @@ mod tests { }); } + #[test] + fn prime_works() { + ExtBuilder::default().build().execute_with(|| { + assert_ok!(Elections::submit_candidacy(Origin::signed(3))); + assert_ok!(Elections::submit_candidacy(Origin::signed(4))); + assert_ok!(Elections::submit_candidacy(Origin::signed(5))); + + assert_ok!(Elections::vote(Origin::signed(1), vec![4, 3], 10)); + assert_ok!(Elections::vote(Origin::signed(2), vec![4], 20)); + assert_ok!(Elections::vote(Origin::signed(3), vec![3], 30)); + assert_ok!(Elections::vote(Origin::signed(4), vec![4], 40)); + assert_ok!(Elections::vote(Origin::signed(5), vec![5], 50)); + + System::set_block_number(5); + assert_ok!(Elections::end_block(System::block_number())); + + assert_eq!(Elections::members_ids(), vec![4, 5]); + assert_eq!(Elections::candidates(), vec![]); + + assert_ok!(Elections::vote(Origin::signed(3), vec![4, 5], 10)); + assert_eq!(PRIME.with(|p| *p.borrow()), Some(4)); + }); + } + #[test] fn cannot_vote_for_more_than_candidates() { ExtBuilder::default().build().execute_with(|| { diff --git a/frame/membership/src/lib.rs b/frame/membership/src/lib.rs index c39055c1bc9..129f3c4003b 100644 --- a/frame/membership/src/lib.rs +++ b/frame/membership/src/lib.rs @@ -17,7 +17,7 @@ //! # Membership Module //! //! Allows control of membership of a set of `AccountId`s, useful for managing membership of of a -//! collective. +//! collective. A prime member may be set. // Ensure we're `no_std` when compiling for Wasm. #![cfg_attr(not(feature = "std"), no_std)] @@ -47,6 +47,9 @@ pub trait Trait: frame_system::Trait { /// Required origin for resetting membership. type ResetOrigin: EnsureOrigin; + /// Required origin for setting or resetting the prime member. + type PrimeOrigin: EnsureOrigin; + /// The receiver of the signal for when the membership has been initialized. This happens pre- /// genesis and will usually be the same as `MembershipChanged`. If you need to do something /// different on initialization, then you can change this accordingly. @@ -60,6 +63,9 @@ decl_storage! { trait Store for Module, I: Instance=DefaultInstance> as Membership { /// The current membership, stored as an ordered Vec. Members get(fn members): Vec; + + /// The current prime member, if one exists. + Prime get(fn prime): Option; } add_extra_genesis { config(members): Vec; @@ -144,6 +150,7 @@ decl_module! { >::put(&members); T::MembershipChanged::change_members_sorted(&[], &[who], &members[..]); + Self::rejig_prime(&members); Self::deposit_event(RawEvent::MemberRemoved); } @@ -151,6 +158,8 @@ decl_module! { /// Swap out one member `remove` for another `add`. /// /// May only be called from `SwapOrigin` or root. + /// + /// Prime membership is *not* passed from `remove` to `add`, if extant. #[weight = SimpleDispatchInfo::FixedNormal(50_000)] fn swap_member(origin, remove: T::AccountId, add: T::AccountId) { T::SwapOrigin::try_origin(origin) @@ -171,6 +180,7 @@ decl_module! { &[remove], &members[..], ); + Self::rejig_prime(&members); Self::deposit_event(RawEvent::MembersSwapped); } @@ -189,15 +199,19 @@ decl_module! { members.sort(); >::mutate(|m| { T::MembershipChanged::set_members_sorted(&members[..], m); + Self::rejig_prime(&members); *m = members; }); + Self::deposit_event(RawEvent::MembersReset); } /// Swap out the sending member for some other key `new`. /// /// May only be called from `Signed` origin of a current member. + /// + /// Prime membership is passed from the origin account to `new`, if extant. #[weight = SimpleDispatchInfo::FixedNormal(50_000)] fn change_key(origin, new: T::AccountId) { let remove = ensure_signed(origin)?; @@ -211,14 +225,51 @@ decl_module! { >::put(&members); T::MembershipChanged::change_members_sorted( - &[new], - &[remove], + &[new.clone()], + &[remove.clone()], &members[..], ); + + if Prime::::get() == Some(remove) { + Prime::::put(&new); + T::MembershipChanged::set_prime(Some(new)); + } } Self::deposit_event(RawEvent::KeyChanged); } + + /// Set the prime member. Must be a current member. + #[weight = SimpleDispatchInfo::FixedNormal(50_000)] + fn set_prime(origin, who: T::AccountId) { + T::PrimeOrigin::try_origin(origin) + .map(|_| ()) + .or_else(ensure_root)?; + Self::members().binary_search(&who).ok().ok_or(Error::::NotMember)?; + Prime::::put(&who); + T::MembershipChanged::set_prime(Some(who)); + } + + /// Remove the prime member if it exists. + #[weight = SimpleDispatchInfo::FixedNormal(50_000)] + fn clear_prime(origin) { + T::PrimeOrigin::try_origin(origin) + .map(|_| ()) + .or_else(ensure_root)?; + Prime::::kill(); + T::MembershipChanged::set_prime(None); + } + } +} + +impl, I: Instance> Module { + fn rejig_prime(members: &[T::AccountId]) { + if let Some(prime) = Prime::::get() { + match members.binary_search(&prime) { + Ok(_) => T::MembershipChanged::set_prime(Some(prime)), + Err(_) => Prime::::kill(), + } + } } } @@ -283,6 +334,7 @@ mod tests { thread_local! { static MEMBERS: RefCell> = RefCell::new(vec![]); + static PRIME: RefCell> = RefCell::new(None); } pub struct TestChangeMembers; @@ -297,6 +349,10 @@ mod tests { assert_eq!(old_plus_incoming, new_plus_outgoing); MEMBERS.with(|m| *m.borrow_mut() = new.to_vec()); + PRIME.with(|p| *p.borrow_mut() = None); + } + fn set_prime(who: Option) { + PRIME.with(|p| *p.borrow_mut() = who); } } impl InitializeMembers for TestChangeMembers { @@ -311,6 +367,7 @@ mod tests { type RemoveOrigin = EnsureSignedBy; type SwapOrigin = EnsureSignedBy; type ResetOrigin = EnsureSignedBy; + type PrimeOrigin = EnsureSignedBy; type MembershipInitialized = TestChangeMembers; type MembershipChanged = TestChangeMembers; } @@ -337,6 +394,21 @@ mod tests { }); } + #[test] + fn prime_member_works() { + new_test_ext().execute_with(|| { + assert_noop!(Membership::set_prime(Origin::signed(4), 20), BadOrigin); + assert_noop!(Membership::set_prime(Origin::signed(5), 15), Error::::NotMember); + assert_ok!(Membership::set_prime(Origin::signed(5), 20)); + assert_eq!(Membership::prime(), Some(20)); + assert_eq!(PRIME.with(|m| *m.borrow()), Membership::prime()); + + assert_ok!(Membership::clear_prime(Origin::signed(5))); + assert_eq!(Membership::prime(), None); + assert_eq!(PRIME.with(|m| *m.borrow()), Membership::prime()); + }); + } + #[test] fn add_member_works() { new_test_ext().execute_with(|| { @@ -353,9 +425,12 @@ mod tests { new_test_ext().execute_with(|| { assert_noop!(Membership::remove_member(Origin::signed(5), 20), BadOrigin); assert_noop!(Membership::remove_member(Origin::signed(2), 15), Error::::NotMember); + assert_ok!(Membership::set_prime(Origin::signed(5), 20)); assert_ok!(Membership::remove_member(Origin::signed(2), 20)); assert_eq!(Membership::members(), vec![10, 30]); assert_eq!(MEMBERS.with(|m| m.borrow().clone()), Membership::members()); + assert_eq!(Membership::prime(), None); + assert_eq!(PRIME.with(|m| *m.borrow()), Membership::prime()); }); } @@ -365,11 +440,19 @@ mod tests { assert_noop!(Membership::swap_member(Origin::signed(5), 10, 25), BadOrigin); assert_noop!(Membership::swap_member(Origin::signed(3), 15, 25), Error::::NotMember); assert_noop!(Membership::swap_member(Origin::signed(3), 10, 30), Error::::AlreadyMember); + + assert_ok!(Membership::set_prime(Origin::signed(5), 20)); assert_ok!(Membership::swap_member(Origin::signed(3), 20, 20)); assert_eq!(Membership::members(), vec![10, 20, 30]); + assert_eq!(Membership::prime(), Some(20)); + assert_eq!(PRIME.with(|m| *m.borrow()), Membership::prime()); + + assert_ok!(Membership::set_prime(Origin::signed(5), 10)); assert_ok!(Membership::swap_member(Origin::signed(3), 10, 25)); assert_eq!(Membership::members(), vec![20, 25, 30]); assert_eq!(MEMBERS.with(|m| m.borrow().clone()), Membership::members()); + assert_eq!(Membership::prime(), None); + assert_eq!(PRIME.with(|m| *m.borrow()), Membership::prime()); }); } @@ -385,11 +468,14 @@ mod tests { #[test] fn change_key_works() { new_test_ext().execute_with(|| { + assert_ok!(Membership::set_prime(Origin::signed(5), 10)); assert_noop!(Membership::change_key(Origin::signed(3), 25), Error::::NotMember); assert_noop!(Membership::change_key(Origin::signed(10), 20), Error::::AlreadyMember); assert_ok!(Membership::change_key(Origin::signed(10), 40)); assert_eq!(Membership::members(), vec![20, 30, 40]); assert_eq!(MEMBERS.with(|m| m.borrow().clone()), Membership::members()); + assert_eq!(Membership::prime(), Some(40)); + assert_eq!(PRIME.with(|m| *m.borrow()), Membership::prime()); }); } @@ -405,10 +491,20 @@ mod tests { #[test] fn reset_members_works() { new_test_ext().execute_with(|| { + assert_ok!(Membership::set_prime(Origin::signed(5), 20)); assert_noop!(Membership::reset_members(Origin::signed(1), vec![20, 40, 30]), BadOrigin); + assert_ok!(Membership::reset_members(Origin::signed(4), vec![20, 40, 30])); assert_eq!(Membership::members(), vec![20, 30, 40]); assert_eq!(MEMBERS.with(|m| m.borrow().clone()), Membership::members()); + assert_eq!(Membership::prime(), Some(20)); + assert_eq!(PRIME.with(|m| *m.borrow()), Membership::prime()); + + assert_ok!(Membership::reset_members(Origin::signed(4), vec![10, 40, 30])); + assert_eq!(Membership::members(), vec![10, 30, 40]); + assert_eq!(MEMBERS.with(|m| m.borrow().clone()), Membership::members()); + assert_eq!(Membership::prime(), None); + assert_eq!(PRIME.with(|m| *m.borrow()), Membership::prime()); }); } } diff --git a/frame/support/src/storage/generator/value.rs b/frame/support/src/storage/generator/value.rs index 4083576e298..9e26131f489 100644 --- a/frame/support/src/storage/generator/value.rs +++ b/frame/support/src/storage/generator/value.rs @@ -91,6 +91,14 @@ impl> storage::StorageValue for G { unhashed::put(&Self::storage_value_final_key(), &val) } + fn set(maybe_val: Self::Query) { + if let Some(val) = G::from_query_to_optional_value(maybe_val) { + unhashed::put(&Self::storage_value_final_key(), &val) + } else { + unhashed::kill(&Self::storage_value_final_key()) + } + } + fn kill() { unhashed::kill(&Self::storage_value_final_key()) } diff --git a/frame/support/src/storage/mod.rs b/frame/support/src/storage/mod.rs index c28626ad2c3..e5d845cb22a 100644 --- a/frame/support/src/storage/mod.rs +++ b/frame/support/src/storage/mod.rs @@ -73,6 +73,10 @@ pub trait StorageValue { /// Store a value under this key into the provided storage instance. fn put>(val: Arg); + /// Store a value under this key into the provided storage instance; this uses the query + /// type rather than the underlying value. + fn set(val: Self::Query); + /// Mutate the value fn mutate R>(f: F) -> R; diff --git a/frame/support/src/traits.rs b/frame/support/src/traits.rs index bd6895bda5b..c1e9e7c3171 100644 --- a/frame/support/src/traits.rs +++ b/frame/support/src/traits.rs @@ -808,6 +808,8 @@ impl WithdrawReasons { pub trait ChangeMembers { /// A number of members `incoming` just joined the set and replaced some `outgoing` ones. The /// new set is given by `new`, and need not be sorted. + /// + /// This resets any previous value of prime. fn change_members(incoming: &[AccountId], outgoing: &[AccountId], mut new: Vec) { new.sort_unstable(); Self::change_members_sorted(incoming, outgoing, &new[..]); @@ -817,6 +819,8 @@ pub trait ChangeMembers { /// new set is thus given by `sorted_new` and **must be sorted**. /// /// NOTE: This is the only function that needs to be implemented in `ChangeMembers`. + /// + /// This resets any previous value of prime. fn change_members_sorted( incoming: &[AccountId], outgoing: &[AccountId], @@ -825,6 +829,8 @@ pub trait ChangeMembers { /// Set the new members; they **must already be sorted**. This will compute the diff and use it to /// call `change_members_sorted`. + /// + /// This resets any previous value of prime. fn set_members_sorted(new_members: &[AccountId], old_members: &[AccountId]) { let (incoming, outgoing) = Self::compute_members_diff(new_members, old_members); Self::change_members_sorted(&incoming[..], &outgoing[..], &new_members); @@ -865,14 +871,20 @@ pub trait ChangeMembers { } (incoming, outgoing) } + + /// Set the prime member. + fn set_prime(_prime: Option) {} } impl ChangeMembers for () { fn change_members(_: &[T], _: &[T], _: Vec) {} fn change_members_sorted(_: &[T], _: &[T], _: &[T]) {} fn set_members_sorted(_: &[T], _: &[T]) {} + fn set_prime(_: Option) {} } + + /// Trait for type that can handle the initialization of account IDs at genesis. pub trait InitializeMembers { /// Initialize the members to the given `members`. -- GitLab From 0f28c33ae79ff2d4109bbdb4c755ba64a7c6a35a Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 15:57:38 +0100 Subject: [PATCH 097/106] Expose the `runtime-benchmarks` feature to the cli crate (#5143) This exposes the `runtime-benchmarks` feature via the cli crate and makes sure the benchmarking can be enabled. This requires that the user goes to `bin/node/cli` and runs `cargo build --features runtime-benchmarks` to build a node that has the feature enabled. --- bin/node/cli/Cargo.toml | 1 + bin/node/runtime/Cargo.toml | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml index cfb1621b692..e18b6b228e6 100644 --- a/bin/node/cli/Cargo.toml +++ b/bin/node/cli/Cargo.toml @@ -151,3 +151,4 @@ wasmtime = [ "sc-cli/wasmtime", "sc-service/wasmtime", ] +runtime-benchmarks = [ "node-runtime/runtime-benchmarks" ] diff --git a/bin/node/runtime/Cargo.toml b/bin/node/runtime/Cargo.toml index b92e9bc8ae0..0d65cf53395 100644 --- a/bin/node/runtime/Cargo.toml +++ b/bin/node/runtime/Cargo.toml @@ -132,4 +132,9 @@ std = [ "pallet-recovery/std", "pallet-vesting/std", ] -runtime-benchmarks = ["frame-benchmarking"] +runtime-benchmarks = [ + "frame-benchmarking", + "pallet-timestamp/runtime-benchmarks", + "pallet-identity/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", +] -- GitLab From 744dfe5ae2033b616a7639035898984e658d2efd Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Thu, 5 Mar 2020 16:41:10 +0100 Subject: [PATCH 098/106] removes use of sc_client::Client from sc-rpc (#5063) * removes use of sc_client::Client from sc-rpc * remove Client impl from sc-finality-benches * remove client impl from sc-finality-grandpa * read_proof accepts iterator * remove generic Executor param from ExecutorProvider * fix long ass line * code style changes * merge with master Co-authored-by: Arkadiy Paronyan --- Cargo.lock | 2 + bin/node-template/node/Cargo.toml | 1 + bin/node-template/node/src/service.rs | 27 +- bin/node/cli/src/service.rs | 27 +- client/api/Cargo.toml | 1 + client/api/src/backend.rs | 119 ++++ client/api/src/call_executor.rs | 12 + client/api/src/client.rs | 8 +- client/api/src/lib.rs | 2 + client/api/src/proof_provider.rs | 71 +++ client/finality-grandpa/src/environment.rs | 5 +- client/finality-grandpa/src/finality_proof.rs | 40 +- client/finality-grandpa/src/import.rs | 3 +- client/finality-grandpa/src/lib.rs | 17 +- client/finality-grandpa/src/light_import.rs | 4 +- client/finality-grandpa/src/observer.rs | 2 +- client/finality-grandpa/src/tests.rs | 5 +- client/network/src/chain.rs | 37 +- client/network/src/protocol.rs | 7 +- .../src/protocol/light_client_handler.rs | 9 +- client/offchain/src/lib.rs | 1 + client/rpc/src/author/mod.rs | 38 +- client/rpc/src/author/tests.rs | 6 +- client/rpc/src/chain/chain_full.rs | 26 +- client/rpc/src/chain/chain_light.rs | 20 +- client/rpc/src/chain/mod.rs | 68 +- client/rpc/src/state/mod.rs | 54 +- client/rpc/src/state/state_full.rs | 48 +- client/rpc/src/state/state_light.rs | 25 +- client/service/src/builder.rs | 5 +- client/service/src/chain_ops.rs | 1 + client/src/client.rs | 584 ++++++++---------- client/src/light/call_executor.rs | 3 +- client/src/light/fetcher.rs | 5 +- 34 files changed, 739 insertions(+), 544 deletions(-) create mode 100644 client/api/src/proof_provider.rs diff --git a/Cargo.lock b/Cargo.lock index 4f42fa17cd4..9a380eaac18 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3569,6 +3569,7 @@ dependencies = [ "sc-basic-authorship", "sc-cli", "sc-client", + "sc-client-api", "sc-consensus-aura", "sc-executor", "sc-finality-grandpa", @@ -5777,6 +5778,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-std", + "sp-storage", "sp-test-primitives", "sp-transaction-pool", "sp-trie", diff --git a/bin/node-template/node/Cargo.toml b/bin/node-template/node/Cargo.toml index bccd0576dfa..1e8c3fad2e3 100644 --- a/bin/node-template/node/Cargo.toml +++ b/bin/node-template/node/Cargo.toml @@ -30,6 +30,7 @@ sp-consensus = { version = "0.8.0-alpha.2", path = "../../../primitives/consensu grandpa = { version = "0.8.0-alpha.2", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" } grandpa-primitives = { version = "2.0.0-alpha.2", package = "sp-finality-grandpa", path = "../../../primitives/finality-grandpa" } sc-client = { version = "0.8.0-alpha.2", path = "../../../client/" } +sc-client-api = { version = "2.0.0-alpha.2", path = "../../../client/api" } sp-runtime = { version = "2.0.0-alpha.2", path = "../../../primitives/runtime" } sc-basic-authorship = { path = "../../../client/basic-authorship" , version = "0.8.0-alpha.2"} diff --git a/bin/node-template/node/src/service.rs b/bin/node-template/node/src/service.rs index fe1b3af4eb4..f289ff58549 100644 --- a/bin/node-template/node/src/service.rs +++ b/bin/node-template/node/src/service.rs @@ -3,13 +3,14 @@ use std::sync::Arc; use std::time::Duration; use sc_client::LongestChain; +use sc_client_api::ExecutorProvider; use node_template_runtime::{self, GenesisConfig, 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 sp_consensus_aura::sr25519::{AuthorityPair as AuraPair}; -use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider}; +use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider, StorageAndProofProvider}; // Our native executor instance. native_executor_instance!( @@ -24,6 +25,7 @@ native_executor_instance!( /// be able to perform chain operations. macro_rules! new_full_start { ($config:expr) => {{ + use std::sync::Arc; let mut import_setup = None; let inherent_data_providers = sp_inherents::InherentDataProviders::new(); @@ -42,7 +44,7 @@ macro_rules! new_full_start { .ok_or_else(|| sc_service::Error::SelectChainRequired)?; let (grandpa_block_import, grandpa_link) = - grandpa::block_import(client.clone(), &*client, select_chain)?; + grandpa::block_import(client.clone(), &(client.clone() as Arc<_>), select_chain)?; let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new( grandpa_block_import.clone(), client.clone(), @@ -87,9 +89,11 @@ pub fn new_full(config: Configuration) .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| - Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, client)) as _) - )? + .with_finality_proof_provider(|client, backend| { + // GenesisAuthoritySetProvider is implemented for StorageAndProofProvider + let provider = client as Arc>; + Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _) + })? .build()?; if participates_in_consensus { @@ -201,7 +205,10 @@ pub fn new_light(config: Configuration) .map(|fetcher| fetcher.checker().clone()) .ok_or_else(|| "Trying to start light import queue without active fetch checker")?; let grandpa_block_import = grandpa::light_block_import( - client.clone(), backend, &*client.clone(), Arc::new(fetch_checker), + client.clone(), + backend, + &(client.clone() as Arc<_>), + Arc::new(fetch_checker), )?; let finality_proof_import = grandpa_block_import.clone(); let finality_proof_request_builder = @@ -218,8 +225,10 @@ pub fn new_light(config: Configuration) Ok((import_queue, finality_proof_request_builder)) })? - .with_finality_proof_provider(|client, backend| - Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, client)) as _) - )? + .with_finality_proof_provider(|client, backend| { + // GenesisAuthoritySetProvider is implemented for StorageAndProofProvider + let provider = client as Arc>; + Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _) + })? .build() } diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs index ca7bd431618..332c47ea132 100644 --- a/bin/node/cli/src/service.rs +++ b/bin/node/cli/src/service.rs @@ -22,7 +22,7 @@ use std::sync::Arc; use sc_consensus_babe; use sc_client::{self, LongestChain}; -use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider}; +use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider, StorageAndProofProvider}; use node_executor; use node_primitives::Block; use node_runtime::{GenesisConfig, RuntimeApi}; @@ -45,6 +45,7 @@ use sc_offchain::OffchainWorkers; /// be able to perform chain operations. macro_rules! new_full_start { ($config:expr) => {{ + use std::sync::Arc; type RpcExtension = jsonrpc_core::IoHandler; let mut import_setup = None; let inherent_data_providers = sp_inherents::InherentDataProviders::new(); @@ -64,7 +65,7 @@ macro_rules! new_full_start { .ok_or_else(|| sc_service::Error::SelectChainRequired)?; let (grandpa_block_import, grandpa_link) = grandpa::block_import( client.clone(), - &*client, + &(client.clone() as Arc<_>), select_chain, )?; let justification_import = grandpa_block_import.clone(); @@ -116,6 +117,7 @@ macro_rules! new_full { ($config:expr, $with_startup_data: expr) => {{ use futures::prelude::*; use sc_network::Event; + use sc_client_api::ExecutorProvider; let ( is_authority, @@ -139,9 +141,11 @@ macro_rules! new_full { let (builder, mut import_setup, inherent_data_providers) = new_full_start!($config); let service = builder - .with_finality_proof_provider(|client, backend| - Ok(Arc::new(grandpa::FinalityProofProvider::new(backend, client)) as _) - )? + .with_finality_proof_provider(|client, backend| { + // GenesisAuthoritySetProvider is implemented for StorageAndProofProvider + let provider = client as Arc>; + Ok(Arc::new(grandpa::FinalityProofProvider::new(backend, provider)) as _) + })? .build()?; let (block_import, grandpa_link, babe_link) = import_setup.take() @@ -255,8 +259,7 @@ type ConcreteBlock = node_primitives::Block; type ConcreteClient = Client< Backend, - LocalCallExecutor, - NativeExecutor>, + LocalCallExecutor, NativeExecutor>, ConcreteBlock, node_runtime::RuntimeApi >; @@ -317,7 +320,7 @@ pub fn new_light(config: NodeConfiguration) let grandpa_block_import = grandpa::light_block_import( client.clone(), backend, - &*client, + &(client.clone() as Arc<_>), Arc::new(fetch_checker), )?; @@ -342,9 +345,11 @@ pub fn new_light(config: NodeConfiguration) Ok((import_queue, finality_proof_request_builder)) })? - .with_finality_proof_provider(|client, backend| - Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, client)) as _) - )? + .with_finality_proof_provider(|client, backend| { + // GenesisAuthoritySetProvider is implemented for StorageAndProofProvider + let provider = client as Arc>; + Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _) + })? .with_rpc_extensions(|builder,| -> Result { diff --git a/client/api/Cargo.toml b/client/api/Cargo.toml index 02568910547..7ceb12eaf60 100644 --- a/client/api/Cargo.toml +++ b/client/api/Cargo.toml @@ -34,6 +34,7 @@ sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../. sp-state-machine = { version = "0.8.0-alpha.2", path = "../../primitives/state-machine" } sc-telemetry = { version = "2.0.0-alpha.2", path = "../telemetry" } sp-trie = { version = "2.0.0-alpha.2", path = "../../primitives/trie" } +sp-storage = { version = "2.0.0-alpha.2", path = "../../primitives/storage" } sp-transaction-pool = { version = "2.0.0-alpha.2", path = "../../primitives/transaction-pool" } [dev-dependencies] diff --git a/client/api/src/backend.rs b/client/api/src/backend.rs index 1f76aa8c1af..808ca7a870a 100644 --- a/client/api/src/backend.rs +++ b/client/api/src/backend.rs @@ -26,6 +26,7 @@ use sp_state_machine::{ ChangesTrieState, ChangesTrieStorage as StateChangesTrieStorage, ChangesTrieTransaction, StorageCollection, ChildStorageCollection, }; +use sp_storage::{StorageData, StorageKey, ChildInfo}; use crate::{ blockchain::{ Backend as BlockchainBackend, well_known_cache_keys @@ -38,6 +39,7 @@ use sp_consensus::BlockOrigin; use parking_lot::RwLock; pub use sp_state_machine::Backend as StateBackend; +use std::marker::PhantomData; /// Extracts the state backend type for the given backend. pub type StateBackendFor = >::State; @@ -237,6 +239,123 @@ pub trait AuxStore { fn get_aux(&self, key: &[u8]) -> sp_blockchain::Result>>; } +/// An `Iterator` that iterates keys in a given block under a prefix. +pub struct KeyIterator<'a, State, Block> { + state: State, + prefix: Option<&'a StorageKey>, + current_key: Vec, + _phantom: PhantomData, +} + +impl <'a, State, Block> KeyIterator<'a, State, Block> { + /// create a KeyIterator instance + pub fn new(state: State, prefix: Option<&'a StorageKey>, current_key: Vec) -> Self { + Self { + state, + prefix, + current_key, + _phantom: PhantomData, + } + } +} + +impl<'a, State, Block> Iterator for KeyIterator<'a, State, Block> where + Block: BlockT, + State: StateBackend>, +{ + type Item = StorageKey; + + fn next(&mut self) -> Option { + let next_key = self.state + .next_storage_key(&self.current_key) + .ok() + .flatten()?; + // this terminates the iterator the first time it fails. + if let Some(prefix) = self.prefix { + if !next_key.starts_with(&prefix.0[..]) { + return None; + } + } + self.current_key = next_key.clone(); + Some(StorageKey(next_key)) + } +} +/// Provides acess to storage primitives +pub trait StorageProvider> { + /// Given a `BlockId` and a key, return the value under the key in that block. + fn storage(&self, id: &BlockId, key: &StorageKey) -> sp_blockchain::Result>; + + /// Given a `BlockId` and a key prefix, return the matching storage keys in that block. + fn storage_keys(&self, id: &BlockId, key_prefix: &StorageKey) -> sp_blockchain::Result>; + + /// Given a `BlockId` and a key, return the value under the hash in that block. + fn storage_hash(&self, id: &BlockId, key: &StorageKey) -> sp_blockchain::Result>; + + /// Given a `BlockId` and a key prefix, return the matching child storage keys and values in that block. + fn storage_pairs( + &self, + id: &BlockId, + key_prefix: &StorageKey + ) -> sp_blockchain::Result>; + + /// Given a `BlockId` and a key prefix, return a `KeyIterator` iterates matching storage keys in that block. + fn storage_keys_iter<'a>( + &self, + id: &BlockId, + prefix: Option<&'a StorageKey>, + start_key: Option<&StorageKey> + ) -> sp_blockchain::Result>; + + /// Given a `BlockId`, a key and a child storage key, return the value under the key in that block. + fn child_storage( + &self, + id: &BlockId, + storage_key: &StorageKey, + child_info: ChildInfo, + key: &StorageKey + ) -> sp_blockchain::Result>; + + /// Given a `BlockId`, a key prefix, and a child storage key, return the matching child storage keys. + fn child_storage_keys( + &self, + id: &BlockId, + child_storage_key: &StorageKey, + child_info: ChildInfo, + key_prefix: &StorageKey + ) -> sp_blockchain::Result>; + + /// Given a `BlockId`, a key and a child storage key, return the hash under the key in that block. + fn child_storage_hash( + &self, + id: &BlockId, + storage_key: &StorageKey, + child_info: ChildInfo, + key: &StorageKey + ) -> sp_blockchain::Result>; + + /// Get longest range within [first; last] that is possible to use in `key_changes` + /// and `key_changes_proof` calls. + /// Range could be shortened from the beginning if some changes tries have been pruned. + /// Returns Ok(None) if changes tries are not supported. + fn max_key_changes_range( + &self, + first: NumberFor, + last: BlockId, + ) -> sp_blockchain::Result, BlockId)>>; + + /// Get pairs of (block, extrinsic) where key has been changed at given blocks range. + /// Works only for runtimes that are supporting changes tries. + /// + /// Changes are returned in descending order (i.e. last block comes first). + fn key_changes( + &self, + first: NumberFor, + last: BlockId, + storage_key: Option<&StorageKey>, + key: &StorageKey + ) -> sp_blockchain::Result, u32)>>; +} + /// Client backend. /// /// Manages the data layer. diff --git a/client/api/src/call_executor.rs b/client/api/src/call_executor.rs index 1a7b53d5415..f39d7971578 100644 --- a/client/api/src/call_executor.rs +++ b/client/api/src/call_executor.rs @@ -29,6 +29,18 @@ use sp_externalities::Extensions; use sp_core::NativeOrEncoded; use sp_api::{ProofRecorder, InitializeBlock, StorageTransactionCache}; +use crate::execution_extensions::ExecutionExtensions; + +/// Executor Provider +pub trait ExecutorProvider { + /// executor instance + type Executor: CallExecutor; + /// Get call executor reference. + fn executor(&self) -> &Self::Executor; + + /// Get a reference to the execution extensions. + fn execution_extensions(&self) -> &ExecutionExtensions; +} /// Method call executor. pub trait CallExecutor { diff --git a/client/api/src/client.rs b/client/api/src/client.rs index 4980015568b..22503732be4 100644 --- a/client/api/src/client.rs +++ b/client/api/src/client.rs @@ -21,7 +21,7 @@ use futures::channel::mpsc; use sp_core::storage::StorageKey; use sp_runtime::{ traits::{Block as BlockT, NumberFor}, - generic::BlockId + generic::{BlockId, SignedBlock} }; use sp_consensus::BlockOrigin; @@ -76,9 +76,13 @@ pub trait BlockchainEvents { /// Fetch block body by ID. pub trait BlockBody { /// Get block body by ID. Returns `None` if the body is not stored. - fn block_body(&self, + fn block_body( + &self, id: &BlockId ) -> sp_blockchain::Result::Extrinsic>>>; + + /// Get full block by id. + fn block(&self, id: &BlockId) -> sp_blockchain::Result>>; } /// Provide a list of potential uncle headers for a given block. diff --git a/client/api/src/lib.rs b/client/api/src/lib.rs index 69d0c94ac2b..66f51e75c79 100644 --- a/client/api/src/lib.rs +++ b/client/api/src/lib.rs @@ -23,6 +23,7 @@ pub mod client; pub mod execution_extensions; pub mod light; pub mod notifications; +pub mod proof_provider; pub use sp_blockchain as blockchain; pub use backend::*; @@ -31,6 +32,7 @@ pub use call_executor::*; pub use client::*; pub use light::*; pub use notifications::*; +pub use proof_provider::*; pub use sp_state_machine::{StorageProof, ExecutionStrategy}; diff --git a/client/api/src/proof_provider.rs b/client/api/src/proof_provider.rs new file mode 100644 index 00000000000..2d9876f7ad2 --- /dev/null +++ b/client/api/src/proof_provider.rs @@ -0,0 +1,71 @@ +// Copyright 2017-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . +//! Proof utilities +use sp_runtime::{ + generic::BlockId, + traits::{Block as BlockT}, +}; +use crate::{StorageProof, ChangesProof}; +use sp_storage::{ChildInfo, StorageKey}; + +/// Interface for providing block proving utilities. +pub trait ProofProvider { + /// Reads storage value at a given block + key, returning read proof. + fn read_proof( + &self, + id: &BlockId, + keys: &mut dyn Iterator, + ) -> sp_blockchain::Result; + + /// Reads child storage value at a given block + storage_key + key, returning + /// read proof. + fn read_child_proof( + &self, + id: &BlockId, + storage_key: &[u8], + child_info: ChildInfo, + keys: &mut dyn Iterator, + ) -> sp_blockchain::Result; + + /// Execute a call to a contract on top of state in a block of given hash + /// AND returning execution proof. + /// + /// No changes are made. + fn execution_proof( + &self, + id: &BlockId, + method: &str, + call_data: &[u8], + ) -> sp_blockchain::Result<(Vec, StorageProof)>; + /// Reads given header and generates CHT-based header proof. + fn header_proof(&self, id: &BlockId) -> sp_blockchain::Result<(Block::Header, StorageProof)>; + + /// Get proof for computation of (block, extrinsic) pairs where key has been changed at given blocks range. + /// `min` is the hash of the first block, which changes trie root is known to the requester - when we're using + /// changes tries from ascendants of this block, we should provide proofs for changes tries roots + /// `max` is the hash of the last block known to the requester - we can't use changes tries from descendants + /// of this block. + /// Works only for runtimes that are supporting changes tries. + fn key_changes_proof( + &self, + first: Block::Hash, + last: Block::Hash, + min: Block::Hash, + max: Block::Hash, + storage_key: Option<&StorageKey>, + key: &StorageKey, + ) -> sp_blockchain::Result>; +} diff --git a/client/finality-grandpa/src/environment.rs b/client/finality-grandpa/src/environment.rs index 21a44c32dc9..a0f37f20cb3 100644 --- a/client/finality-grandpa/src/environment.rs +++ b/client/finality-grandpa/src/environment.rs @@ -28,10 +28,7 @@ use parking_lot::RwLock; use sp_blockchain::{HeaderBackend, Error as ClientError, HeaderMetadata}; use std::marker::PhantomData; -use sc_client_api::{ - backend::Backend, - utils::is_descendent_of, -}; +use sc_client_api::{backend::Backend, utils::is_descendent_of}; use sc_client::apply_aux; use finality_grandpa::{ BlockNumberOps, Equivocation, Error as GrandpaError, round::State as RoundState, diff --git a/client/finality-grandpa/src/finality_proof.rs b/client/finality-grandpa/src/finality_proof.rs index d52db6c0998..2c85839b5e3 100644 --- a/client/finality-grandpa/src/finality_proof.rs +++ b/client/finality-grandpa/src/finality_proof.rs @@ -34,16 +34,15 @@ //! finality proof (that finalizes some block C that is ancestor of the B and descendant //! of the U) could be returned. -use std::iter; use std::sync::Arc; use log::{trace, warn}; use sp_blockchain::{Backend as BlockchainBackend, Error as ClientError, Result as ClientResult}; use sc_client_api::{ - backend::Backend, CallExecutor, StorageProof, + backend::Backend, StorageProof, light::{FetchChecker, RemoteReadRequest}, + StorageProvider, ProofProvider, }; -use sc_client::Client; use parity_scale_codec::{Encode, Decode}; use finality_grandpa::BlockNumberOps; use sp_runtime::{ @@ -67,12 +66,25 @@ pub trait AuthoritySetForFinalityProver: Send + Sync { fn prove_authorities(&self, block: &BlockId) -> ClientResult; } -/// Client-based implementation of AuthoritySetForFinalityProver. -impl AuthoritySetForFinalityProver for Client +/// Trait that combines `StorageProvider` and `ProofProvider` +pub trait StorageAndProofProvider: StorageProvider + ProofProvider + Send + Sync where - B: Backend + Send + Sync + 'static, - E: CallExecutor + 'static + Clone + Send + Sync, - RA: Send + Sync, + Block: BlockT, + BE: Backend + Send + Sync, +{} + +/// Blanket implementation. +impl StorageAndProofProvider for P + where + Block: BlockT, + BE: Backend + Send + Sync, + P: StorageProvider + ProofProvider + Send + Sync, +{} + +/// Implementation of AuthoritySetForFinalityProver. +impl AuthoritySetForFinalityProver for Arc> + where + BE: Backend + Send + Sync + 'static, { fn authorities(&self, block: &BlockId) -> ClientResult { let storage_key = StorageKey(GRANDPA_AUTHORITIES_KEY.to_vec()); @@ -83,7 +95,7 @@ impl AuthoritySetForFinalityProver for Client) -> ClientResult { - self.read_proof(block, iter::once(GRANDPA_AUTHORITIES_KEY)) + self.read_proof(block, &mut std::iter::once(GRANDPA_AUTHORITIES_KEY)) } } @@ -146,11 +158,13 @@ impl FinalityProofProvider /// /// - backend for accessing blockchain data; /// - authority_provider for calling and proving runtime methods. - pub fn new( + pub fn new

( backend: Arc, - authority_provider: Arc>, - ) -> Self { - FinalityProofProvider { backend, authority_provider } + authority_provider: P, + ) -> Self + where P: AuthoritySetForFinalityProver + 'static, + { + FinalityProofProvider { backend, authority_provider: Arc::new(authority_provider) } } } diff --git a/client/finality-grandpa/src/import.rs b/client/finality-grandpa/src/import.rs index 28a08339dcb..ea1deccdafb 100644 --- a/client/finality-grandpa/src/import.rs +++ b/client/finality-grandpa/src/import.rs @@ -541,8 +541,7 @@ impl GrandpaBlockImport - GrandpaBlockImport +impl GrandpaBlockImport where BE: Backend, Client: crate::ClientForGrandpa, diff --git a/client/finality-grandpa/src/lib.rs b/client/finality-grandpa/src/lib.rs index 38c1070d770..afee2bec535 100644 --- a/client/finality-grandpa/src/lib.rs +++ b/client/finality-grandpa/src/lib.rs @@ -57,11 +57,11 @@ use futures::StreamExt; use log::{debug, info}; use futures::channel::mpsc; use sc_client_api::{ + backend::{AuxStore, Backend}, LockImportRun, BlockchainEvents, CallExecutor, - backend::{AuxStore, Backend}, ExecutionStrategy, Finalizer, TransactionFor, + ExecutionStrategy, Finalizer, TransactionFor, ExecutorProvider, }; use sp_blockchain::{HeaderBackend, Error as ClientError, HeaderMetadata}; -use sc_client::Client; use parity_scale_codec::{Decode, Encode}; use sp_runtime::generic::BlockId; use sp_runtime::traits::{NumberFor, Block as BlockT, DigestFor, Zero}; @@ -96,7 +96,7 @@ mod observer; mod until_imported; mod voting_rule; -pub use finality_proof::FinalityProofProvider; +pub use finality_proof::{FinalityProofProvider, StorageAndProofProvider}; pub use justification::GrandpaJustification; pub use light_import::light_block_import; pub use voting_rule::{ @@ -266,7 +266,7 @@ impl BlockStatus for Arc where pub trait ClientForGrandpa: LockImportRun + Finalizer + AuxStore + HeaderMetadata + HeaderBackend - + BlockchainEvents + ProvideRuntimeApi + + BlockchainEvents + ProvideRuntimeApi + ExecutorProvider + BlockImport, Error = sp_consensus::Error> where BE: Backend, @@ -279,7 +279,7 @@ impl ClientForGrandpa for T Block: BlockT, T: LockImportRun + Finalizer + AuxStore + HeaderMetadata + HeaderBackend - + BlockchainEvents + ProvideRuntimeApi + + BlockchainEvents + ProvideRuntimeApi + ExecutorProvider + BlockImport, Error = sp_consensus::Error>, {} @@ -387,11 +387,8 @@ pub trait GenesisAuthoritySetProvider { fn get(&self) -> Result; } -impl GenesisAuthoritySetProvider for Client - where - B: Backend + Send + Sync + 'static, - E: CallExecutor + Send + Sync, - RA: Send + Sync, +impl GenesisAuthoritySetProvider for Arc> + where E: CallExecutor, { fn get(&self) -> Result { // This implementation uses the Grandpa runtime API instead of reading directly from the diff --git a/client/finality-grandpa/src/light_import.rs b/client/finality-grandpa/src/light_import.rs index 258ea81bd51..276f5d0f28d 100644 --- a/client/finality-grandpa/src/light_import.rs +++ b/client/finality-grandpa/src/light_import.rs @@ -18,7 +18,9 @@ use std::collections::HashMap; use std::sync::Arc; use log::{info, trace, warn}; use parking_lot::RwLock; -use sc_client_api::backend::{AuxStore, Backend, Finalizer, TransactionFor}; +use sc_client_api::{ + backend::{AuxStore, Backend, Finalizer, TransactionFor}, +}; use sp_blockchain::{HeaderBackend, Error as ClientError, well_known_cache_keys}; use parity_scale_codec::{Encode, Decode}; use sp_consensus::{ diff --git a/client/finality-grandpa/src/observer.rs b/client/finality-grandpa/src/observer.rs index 97352b68e32..921e5a3dd5b 100644 --- a/client/finality-grandpa/src/observer.rs +++ b/client/finality-grandpa/src/observer.rs @@ -328,7 +328,7 @@ impl Future for ObserverWork where B: BlockT, BE: Backend + Unpin + 'static, - C: crate::ClientForGrandpa+ 'static, + C: crate::ClientForGrandpa + 'static, N: NetworkT, NumberFor: BlockNumberOps, { diff --git a/client/finality-grandpa/src/tests.rs b/client/finality-grandpa/src/tests.rs index aedcb20a598..0774194d7eb 100644 --- a/client/finality-grandpa/src/tests.rs +++ b/client/finality-grandpa/src/tests.rs @@ -39,7 +39,7 @@ use sp_consensus::{ use std::{ collections::{HashMap, HashSet}, result, - pin::Pin, task, + pin::Pin, }; use parity_scale_codec::Decode; use sp_runtime::traits::{Block as BlockT, Header as HeaderT, HashFor}; @@ -170,8 +170,7 @@ impl TestNetFactory for GrandpaTestNet { ) -> Option>> { match client { PeersClient::Full(_, ref backend) => { - let authorities_provider = Arc::new(self.test_config.clone()); - Some(Arc::new(FinalityProofProvider::new(backend.clone(), authorities_provider))) + Some(Arc::new(FinalityProofProvider::new(backend.clone(), self.test_config.clone()))) }, PeersClient::Light(_, _) => None, } diff --git a/client/network/src/chain.rs b/client/network/src/chain.rs index b991a0e6520..3c075ec881c 100644 --- a/client/network/src/chain.rs +++ b/client/network/src/chain.rs @@ -18,7 +18,7 @@ use sc_client::Client as SubstrateClient; use sp_blockchain::{Error, Info as BlockchainInfo}; -use sc_client_api::{ChangesProof, StorageProof, CallExecutor}; +use sc_client_api::{ChangesProof, StorageProof, CallExecutor, ProofProvider}; use sp_consensus::{BlockImport, BlockStatus, Error as ConsensusError}; use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor}; use sp_runtime::generic::{BlockId}; @@ -50,7 +50,11 @@ pub trait Client: Send + Sync { -> Result<(Block::Header, StorageProof), Error>; /// Get storage read execution proof. - fn read_proof(&self, block: &Block::Hash, keys: &[Vec]) -> Result; + fn read_proof( + &self, + block: &Block::Hash, + keys: &mut dyn Iterator, + ) -> Result; /// Get child storage read execution proof. fn read_child_proof( @@ -58,7 +62,7 @@ pub trait Client: Send + Sync { block: &Block::Hash, storage_key: &[u8], child_info: ChildInfo, - keys: &[Vec], + keys: &mut dyn Iterator, ) -> Result; /// Get method execution proof. @@ -125,14 +129,19 @@ impl Client for SubstrateClient where (self as &SubstrateClient).justification(id) } - fn header_proof(&self, block_number: ::Number) - -> Result<(Block::Header, StorageProof), Error> - { - (self as &SubstrateClient).header_proof(&BlockId::Number(block_number)) + fn header_proof( + &self, + block_number: ::Number, + )-> Result<(Block::Header, StorageProof), Error> { + ProofProvider::::header_proof(self, &BlockId::Number(block_number)) } - fn read_proof(&self, block: &Block::Hash, keys: &[Vec]) -> Result { - (self as &SubstrateClient).read_proof(&BlockId::Hash(block.clone()), keys) + fn read_proof( + &self, + block: &Block::Hash, + keys: &mut dyn Iterator, + ) -> Result { + ProofProvider::::read_proof(self, &BlockId::Hash(block.clone()), keys) } fn read_child_proof( @@ -140,10 +149,9 @@ impl Client for SubstrateClient where block: &Block::Hash, storage_key: &[u8], child_info: ChildInfo, - keys: &[Vec], + keys: &mut dyn Iterator, ) -> Result { - (self as &SubstrateClient) - .read_child_proof(&BlockId::Hash(block.clone()), storage_key, child_info, keys) + ProofProvider::::read_child_proof(self, &BlockId::Hash(block.clone()), storage_key, child_info, keys) } fn execution_proof( @@ -152,7 +160,8 @@ impl Client for SubstrateClient where method: &str, data: &[u8], ) -> Result<(Vec, StorageProof), Error> { - (self as &SubstrateClient).execution_proof( + ProofProvider::::execution_proof( + self, &BlockId::Hash(block.clone()), method, data, @@ -168,7 +177,7 @@ impl Client for SubstrateClient where storage_key: Option<&StorageKey>, key: &StorageKey, ) -> Result, Error> { - (self as &SubstrateClient).key_changes_proof(first, last, min, max, storage_key, key) + ProofProvider::::key_changes_proof(self, first, last, min, max, storage_key, key) } fn is_descendent_of(&self, base: &Block::Hash, block: &Block::Hash) -> Result { diff --git a/client/network/src/protocol.rs b/client/network/src/protocol.rs index d344321e68d..5d7adfdcc3f 100644 --- a/client/network/src/protocol.rs +++ b/client/network/src/protocol.rs @@ -1473,7 +1473,10 @@ impl Protocol { trace!(target: "sync", "Remote read request {} from {} ({} at {})", request.id, who, keys_str(), request.block); - let proof = match self.context_data.chain.read_proof(&request.block, &request.keys) { + let proof = match self.context_data.chain.read_proof( + &request.block, + &mut request.keys.iter().map(AsRef::as_ref) + ) { Ok(proof) => proof, Err(error) => { trace!(target: "sync", "Remote read request {} from {} ({} at {}) failed with: {}", @@ -1523,7 +1526,7 @@ impl Protocol { &request.block, &request.storage_key, child_info, - &request.keys, + &mut request.keys.iter().map(AsRef::as_ref), ) { Ok(proof) => proof, Err(error) => { diff --git a/client/network/src/protocol/light_client_handler.rs b/client/network/src/protocol/light_client_handler.rs index b531f3515a6..a141e134fca 100644 --- a/client/network/src/protocol/light_client_handler.rs +++ b/client/network/src/protocol/light_client_handler.rs @@ -467,7 +467,7 @@ where let block = Decode::decode(&mut request.block.as_ref())?; - let proof = match self.chain.read_proof(&block, &request.keys) { + let proof = match self.chain.read_proof(&block, &mut request.keys.iter().map(AsRef::as_ref)) { Ok(proof) => proof, Err(error) => { log::trace!("remote read request from {} ({} at {:?}) failed with: {}", @@ -508,7 +508,12 @@ where let proof = if let Some(info) = ChildInfo::resolve_child_info(request.child_type, &request.child_info[..]) { - match self.chain.read_child_proof(&block, &request.storage_key, info, &request.keys) { + match self.chain.read_child_proof( + &block, + &request.storage_key, + info, + &mut request.keys.iter().map(AsRef::as_ref) + ) { Ok(proof) => proof, Err(error) => { log::trace!("remote read child request from {} ({} {} at {:?}) failed with: {}", diff --git a/client/offchain/src/lib.rs b/client/offchain/src/lib.rs index 7fc9671fcbc..27a7f508459 100644 --- a/client/offchain/src/lib.rs +++ b/client/offchain/src/lib.rs @@ -169,6 +169,7 @@ mod tests { use substrate_test_runtime_client::runtime::Block; use sc_transaction_pool::{BasicPool, FullChainApi}; use sp_transaction_pool::{TransactionPool, InPoolTransaction}; + use sc_client_api::ExecutorProvider; struct MockNetworkStateInfo(); diff --git a/client/rpc/src/author/mod.rs b/client/rpc/src/author/mod.rs index 06bdcf883c6..80a3a4349ed 100644 --- a/client/rpc/src/author/mod.rs +++ b/client/rpc/src/author/mod.rs @@ -22,8 +22,7 @@ mod tests; use std::{sync::Arc, convert::TryInto}; use log::warn; -use sc_client::Client; -use sp_blockchain::Error as ClientError; +use sp_blockchain::{Error as ClientError, HeaderBackend}; use rpc::futures::{ Sink, Future, @@ -36,7 +35,7 @@ use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId}; use codec::{Encode, Decode}; use sp_core::{Bytes, traits::BareCryptoStorePtr}; use sp_api::ProvideRuntimeApi; -use sp_runtime::{generic, traits}; +use sp_runtime::generic; use sp_transaction_pool::{ TransactionPool, InPoolTransaction, TransactionStatus, BlockHash, TxHash, TransactionFor, error::IntoPoolError, @@ -48,9 +47,9 @@ pub use sc_rpc_api::author::*; use self::error::{Error, FutureResult, Result}; /// Authoring API -pub struct Author { +pub struct Author { /// Substrate client - client: Arc>, + client: Arc, /// Transactions pool pool: Arc

, /// Subscriptions manager @@ -59,10 +58,10 @@ pub struct Author { keystore: BareCryptoStorePtr, } -impl Author { +impl Author { /// Create new instance of Authoring API. pub fn new( - client: Arc>, + client: Arc, pool: Arc

, subscriptions: Subscriptions, keystore: BareCryptoStorePtr, @@ -76,18 +75,11 @@ impl Author { } } -impl AuthorApi, BlockHash

> - for Author::Block, RA> -where - B: sc_client_api::backend::Backend<

::Block> + Send + Sync + 'static, - E: sc_client::CallExecutor<

::Block> + Send + Sync + 'static, - P: TransactionPool + Sync + Send + 'static, - P::Block: traits::Block, - P::Error: 'static, - RA: Send + Sync + 'static, - Client: ProvideRuntimeApi, - as ProvideRuntimeApi>::Api: - SessionKeys, +impl AuthorApi, BlockHash

> for Author + where + P: TransactionPool + Sync + Send + 'static, + Client: HeaderBackend + ProvideRuntimeApi + Send + Sync + 'static, + Client::Api: SessionKeys, { type Metadata = crate::metadata::Metadata; @@ -105,7 +97,7 @@ where } fn rotate_keys(&self) -> Result { - let best_block_hash = self.client.chain_info().best_hash; + let best_block_hash = self.client.info().best_hash; self.client.runtime_api().generate_session_keys( &generic::BlockId::Hash(best_block_hash), None, @@ -113,7 +105,7 @@ where } fn has_session_keys(&self, session_keys: Bytes) -> Result { - let best_block_hash = self.client.chain_info().best_hash; + let best_block_hash = self.client.info().best_hash; let keys = self.client.runtime_api().decode_session_keys( &generic::BlockId::Hash(best_block_hash), session_keys.to_vec(), @@ -133,7 +125,7 @@ where Ok(xt) => xt, Err(err) => return Box::new(result(Err(err.into()))), }; - let best_block_hash = self.client.chain_info().best_hash; + let best_block_hash = self.client.info().best_hash; Box::new(self.pool .submit_one(&generic::BlockId::hash(best_block_hash), xt) .compat() @@ -176,7 +168,7 @@ where xt: Bytes, ) { let submit = || -> Result<_> { - let best_block_hash = self.client.chain_info().best_hash; + let best_block_hash = self.client.info().best_hash; let dxt = TransactionFor::

::decode(&mut &xt[..]) .map_err(error::Error::from)?; Ok( diff --git a/client/rpc/src/author/tests.rs b/client/rpc/src/author/tests.rs index 41bfc46d388..3093cd9d3b7 100644 --- a/client/rpc/src/author/tests.rs +++ b/client/rpc/src/author/tests.rs @@ -25,8 +25,8 @@ use sp_core::{ }; use rpc::futures::Stream as _; use substrate_test_runtime_client::{ - self, AccountKeyring, runtime::{Extrinsic, Transfer, SessionKeys, RuntimeApi, Block}, - DefaultTestClientBuilderExt, TestClientBuilderExt, Backend, Client, Executor, + self, AccountKeyring, runtime::{Extrinsic, Transfer, SessionKeys, Block}, + DefaultTestClientBuilderExt, TestClientBuilderExt, Backend, Client, }; use sc_transaction_pool::{BasicPool, FullChainApi}; use tokio::runtime; @@ -75,7 +75,7 @@ impl Default for TestSetup { } impl TestSetup { - fn author(&self) -> Author { + fn author(&self) -> Author> { Author { client: self.client.clone(), pool: self.pool.clone(), diff --git a/client/rpc/src/chain/chain_full.rs b/client/rpc/src/chain/chain_full.rs index ff732368fe9..ea562d47748 100644 --- a/client/rpc/src/chain/chain_full.rs +++ b/client/rpc/src/chain/chain_full.rs @@ -20,37 +20,39 @@ use std::sync::Arc; use rpc::futures::future::result; use sc_rpc_api::Subscriptions; -use sc_client_api::{CallExecutor, backend::Backend}; -use sc_client::Client; +use sc_client_api::{BlockchainEvents, BlockBody}; use sp_runtime::{generic::{BlockId, SignedBlock}, traits::{Block as BlockT}}; use super::{ChainBackend, client_err, error::FutureResult}; +use std::marker::PhantomData; +use sp_blockchain::HeaderBackend; /// Blockchain API backend for full nodes. Reads all the data from local database. -pub struct FullChain { +pub struct FullChain { /// Substrate client. - client: Arc>, + client: Arc, /// Current subscriptions. subscriptions: Subscriptions, + /// phantom member to pin the block type + _phantom: PhantomData, } -impl FullChain { +impl FullChain { /// Create new Chain API RPC handler. - pub fn new(client: Arc>, subscriptions: Subscriptions) -> Self { + pub fn new(client: Arc, subscriptions: Subscriptions) -> Self { Self { client, subscriptions, + _phantom: PhantomData, } } } -impl ChainBackend for FullChain where +impl ChainBackend for FullChain where Block: BlockT + 'static, - B: Backend + Send + Sync + 'static, - E: CallExecutor + Send + Sync + 'static, - RA: Send + Sync + 'static, + Client: BlockBody + HeaderBackend + BlockchainEvents + 'static, { - fn client(&self) -> &Arc> { + fn client(&self) -> &Arc { &self.client } @@ -60,7 +62,7 @@ impl ChainBackend for FullChain) -> FutureResult> { Box::new(result(self.client - .header(&BlockId::Hash(self.unwrap_or_best(hash))) + .header(BlockId::Hash(self.unwrap_or_best(hash))) .map_err(client_err) )) } diff --git a/client/rpc/src/chain/chain_light.rs b/client/rpc/src/chain/chain_light.rs index 3e26bd24bb0..b258c8dd3bc 100644 --- a/client/rpc/src/chain/chain_light.rs +++ b/client/rpc/src/chain/chain_light.rs @@ -22,7 +22,7 @@ use rpc::futures::future::{result, Future, Either}; use sc_rpc_api::Subscriptions; use sc_client::{ - Client, light::{fetcher::{Fetcher, RemoteBodyRequest}, blockchain::RemoteBlockchain}, + light::{fetcher::{Fetcher, RemoteBodyRequest}, blockchain::RemoteBlockchain}, }; use sp_runtime::{ generic::{BlockId, SignedBlock}, @@ -30,12 +30,14 @@ use sp_runtime::{ }; use super::{ChainBackend, client_err, error::FutureResult}; +use sp_blockchain::HeaderBackend; +use sc_client_api::BlockchainEvents; /// Blockchain API backend for light nodes. Reads all the data from local /// database, if available, or fetches it from remote node otherwise. -pub struct LightChain { +pub struct LightChain { /// Substrate client. - client: Arc>, + client: Arc, /// Current subscriptions. subscriptions: Subscriptions, /// Remote blockchain reference @@ -44,10 +46,10 @@ pub struct LightChain { fetcher: Arc, } -impl> LightChain { +impl> LightChain { /// Create new Chain API RPC handler. pub fn new( - client: Arc>, + client: Arc, subscriptions: Subscriptions, remote_blockchain: Arc>, fetcher: Arc, @@ -61,14 +63,12 @@ impl> LightChain } } -impl ChainBackend for LightChain where +impl ChainBackend for LightChain where Block: BlockT + 'static, - B: sc_client_api::backend::Backend + Send + Sync + 'static, - E: sc_client::CallExecutor + Send + Sync + 'static, - RA: Send + Sync + 'static, + Client: BlockchainEvents + HeaderBackend + Send + Sync + 'static, F: Fetcher + Send + Sync + 'static, { - fn client(&self) -> &Arc> { + fn client(&self) -> &Arc { &self.client } diff --git a/client/rpc/src/chain/mod.rs b/client/rpc/src/chain/mod.rs index 5285de670d8..e7a927e7806 100644 --- a/client/rpc/src/chain/mod.rs +++ b/client/rpc/src/chain/mod.rs @@ -32,7 +32,7 @@ use rpc::{ use sc_rpc_api::Subscriptions; use sc_client::{ - self, Client, BlockchainEvents, + self, BlockchainEvents, light::{fetcher::Fetcher, blockchain::RemoteBlockchain}, }; use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId}; @@ -45,16 +45,17 @@ use sp_runtime::{ use self::error::{Result, Error, FutureResult}; pub use sc_rpc_api::chain::*; +use sp_blockchain::HeaderBackend; +use sc_client_api::BlockBody; /// Blockchain backend API -trait ChainBackend: Send + Sync + 'static +trait ChainBackend: Send + Sync + 'static where Block: BlockT + 'static, - B: sc_client_api::backend::Backend + Send + Sync + 'static, - E: sc_client::CallExecutor + Send + Sync + 'static, + Client: HeaderBackend + BlockchainEvents + 'static, { /// Get client reference. - fn client(&self) -> &Arc>; + fn client(&self) -> &Arc; /// Get subscriptions reference. fn subscriptions(&self) -> &Subscriptions; @@ -62,7 +63,7 @@ trait ChainBackend: Send + Sync + 'static /// Tries to unwrap passed block hash, or uses best block hash otherwise. fn unwrap_or_best(&self, hash: Option) -> Block::Hash { match hash.into() { - None => self.client().chain_info().best_hash, + None => self.client().info().best_hash, Some(hash) => hash, } } @@ -81,9 +82,9 @@ trait ChainBackend: Send + Sync + 'static number: Option>>, ) -> Result> { Ok(match number { - None => Some(self.client().chain_info().best_hash), + None => Some(self.client().info().best_hash), Some(num_or_hex) => self.client() - .header(&BlockId::number(num_or_hex.to_number()?)) + .header(BlockId::number(num_or_hex.to_number()?)) .map_err(client_err)? .map(|h| h.hash()), }) @@ -91,7 +92,7 @@ trait ChainBackend: Send + Sync + 'static /// Get hash of the last finalized block in the canon chain. fn finalized_head(&self) -> Result { - Ok(self.client().chain_info().finalized_hash) + Ok(self.client().info().finalized_hash) } /// All new head subscription @@ -104,7 +105,7 @@ trait ChainBackend: Send + Sync + 'static self.client(), self.subscriptions(), subscriber, - || self.client().chain_info().best_hash, + || self.client().info().best_hash, || self.client().import_notification_stream() .map(|notification| Ok::<_, ()>(notification.header)) .compat(), @@ -130,7 +131,7 @@ trait ChainBackend: Send + Sync + 'static self.client(), self.subscriptions(), subscriber, - || self.client().chain_info().best_hash, + || self.client().info().best_hash, || self.client().import_notification_stream() .filter(|notification| future::ready(notification.is_new_best)) .map(|notification| Ok::<_, ()>(notification.header)) @@ -157,7 +158,7 @@ trait ChainBackend: Send + Sync + 'static self.client(), self.subscriptions(), subscriber, - || self.client().chain_info().finalized_hash, + || self.client().info().finalized_hash, || self.client().finality_notification_stream() .map(|notification| Ok::<_, ()>(notification.header)) .compat(), @@ -175,15 +176,13 @@ trait ChainBackend: Send + Sync + 'static } /// Create new state API that works on full node. -pub fn new_full( - client: Arc>, +pub fn new_full( + client: Arc, subscriptions: Subscriptions, -) -> Chain +) -> Chain where Block: BlockT + 'static, - B: sc_client_api::backend::Backend + Send + Sync + 'static, - E: sc_client::CallExecutor + Send + Sync + 'static + Clone, - RA: Send + Sync + 'static, + Client: BlockBody + HeaderBackend + BlockchainEvents + 'static, { Chain { backend: Box::new(self::chain_full::FullChain::new(client, subscriptions)), @@ -191,17 +190,15 @@ pub fn new_full( } /// Create new state API that works on light node. -pub fn new_light>( - client: Arc>, +pub fn new_light>( + client: Arc, subscriptions: Subscriptions, remote_blockchain: Arc>, fetcher: Arc, -) -> Chain +) -> Chain where Block: BlockT + 'static, - B: sc_client_api::backend::Backend + Send + Sync + 'static, - E: sc_client::CallExecutor + Send + Sync + 'static + Clone, - RA: Send + Sync + 'static, + Client: BlockBody + HeaderBackend + BlockchainEvents + 'static, F: Send + Sync + 'static, { Chain { @@ -215,15 +212,15 @@ pub fn new_light>( } /// Chain API with subscriptions support. -pub struct Chain { - backend: Box>, +pub struct Chain { + backend: Box>, } -impl ChainApi, Block::Hash, Block::Header, SignedBlock> for Chain where - Block: BlockT + 'static, - B: sc_client_api::backend::Backend + Send + Sync + 'static, - E: sc_client::CallExecutor + Send + Sync + 'static, - RA: Send + Sync + 'static +impl ChainApi, Block::Hash, Block::Header, SignedBlock> for + Chain + where + Block: BlockT + 'static, + Client: HeaderBackend + BlockchainEvents + 'static, { type Metadata = crate::metadata::Metadata; @@ -281,16 +278,15 @@ impl ChainApi, Block::Hash, Block::Header, Sig } /// Subscribe to new headers. -fn subscribe_headers( - client: &Arc>, +fn subscribe_headers( + client: &Arc, subscriptions: &Subscriptions, subscriber: Subscriber, best_block_hash: G, stream: F, ) where Block: BlockT + 'static, - B: sc_client_api::backend::Backend + Send + Sync + 'static, - E: sc_client::CallExecutor + Send + Sync + 'static, + Client: HeaderBackend + 'static, F: FnOnce() -> S, G: FnOnce() -> Block::Hash, ERR: ::std::fmt::Debug, @@ -298,7 +294,7 @@ fn subscribe_headers( { subscriptions.add(subscriber, |sink| { // send current head right at the start. - let header = client.header(&BlockId::Hash(best_block_hash())) + let header = client.header(BlockId::Hash(best_block_hash())) .map_err(client_err) .and_then(|header| { header.ok_or_else(|| "Best header missing.".to_owned().into()) diff --git a/client/rpc/src/state/mod.rs b/client/rpc/src/state/mod.rs index 8f621cc8afc..82568866ee3 100644 --- a/client/rpc/src/state/mod.rs +++ b/client/rpc/src/state/mod.rs @@ -27,26 +27,26 @@ use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId}; use rpc::{Result as RpcResult, futures::{Future, future::result}}; use sc_rpc_api::Subscriptions; -use sc_client::{Client, CallExecutor, light::{blockchain::RemoteBlockchain, fetcher::Fetcher}}; +use sc_client::{light::{blockchain::RemoteBlockchain, fetcher::Fetcher}}; use sp_core::{Bytes, storage::{StorageKey, StorageData, StorageChangeSet}}; use sp_version::RuntimeVersion; use sp_runtime::traits::Block as BlockT; -use sp_api::{Metadata, ProvideRuntimeApi}; +use sp_api::{Metadata, ProvideRuntimeApi, CallApiAt}; use self::error::{Error, FutureResult}; pub use sc_rpc_api::state::*; +use sc_client_api::{ExecutorProvider, StorageProvider, BlockchainEvents, Backend}; +use sp_blockchain::{HeaderMetadata, HeaderBackend}; const STORAGE_KEYS_PAGED_MAX_COUNT: u32 = 1000; /// State backend API. -pub trait StateBackend: Send + Sync + 'static +pub trait StateBackend: Send + Sync + 'static where Block: BlockT + 'static, - B: sc_client_api::backend::Backend + Send + Sync + 'static, - E: sc_client::CallExecutor + Send + Sync + 'static, - RA: Send + Sync + 'static, + Client: Send + Sync + 'static, { /// Call runtime method at given block. fn call( @@ -194,18 +194,18 @@ pub trait StateBackend: Send + Sync + 'static } /// Create new state API that works on full node. -pub fn new_full( - client: Arc>, +pub fn new_full( + client: Arc, subscriptions: Subscriptions, -) -> State +) -> State where Block: BlockT + 'static, - B: sc_client_api::backend::Backend + Send + Sync + 'static, - E: CallExecutor + Send + Sync + 'static + Clone, - RA: Send + Sync + 'static, - Client: ProvideRuntimeApi, - as ProvideRuntimeApi>::Api: - Metadata, + BE: Backend + 'static, + Client: ExecutorProvider + StorageProvider + HeaderBackend + + HeaderMetadata + BlockchainEvents + + CallApiAt + + ProvideRuntimeApi + Send + Sync + 'static, + Client::Api: Metadata, { State { backend: Box::new(self::state_full::FullState::new(client, subscriptions)), @@ -213,17 +213,19 @@ pub fn new_full( } /// Create new state API that works on light node. -pub fn new_light>( - client: Arc>, +pub fn new_light>( + client: Arc, subscriptions: Subscriptions, remote_blockchain: Arc>, fetcher: Arc, -) -> State +) -> State where Block: BlockT + 'static, - B: sc_client_api::backend::Backend + Send + Sync + 'static, - E: CallExecutor + Send + Sync + 'static + Clone, - RA: Send + Sync + 'static, + BE: Backend + 'static, + Client: ExecutorProvider + StorageProvider + + HeaderMetadata + + ProvideRuntimeApi + HeaderBackend + BlockchainEvents + + Send + Sync + 'static, F: Send + Sync + 'static, { State { @@ -237,16 +239,14 @@ pub fn new_light>( } /// State API with subscriptions support. -pub struct State { - backend: Box>, +pub struct State { + backend: Box>, } -impl StateApi for State +impl StateApi for State where Block: BlockT + 'static, - B: sc_client_api::backend::Backend + Send + Sync + 'static, - E: CallExecutor + Send + Sync + 'static + Clone, - RA: Send + Sync + 'static, + Client: Send + Sync + 'static, { type Metadata = crate::metadata::Metadata; diff --git a/client/rpc/src/state/state_full.rs b/client/rpc/src/state/state_full.rs index 3d5613626e0..b7589d2aefe 100644 --- a/client/rpc/src/state/state_full.rs +++ b/client/rpc/src/state/state_full.rs @@ -26,12 +26,8 @@ use rpc::{Result as RpcResult, futures::{stream, Future, Sink, Stream, future::r use sc_rpc_api::Subscriptions; use sc_client_api::backend::Backend; -use sp_blockchain::{ - Result as ClientResult, Error as ClientError, HeaderMetadata, CachedHeaderMetadata -}; -use sc_client::{ - Client, CallExecutor, BlockchainEvents -}; +use sp_blockchain::{Result as ClientResult, Error as ClientError, HeaderMetadata, CachedHeaderMetadata, HeaderBackend}; +use sc_client::BlockchainEvents; use sp_core::{ Bytes, storage::{well_known_keys, StorageKey, StorageData, StorageChangeSet, ChildInfo}, }; @@ -40,9 +36,11 @@ use sp_runtime::{ generic::BlockId, traits::{Block as BlockT, NumberFor, SaturatedConversion}, }; -use sp_api::{Metadata, ProvideRuntimeApi}; +use sp_api::{Metadata, ProvideRuntimeApi, CallApiAt}; use super::{StateBackend, error::{FutureResult, Error, Result}, client_err, child_resolution_error}; +use std::marker::PhantomData; +use sc_client_api::{CallExecutor, StorageProvider, ExecutorProvider}; /// Ranges to query in state_queryStorage. struct QueryStorageRange { @@ -59,25 +57,27 @@ struct QueryStorageRange { } /// State API backend for full nodes. -pub struct FullState { - client: Arc>, +pub struct FullState { + client: Arc, subscriptions: Subscriptions, + _phantom: PhantomData<(BE, Block)> } -impl FullState +impl FullState where + BE: Backend, + Client: StorageProvider + HeaderBackend + + HeaderMetadata, Block: BlockT + 'static, - B: Backend + Send + Sync + 'static, - E: CallExecutor + Send + Sync + 'static + Clone, { /// Create new state API backend for full nodes. - pub fn new(client: Arc>, subscriptions: Subscriptions) -> Self { - Self { client, subscriptions } + pub fn new(client: Arc, subscriptions: Subscriptions) -> Self { + Self { client, subscriptions, _phantom: PhantomData } } /// Returns given block hash or best block hash if None is passed. fn block_or_best(&self, hash: Option) -> ClientResult { - Ok(hash.unwrap_or_else(|| self.client.chain_info().best_hash)) + Ok(hash.unwrap_or_else(|| self.client.info().best_hash)) } /// Splits the `query_storage` block range into 'filtered' and 'unfiltered' subranges. @@ -212,14 +212,14 @@ impl FullState } } -impl StateBackend for FullState where +impl StateBackend for FullState where Block: BlockT + 'static, - B: Backend + Send + Sync + 'static, - E: CallExecutor + Send + Sync + 'static + Clone, - RA: Send + Sync + 'static, - Client: ProvideRuntimeApi, - as ProvideRuntimeApi>::Api: - Metadata, + BE: Backend + 'static, + Client: ExecutorProvider + StorageProvider + HeaderBackend + + HeaderMetadata + BlockchainEvents + + CallApiAt + ProvideRuntimeApi + + Send + Sync + 'static, + Client::Api: Metadata, { fn call( &self, @@ -424,7 +424,7 @@ impl StateBackend for FullState StateBackend for FullState>; /// State API backend for light nodes. -pub struct LightState, B, E, RA> { - client: Arc>, +pub struct LightState, Client> { + client: Arc, subscriptions: Subscriptions, version_subscriptions: SimpleSubscriptions, storage_subscriptions: Arc>>, @@ -134,16 +133,14 @@ impl SharedRequests for SimpleSubscriptions where } } -impl + 'static, B, E, RA> LightState +impl + 'static, Client> LightState where Block: BlockT, - B: Backend + Send + Sync + 'static, - E: CallExecutor + Send + Sync + 'static + Clone, - RA: Send + Sync + 'static, + Client: HeaderBackend + Send + Sync + 'static, { /// Create new state API backend for light nodes. pub fn new( - client: Arc>, + client: Arc, subscriptions: Subscriptions, remote_blockchain: Arc>, fetcher: Arc, @@ -164,16 +161,14 @@ impl + 'static, B, E, RA> LightState) -> Block::Hash { - hash.unwrap_or_else(|| self.client.chain_info().best_hash) + hash.unwrap_or_else(|| self.client.info().best_hash) } } -impl StateBackend for LightState +impl StateBackend for LightState where Block: BlockT, - B: Backend + Send + Sync + 'static, - E: CallExecutor + Send + Sync + 'static + Clone, - RA: Send + Sync + 'static, + Client: BlockchainEvents + HeaderBackend + Send + Sync + 'static, F: Fetcher + 'static { fn call( diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index bfb979c19e0..096f492e646 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -23,6 +23,7 @@ use sc_client_api::{ BlockchainEvents, backend::RemoteBackend, light::RemoteBlockchain, execution_extensions::ExtensionsFactory, + ExecutorProvider, CallExecutor }; use sc_client::Client; use sc_chain_spec::{RuntimeGenesis, Extension}; @@ -799,7 +800,9 @@ ServiceBuilder< TBackend::OffchainStorage, TBl >, - >, Error> { + >, Error> + where TExec: CallExecutor, + { let ServiceBuilder { marker: _, mut config, diff --git a/client/service/src/chain_ops.rs b/client/service/src/chain_ops.rs index 03db9232a10..350aac91758 100644 --- a/client/service/src/chain_ops.rs +++ b/client/service/src/chain_ops.rs @@ -35,6 +35,7 @@ use sp_consensus::{ use sc_executor::{NativeExecutor, NativeExecutionDispatch}; use std::{io::{Read, Write, Seek}, pin::Pin}; +use sc_client_api::BlockBody; /// Build a chain spec json pub fn build_spec(spec: ChainSpec, raw: bool) -> error::Result where diff --git a/client/src/client.rs b/client/src/client.rs index 89414870391..c921d297012 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -66,7 +66,8 @@ pub use sc_client_api::{ backend::{ self, BlockImportOperation, PrunableStateChangesTrieStorage, ClientImportOperation, Finalizer, ImportSummary, NewBlockState, - LockImportRun, changes_tries_state_at_block, + changes_tries_state_at_block, StorageProvider, + LockImportRun, }, client::{ ImportNotifications, FinalityNotification, FinalityNotifications, BlockImportNotification, @@ -75,7 +76,7 @@ pub use sc_client_api::{ }, execution_extensions::{ExecutionExtensions, ExecutionStrategies}, notifications::{StorageNotifications, StorageEventStream}, - CallExecutor, + CallExecutor, ExecutorProvider, ProofProvider, }; use sp_blockchain::Error; use prometheus_endpoint::Registry; @@ -85,6 +86,7 @@ use crate::{ light::{call_executor::prove_execution, fetcher::ChangesProof}, in_mem, genesis, cht, block_rules::{BlockRules, LookupResult as BlockLookupResult}, }; +use crate::client::backend::KeyIterator; /// Substrate Client pub struct Client where Block: BlockT { @@ -100,46 +102,6 @@ pub struct Client where Block: BlockT { _phantom: PhantomData, } -/// An `Iterator` that iterates keys in a given block under a prefix. -pub struct KeyIterator<'a, State, Block> { - state: State, - prefix: Option<&'a StorageKey>, - current_key: Vec, - _phantom: PhantomData, -} - -impl <'a, State, Block> KeyIterator<'a, State, Block> { - fn new(state: State, prefix: Option<&'a StorageKey>, current_key: Vec) -> Self { - Self { - state, - prefix, - current_key, - _phantom: PhantomData, - } - } -} - -impl<'a, State, Block> Iterator for KeyIterator<'a, State, Block> where - Block: BlockT, - State: StateBackend>, -{ - type Item = StorageKey; - - fn next(&mut self) -> Option { - let next_key = self.state - .next_storage_key(&self.current_key) - .ok() - .flatten()?; - if let Some(prefix) = self.prefix { - if !next_key.starts_with(&prefix.0[..]) { - return None; - } - } - self.current_key = next_key.clone(); - Some(StorageKey(next_key)) - } -} - // used in importing a block, where additional changes are made after the runtime // executed. enum PrePostHeader { @@ -324,119 +286,14 @@ impl Client where }) } - /// Get a reference to the execution extensions. - pub fn execution_extensions(&self) -> &ExecutionExtensions { - &self.execution_extensions - } - /// Get a reference to the state at a given block. pub fn state_at(&self, block: &BlockId) -> sp_blockchain::Result { self.backend.state_at(*block) } - /// Given a `BlockId` and a key prefix, return the matching storage keys in that block. - pub fn storage_keys(&self, id: &BlockId, key_prefix: &StorageKey) -> sp_blockchain::Result> { - let keys = self.state_at(id)?.keys(&key_prefix.0).into_iter().map(StorageKey).collect(); - Ok(keys) - } - - /// Given a `BlockId` and a key prefix, return the matching child storage keys and values in that block. - pub fn storage_pairs(&self, id: &BlockId, key_prefix: &StorageKey) - -> sp_blockchain::Result> - { - let state = self.state_at(id)?; - let keys = state - .keys(&key_prefix.0) - .into_iter() - .map(|k| { - let d = state.storage(&k).ok().flatten().unwrap_or_default(); - (StorageKey(k), StorageData(d)) - }) - .collect(); - Ok(keys) - } - - /// Given a `BlockId` and a key prefix, return a `KeyIterator` iterates matching storage keys in that block. - pub fn storage_keys_iter<'a>( - &self, - id: &BlockId, - prefix: Option<&'a StorageKey>, - start_key: Option<&StorageKey> - ) -> sp_blockchain::Result> { - let state = self.state_at(id)?; - let start_key = start_key - .or(prefix) - .map(|key| key.0.clone()) - .unwrap_or_else(Vec::new); - Ok(KeyIterator::new(state, prefix, start_key)) - } - - /// Given a `BlockId` and a key, return the value under the key in that block. - pub fn storage(&self, id: &BlockId, key: &StorageKey) - -> sp_blockchain::Result> - { - Ok(self.state_at(id)? - .storage(&key.0).map_err(|e| sp_blockchain::Error::from_state(Box::new(e)))? - .map(StorageData) - ) - } - - /// Given a `BlockId` and a key, return the value under the hash in that block. - pub fn storage_hash(&self, id: &BlockId, key: &StorageKey) - -> sp_blockchain::Result> - { - Ok(self.state_at(id)? - .storage_hash(&key.0).map_err(|e| sp_blockchain::Error::from_state(Box::new(e)))? - ) - } - - /// Given a `BlockId`, a key prefix, and a child storage key, return the matching child storage keys. - pub fn child_storage_keys( - &self, - id: &BlockId, - child_storage_key: &StorageKey, - child_info: ChildInfo, - key_prefix: &StorageKey - ) -> sp_blockchain::Result> { - let keys = self.state_at(id)? - .child_keys(&child_storage_key.0, child_info, &key_prefix.0) - .into_iter() - .map(StorageKey) - .collect(); - Ok(keys) - } - - /// Given a `BlockId`, a key and a child storage key, return the value under the key in that block. - pub fn child_storage( - &self, - id: &BlockId, - storage_key: &StorageKey, - child_info: ChildInfo, - key: &StorageKey - ) -> sp_blockchain::Result> { - Ok(self.state_at(id)? - .child_storage(&storage_key.0, child_info, &key.0) - .map_err(|e| sp_blockchain::Error::from_state(Box::new(e)))? - .map(StorageData)) - } - - /// Given a `BlockId`, a key and a child storage key, return the hash under the key in that block. - pub fn child_storage_hash( - &self, - id: &BlockId, - storage_key: &StorageKey, - child_info: ChildInfo, - key: &StorageKey - ) -> sp_blockchain::Result> { - Ok(self.state_at(id)? - .child_storage_hash(&storage_key.0, child_info, &key.0) - .map_err(|e| sp_blockchain::Error::from_state(Box::new(e)))? - ) - } - /// Get the code at a given block. pub fn code_at(&self, id: &BlockId) -> sp_blockchain::Result> { - Ok(self.storage(id, &StorageKey(well_known_keys::CODE.to_vec()))? + Ok(StorageProvider::storage(self, id, &StorageKey(well_known_keys::CODE.to_vec()))? .expect("None is returned if there's no value stored for the given key;\ ':code' key is always defined; qed").0) } @@ -446,57 +303,6 @@ impl Client where self.executor.runtime_version(id) } - /// Get call executor reference. - pub fn executor(&self) -> &E { - &self.executor - } - - /// Reads storage value at a given block + key, returning read proof. - pub fn read_proof(&self, id: &BlockId, keys: I) -> sp_blockchain::Result where - I: IntoIterator, - I::Item: AsRef<[u8]>, - { - self.state_at(id) - .and_then(|state| prove_read(state, keys) - .map_err(Into::into)) - } - - /// Reads child storage value at a given block + storage_key + key, returning - /// read proof. - pub fn read_child_proof( - &self, - id: &BlockId, - storage_key: &[u8], - child_info: ChildInfo, - keys: I, - ) -> sp_blockchain::Result where - I: IntoIterator, - I::Item: AsRef<[u8]>, - { - self.state_at(id) - .and_then(|state| prove_child_read(state, storage_key, child_info, keys) - .map_err(Into::into)) - } - - /// Execute a call to a contract on top of state in a block of given hash - /// AND returning execution proof. - /// - /// No changes are made. - pub fn execution_proof(&self, - id: &BlockId, - method: &str, - call_data: &[u8] - ) -> sp_blockchain::Result<(Vec, StorageProof)> { - let state = self.state_at(id)?; - let header = self.prepare_environment_block(id)?; - prove_execution(state, header, &self.executor, method, call_data) - } - - /// Reads given header and generates CHT-based header proof. - pub fn header_proof(&self, id: &BlockId) -> sp_blockchain::Result<(Block::Header, StorageProof)> { - self.header_proof_with_cht_size(id, cht::size()) - } - /// Get block hash by number. pub fn block_hash(&self, block_number: <::Header as HeaderT>::Number @@ -531,112 +337,6 @@ impl Client where Ok((header, proof)) } - /// Get longest range within [first; last] that is possible to use in `key_changes` - /// and `key_changes_proof` calls. - /// Range could be shortened from the beginning if some changes tries have been pruned. - /// Returns Ok(None) if changes tries are not supported. - pub fn max_key_changes_range( - &self, - first: NumberFor, - last: BlockId, - ) -> sp_blockchain::Result, BlockId)>> { - let last_number = self.backend.blockchain().expect_block_number_from_id(&last)?; - let last_hash = self.backend.blockchain().expect_block_hash_from_id(&last)?; - if first > last_number { - return Err(sp_blockchain::Error::ChangesTrieAccessFailed("Invalid changes trie range".into())); - } - - let (storage, configs) = match self.require_changes_trie(first, last_hash, false).ok() { - Some((storage, configs)) => (storage, configs), - None => return Ok(None), - }; - - let first_available_changes_trie = configs.last().map(|config| config.0); - match first_available_changes_trie { - Some(first_available_changes_trie) => { - let oldest_unpruned = storage.oldest_pruned_digest_range_end(); - let first = std::cmp::max(first_available_changes_trie, oldest_unpruned); - Ok(Some((first, last))) - }, - None => Ok(None) - } - } - - /// Get pairs of (block, extrinsic) where key has been changed at given blocks range. - /// Works only for runtimes that are supporting changes tries. - /// - /// Changes are returned in descending order (i.e. last block comes first). - pub fn key_changes( - &self, - first: NumberFor, - last: BlockId, - storage_key: Option<&StorageKey>, - key: &StorageKey - ) -> sp_blockchain::Result, u32)>> { - let last_number = self.backend.blockchain().expect_block_number_from_id(&last)?; - let last_hash = self.backend.blockchain().expect_block_hash_from_id(&last)?; - let (storage, configs) = self.require_changes_trie(first, last_hash, true)?; - - let mut result = Vec::new(); - let best_number = self.backend.blockchain().info().best_number; - for (config_zero, config_end, config) in configs { - let range_first = ::std::cmp::max(first, config_zero + One::one()); - let range_anchor = match config_end { - Some((config_end_number, config_end_hash)) => if last_number > config_end_number { - ChangesTrieAnchorBlockId { hash: config_end_hash, number: config_end_number } - } else { - ChangesTrieAnchorBlockId { hash: convert_hash(&last_hash), number: last_number } - }, - None => ChangesTrieAnchorBlockId { hash: convert_hash(&last_hash), number: last_number }, - }; - - let config_range = ChangesTrieConfigurationRange { - config: &config, - zero: config_zero.clone(), - end: config_end.map(|(config_end_number, _)| config_end_number), - }; - let result_range: Vec<(NumberFor, u32)> = key_changes::, _>( - config_range, - storage.storage(), - range_first, - &range_anchor, - best_number, - storage_key.as_ref().map(|x| &x.0[..]), - &key.0) - .and_then(|r| r.map(|r| r.map(|(block, tx)| (block, tx))).collect::>()) - .map_err(|err| sp_blockchain::Error::ChangesTrieAccessFailed(err))?; - result.extend(result_range); - } - - Ok(result) - } - - /// Get proof for computation of (block, extrinsic) pairs where key has been changed at given blocks range. - /// `min` is the hash of the first block, which changes trie root is known to the requester - when we're using - /// changes tries from ascendants of this block, we should provide proofs for changes tries roots - /// `max` is the hash of the last block known to the requester - we can't use changes tries from descendants - /// of this block. - /// Works only for runtimes that are supporting changes tries. - pub fn key_changes_proof( - &self, - first: Block::Hash, - last: Block::Hash, - min: Block::Hash, - max: Block::Hash, - storage_key: Option<&StorageKey>, - key: &StorageKey, - ) -> sp_blockchain::Result> { - self.key_changes_proof_with_cht_size( - first, - last, - min, - max, - storage_key, - key, - cht::size(), - ) - } - /// Does the same work as `key_changes_proof`, but assumes that CHTs are of passed size. pub fn key_changes_proof_with_cht_size( &self, @@ -1344,17 +1044,6 @@ impl Client where self.backend.blockchain().justification(*id) } - /// Get full block by id. - pub fn block(&self, id: &BlockId) - -> sp_blockchain::Result>> - { - Ok(match (self.header(id)?, self.body(id)?, self.justification(id)?) { - (Some(header), Some(extrinsics), justification) => - Some(SignedBlock { block: Block::new(header, extrinsics), justification }), - _ => None, - }) - } - /// Gets the uncles of the block with `target_hash` going back `max_generation` ancestors. pub fn uncles(&self, target_hash: Block::Hash, max_generation: NumberFor) -> sp_blockchain::Result> { let load_header = |id: Block::Hash| -> sp_blockchain::Result { @@ -1399,6 +1088,70 @@ impl Client where } } +impl ProofProvider for Client where + B: backend::Backend, + E: CallExecutor, + Block: BlockT, +{ + fn read_proof( + &self, + id: &BlockId, + keys: &mut dyn Iterator, + ) -> sp_blockchain::Result { + self.state_at(id) + .and_then(|state| prove_read(state, keys) + .map_err(Into::into)) + } + + fn read_child_proof( + &self, + id: &BlockId, + storage_key: &[u8], + child_info: ChildInfo, + keys: &mut dyn Iterator, + ) -> sp_blockchain::Result { + self.state_at(id) + .and_then(|state| prove_child_read(state, storage_key, child_info, keys) + .map_err(Into::into)) + } + + fn execution_proof( + &self, + id: &BlockId, + method: &str, + call_data: &[u8] + ) -> sp_blockchain::Result<(Vec, StorageProof)> { + let state = self.state_at(id)?; + let header = self.prepare_environment_block(id)?; + prove_execution(state, header, &self.executor, method, call_data) + } + + fn header_proof(&self, id: &BlockId) -> sp_blockchain::Result<(Block::Header, StorageProof)> { + self.header_proof_with_cht_size(id, cht::size()) + } + + fn key_changes_proof( + &self, + first: Block::Hash, + last: Block::Hash, + min: Block::Hash, + max: Block::Hash, + storage_key: Option<&StorageKey>, + key: &StorageKey, + ) -> sp_blockchain::Result> { + self.key_changes_proof_with_cht_size( + first, + last, + min, + max, + storage_key, + key, + cht::size(), + ) + } +} + + impl BlockBuilderProvider for Client where B: backend::Backend + Send + Sync + 'static, @@ -1425,6 +1178,196 @@ impl BlockBuilderProvider for Client ExecutorProvider for Client where + B: backend::Backend, + E: CallExecutor, + Block: BlockT, +{ + type Executor = E; + + fn executor(&self) -> &Self::Executor { + &self.executor + } + + fn execution_extensions(&self) -> &ExecutionExtensions { + &self.execution_extensions + } +} + +impl StorageProvider for Client where + B: backend::Backend, + E: CallExecutor, + Block: BlockT, +{ + fn storage_keys(&self, id: &BlockId, key_prefix: &StorageKey) -> sp_blockchain::Result> { + let keys = self.state_at(id)?.keys(&key_prefix.0).into_iter().map(StorageKey).collect(); + Ok(keys) + } + + fn storage_pairs(&self, id: &BlockId, key_prefix: &StorageKey) + -> sp_blockchain::Result> + { + let state = self.state_at(id)?; + let keys = state + .keys(&key_prefix.0) + .into_iter() + .map(|k| { + let d = state.storage(&k).ok().flatten().unwrap_or_default(); + (StorageKey(k), StorageData(d)) + }) + .collect(); + Ok(keys) + } + + + fn storage_keys_iter<'a>( + &self, + id: &BlockId, + prefix: Option<&'a StorageKey>, + start_key: Option<&StorageKey> + ) -> sp_blockchain::Result> { + let state = self.state_at(id)?; + let start_key = start_key + .or(prefix) + .map(|key| key.0.clone()) + .unwrap_or_else(Vec::new); + Ok(KeyIterator::new(state, prefix, start_key)) + } + + + fn storage(&self, id: &BlockId, key: &StorageKey) -> sp_blockchain::Result> + { + Ok(self.state_at(id)? + .storage(&key.0).map_err(|e| sp_blockchain::Error::from_state(Box::new(e)))? + .map(StorageData) + ) + } + + + fn storage_hash(&self, id: &BlockId, key: &StorageKey) -> sp_blockchain::Result> + { + Ok(self.state_at(id)? + .storage_hash(&key.0).map_err(|e| sp_blockchain::Error::from_state(Box::new(e)))? + ) + } + + + fn child_storage_keys( + &self, + id: &BlockId, + child_storage_key: &StorageKey, + child_info: ChildInfo, + key_prefix: &StorageKey + ) -> sp_blockchain::Result> { + let keys = self.state_at(id)? + .child_keys(&child_storage_key.0, child_info, &key_prefix.0) + .into_iter() + .map(StorageKey) + .collect(); + Ok(keys) + } + + + fn child_storage( + &self, + id: &BlockId, + storage_key: &StorageKey, + child_info: ChildInfo, + key: &StorageKey + ) -> sp_blockchain::Result> { + Ok(self.state_at(id)? + .child_storage(&storage_key.0, child_info, &key.0) + .map_err(|e| sp_blockchain::Error::from_state(Box::new(e)))? + .map(StorageData)) + } + + + fn child_storage_hash( + &self, + id: &BlockId, + storage_key: &StorageKey, + child_info: ChildInfo, + key: &StorageKey + ) -> sp_blockchain::Result> { + Ok(self.state_at(id)? + .child_storage_hash(&storage_key.0, child_info, &key.0) + .map_err(|e| sp_blockchain::Error::from_state(Box::new(e)))? + ) + } + + fn max_key_changes_range( + &self, + first: NumberFor, + last: BlockId, + ) -> sp_blockchain::Result, BlockId)>> { + let last_number = self.backend.blockchain().expect_block_number_from_id(&last)?; + let last_hash = self.backend.blockchain().expect_block_hash_from_id(&last)?; + if first > last_number { + return Err(sp_blockchain::Error::ChangesTrieAccessFailed("Invalid changes trie range".into())); + } + + let (storage, configs) = match self.require_changes_trie(first, last_hash, false).ok() { + Some((storage, configs)) => (storage, configs), + None => return Ok(None), + }; + + let first_available_changes_trie = configs.last().map(|config| config.0); + match first_available_changes_trie { + Some(first_available_changes_trie) => { + let oldest_unpruned = storage.oldest_pruned_digest_range_end(); + let first = std::cmp::max(first_available_changes_trie, oldest_unpruned); + Ok(Some((first, last))) + }, + None => Ok(None) + } + } + + fn key_changes( + &self, + first: NumberFor, + last: BlockId, + storage_key: Option<&StorageKey>, + key: &StorageKey + ) -> sp_blockchain::Result, u32)>> { + let last_number = self.backend.blockchain().expect_block_number_from_id(&last)?; + let last_hash = self.backend.blockchain().expect_block_hash_from_id(&last)?; + let (storage, configs) = self.require_changes_trie(first, last_hash, true)?; + + let mut result = Vec::new(); + let best_number = self.backend.blockchain().info().best_number; + for (config_zero, config_end, config) in configs { + let range_first = ::std::cmp::max(first, config_zero + One::one()); + let range_anchor = match config_end { + Some((config_end_number, config_end_hash)) => if last_number > config_end_number { + ChangesTrieAnchorBlockId { hash: config_end_hash, number: config_end_number } + } else { + ChangesTrieAnchorBlockId { hash: convert_hash(&last_hash), number: last_number } + }, + None => ChangesTrieAnchorBlockId { hash: convert_hash(&last_hash), number: last_number }, + }; + + let config_range = ChangesTrieConfigurationRange { + config: &config, + zero: config_zero.clone(), + end: config_end.map(|(config_end_number, _)| config_end_number), + }; + let result_range: Vec<(NumberFor, u32)> = key_changes::, _>( + config_range, + storage.storage(), + range_first, + &range_anchor, + best_number, + storage_key.as_ref().map(|x| &x.0[..]), + &key.0) + .and_then(|r| r.map(|r| r.map(|(block, tx)| (block, tx))).collect::>()) + .map_err(|err| sp_blockchain::Error::ChangesTrieAccessFailed(err))?; + result.extend(result_range); + } + + Ok(result) + } +} + impl HeaderMetadata for Client where B: backend::Backend, E: CallExecutor, @@ -1902,6 +1845,15 @@ impl BlockBody for Client ) -> sp_blockchain::Result::Extrinsic>>> { self.body(id) } + + fn block(&self, id: &BlockId) -> sp_blockchain::Result>> + { + Ok(match (self.header(id)?, self.body(id)?, self.justification(id)?) { + (Some(header), Some(extrinsics), justification) => + Some(SignedBlock { block: Block::new(header, extrinsics), justification }), + _ => None, + }) + } } impl backend::AuxStore for Client diff --git a/client/src/light/call_executor.rs b/client/src/light/call_executor.rs index f8db30194b5..cae5d5a0aa8 100644 --- a/client/src/light/call_executor.rs +++ b/client/src/light/call_executor.rs @@ -40,7 +40,7 @@ use sp_blockchain::{Error as ClientError, Result as ClientResult}; use sc_client_api::{ backend::RemoteBackend, light::RemoteCallRequest, - call_executor::CallExecutor + call_executor::CallExecutor, }; use sc_executor::{RuntimeVersion, NativeVersion}; @@ -288,6 +288,7 @@ mod tests { use sp_core::H256; use sc_client_api::backend::{Backend, NewBlockState}; use crate::in_mem::Backend as InMemBackend; + use sc_client_api::ProofProvider; use sp_runtime::traits::BlakeTwo256; struct DummyCallExecutor; diff --git a/client/src/light/fetcher.rs b/client/src/light/fetcher.rs index c4989e90b5b..87e21e3c0e1 100644 --- a/client/src/light/fetcher.rs +++ b/client/src/light/fetcher.rs @@ -349,6 +349,7 @@ pub mod tests { use sp_runtime::{generic::BlockId, traits::BlakeTwo256}; use sp_state_machine::Backend; use super::*; + use sc_client_api::{StorageProvider, ProofProvider}; const CHILD_INFO_1: ChildInfo<'static> = ChildInfo::new_default(b"unique_id_1"); @@ -378,7 +379,7 @@ pub mod tests { .and_then(|v| Decode::decode(&mut &v.0[..]).ok()).unwrap(); let remote_read_proof = remote_client.read_proof( &remote_block_id, - &[well_known_keys::HEAP_PAGES], + &mut std::iter::once(well_known_keys::HEAP_PAGES), ).unwrap(); // check remote read proof locally @@ -426,7 +427,7 @@ pub mod tests { &remote_block_id, b":child_storage:default:child1", CHILD_INFO_1, - &[b"key1"], + &mut std::iter::once("key1".as_bytes()), ).unwrap(); // check locally -- GitLab From 9e52443bfc5cd3e204351f8872aeca83a304a3cf Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 17:00:31 +0100 Subject: [PATCH 099/106] Don't remove invalid transactions when skipping. (#5121) * Don't remove invalid transactions when skipping. * Use a special kind of extrinsic instead of arbitrary limit. * Fix txpool tests. * Attempt to create more blocks. * Bump lock Co-authored-by: Gavin Wood Co-authored-by: Nikolay Volf --- bin/node/executor/benches/bench.rs | 2 +- .../basic-authorship/src/basic_authorship.rs | 88 +++++++++++++++++-- .../transaction-pool/graph/benches/basics.rs | 6 +- client/transaction-pool/graph/src/pool.rs | 6 +- test-utils/runtime/src/lib.rs | 32 +++++-- test-utils/runtime/src/system.rs | 17 ++-- .../runtime/transaction-pool/src/lib.rs | 4 +- 7 files changed, 133 insertions(+), 22 deletions(-) diff --git a/bin/node/executor/benches/bench.rs b/bin/node/executor/benches/bench.rs index 3209bb8729a..ef0cdf445a5 100644 --- a/bin/node/executor/benches/bench.rs +++ b/bin/node/executor/benches/bench.rs @@ -166,7 +166,7 @@ fn bench_execute_block(c: &mut Criterion) { // Get the runtime version to initialize the runtimes cache. { let mut test_ext = new_test_ext(&genesis_config); - executor.runtime_version(&mut test_ext.ext()); + executor.runtime_version(&mut test_ext.ext()).unwrap(); } let blocks = test_blocks(&genesis_config, &executor); diff --git a/client/basic-authorship/src/basic_authorship.rs b/client/basic-authorship/src/basic_authorship.rs index 231d0255919..41216c2b544 100644 --- a/client/basic-authorship/src/basic_authorship.rs +++ b/client/basic-authorship/src/basic_authorship.rs @@ -26,15 +26,15 @@ use sp_inherents::InherentData; use log::{error, info, debug, trace}; use sp_core::ExecutionContext; use sp_runtime::{ - traits::{Block as BlockT, Hash as HashT, Header as HeaderT, DigestFor, BlakeTwo256}, generic::BlockId, + traits::{Block as BlockT, Hash as HashT, Header as HeaderT, DigestFor, BlakeTwo256}, }; use sp_transaction_pool::{TransactionPool, InPoolTransaction}; use sc_telemetry::{telemetry, CONSENSUS_INFO}; use sc_block_builder::{BlockBuilderApi, BlockBuilderProvider}; use sp_api::{ProvideRuntimeApi, ApiExt}; use futures::prelude::*; -use sp_blockchain::HeaderBackend; +use sp_blockchain::{HeaderBackend, ApplyExtrinsicFailed}; use std::marker::PhantomData; /// Proposer factory. @@ -230,7 +230,7 @@ impl ProposerInner Ok(()) => { debug!("[{:?}] Pushed to the block.", pending_tx_hash); } - Err(sp_blockchain::Error::ApplyExtrinsicFailed(sp_blockchain::ApplyExtrinsicFailed::Validity(e))) + Err(sp_blockchain::Error::ApplyExtrinsicFailed(ApplyExtrinsicFailed::Validity(e))) if e.exhausted_resources() => { if is_first { debug!("[{:?}] Invalid transaction: FullBlock on empty block", pending_tx_hash); @@ -246,6 +246,13 @@ impl ProposerInner break; } } + Err(e) if skipped > 0 => { + trace!( + "[{:?}] Ignoring invalid transaction when skipping: {}", + pending_tx_hash, + e + ); + } Err(e) => { debug!("[{:?}] Invalid transaction: {}", pending_tx_hash, e); unqueue_invalid.push(pending_tx_hash); @@ -292,10 +299,10 @@ mod tests { use super::*; use parking_lot::Mutex; - use sp_consensus::Proposer; + use sp_consensus::{BlockOrigin, Proposer}; use substrate_test_runtime_client::{ - runtime::{Extrinsic, Transfer}, AccountKeyring, DefaultTestClientBuilderExt, - TestClientBuilderExt, + prelude::*, + runtime::{Extrinsic, Transfer}, }; use sc_transaction_pool::{BasicPool, FullChainApi}; use sp_api::Core; @@ -395,4 +402,73 @@ mod tests { storage_changes.transaction_storage_root, ); } + + #[test] + fn should_not_remove_invalid_transactions_when_skipping() { + // given + let mut client = Arc::new(substrate_test_runtime_client::new()); + let txpool = Arc::new( + BasicPool::new(Default::default(), Arc::new(FullChainApi::new(client.clone()))).0 + ); + + futures::executor::block_on( + txpool.submit_at(&BlockId::number(0), vec![ + extrinsic(0), + extrinsic(1), + Transfer { + amount: Default::default(), + nonce: 2, + from: AccountKeyring::Alice.into(), + to: Default::default(), + }.into_resources_exhausting_tx(), + extrinsic(3), + Transfer { + amount: Default::default(), + nonce: 4, + from: AccountKeyring::Alice.into(), + to: Default::default(), + }.into_resources_exhausting_tx(), + extrinsic(5), + extrinsic(6), + ]) + ).unwrap(); + + let mut proposer_factory = ProposerFactory::new(client.clone(), txpool.clone()); + let mut propose_block = | + client: &TestClient, + number, + expected_block_extrinsics, + expected_pool_transactions, + | { + let mut proposer = proposer_factory.init_with_now( + &client.header(&BlockId::number(number)).unwrap().unwrap(), + Box::new(move || time::Instant::now()), + ); + + // when + let deadline = time::Duration::from_secs(9); + let block = futures::executor::block_on( + proposer.propose(Default::default(), Default::default(), deadline, RecordProof::No) + ).map(|r| r.block).unwrap(); + + // then + // block should have some extrinsics although we have some more in the pool. + assert_eq!(block.extrinsics().len(), expected_block_extrinsics); + assert_eq!(txpool.ready().count(), expected_pool_transactions); + + block + }; + + // let's create one block and import it + let block = propose_block(&client, 0, 2, 7); + client.import(BlockOrigin::Own, block).unwrap(); + + // now let's make sure that we can still make some progress + + // This is most likely incorrect, and caused by #5139 + let tx_remaining = 0; + let block = propose_block(&client, 1, 2, tx_remaining); + client.import(BlockOrigin::Own, block).unwrap(); + } } + diff --git a/client/transaction-pool/graph/benches/basics.rs b/client/transaction-pool/graph/benches/basics.rs index 54bbe930b39..6f5d39f09f5 100644 --- a/client/transaction-pool/graph/benches/basics.rs +++ b/client/transaction-pool/graph/benches/basics.rs @@ -113,7 +113,11 @@ impl ChainApi for TestApi { } fn uxt(transfer: Transfer) -> Extrinsic { - Extrinsic::Transfer(transfer, Default::default()) + Extrinsic::Transfer { + transfer, + signature: Default::default(), + exhaust_resources_when_not_first: false, + } } fn bench_configured(pool: Pool, number: u64) { diff --git a/client/transaction-pool/graph/src/pool.rs b/client/transaction-pool/graph/src/pool.rs index 12601bb8d21..f0bf17dcb8d 100644 --- a/client/transaction-pool/graph/src/pool.rs +++ b/client/transaction-pool/graph/src/pool.rs @@ -524,7 +524,11 @@ mod tests { } fn uxt(transfer: Transfer) -> Extrinsic { - Extrinsic::Transfer(transfer, Default::default()) + Extrinsic::Transfer { + transfer, + signature: Default::default(), + exhaust_resources_when_not_first: false, + } } fn pool() -> Pool { diff --git a/test-utils/runtime/src/lib.rs b/test-utils/runtime/src/lib.rs index 497de36c8b7..5ddeff39010 100644 --- a/test-utils/runtime/src/lib.rs +++ b/test-utils/runtime/src/lib.rs @@ -101,7 +101,25 @@ impl Transfer { pub fn into_signed_tx(self) -> Extrinsic { let signature = sp_keyring::AccountKeyring::from_public(&self.from) .expect("Creates keyring from public key.").sign(&self.encode()).into(); - Extrinsic::Transfer(self, signature) + Extrinsic::Transfer { + transfer: self, + signature, + exhaust_resources_when_not_first: false, + } + } + + /// Convert into a signed extrinsic, which will only end up included in the block + /// if it's the first transaction. Otherwise it will cause `ResourceExhaustion` error + /// which should be considered as block being full. + #[cfg(feature = "std")] + pub fn into_resources_exhausting_tx(self) -> Extrinsic { + let signature = sp_keyring::AccountKeyring::from_public(&self.from) + .expect("Creates keyring from public key.").sign(&self.encode()).into(); + Extrinsic::Transfer { + transfer: self, + signature, + exhaust_resources_when_not_first: true, + } } } @@ -109,7 +127,11 @@ impl Transfer { #[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug)] pub enum Extrinsic { AuthoritiesChange(Vec), - Transfer(Transfer, AccountSignature), + Transfer { + transfer: Transfer, + signature: AccountSignature, + exhaust_resources_when_not_first: bool, + }, IncludeData(Vec), StorageChange(Vec, Option>), ChangesTrieConfigUpdate(Option), @@ -130,9 +152,9 @@ impl BlindCheckable for Extrinsic { fn check(self, _signature: CheckSignature) -> Result { match self { Extrinsic::AuthoritiesChange(new_auth) => Ok(Extrinsic::AuthoritiesChange(new_auth)), - Extrinsic::Transfer(transfer, signature) => { + Extrinsic::Transfer { transfer, signature, exhaust_resources_when_not_first } => { if sp_runtime::verify_encoded_lazy(&signature, &transfer, &transfer.from) { - Ok(Extrinsic::Transfer(transfer, signature)) + Ok(Extrinsic::Transfer { transfer, signature, exhaust_resources_when_not_first }) } else { Err(InvalidTransaction::BadProof.into()) } @@ -165,7 +187,7 @@ impl ExtrinsicT for Extrinsic { impl Extrinsic { pub fn transfer(&self) -> &Transfer { match self { - Extrinsic::Transfer(ref transfer, _) => transfer, + Extrinsic::Transfer { ref transfer, .. } => transfer, _ => panic!("cannot convert to transfer ref"), } } diff --git a/test-utils/runtime/src/system.rs b/test-utils/runtime/src/system.rs index 9eb501c4c89..4ce774598f3 100644 --- a/test-utils/runtime/src/system.rs +++ b/test-utils/runtime/src/system.rs @@ -192,7 +192,7 @@ pub fn validate_transaction(utx: Extrinsic) -> TransactionValidity { /// This doesn't attempt to validate anything regarding the block. pub fn execute_transaction(utx: Extrinsic) -> ApplyExtrinsicResult { let extrinsic_index: u32 = storage::unhashed::get(well_known_keys::EXTRINSIC_INDEX).unwrap(); - let result = execute_transaction_backend(&utx); + let result = execute_transaction_backend(&utx, extrinsic_index); ExtrinsicData::insert(extrinsic_index, utx.encode()); storage::unhashed::put(well_known_keys::EXTRINSIC_INDEX, &(extrinsic_index + 1)); result @@ -237,7 +237,7 @@ pub fn finalize_block() -> Header { extrinsics_root, state_root: storage_root, parent_hash, - digest: digest, + digest, } } @@ -247,13 +247,18 @@ fn check_signature(utx: &Extrinsic) -> Result<(), TransactionValidityError> { utx.clone().check(CheckSignature::Yes).map_err(|_| InvalidTransaction::BadProof.into()).map(|_| ()) } -fn execute_transaction_backend(utx: &Extrinsic) -> ApplyExtrinsicResult { +fn execute_transaction_backend(utx: &Extrinsic, extrinsic_index: u32) -> ApplyExtrinsicResult { check_signature(utx)?; match utx { - Extrinsic::Transfer(ref transfer, _) => execute_transfer_backend(transfer), - Extrinsic::AuthoritiesChange(ref new_auth) => execute_new_authorities_backend(new_auth), + Extrinsic::Transfer { exhaust_resources_when_not_first: true, .. } if extrinsic_index != 0 => + Err(InvalidTransaction::ExhaustsResources.into()), + Extrinsic::Transfer { ref transfer, .. } => + execute_transfer_backend(transfer), + Extrinsic::AuthoritiesChange(ref new_auth) => + execute_new_authorities_backend(new_auth), Extrinsic::IncludeData(_) => Ok(Ok(())), - Extrinsic::StorageChange(key, value) => execute_storage_change(key, value.as_ref().map(|v| &**v)), + Extrinsic::StorageChange(key, value) => + execute_storage_change(key, value.as_ref().map(|v| &**v)), Extrinsic::ChangesTrieConfigUpdate(ref new_config) => execute_changes_trie_config_update(new_config.clone()), } diff --git a/test-utils/runtime/transaction-pool/src/lib.rs b/test-utils/runtime/transaction-pool/src/lib.rs index aedc7dc4c37..8cd4e58954b 100644 --- a/test-utils/runtime/transaction-pool/src/lib.rs +++ b/test-utils/runtime/transaction-pool/src/lib.rs @@ -265,7 +265,7 @@ pub fn uxt(who: AccountKeyring, nonce: Index) -> Extrinsic { nonce, amount: 1, }; - let signature = transfer.using_encoded(|e| who.sign(e)); - Extrinsic::Transfer(transfer, signature.into()) + let signature = transfer.using_encoded(|e| who.sign(e)).into(); + Extrinsic::Transfer { transfer, signature, exhaust_resources_when_not_first: false } } -- GitLab From 870436e9fd83376dd61edcd65eff8d1670a81e32 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 17:00:44 +0100 Subject: [PATCH 100/106] remove derivation of debug in no_std (#5146) --- frame/staking/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/staking/src/lib.rs b/frame/staking/src/lib.rs index 612efecea16..2dc377c55af 100644 --- a/frame/staking/src/lib.rs +++ b/frame/staking/src/lib.rs @@ -300,7 +300,7 @@ pub type EraIndex = u32; pub type RewardPoint = u32; /// Information regarding the active era (era in used in session). -#[derive(Encode, Decode, Debug)] +#[derive(Encode, Decode, RuntimeDebug)] pub struct ActiveEraInfo { /// Index of era. index: EraIndex, @@ -314,7 +314,7 @@ pub struct ActiveEraInfo { /// Reward points of an era. Used to split era total payout between validators. /// /// This points will be used to reward validators and their respective nominators. -#[derive(PartialEq, Encode, Decode, Default, Debug)] +#[derive(PartialEq, Encode, Decode, Default, RuntimeDebug)] pub struct EraRewardPoints { /// Total number of points. Equals the sum of reward points for each validator. total: RewardPoint, -- GitLab From 027756ea80b81c71410da3fb751ae99cc3173b34 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 17:01:24 +0100 Subject: [PATCH 101/106] Add more prometheus metrics to `network::Protocol`. (#5145) --- client/network/src/protocol.rs | 145 +++++++++++++++++- client/network/src/protocol/sync.rs | 21 +++ .../src/protocol/sync/extra_requests.rs | 21 +++ client/network/src/service.rs | 5 +- 4 files changed, 189 insertions(+), 3 deletions(-) diff --git a/client/network/src/protocol.rs b/client/network/src/protocol.rs index 5d7adfdcc3f..c19a230769c 100644 --- a/client/network/src/protocol.rs +++ b/client/network/src/protocol.rs @@ -38,6 +38,7 @@ use sp_arithmetic::traits::SaturatedConversion; use message::{BlockAnnounce, BlockAttributes, Direction, FromBlock, Message, RequestId}; use message::generic::Message as GenericMessage; use light_dispatch::{LightDispatch, LightDispatchNetwork, RequestData}; +use prometheus_endpoint::{Registry, Gauge, register, PrometheusError, U64}; use sync::{ChainSync, SyncState}; use crate::service::{TransactionPool, ExHashT}; use crate::config::{BoxFinalityProofRequestBuilder, Roles}; @@ -135,6 +136,105 @@ mod rep { pub const BAD_RESPONSE: Rep = Rep::new(-(1 << 12), "Incomplete response"); } +struct Metrics { + handshaking_peers: Gauge, + obsolete_requests: Gauge, + peers: Gauge, + queued_blocks: Gauge, + fork_targets: Gauge, + finality_proofs_pending: Gauge, + finality_proofs_active: Gauge, + finality_proofs_failed: Gauge, + finality_proofs_importing: Gauge, + justifications_pending: Gauge, + justifications_active: Gauge, + justifications_failed: Gauge, + justifications_importing: Gauge +} + +impl Metrics { + fn register(r: &Registry) -> Result { + Ok(Metrics { + handshaking_peers: { + let g = Gauge::new("sync_handshaking_peers", "number of newly connected peers")?; + register(g, r)? + }, + obsolete_requests: { + let g = Gauge::new("sync_obsolete_requests", "total number of obsolete requests")?; + register(g, r)? + }, + peers: { + let g = Gauge::new("sync_peers", "number of peers we sync with")?; + register(g, r)? + }, + queued_blocks: { + let g = Gauge::new("sync_queued_blocks", "number of blocks in import queue")?; + register(g, r)? + }, + fork_targets: { + let g = Gauge::new("sync_fork_targets", "fork sync targets")?; + register(g, r)? + }, + justifications_pending: { + let g = Gauge::new( + "sync_extra_justifications_pending", + "number of pending extra justifications requests" + )?; + register(g, r)? + }, + justifications_active: { + let g = Gauge::new( + "sync_extra_justifications_active", + "number of active extra justifications requests" + )?; + register(g, r)? + }, + justifications_failed: { + let g = Gauge::new( + "sync_extra_justifications_failed", + "number of failed extra justifications requests" + )?; + register(g, r)? + }, + justifications_importing: { + let g = Gauge::new( + "sync_extra_justifications_importing", + "number of importing extra justifications requests" + )?; + register(g, r)? + }, + finality_proofs_pending: { + let g = Gauge::new( + "sync_extra_finality_proofs_pending", + "number of pending extra finality proof requests" + )?; + register(g, r)? + }, + finality_proofs_active: { + let g = Gauge::new( + "sync_extra_finality_proofs_active", + "number of active extra finality proof requests" + )?; + register(g, r)? + }, + finality_proofs_failed: { + let g = Gauge::new( + "sync_extra_finality_proofs_failed", + "number of failed extra finality proof requests" + )?; + register(g, r)? + }, + finality_proofs_importing: { + let g = Gauge::new( + "sync_extra_finality_proofs_importing", + "number of importing extra finality proof requests" + )?; + register(g, r)? + }, + }) + } +} + // Lock must always be taken in order declared here. pub struct Protocol { /// Interval at which we call `tick`. @@ -163,6 +263,8 @@ pub struct Protocol { protocol_name_by_engine: HashMap>, /// For each protocol name, the legacy gossiping engine ID. protocol_engine_by_name: HashMap, ConsensusEngineId>, + /// Prometheus metrics. + metrics: Option, } #[derive(Default)] @@ -371,7 +473,8 @@ impl Protocol { finality_proof_request_builder: Option>, protocol_id: ProtocolId, peerset_config: sc_peerset::PeersetConfig, - block_announce_validator: Box + Send> + block_announce_validator: Box + Send>, + metrics_registry: Option<&Registry> ) -> error::Result<(Protocol, sc_peerset::PeersetHandle)> { let info = chain.info(); let sync = ChainSync::new( @@ -416,6 +519,11 @@ impl Protocol { behaviour, protocol_name_by_engine: HashMap::new(), protocol_engine_by_name: HashMap::new(), + metrics: if let Some(r) = metrics_registry { + Some(Metrics::register(r)?) + } else { + None + } }; Ok((protocol, peerset_handle)) @@ -859,6 +967,7 @@ impl Protocol { behaviour: &mut self.behaviour, peerset: self.peerset_handle.clone(), }); + self.report_metrics() } fn maintain_peers(&mut self) { @@ -1767,6 +1876,40 @@ impl Protocol { } out } + + fn report_metrics(&self) { + use std::convert::TryInto; + + if let Some(metrics) = &self.metrics { + let mut obsolete_requests: u64 = 0; + for peer in self.context_data.peers.values() { + let n = peer.obsolete_requests.len().try_into().unwrap_or(std::u64::MAX); + obsolete_requests = obsolete_requests.saturating_add(n); + } + metrics.obsolete_requests.set(obsolete_requests); + + let n = self.handshaking_peers.len().try_into().unwrap_or(std::u64::MAX); + metrics.handshaking_peers.set(n); + + let n = self.context_data.peers.len().try_into().unwrap_or(std::u64::MAX); + metrics.peers.set(n); + + let m = self.sync.metrics(); + + metrics.fork_targets.set(m.fork_targets.into()); + metrics.queued_blocks.set(m.queued_blocks.into()); + + metrics.justifications_pending.set(m.justifications.pending_requests.into()); + metrics.justifications_active.set(m.justifications.active_requests.into()); + metrics.justifications_failed.set(m.justifications.failed_requests.into()); + metrics.justifications_importing.set(m.justifications.importing_requests.into()); + + metrics.finality_proofs_pending.set(m.finality_proofs.pending_requests.into()); + metrics.finality_proofs_active.set(m.finality_proofs.active_requests.into()); + metrics.finality_proofs_failed.set(m.finality_proofs.failed_requests.into()); + metrics.finality_proofs_importing.set(m.finality_proofs.importing_requests.into()); + } + } } /// Outcome of an incoming custom message. diff --git a/client/network/src/protocol/sync.rs b/client/network/src/protocol/sync.rs index d0427e61a81..04afc5d9184 100644 --- a/client/network/src/protocol/sync.rs +++ b/client/network/src/protocol/sync.rs @@ -1202,6 +1202,27 @@ impl ChainSync { fn is_already_downloading(&self, hash: &B::Hash) -> bool { self.peers.iter().any(|(_, p)| p.state == PeerSyncState::DownloadingStale(*hash)) } + + /// Return some key metrics. + pub(crate) fn metrics(&self) -> Metrics { + use std::convert::TryInto; + Metrics { + queued_blocks: self.queue_blocks.len().try_into().unwrap_or(std::u32::MAX), + fork_targets: self.fork_targets.len().try_into().unwrap_or(std::u32::MAX), + finality_proofs: self.extra_finality_proofs.metrics(), + justifications: self.extra_justifications.metrics(), + _priv: () + } + } +} + +#[derive(Debug)] +pub(crate) struct Metrics { + pub(crate) queued_blocks: u32, + pub(crate) fork_targets: u32, + pub(crate) finality_proofs: extra_requests::Metrics, + pub(crate) justifications: extra_requests::Metrics, + _priv: () } /// Request the ancestry for a block. Sends a request for header and justification for the given diff --git a/client/network/src/protocol/sync/extra_requests.rs b/client/network/src/protocol/sync/extra_requests.rs index 38c250cddf2..81b12a1a704 100644 --- a/client/network/src/protocol/sync/extra_requests.rs +++ b/client/network/src/protocol/sync/extra_requests.rs @@ -53,6 +53,15 @@ pub(crate) struct ExtraRequests { request_type_name: &'static str, } +#[derive(Debug)] +pub(crate) struct Metrics { + pub(crate) pending_requests: u32, + pub(crate) active_requests: u32, + pub(crate) importing_requests: u32, + pub(crate) failed_requests: u32, + _priv: () +} + impl ExtraRequests { pub(crate) fn new(request_type_name: &'static str) -> Self { ExtraRequests { @@ -240,6 +249,18 @@ impl ExtraRequests { pub(crate) fn pending_requests(&self) -> impl Iterator> { self.pending_requests.iter() } + + /// Get some key metrics. + pub(crate) fn metrics(&self) -> Metrics { + use std::convert::TryInto; + Metrics { + pending_requests: self.pending_requests.len().try_into().unwrap_or(std::u32::MAX), + active_requests: self.active_requests.len().try_into().unwrap_or(std::u32::MAX), + failed_requests: self.failed_requests.len().try_into().unwrap_or(std::u32::MAX), + importing_requests: self.importing_requests.len().try_into().unwrap_or(std::u32::MAX), + _priv: () + } + } } /// Matches peers with pending extra requests. diff --git a/client/network/src/service.rs b/client/network/src/service.rs index 821847add1d..5c618ac4eca 100644 --- a/client/network/src/service.rs +++ b/client/network/src/service.rs @@ -210,7 +210,8 @@ impl NetworkWorker { params.finality_proof_request_builder, params.protocol_id.clone(), peerset_config, - params.block_announce_validator + params.block_announce_validator, + params.metrics_registry.as_ref() )?; // Build the swarm. @@ -858,7 +859,7 @@ impl Future for NetworkWorker { }; this.is_major_syncing.store(is_major_syncing, Ordering::Relaxed); - + if let Some(metrics) = this.metrics.as_ref() { metrics.is_major_syncing.set(is_major_syncing as u64); metrics.peers_count.set(num_connected_peers as u64); -- GitLab From bb1b68d2dcdc7a8a0b6311eb2b4ac1fb88aa004f Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 17:01:36 +0100 Subject: [PATCH 102/106] Remove substrate-ui.parity.io from CORS whitelist (#5142) The only up-to-date deployment of PolkadotJS apps is currently on https://polkadot.js.org/apps/. https://substrate-ui.parity.io is only useful as deliberately kept outdated version of Apps, to be used for projects still on Substrate 1.0 It cannot be used with the up-to-date chains running the Substrate 2.0 codebase, and probably won't be maintained much longer. --- client/cli/src/commands/runcmd.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/cli/src/commands/runcmd.rs b/client/cli/src/commands/runcmd.rs index 0ad6fefcce8..2a070b27b8b 100644 --- a/client/cli/src/commands/runcmd.rs +++ b/client/cli/src/commands/runcmd.rs @@ -140,9 +140,8 @@ pub struct RunCmd { /// /// A comma-separated list of origins (protocol://domain or special `null` /// value). Value of `all` will disable origin validation. Default is to - /// allow localhost, https://polkadot.js.org and - /// https://substrate-ui.parity.io origins. When running in --dev mode the - /// default is to allow all origins. + /// allow localhost and https://polkadot.js.org origins. When running in + /// --dev mode the default is to allow all origins. #[structopt(long = "rpc-cors", value_name = "ORIGINS", parse(try_from_str = parse_cors))] pub rpc_cors: Option, @@ -408,7 +407,6 @@ impl RunCmd { "https://localhost:*".into(), "https://127.0.0.1:*".into(), "https://polkadot.js.org".into(), - "https://substrate-ui.parity.io".into(), ]) }).into(); -- GitLab From fca34f6180522724e318f14a32980102e6199958 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 17:01:52 +0100 Subject: [PATCH 103/106] Remove `Backend::destroy_state` (#5068) * Remove `Backend::destroy_state` This removes the `destroy_state` function of `Backend` and instead moves the functionality into the `Drop` implementation of the state. This makes it much easier to work with the state, as the user no longer needs to call` destroy_state` manually. However, it requires that we switch from `RwLock` to `ReentrantMutex` as while importing a block we maybe need to lock again in `drop`. * Bring back the `RwLock` and some other clean ups * Fix compilation --- client/api/src/backend.rs | 5 - client/block-builder/src/lib.rs | 10 +- client/db/src/lib.rs | 92 ++++++++---- client/db/src/stats.rs | 16 ++- client/db/src/storage_cache.rs | 247 +++++++++++++++++++++++++++++--- client/src/call_executor.rs | 34 ++--- client/src/client.rs | 14 +- 7 files changed, 318 insertions(+), 100 deletions(-) diff --git a/client/api/src/backend.rs b/client/api/src/backend.rs index 808ca7a870a..d10e62cc549 100644 --- a/client/api/src/backend.rs +++ b/client/api/src/backend.rs @@ -420,11 +420,6 @@ pub trait Backend: AuxStore + Send + Sync { /// Returns state backend with post-state of given block. fn state_at(&self, block: BlockId) -> sp_blockchain::Result; - /// Destroy state and save any useful data, such as cache. - fn destroy_state(&self, _state: Self::State) -> sp_blockchain::Result<()> { - Ok(()) - } - /// Attempts to revert the chain by `n` blocks. If `revert_finalized` is set /// it will attempt to revert past any finalized block, this is unsafe and /// can potentially leave the node in an inconsistent state. diff --git a/client/block-builder/src/lib.rs b/client/block-builder/src/lib.rs index 9695fddf869..2666fd9cd71 100644 --- a/client/block-builder/src/lib.rs +++ b/client/block-builder/src/lib.rs @@ -224,17 +224,11 @@ where &state, changes_trie_state.as_ref(), parent_hash, - ); - - // We need to destroy the state, before we check if `storage_changes` is `Ok(_)` - { - let _lock = self.backend.get_import_lock().read(); - self.backend.destroy_state(state)?; - } + )?; Ok(BuiltBlock { block: ::new(header, self.extrinsics), - storage_changes: storage_changes?, + storage_changes, proof, }) } diff --git a/client/db/src/lib.rs b/client/db/src/lib.rs index eed1fc0e1d9..746c73bea28 100644 --- a/client/db/src/lib.rs +++ b/client/db/src/lib.rs @@ -80,7 +80,7 @@ use crate::changes_tries_storage::{DbChangesTrieStorage, DbChangesTrieStorageTra use sc_client::leaves::{LeafSet, FinalizationDisplaced}; use sc_state_db::StateDb; use sp_blockchain::{CachedHeaderMetadata, HeaderMetadata, HeaderMetadataCache}; -use crate::storage_cache::{CachingState, SharedCache, new_shared_cache}; +use crate::storage_cache::{CachingState, SyncingCachingState, SharedCache, new_shared_cache}; use crate::stats::StateUsageStats; use log::{trace, debug, warn}; pub use sc_state_db::PruningMode; @@ -523,7 +523,7 @@ impl HeaderMetadata for BlockchainDb { /// Database transaction pub struct BlockImportOperation { - old_state: CachingState, Block>, + old_state: SyncingCachingState, Block>, db_updates: PrefixedMemoryDB>, storage_updates: StorageCollection, child_storage_updates: ChildStorageCollection, @@ -549,7 +549,7 @@ impl BlockImportOperation { } impl sc_client_api::backend::BlockImportOperation for BlockImportOperation { - type State = CachingState, Block>; + type State = SyncingCachingState, Block>; fn state(&self) -> ClientResult> { Ok(Some(&self.old_state)) @@ -755,10 +755,10 @@ pub struct Backend { blockchain: BlockchainDb, canonicalization_delay: u64, shared_cache: SharedCache, - import_lock: RwLock<()>, + import_lock: Arc>, is_archive: bool, io_stats: FrozenForDuration<(kvdb::IoStats, StateUsageInfo)>, - state_usage: StateUsageStats, + state_usage: Arc, } impl Backend { @@ -830,7 +830,7 @@ impl Backend { import_lock: Default::default(), is_archive: is_archive_pruning, io_stats: FrozenForDuration::new(std::time::Duration::from_secs(1)), - state_usage: StateUsageStats::new(), + state_usage: Arc::new(StateUsageStats::new()), }) } @@ -1132,8 +1132,14 @@ impl Backend { self.state_usage.tally_writes(ops, bytes); let number_u64 = number.saturated_into::(); - let commit = self.storage.state_db.insert_block(&hash, number_u64, &pending_block.header.parent_hash(), changeset) - .map_err(|e: sc_state_db::Error| sp_blockchain::Error::from(format!("State database error: {:?}", e)))?; + let commit = self.storage.state_db.insert_block( + &hash, + number_u64, + &pending_block.header.parent_hash(), + changeset, + ).map_err(|e: sc_state_db::Error| + sp_blockchain::Error::from(format!("State database error: {:?}", e)) + )?; apply_state_commit(&mut transaction, commit); // Check if need to finalize. Genesis is always finalized instantly. @@ -1161,7 +1167,8 @@ impl Backend { changes_trie_cache_ops, )?); self.state_usage.merge_sm(operation.old_state.usage_info()); - let cache = operation.old_state.release(); // release state reference so that it can be finalized + // release state reference so that it can be finalized + let cache = operation.old_state.into_cache_changes(); if finalized { // TODO: ensure best chain contains this block. @@ -1189,9 +1196,20 @@ impl Backend { displaced_leaf }; - let mut children = children::read_children(&*self.storage.db, columns::META, meta_keys::CHILDREN_PREFIX, parent_hash)?; + let mut children = children::read_children( + &*self.storage.db, + columns::META, + meta_keys::CHILDREN_PREFIX, + parent_hash, + )?; children.push(hash); - children::write_children(&mut transaction, columns::META, meta_keys::CHILDREN_PREFIX, parent_hash, children); + children::write_children( + &mut transaction, + columns::META, + meta_keys::CHILDREN_PREFIX, + parent_hash, + children, + ); meta_updates.push((hash, number, pending_block.leaf_state.is_best(), finalized)); @@ -1201,7 +1219,7 @@ impl Backend { }; let cache_update = if let Some(set_head) = operation.set_head { - if let Some(header) = ::sc_client::blockchain::HeaderBackend::header(&self.blockchain, set_head)? { + if let Some(header) = sc_client::blockchain::HeaderBackend::header(&self.blockchain, set_head)? { let number = header.number(); let hash = header.hash(); @@ -1271,7 +1289,6 @@ impl Backend { Ok(()) } - // write stuff to a transaction after a new block is finalized. // this canonicalizes finalized blocks. Fails if called with a block which // was not a child of the last finalized block. @@ -1359,11 +1376,13 @@ impl sc_client_api::backend::AuxStore for Backend where Block: Blo impl sc_client_api::backend::Backend for Backend { type BlockImportOperation = BlockImportOperation; type Blockchain = BlockchainDb; - type State = CachingState, Block>; + type State = SyncingCachingState, Block>; type OffchainStorage = offchain::LocalStorage; fn begin_operation(&self) -> ClientResult { - let old_state = self.state_at(BlockId::Hash(Default::default()))?; + let mut old_state = self.state_at(BlockId::Hash(Default::default()))?; + old_state.disable_syncing(); + Ok(BlockImportOperation { pending_block: None, old_state, @@ -1386,13 +1405,13 @@ impl sc_client_api::backend::Backend for Backend { block: BlockId, ) -> ClientResult<()> { operation.old_state = self.state_at(block)?; + operation.old_state.disable_syncing(); + operation.commit_state = true; Ok(()) } - fn commit_operation(&self, operation: Self::BlockImportOperation) - -> ClientResult<()> - { + fn commit_operation(&self, operation: Self::BlockImportOperation) -> ClientResult<()> { let usage = operation.old_state.usage_info(); self.state_usage.merge_sm(usage); @@ -1452,7 +1471,6 @@ impl sc_client_api::backend::Backend for Backend { Some(self.offchain_storage.clone()) } - fn usage_info(&self) -> Option { let (io_stats, state_stats) = self.io_stats.take_or_else(|| ( @@ -1577,7 +1595,17 @@ impl sc_client_api::backend::Backend for Backend { let root = genesis_storage.0.clone(); let db_state = DbState::::new(Arc::new(genesis_storage), root); let state = RefTrackingState::new(db_state, self.storage.clone(), None); - return Ok(CachingState::new(state, self.shared_cache.clone(), None)); + let caching_state = CachingState::new( + state, + self.shared_cache.clone(), + None, + ); + return Ok(SyncingCachingState::new( + caching_state, + self.state_usage.clone(), + self.blockchain.meta.clone(), + self.import_lock.clone(), + )); }, _ => {} } @@ -1600,7 +1628,17 @@ impl sc_client_api::backend::Backend for Backend { self.storage.clone(), Some(hash.clone()), ); - Ok(CachingState::new(state, self.shared_cache.clone(), Some(hash))) + let caching_state = CachingState::new( + state, + self.shared_cache.clone(), + Some(hash), + ); + Ok(SyncingCachingState::new( + caching_state, + self.state_usage.clone(), + self.blockchain.meta.clone(), + self.import_lock.clone(), + )) } else { Err( sp_blockchain::Error::UnknownBlock( @@ -1635,17 +1673,8 @@ impl sc_client_api::backend::Backend for Backend { } } - fn destroy_state(&self, state: Self::State) -> ClientResult<()> { - self.state_usage.merge_sm(state.usage_info()); - if let Some(hash) = state.cache.parent_hash.clone() { - let is_best = self.blockchain.meta.read().best_hash == hash; - state.release().sync_cache(&[], &[], vec![], vec![], None, None, is_best); - } - Ok(()) - } - fn get_import_lock(&self) -> &RwLock<()> { - &self.import_lock + &*self.import_lock } } @@ -1844,6 +1873,7 @@ pub(crate) mod tests { op.update_db_storage(overlay).unwrap(); header.state_root = root.into(); + op.update_storage(storage, Vec::new()).unwrap(); op.set_block_data( header, Some(vec![]), diff --git a/client/db/src/stats.rs b/client/db/src/stats.rs index 805a0f498f7..1d6ed8e7f04 100644 --- a/client/db/src/stats.rs +++ b/client/db/src/stats.rs @@ -59,8 +59,14 @@ impl StateUsageStats { } /// Tally one child key read. - pub fn tally_child_key_read(&self, key: &(Vec, Vec), val: Option>, cache: bool) -> Option> { - self.tally_read(key.0.len() as u64 + key.1.len() as u64 + val.as_ref().map(|x| x.len() as u64).unwrap_or(0), cache); + pub fn tally_child_key_read( + &self, + key: &(Vec, Vec), + val: Option>, + cache: bool, + ) -> Option> { + let bytes = key.0.len() + key.1.len() + val.as_ref().map(|x| x.len()).unwrap_or(0); + self.tally_read(bytes as u64, cache); val } @@ -80,11 +86,15 @@ impl StateUsageStats { self.bytes_read_cache.fetch_add(info.cache_reads.bytes, AtomicOrdering::Relaxed); } + /// Returns the collected `UsageInfo` and resets the internal state. pub fn take(&self) -> sp_state_machine::UsageInfo { use sp_state_machine::UsageUnit; fn unit(ops: &AtomicU64, bytes: &AtomicU64) -> UsageUnit { - UsageUnit { ops: ops.swap(0, AtomicOrdering::Relaxed), bytes: bytes.swap(0, AtomicOrdering::Relaxed) } + UsageUnit { + ops: ops.swap(0, AtomicOrdering::Relaxed), + bytes: bytes.swap(0, AtomicOrdering::Relaxed), + } } sp_state_machine::UsageInfo { diff --git a/client/db/src/storage_cache.rs b/client/db/src/storage_cache.rs index 6f289369e2e..2ac1ee3dbd5 100644 --- a/client/db/src/storage_cache.rs +++ b/client/db/src/storage_cache.rs @@ -18,6 +18,7 @@ use std::collections::{VecDeque, HashSet, HashMap}; use std::sync::Arc; +use std::hash::Hash as StdHash; use parking_lot::{Mutex, RwLock, RwLockUpgradableReadGuard}; use linked_hash_map::{LinkedHashMap, Entry}; use hash_db::Hasher; @@ -29,8 +30,7 @@ use sp_state_machine::{ StorageCollection, ChildStorageCollection, }; use log::trace; -use std::hash::Hash as StdHash; -use crate::stats::StateUsageStats; +use crate::{utils::Meta, stats::StateUsageStats}; const STATE_CACHE_BLOCKS: usize = 12; @@ -296,16 +296,16 @@ pub struct CacheChanges { /// For canonical instances local cache is accumulated and applied /// in `sync_cache` along with the change overlay. /// For non-canonical clones local cache and changes are dropped. -pub struct CachingState>, B: BlockT> { +pub struct CachingState { /// Usage statistics usage: StateUsageStats, /// Backing state. state: S, /// Cache data. - pub cache: CacheChanges, + cache: CacheChanges, } -impl>, B: BlockT> std::fmt::Debug for CachingState { +impl std::fmt::Debug for CachingState { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "Block {:?}", self.cache.parent_hash) } @@ -417,12 +417,15 @@ impl CacheChanges { } } } - } impl>, B: BlockT> CachingState { /// Create a new instance wrapping generic State and shared cache. - pub fn new(state: S, shared_cache: SharedCache, parent_hash: Option) -> Self { + pub(crate) fn new( + state: S, + shared_cache: SharedCache, + parent_hash: Option, + ) -> Self { CachingState { usage: StateUsageStats::new(), state, @@ -433,7 +436,7 @@ impl>, B: BlockT> CachingState { hashes: Default::default(), child_storage: Default::default(), }), - parent_hash: parent_hash, + parent_hash, }, } } @@ -445,8 +448,7 @@ impl>, B: BlockT> CachingState { child_key: Option<&ChildStorageKey>, parent_hash: &Option, modifications: &VecDeque> - ) -> bool - { + ) -> bool { let mut parent = match *parent_hash { None => { trace!("Cache lookup skipped for {:?}: no parent hash", key.as_ref().map(HexDisplay::from)); @@ -479,14 +481,12 @@ impl>, B: BlockT> CachingState { } } } - trace!("Cache lookup skipped for {:?}: parent hash is unknown", key.as_ref().map(HexDisplay::from)); + trace!( + "Cache lookup skipped for {:?}: parent hash is unknown", + key.as_ref().map(HexDisplay::from), + ); false } - - /// Dispose state and return cache data. - pub fn release(self) -> CacheChanges { - self.cache - } } impl>, B: BlockT> StateBackend> for CachingState { @@ -668,6 +668,213 @@ impl>, B: BlockT> StateBackend> for Cachin } } +/// Extended [`CachingState`] that will sync the caches on drop. +pub struct SyncingCachingState { + /// The usage statistics of the backend. These will be updated on drop. + state_usage: Arc, + /// Reference to the meta db. + meta: Arc, Block::Hash>>>, + /// Mutex to lock get exlusive access to the backend. + lock: Arc>, + /// The wrapped caching state. + /// + /// This is required to be a `Option`, because sometimes we want to extract + /// the cache changes and Rust does not allow to move fields from types that + /// implement `Drop`. + caching_state: Option>, + /// Disable syncing of the cache. This is by default always `false`. However, + /// we need to disable syncing when this is a state in a + /// [`BlockImportOperation`](crate::BlockImportOperation). The import operation + /// takes care to sync the cache and more importantly we want to prevent a dead + /// lock. + disable_syncing: bool, +} + +impl SyncingCachingState { + /// Create new automatic syncing state. + pub fn new( + caching_state: CachingState, + state_usage: Arc, + meta: Arc, B::Hash>>>, + lock: Arc>, + ) -> Self { + Self { + caching_state: Some(caching_state), + state_usage, + meta, + lock, + disable_syncing: false, + } + } + + /// Returns the reference to the internal [`CachingState`]. + fn caching_state(&self) -> &CachingState { + self.caching_state + .as_ref() + .expect("`caching_state` is always valid for the lifetime of the object; qed") + } + + /// Convert `Self` into the cache changes. + pub fn into_cache_changes(mut self) -> CacheChanges { + self.caching_state + .take() + .expect("`caching_state` is always valid for the lifetime of the object; qed") + .cache + } + + /// Disable syncing the cache on drop. + pub fn disable_syncing(&mut self) { + self.disable_syncing = true; + } +} + +impl std::fmt::Debug for SyncingCachingState { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + self.caching_state().fmt(f) + } +} + +impl>, B: BlockT> StateBackend> for SyncingCachingState { + type Error = S::Error; + type Transaction = S::Transaction; + type TrieBackendStorage = S::TrieBackendStorage; + + fn storage(&self, key: &[u8]) -> Result>, Self::Error> { + self.caching_state().storage(key) + } + + fn storage_hash(&self, key: &[u8]) -> Result, Self::Error> { + self.caching_state().storage_hash(key) + } + + fn child_storage( + &self, + storage_key: &[u8], + child_info: ChildInfo, + key: &[u8], + ) -> Result>, Self::Error> { + self.caching_state().child_storage(storage_key, child_info, key) + } + + fn exists_storage(&self, key: &[u8]) -> Result { + self.caching_state().exists_storage(key) + } + + fn exists_child_storage( + &self, + storage_key: &[u8], + child_info: ChildInfo, + key: &[u8], + ) -> Result { + self.caching_state().exists_child_storage(storage_key, child_info, key) + } + + fn for_keys_in_child_storage( + &self, + storage_key: &[u8], + child_info: ChildInfo, + f: F, + ) { + self.caching_state().for_keys_in_child_storage(storage_key, child_info, f) + } + + fn next_storage_key(&self, key: &[u8]) -> Result>, Self::Error> { + self.caching_state().next_storage_key(key) + } + + fn next_child_storage_key( + &self, + storage_key: &[u8], + child_info: ChildInfo, + key: &[u8], + ) -> Result>, Self::Error> { + self.caching_state().next_child_storage_key(storage_key, child_info, key) + } + + fn for_keys_with_prefix(&self, prefix: &[u8], f: F) { + self.caching_state().for_keys_with_prefix(prefix, f) + } + + fn for_key_values_with_prefix(&self, prefix: &[u8], f: F) { + self.caching_state().for_key_values_with_prefix(prefix, f) + } + + fn for_child_keys_with_prefix( + &self, + storage_key: &[u8], + child_info: ChildInfo, + prefix: &[u8], + f: F, + ) { + self.caching_state().for_child_keys_with_prefix(storage_key, child_info, prefix, f) + } + + fn storage_root(&self, delta: I) -> (B::Hash, Self::Transaction) + where + I: IntoIterator, Option>)>, + { + self.caching_state().storage_root(delta) + } + + fn child_storage_root( + &self, + storage_key: &[u8], + child_info: ChildInfo, + delta: I, + ) -> (B::Hash, bool, Self::Transaction) + where + I: IntoIterator, Option>)>, + { + self.caching_state().child_storage_root(storage_key, child_info, delta) + } + + fn pairs(&self) -> Vec<(Vec, Vec)> { + self.caching_state().pairs() + } + + fn keys(&self, prefix: &[u8]) -> Vec> { + self.caching_state().keys(prefix) + } + + fn child_keys( + &self, + storage_key: &[u8], + child_info: ChildInfo, + prefix: &[u8], + ) -> Vec> { + self.caching_state().child_keys(storage_key, child_info, prefix) + } + + fn as_trie_backend(&mut self) -> Option<&TrieBackend>> { + self.caching_state + .as_mut() + .expect("`caching_state` is valid for the lifetime of the object; qed") + .as_trie_backend() + } + + fn usage_info(&self) -> sp_state_machine::UsageInfo { + self.caching_state().usage_info() + } +} + +impl Drop for SyncingCachingState { + fn drop(&mut self) { + if self.disable_syncing { + return; + } + + if let Some(mut caching_state) = self.caching_state.take() { + let _lock = self.lock.read(); + + self.state_usage.merge_sm(caching_state.usage.take()); + if let Some(hash) = caching_state.cache.parent_hash.clone() { + let is_best = self.meta.read().best_hash == hash; + caching_state.cache.sync_cache(&[], &[], vec![], vec![], None, None, is_best); + } + } + } +} + #[cfg(test)] mod tests { use super::*; @@ -1258,7 +1465,7 @@ mod qc { CachingState::new( InMemoryBackend::::default(), self.shared.clone(), - Some(hash) + Some(hash), ) } @@ -1327,7 +1534,7 @@ mod qc { let mut state = CachingState::new( InMemoryBackend::::default(), self.shared.clone(), - Some(parent) + Some(parent), ); state.cache.sync_cache( @@ -1366,7 +1573,7 @@ mod qc { let mut state = CachingState::new( InMemoryBackend::::default(), self.shared.clone(), - Some(parent_hash) + Some(parent_hash), ); state.cache.sync_cache( @@ -1413,7 +1620,7 @@ mod qc { let mut state = CachingState::new( InMemoryBackend::::default(), self.shared.clone(), - Some(fork_at) + Some(fork_at), ); let height = pos as u64 + enacted.len() as u64 + 2; diff --git a/client/src/call_executor.rs b/client/src/call_executor.rs index 1fdbfe981a4..b5206d3c461 100644 --- a/client/src/call_executor.rs +++ b/client/src/call_executor.rs @@ -80,7 +80,6 @@ where let changes_trie = backend::changes_tries_state_at_block( id, self.backend.changes_trie_storage() )?; - // make sure to destroy state before exiting this function let state = self.backend.state_at(*id)?; let return_data = StateMachine::new( &state, @@ -93,12 +92,9 @@ where ).execute_using_consensus_failure_handler::<_, NeverNativeValue, fn() -> _>( strategy.get_manager(), None, - ); - { - let _lock = self.backend.get_import_lock().read(); - self.backend.destroy_state(state)?; - } - Ok(return_data?.into_encoded()) + )?; + + Ok(return_data.into_encoded()) } fn contextual_call< @@ -138,9 +134,8 @@ where let changes_trie_state = backend::changes_tries_state_at_block(at, self.backend.changes_trie_storage())?; let mut storage_transaction_cache = storage_transaction_cache.map(|c| c.borrow_mut()); - // make sure to destroy state before exiting this function let mut state = self.backend.state_at(*at)?; - let result = match recorder { + match recorder { Some(recorder) => state.as_trie_backend() .ok_or_else(|| Box::new(sp_state_machine::ExecutionError::UnableToGenerateProof) @@ -176,18 +171,15 @@ where ) .with_storage_transaction_cache(storage_transaction_cache.as_mut().map(|c| &mut **c)) .execute_using_consensus_failure_handler(execution_manager, native_call) - }; - { - let _lock = self.backend.get_import_lock().read(); - self.backend.destroy_state(state)?; - } - result.map_err(Into::into) + }.map_err(Into::into) } fn runtime_version(&self, id: &BlockId) -> sp_blockchain::Result { let mut overlay = OverlayedChanges::default(); - let changes_trie_state = backend::changes_tries_state_at_block(id, self.backend.changes_trie_storage())?; - // make sure to destroy state before exiting this function + let changes_trie_state = backend::changes_tries_state_at_block( + id, + self.backend.changes_trie_storage(), + )?; let state = self.backend.state_at(*id)?; let mut cache = StorageTransactionCache::::default(); let mut ext = Ext::new( @@ -197,12 +189,8 @@ where changes_trie_state, None, ); - let version = self.executor.runtime_version(&mut ext); - { - let _lock = self.backend.get_import_lock().read(); - self.backend.destroy_state(state)?; - } - version.map_err(|e| sp_blockchain::Error::VersionInvalid(format!("{:?}", e)).into()) + self.executor.runtime_version(&mut ext) + .map_err(|e| sp_blockchain::Error::VersionInvalid(format!("{:?}", e)).into()) } fn prove_at_trie_state>>( diff --git a/client/src/client.rs b/client/src/client.rs index c921d297012..699e3320ff4 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -830,15 +830,7 @@ impl Client where &state, changes_trie_state.as_ref(), *parent_hash, - ); - - { - let _lock = self.backend.get_import_lock().read(); - self.backend.destroy_state(state)?; - } - - // Make sure to consume the error, only after we have destroyed the state. - let gen_storage_changes = gen_storage_changes?; + )?; if import_block.header.state_root() != &gen_storage_changes.transaction_storage_root @@ -1792,7 +1784,9 @@ where fn best_block_header(&self) -> sp_blockchain::Result<::Header> { let info = self.backend.blockchain().info(); let import_lock = self.backend.get_import_lock(); - let best_hash = self.backend.blockchain().best_containing(info.best_hash, None, import_lock)? + let best_hash = self.backend + .blockchain() + .best_containing(info.best_hash, None, import_lock)? .unwrap_or(info.best_hash); Ok(self.backend.blockchain().header(BlockId::Hash(best_hash))? -- GitLab From adacbd18a752597beffb9dbb805bd884c83557f0 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 17:11:46 +0100 Subject: [PATCH 104/106] Add Github Action for Matrix release bot (#5117) --- .github/workflows/release-bot.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/release-bot.yml diff --git a/.github/workflows/release-bot.yml b/.github/workflows/release-bot.yml new file mode 100644 index 00000000000..08aa94417c0 --- /dev/null +++ b/.github/workflows/release-bot.yml @@ -0,0 +1,18 @@ +name: Pushes release updates to a pre-defined Matrix room +on: + release: + types: + - edited + - prereleased + - published +jobs: + ping_matrix: + runs-on: ubuntu-latest + steps: + - name: send message + uses: s3krit/matrix-message-action@v0.0.2 + with: + room_id: ${{ secrets.MATRIX_ROOM_ID }} + access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }} + message: "**${{github.event.repository.full_name}}:** A release has been ${{github.event.action}}
Release version [${{github.event.release.tag_name}}](${{github.event.release.html_url}})

***Description:***
${{github.event.release.body}}
" + server: "matrix.parity.io" -- GitLab From e6cc799a33d6deefb44b0416901632c83a8d3ecd Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 21:38:41 +0100 Subject: [PATCH 105/106] Add lots of networking metrics for Prometheus (#5126) * Add some metrics * Address concerns --- client/network/src/behaviour.rs | 10 + client/network/src/discovery.rs | 20 +- client/network/src/protocol.rs | 10 + .../src/protocol/generic_proto/behaviour.rs | 24 +++ client/network/src/service.rs | 172 ++++++++++++++++-- client/peerset/src/lib.rs | 5 + client/peerset/src/peersstate.rs | 2 +- 7 files changed, 220 insertions(+), 23 deletions(-) diff --git a/client/network/src/behaviour.rs b/client/network/src/behaviour.rs index a03a6caa2f5..e7aca1975cd 100644 --- a/client/network/src/behaviour.rs +++ b/client/network/src/behaviour.rs @@ -54,6 +54,8 @@ pub enum BehaviourOut { BlockImport(BlockOrigin, Vec>), JustificationImport(Origin, B::Hash, NumberFor, Justification), FinalityProofImport(Origin, B::Hash, NumberFor, Vec), + /// Started a random Kademlia discovery query. + RandomKademliaStarted, Event(Event), } @@ -96,6 +98,11 @@ impl Behaviour { self.discovery.add_known_address(peer_id, addr) } + /// Returns the number of nodes that are in the Kademlia k-buckets. + pub fn num_kbuckets_entries(&mut self) -> usize { + self.discovery.num_kbuckets_entries() + } + /// Borrows `self` and returns a struct giving access to the information about a node. /// /// Returns `None` if we don't know anything about this node. Always returns `Some` for nodes @@ -216,6 +223,9 @@ impl NetworkBehaviourEventProcess DiscoveryOut::ValuePutFailed(key) => { self.events.push(BehaviourOut::Event(Event::Dht(DhtEvent::ValuePutFailed(key)))); } + DiscoveryOut::RandomKademliaStarted => { + self.events.push(BehaviourOut::RandomKademliaStarted); + } } } } diff --git a/client/network/src/discovery.rs b/client/network/src/discovery.rs index 8360fce5186..ecce7d81e30 100644 --- a/client/network/src/discovery.rs +++ b/client/network/src/discovery.rs @@ -176,6 +176,11 @@ impl DiscoveryBehaviour { pub fn put_value(&mut self, key: record::Key, value: Vec) { self.kademlia.put_record(Record::new(key, value), Quorum::All); } + + /// Returns the number of nodes that are in the Kademlia k-buckets. + pub fn num_kbuckets_entries(&mut self) -> usize { + self.kademlia.kbuckets_entries().count() + } } /// Event generated by the `DiscoveryBehaviour`. @@ -203,6 +208,9 @@ pub enum DiscoveryOut { /// Inserting a value into the DHT failed. ValuePutFailed(record::Key), + + /// Started a random Kademlia query. + RandomKademliaStarted, } impl NetworkBehaviour for DiscoveryBehaviour { @@ -330,25 +338,33 @@ impl NetworkBehaviour for DiscoveryBehaviour { // Poll the stream that fires when we need to start a random Kademlia query. while let Poll::Ready(_) = self.next_kad_random_query.poll_unpin(cx) { - if self.num_connections < self.discovery_only_if_under_num { + let actually_started = if self.num_connections < self.discovery_only_if_under_num { let random_peer_id = PeerId::random(); debug!(target: "sub-libp2p", "Libp2p <= Starting random Kademlia request for \ {:?}", random_peer_id); self.kademlia.get_closest_peers(random_peer_id); + true + } else { debug!( target: "sub-libp2p", "Kademlia paused due to high number of connections ({})", self.num_connections ); - } + false + }; // Schedule the next random query with exponentially increasing delay, // capped at 60 seconds. self.next_kad_random_query = Delay::new(self.duration_to_next_kad); self.duration_to_next_kad = cmp::min(self.duration_to_next_kad * 2, Duration::from_secs(60)); + + if actually_started { + let ev = DiscoveryOut::RandomKademliaStarted; + return Poll::Ready(NetworkBehaviourAction::GenerateEvent(ev)); + } } // Poll Kademlia. diff --git a/client/network/src/protocol.rs b/client/network/src/protocol.rs index c19a230769c..17208aab50f 100644 --- a/client/network/src/protocol.rs +++ b/client/network/src/protocol.rs @@ -539,6 +539,16 @@ impl Protocol { self.behaviour.is_open(peer_id) } + /// Returns the list of all the peers that the peerset currently requests us to be connected to. + pub fn requested_peers(&self) -> impl Iterator { + self.behaviour.requested_peers() + } + + /// Returns the number of discovered nodes that we keep in memory. + pub fn num_discovered_peers(&self) -> usize { + self.behaviour.num_discovered_peers() + } + /// Disconnects the given peer if we are connected to it. pub fn disconnect_peer(&mut self, peer_id: &PeerId) { self.behaviour.disconnect_peer(peer_id) diff --git a/client/network/src/protocol/generic_proto/behaviour.rs b/client/network/src/protocol/generic_proto/behaviour.rs index 24e96681a08..727415baaf5 100644 --- a/client/network/src/protocol/generic_proto/behaviour.rs +++ b/client/network/src/protocol/generic_proto/behaviour.rs @@ -191,6 +191,20 @@ impl PeerState { PeerState::Incoming { .. } => false, } } + + /// True if that node has been requested by the PSM. + fn is_requested(&self) -> bool { + match self { + PeerState::Poisoned => false, + PeerState::Banned { .. } => false, + PeerState::PendingRequest { .. } => true, + PeerState::Requested => true, + PeerState::Disabled { .. } => false, + PeerState::DisabledPendingEnable { .. } => true, + PeerState::Enabled { .. } => true, + PeerState::Incoming { .. } => false, + } + } } /// State of an "incoming" message sent to the peer set manager. @@ -277,6 +291,11 @@ impl GenericProto { self.notif_protocols.push((protocol_name.into(), engine_id, handshake_msg.into())); } + /// Returns the number of discovered nodes that we keep in memory. + pub fn num_discovered_peers(&self) -> usize { + self.peerset.num_discovered_peers() + } + /// Returns the list of all the peers we have an open channel to. pub fn open_peers<'a>(&'a self) -> impl Iterator + 'a { self.peers.iter().filter(|(_, state)| state.is_open()).map(|(id, _)| id) @@ -360,6 +379,11 @@ impl GenericProto { } } + /// Returns the list of all the peers that the peerset currently requests us to be connected to. + pub fn requested_peers<'a>(&'a self) -> impl Iterator + 'a { + self.peers.iter().filter(|(_, state)| state.is_requested()).map(|(id, _)| id) + } + /// Returns true if we try to open protocols with the given peer. pub fn is_enabled(&self, peer_id: &PeerId) -> bool { match self.peers.get(peer_id) { diff --git a/client/network/src/service.rs b/client/network/src/service.rs index 5c618ac4eca..a220a009f3f 100644 --- a/client/network/src/service.rs +++ b/client/network/src/service.rs @@ -25,7 +25,7 @@ //! The methods of the [`NetworkService`] are implemented by sending a message over a channel, //! which is then processed by [`NetworkWorker::poll`]. -use std::{borrow::Cow, collections::{HashMap, HashSet}, fs, marker::PhantomData, io, path::Path}; +use std::{borrow::Cow, collections::{HashMap, HashSet}, fs, marker::PhantomData, io, path::Path, str}; use std::sync::{Arc, atomic::{AtomicBool, AtomicUsize, Ordering}}; use std::pin::Pin; use std::task::Poll; @@ -39,7 +39,7 @@ use libp2p::swarm::{NetworkBehaviour, SwarmBuilder, SwarmEvent}; use parking_lot::Mutex; use sc_peerset::PeersetHandle; use sp_runtime::{traits::{Block as BlockT, NumberFor}, ConsensusEngineId}; -use prometheus_endpoint::{Registry, Gauge, U64, register, PrometheusError}; +use prometheus_endpoint::{Registry, Counter, CounterVec, Gauge, GaugeVec, Opts, U64, register, PrometheusError}; use crate::{behaviour::{Behaviour, BehaviourOut}, config::{parse_str_addr, parse_addr}}; use crate::{transport, config::NonReservedPeerMode, ReputationChange}; @@ -734,25 +734,108 @@ pub struct NetworkWorker { /// Senders for events that happen on the network. event_streams: Vec>, /// Prometheus network metrics. - metrics: Option + metrics: Option, } struct Metrics { + // This list is ordered alphabetically + connections: Gauge, + import_queue_blocks_submitted: Counter, + import_queue_finality_proofs_submitted: Counter, + import_queue_justifications_submitted: Counter, is_major_syncing: Gauge, + kbuckets_num_nodes: Gauge, + network_per_sec_bytes: GaugeVec, + notifications_total: CounterVec, + num_event_stream_channels: Gauge, + opened_notification_streams: GaugeVec, peers_count: Gauge, + peerset_num_discovered: Gauge, + peerset_num_requested: Gauge, + random_kademalia_queries_total: Counter, } impl Metrics { fn register(registry: &Registry) -> Result { Ok(Self { + // This list is ordered alphabetically + connections: register(Gauge::new( + "sub_libp2p_connections", "Number of libp2p connections" + )?, registry)?, + import_queue_blocks_submitted: register(Counter::new( + "import_queue_blocks_submitted", + "Number of blocks submitted to the import queue.", + )?, registry)?, + import_queue_finality_proofs_submitted: register(Counter::new( + "import_queue_finality_proofs_submitted", + "Number of finality proofs submitted to the import queue.", + )?, registry)?, + import_queue_justifications_submitted: register(Counter::new( + "import_queue_justifications_submitted", + "Number of justifications submitted to the import queue.", + )?, registry)?, is_major_syncing: register(Gauge::new( - "is_major_syncing", "Whether the node is performing a major sync or not.", + "sub_libp2p_is_major_syncing", "Whether the node is performing a major sync or not.", + )?, registry)?, + kbuckets_num_nodes: register(Gauge::new( + "sub_libp2p_kbuckets_num_nodes", "Number of nodes in the Kademlia k-buckets" + )?, registry)?, + network_per_sec_bytes: register(GaugeVec::new( + Opts::new( + "sub_libp2p_network_per_sec_bytes", + "Average bandwidth usage per second" + ), + &["direction"] + )?, registry)?, + notifications_total: register(CounterVec::new( + Opts::new( + "sub_libp2p_notifications_total", + "Number of notification received from all nodes" + ), + &["direction", "protocol"] + )?, registry)?, + num_event_stream_channels: register(Gauge::new( + "sub_libp2p_num_event_stream_channels", + "Number of internal active channels that broadcast network events", + )?, registry)?, + opened_notification_streams: register(GaugeVec::new( + Opts::new( + "sub_libp2p_opened_notification_streams", + "Number of open notification substreams" + ), + &["protocol"] )?, registry)?, peers_count: register(Gauge::new( - "peers_count", "Number of network gossip peers", + "sub_libp2p_peers_count", "Number of network gossip peers", + )?, registry)?, + peerset_num_discovered: register(Gauge::new( + "sub_libp2p_peerset_num_discovered", "Number of nodes stored in the peerset manager", + )?, registry)?, + peerset_num_requested: register(Gauge::new( + "sub_libp2p_peerset_num_requested", "Number of nodes that the peerset manager wants us to be connected to", + )?, registry)?, + random_kademalia_queries_total: register(Counter::new( + "sub_libp2p_random_kademalia_queries_total", "Number of random Kademlia queries started", )?, registry)?, }) } + + fn update_with_network_event(&self, event: &Event) { + match event { + Event::NotificationStreamOpened { engine_id, .. } => { + self.opened_notification_streams.with_label_values(&[&engine_id_to_string(&engine_id)]).inc(); + }, + Event::NotificationStreamClosed { engine_id, .. } => { + self.opened_notification_streams.with_label_values(&[&engine_id_to_string(&engine_id)]).dec(); + }, + Event::NotificationsReceived { messages, .. } => { + for (engine_id, _) in messages { + self.notifications_total.with_label_values(&["in", &engine_id_to_string(&engine_id)]).inc(); + } + }, + _ => {} + } + } } impl Future for NetworkWorker { @@ -800,10 +883,15 @@ impl Future for NetworkWorker { this.network_service.user_protocol_mut().set_sync_fork_request(peer_ids, &hash, number), ServiceToWorkerMsg::EventStream(sender) => this.event_streams.push(sender), - ServiceToWorkerMsg::WriteNotification { message, engine_id, target } => - this.network_service.user_protocol_mut().write_notification(target, engine_id, message), + ServiceToWorkerMsg::WriteNotification { message, engine_id, target } => { + if let Some(metrics) = this.metrics.as_ref() { + metrics.notifications_total.with_label_values(&["out", &engine_id_to_string(&engine_id)]).inc(); + } + this.network_service.user_protocol_mut().write_notification(target, engine_id, message) + }, ServiceToWorkerMsg::RegisterNotifProtocol { engine_id, protocol_name } => { - let events = this.network_service.user_protocol_mut().register_notifications_protocol(engine_id, protocol_name); + let events = this.network_service.user_protocol_mut() + .register_notifications_protocol(engine_id, protocol_name); for event in events { this.event_streams.retain(|sender| sender.unbounded_send(event.clone()).is_ok()); } @@ -821,18 +909,47 @@ impl Future for NetworkWorker { match poll_value { Poll::Pending => break, - Poll::Ready(SwarmEvent::Behaviour(BehaviourOut::BlockImport(origin, blocks))) => - this.import_queue.import_blocks(origin, blocks), - Poll::Ready(SwarmEvent::Behaviour(BehaviourOut::JustificationImport(origin, hash, nb, justification))) => - this.import_queue.import_justification(origin, hash, nb, justification), - Poll::Ready(SwarmEvent::Behaviour(BehaviourOut::FinalityProofImport(origin, hash, nb, proof))) => - this.import_queue.import_finality_proof(origin, hash, nb, proof), - Poll::Ready(SwarmEvent::Behaviour(BehaviourOut::Event(ev))) => - this.event_streams.retain(|sender| sender.unbounded_send(ev.clone()).is_ok()), - Poll::Ready(SwarmEvent::Connected(peer_id)) => - trace!(target: "sub-libp2p", "Libp2p => Connected({:?})", peer_id), - Poll::Ready(SwarmEvent::Disconnected(peer_id)) => - trace!(target: "sub-libp2p", "Libp2p => Disconnected({:?})", peer_id), + Poll::Ready(SwarmEvent::Behaviour(BehaviourOut::BlockImport(origin, blocks))) => { + if let Some(metrics) = this.metrics.as_ref() { + metrics.import_queue_blocks_submitted.inc(); + } + this.import_queue.import_blocks(origin, blocks); + }, + Poll::Ready(SwarmEvent::Behaviour(BehaviourOut::JustificationImport(origin, hash, nb, justification))) => { + if let Some(metrics) = this.metrics.as_ref() { + metrics.import_queue_justifications_submitted.inc(); + } + this.import_queue.import_justification(origin, hash, nb, justification); + }, + Poll::Ready(SwarmEvent::Behaviour(BehaviourOut::FinalityProofImport(origin, hash, nb, proof))) => { + if let Some(metrics) = this.metrics.as_ref() { + metrics.import_queue_finality_proofs_submitted.inc(); + } + this.import_queue.import_finality_proof(origin, hash, nb, proof); + }, + Poll::Ready(SwarmEvent::Behaviour(BehaviourOut::RandomKademliaStarted)) => { + if let Some(metrics) = this.metrics.as_ref() { + metrics.random_kademalia_queries_total.inc(); + } + }, + Poll::Ready(SwarmEvent::Behaviour(BehaviourOut::Event(ev))) => { + this.event_streams.retain(|sender| sender.unbounded_send(ev.clone()).is_ok()); + if let Some(metrics) = this.metrics.as_ref() { + metrics.update_with_network_event(&ev); + } + }, + Poll::Ready(SwarmEvent::Connected(peer_id)) => { + trace!(target: "sub-libp2p", "Libp2p => Connected({:?})", peer_id); + if let Some(metrics) = this.metrics.as_ref() { + metrics.connections.inc(); + } + }, + Poll::Ready(SwarmEvent::Disconnected(peer_id)) => { + trace!(target: "sub-libp2p", "Libp2p => Disconnected({:?})", peer_id); + if let Some(metrics) = this.metrics.as_ref() { + metrics.connections.dec(); + } + }, Poll::Ready(SwarmEvent::NewListenAddr(addr)) => trace!(target: "sub-libp2p", "Libp2p => NewListenAddr({})", addr), Poll::Ready(SwarmEvent::ExpiredListenAddr(addr)) => @@ -861,8 +978,14 @@ impl Future for NetworkWorker { this.is_major_syncing.store(is_major_syncing, Ordering::Relaxed); if let Some(metrics) = this.metrics.as_ref() { + metrics.network_per_sec_bytes.with_label_values(&["in"]).set(this.service.bandwidth.average_download_per_sec()); + metrics.network_per_sec_bytes.with_label_values(&["out"]).set(this.service.bandwidth.average_upload_per_sec()); metrics.is_major_syncing.set(is_major_syncing as u64); + metrics.kbuckets_num_nodes.set(this.network_service.num_kbuckets_entries() as u64); + metrics.num_event_stream_channels.set(this.event_streams.len() as u64); metrics.peers_count.set(num_connected_peers as u64); + metrics.peerset_num_discovered.set(this.network_service.user_protocol().num_discovered_peers() as u64); + metrics.peerset_num_requested.set(this.network_service.user_protocol().requested_peers().count() as u64); } Poll::Pending @@ -872,6 +995,15 @@ impl Future for NetworkWorker { impl Unpin for NetworkWorker { } +/// Turns a `ConsensusEngineId` into a representable string. +fn engine_id_to_string(id: &ConsensusEngineId) -> Cow { + if let Ok(s) = std::str::from_utf8(&id[..]) { + Cow::Borrowed(s) + } else { + Cow::Owned(format!("{:?}", id)) + } +} + /// The libp2p swarm, customized for our needs. type Swarm = libp2p::swarm::Swarm>; diff --git a/client/peerset/src/lib.rs b/client/peerset/src/lib.rs index bd6c19a62d1..87ed2336aea 100644 --- a/client/peerset/src/lib.rs +++ b/client/peerset/src/lib.rs @@ -518,6 +518,11 @@ impl Peerset { }) } + /// Returns the number of peers that we have discovered. + pub fn num_discovered_peers(&self) -> usize { + self.data.peers().len() + } + /// Returns priority group by id. pub fn get_priority_group(&self, group_id: &str) -> Option> { self.data.get_priority_group(group_id) diff --git a/client/peerset/src/peersstate.rs b/client/peerset/src/peersstate.rs index 7abf17a5f83..843ec0a3600 100644 --- a/client/peerset/src/peersstate.rs +++ b/client/peerset/src/peersstate.rs @@ -144,7 +144,7 @@ impl PeersState { /// Returns the list of all the peers we know of. // Note: this method could theoretically return a `Peer`, but implementing that // isn't simple. - pub fn peers(&self) -> impl Iterator { + pub fn peers(&self) -> impl ExactSizeIterator { self.nodes.keys() } -- GitLab From 8c672e107789ed10973d937ba8cac245404377e2 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Thu, 5 Mar 2020 22:14:55 +0100 Subject: [PATCH 106/106] Revert quote fixed version and upgrade failure (#5152) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Revert "use fixed quote (#5135)" This reverts commit bea883b3592106f2e2c1ef413b3503fa983c55a8. * Upgrade failure version * Update frame/staking/reward-curve/Cargo.toml Co-Authored-By: André Silva * Ahh I'm dumb Co-authored-by: Gavin Wood Co-authored-by: André Silva --- Cargo.lock | 12 ++++++------ client/chain-spec/derive/Cargo.toml | 2 +- frame/staking/reward-curve/Cargo.toml | 2 +- frame/support/procedural/Cargo.toml | 2 +- frame/support/procedural/tools/Cargo.toml | 2 +- frame/support/procedural/tools/derive/Cargo.toml | 2 +- primitives/api/proc-macro/Cargo.toml | 2 +- primitives/debug-derive/Cargo.toml | 2 +- primitives/runtime-interface/proc-macro/Cargo.toml | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9a380eaac18..2bed3b2bb5f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1318,9 +1318,9 @@ dependencies = [ [[package]] name = "failure" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" +checksum = "b8529c2421efa3066a5cbd8063d2244603824daccb6936b079010bb2aa89464b" dependencies = [ "backtrace", "failure_derive", @@ -1328,9 +1328,9 @@ dependencies = [ [[package]] name = "failure_derive" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" +checksum = "030a733c8287d6213886dd487564ff5c8f6aae10278b3588ed177f9d18f8d231" dependencies = [ "proc-macro2", "quote", @@ -5108,9 +5108,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +checksum = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" dependencies = [ "proc-macro2", ] diff --git a/client/chain-spec/derive/Cargo.toml b/client/chain-spec/derive/Cargo.toml index 801d86c754c..df0e2f92b2e 100644 --- a/client/chain-spec/derive/Cargo.toml +++ b/client/chain-spec/derive/Cargo.toml @@ -14,7 +14,7 @@ proc-macro = true [dependencies] proc-macro-crate = "0.1.4" proc-macro2 = "1.0.6" -quote = "=1.0.2" +quote = "1.0.3" syn = "1.0.7" [dev-dependencies] diff --git a/frame/staking/reward-curve/Cargo.toml b/frame/staking/reward-curve/Cargo.toml index bca5a13fe60..d55813682e6 100644 --- a/frame/staking/reward-curve/Cargo.toml +++ b/frame/staking/reward-curve/Cargo.toml @@ -13,7 +13,7 @@ proc-macro = true [dependencies] syn = { version = "1.0.7", features = ["full", "visit"] } -quote = "=1.0.2" +quote = "1.0.3" proc-macro2 = "1.0.6" proc-macro-crate = "0.1.4" diff --git a/frame/support/procedural/Cargo.toml b/frame/support/procedural/Cargo.toml index a4187673cce..8d8ecb18a76 100644 --- a/frame/support/procedural/Cargo.toml +++ b/frame/support/procedural/Cargo.toml @@ -14,5 +14,5 @@ proc-macro = true [dependencies] frame-support-procedural-tools = { version = "2.0.0-alpha.2", path = "./tools" } proc-macro2 = "1.0.6" -quote = "=1.0.2" +quote = "1.0.3" syn = { version = "1.0.7", features = ["full"] } diff --git a/frame/support/procedural/tools/Cargo.toml b/frame/support/procedural/tools/Cargo.toml index 4aa32de9c0d..52773f6fbee 100644 --- a/frame/support/procedural/tools/Cargo.toml +++ b/frame/support/procedural/tools/Cargo.toml @@ -11,6 +11,6 @@ description = "Proc macro helpers for procedural macros" [dependencies] frame-support-procedural-tools-derive = { version = "2.0.0-alpha.2", path = "./derive" } proc-macro2 = "1.0.6" -quote = "=1.0.2" +quote = "1.0.3" syn = { version = "1.0.7", features = ["full", "visit"] } proc-macro-crate = "0.1.4" diff --git a/frame/support/procedural/tools/derive/Cargo.toml b/frame/support/procedural/tools/derive/Cargo.toml index 8691b1d3968..6bed290c7de 100644 --- a/frame/support/procedural/tools/derive/Cargo.toml +++ b/frame/support/procedural/tools/derive/Cargo.toml @@ -13,5 +13,5 @@ proc-macro = true [dependencies] proc-macro2 = "1.0.6" -quote = { version = "=1.0.2", features = ["proc-macro"] } +quote = { version = "1.0.3", features = ["proc-macro"] } syn = { version = "1.0.7", features = ["proc-macro" ,"full", "extra-traits", "parsing"] } diff --git a/primitives/api/proc-macro/Cargo.toml b/primitives/api/proc-macro/Cargo.toml index 2667a2642e9..940e2175964 100644 --- a/primitives/api/proc-macro/Cargo.toml +++ b/primitives/api/proc-macro/Cargo.toml @@ -14,7 +14,7 @@ documentation = "https://docs.rs/sp-api-proc-macro" proc-macro = true [dependencies] -quote = "=1.0.2" +quote = "1.0.3" syn = { version = "1.0.8", features = ["full", "fold", "extra-traits", "visit"] } proc-macro2 = "1.0.6" blake2-rfc = { version = "0.2.18", default-features = false } diff --git a/primitives/debug-derive/Cargo.toml b/primitives/debug-derive/Cargo.toml index bce3fbbbe34..1ffa37308e2 100644 --- a/primitives/debug-derive/Cargo.toml +++ b/primitives/debug-derive/Cargo.toml @@ -13,7 +13,7 @@ documentation = "https://docs.rs/sp-debug-derive" proc-macro = true [dependencies] -quote = "=1.0.2" +quote = "1.0.3" syn = "1.0.7" proc-macro2 = "1.0" diff --git a/primitives/runtime-interface/proc-macro/Cargo.toml b/primitives/runtime-interface/proc-macro/Cargo.toml index ca37c46c7fa..3743b2e09a1 100644 --- a/primitives/runtime-interface/proc-macro/Cargo.toml +++ b/primitives/runtime-interface/proc-macro/Cargo.toml @@ -14,7 +14,7 @@ proc-macro = true [dependencies] syn = { version = "1.0.5", features = ["full", "visit", "fold", "extra-traits"] } -quote = "=1.0.2" +quote = "1.0.3" proc-macro2 = "1.0.3" Inflector = "0.11.4" proc-macro-crate = "0.1.4" -- GitLab