From 870f7dd7511eb934c66ac34b7325d7e1e0ae18e1 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Tue, 15 Mar 2022 22:19:00 +0100 Subject: [PATCH 01/23] Implement OverseerRuntimeClient --- Cargo.lock | 3 + node/core/runtime-api/Cargo.toml | 1 + node/overseer/Cargo.toml | 2 + node/overseer/src/lib.rs | 391 ++++++++++++++++++++++++++++++- 4 files changed, 394 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8c130152d96e..3b6f138cf736 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6778,6 +6778,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", "polkadot-node-subsystem-util", + "polkadot-overseer", "polkadot-primitives", "polkadot-primitives-test-helpers", "sp-api", @@ -6971,6 +6972,8 @@ dependencies = [ "polkadot-primitives-test-helpers", "sc-client-api", "sp-api", + "sp-authority-discovery", + "sp-consensus-babe", "sp-core", "tracing", ] diff --git a/node/core/runtime-api/Cargo.toml b/node/core/runtime-api/Cargo.toml index 14bdb9f630ca..5b8fe06cc7a5 100644 --- a/node/core/runtime-api/Cargo.toml +++ b/node/core/runtime-api/Cargo.toml @@ -16,6 +16,7 @@ sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-primitives = { path = "../../../primitives" } +polkadot-overseer = { path = "../../overseer" } polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } diff --git a/node/overseer/Cargo.toml b/node/overseer/Cargo.toml index b32e3d63c830..6246b90f1d53 100644 --- a/node/overseer/Cargo.toml +++ b/node/overseer/Cargo.toml @@ -7,6 +7,8 @@ edition = "2021" [dependencies] client = { package = "sc-client-api", git = "https://github.com/paritytech/substrate", branch = "master" } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } futures = "0.3.21" futures-timer = "3.0.2" parking_lot = "0.12.0" diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index f12e21245a77..d5373b1dcece 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -60,7 +60,7 @@ #![warn(missing_docs)] use std::{ - collections::{hash_map, HashMap}, + collections::{hash_map, BTreeMap, HashMap}, fmt::{self, Debug}, pin::Pin, sync::Arc, @@ -72,8 +72,14 @@ use lru::LruCache; use client::{BlockImportNotification, BlockchainEvents, FinalityNotification}; use polkadot_primitives::{ - v1::{Block, BlockId, BlockNumber, Hash}, - v2::ParachainHost, + v1::{ + Block, BlockId, BlockNumber, CandidateCommitments, CandidateEvent, + CommittedCandidateReceipt, CoreState, GroupRotationInfo, Hash, Header, Id, + InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, + PersistedValidationData, ScrapedOnChainVotes, SessionIndex, ValidationCode, + ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, + }, + v2::{ParachainHost, PvfCheckStatement, SessionInfo}, }; use sp_api::{ApiExt, ProvideRuntimeApi}; @@ -92,6 +98,13 @@ pub use polkadot_node_subsystem_types::{ jaeger, ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, OverseerSignal, }; +use sp_api::{ApiError, BlockT}; +use sp_authority_discovery::AuthorityDiscoveryApi; +use sp_consensus_babe::{ + AuthorityId, BabeApi, BabeGenesisConfiguration, Epoch, EquivocationProof, + OpaqueKeyOwnershipProof, Slot, +}; + pub mod metrics; pub use self::metrics::Metrics as OverseerMetrics; @@ -802,3 +815,375 @@ where self.spawner.spawn_blocking(task_name, subsystem_name, j); } } + +pub trait OverseerRuntimeClient { + fn validators(&self, at: &BlockId) -> Result, ApiError>; + + fn validator_groups( + &self, + at: &BlockId, + ) -> Result<(Vec>, GroupRotationInfo), ApiError>; + + /// Yields information on all availability cores as relevant to the child block. + /// Cores are either free or occupied. Free cores can have paras assigned to them. + fn availability_cores( + &self, + at: &BlockId, + ) -> Result>, ApiError>; + + /// Yields the persisted validation data for the given `ParaId` along with an assumption that + /// should be used if the para currently occupies a core. + /// + /// Returns `None` if either the para is not registered or the assumption is `Freed` + /// and the para already occupies a core. + fn persisted_validation_data( + &self, + at: &BlockId, + para_id: Id, + assumption: OccupiedCoreAssumption, + ) -> Result>, ApiError>; + + /// Returns the persisted validation data for the given `ParaId` along with the corresponding + /// validation code hash. Instead of accepting assumption about the para, matches the validation + /// data hash against an expected one and yields `None` if they're not equal. + fn assumed_validation_data( + &self, + at: &BlockId, + para_id: Id, + expected_persisted_validation_data_hash: Hash, + ) -> Result, ValidationCodeHash)>, ApiError>; + + /// Checks if the given validation outputs pass the acceptance criteria. + fn check_validation_outputs( + &self, + at: &BlockId, + para_id: Id, + outputs: CandidateCommitments, + ) -> Result; + + /// Returns the session index expected at a child of the block. + /// + /// This can be used to instantiate a `SigningContext`. + fn session_index_for_child(&self, at: &BlockId) -> Result; + + /// Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`. + /// + /// Returns `None` if either the para is not registered or the assumption is `Freed` + /// and the para already occupies a core. + fn validation_code( + &self, + at: &BlockId, + para_id: Id, + assumption: OccupiedCoreAssumption, + ) -> Result, ApiError>; + + /// Get the receipt of a candidate pending availability. This returns `Some` for any paras + /// assigned to occupied cores in `availability_cores` and `None` otherwise. + fn candidate_pending_availability( + &self, + at: &BlockId, + para_id: Id, + ) -> Result>, ApiError>; + + /// Get a vector of events concerning candidates that occurred within a block. + fn candidate_events(&self, at: &BlockId) -> Result>, ApiError>; + + /// Get all the pending inbound messages in the downward message queue for a para. + fn dmq_contents( + &self, + at: &BlockId, + recipient: Id, + ) -> Result>, ApiError>; + + /// Get the contents of all channels addressed to the given recipient. Channels that have no + /// messages in them are also included. + fn inbound_hrmp_channels_contents( + &self, + at: &BlockId, + recipient: Id, + ) -> Result>>, ApiError>; + + /// Get the validation code from its hash. + fn validation_code_by_hash( + &self, + at: &BlockId, + hash: ValidationCodeHash, + ) -> Result, ApiError>; + + /// Scrape dispute relevant from on-chain, backing votes and resolved disputes. + fn on_chain_votes(&self, at: &BlockId) -> Result>, ApiError>; + + /***** Added in v2 *****/ + + /// Get the session info for the given session, if stored. + /// + /// NOTE: This function is only available since parachain host version 2. + fn session_info( + &self, + at: &BlockId, + index: SessionIndex, + ) -> Result, ApiError>; + + /// Submits a PVF pre-checking statement into the transaction pool. + /// + /// NOTE: This function is only available since parachain host version 2. + fn submit_pvf_check_statement( + &self, + at: &BlockId, + stmt: PvfCheckStatement, + signature: ValidatorSignature, + ) -> Result<(), ApiError>; + + /// Returns code hashes of PVFs that require pre-checking by validators in the active set. + /// + /// NOTE: This function is only available since parachain host version 2. + fn pvfs_require_precheck(&self, at: &BlockId) -> Result, ApiError>; + + /// Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`. + /// + /// NOTE: This function is only available since parachain host version 2. + fn validation_code_hash( + &self, + at: &BlockId, + para_id: Id, + assumption: OccupiedCoreAssumption, + ) -> Result, ApiError>; + + /// ===BABE=== + /// + /// + /// Return the genesis configuration for BABE. The configuration is only read on genesis. + fn configuration(&self, at: &BlockId) -> Result; + + /// Returns the slot that started the current epoch. + fn current_epoch_start(&self, at: &BlockId) -> Result; + + /// Returns information regarding the current epoch. + fn current_epoch(&self, at: &BlockId) -> Result; + + /// Returns information regarding the next epoch (which was already + /// previously announced). + fn next_epoch(&self, at: &BlockId) -> Result; + + /// Generates a proof of key ownership for the given authority in the + /// current epoch. An example usage of this module is coupled with the + /// session historical module to prove that a given authority key is + /// tied to a given staking identity during a specific session. Proofs + /// of key ownership are necessary for submitting equivocation reports. + /// NOTE: even though the API takes a `slot` as parameter the current + /// implementations ignores this parameter and instead relies on this + /// method being called at the correct block height, i.e. any point at + /// which the epoch for the given slot is live on-chain. Future + /// implementations will instead use indexed data through an offchain + /// worker, not requiring older states to be available. + fn generate_key_ownership_proof( + &self, + at: &BlockId, + slot: Slot, + authority_id: AuthorityId, + ) -> Result, ApiError>; + + /// Submits an unsigned extrinsic to report an equivocation. The caller + /// must provide the equivocation proof and a key ownership proof + /// (should be obtained using `generate_key_ownership_proof`). The + /// extrinsic will be unsigned and should only be accepted for local + /// authorship (not to be broadcast to the network). This method returns + /// `None` when creation of the extrinsic fails, e.g. if equivocation + /// reporting is disabled for the given runtime (i.e. this method is + /// hardcoded to return `None`). Only useful in an offchain context. + fn submit_report_equivocation_unsigned_extrinsic( + &self, + at: &BlockId, + equivocation_proof: EquivocationProof
, + key_owner_proof: OpaqueKeyOwnershipProof, + ) -> Result, ApiError>; + + fn authorities( + &self, + at: &BlockId, + ) -> std::result::Result, ApiError>; +} + +impl OverseerRuntimeClient for T +where + T: ProvideRuntimeApi, + T::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, +{ + fn validators(&self, at: &BlockId) -> Result, ApiError> { + self.runtime_api().validators(at) + } + + fn validator_groups( + &self, + at: &BlockId, + ) -> Result<(Vec>, GroupRotationInfo), ApiError> { + self.runtime_api().validator_groups(at) + } + + fn availability_cores( + &self, + at: &BlockId, + ) -> Result>, ApiError> { + self.runtime_api().availability_cores(at) + } + + fn persisted_validation_data( + &self, + at: &BlockId, + para_id: Id, + assumption: OccupiedCoreAssumption, + ) -> Result>, ApiError> { + self.runtime_api().persisted_validation_data(at, para_id, assumption) + } + + fn assumed_validation_data( + &self, + at: &BlockId, + para_id: Id, + expected_persisted_validation_data_hash: Hash, + ) -> Result, ValidationCodeHash)>, ApiError> + { + self.runtime_api().assumed_validation_data( + at, + para_id, + expected_persisted_validation_data_hash, + ) + } + + fn check_validation_outputs( + &self, + at: &BlockId, + para_id: Id, + outputs: CandidateCommitments, + ) -> Result { + self.runtime_api().check_validation_outputs(at, para_id, outputs) + } + + fn session_index_for_child(&self, at: &BlockId) -> Result { + self.runtime_api().session_index_for_child(at) + } + + fn validation_code( + &self, + at: &BlockId, + para_id: Id, + assumption: OccupiedCoreAssumption, + ) -> Result, ApiError> { + self.runtime_api().validation_code(at, para_id, assumption) + } + + fn candidate_pending_availability( + &self, + at: &BlockId, + para_id: Id, + ) -> Result>, ApiError> { + self.runtime_api().candidate_pending_availability(at, para_id) + } + + fn candidate_events(&self, at: &BlockId) -> Result>, ApiError> { + self.runtime_api().candidate_events(at) + } + + fn dmq_contents( + &self, + at: &BlockId, + recipient: Id, + ) -> Result>, ApiError> { + self.runtime_api().dmq_contents(at, recipient) + } + + fn inbound_hrmp_channels_contents( + &self, + at: &BlockId, + recipient: Id, + ) -> Result>>, ApiError> { + self.runtime_api().inbound_hrmp_channels_contents(at, recipient) + } + + fn validation_code_by_hash( + &self, + at: &BlockId, + hash: ValidationCodeHash, + ) -> Result, ApiError> { + self.runtime_api().validation_code_by_hash(at, hash) + } + + fn on_chain_votes(&self, at: &BlockId) -> Result>, ApiError> { + self.runtime_api().on_chain_votes(at) + } + + fn session_info( + &self, + at: &BlockId, + index: SessionIndex, + ) -> Result, ApiError> { + self.runtime_api().session_info(at, index) + } + + fn submit_pvf_check_statement( + &self, + at: &BlockId, + stmt: PvfCheckStatement, + signature: ValidatorSignature, + ) -> Result<(), ApiError> { + self.runtime_api().submit_pvf_check_statement(at, stmt, signature) + } + + fn pvfs_require_precheck(&self, at: &BlockId) -> Result, ApiError> { + self.runtime_api().pvfs_require_precheck(at) + } + + fn validation_code_hash( + &self, + at: &BlockId, + para_id: Id, + assumption: OccupiedCoreAssumption, + ) -> Result, ApiError> { + self.runtime_api().validation_code_hash(at, para_id, assumption) + } + + fn configuration(&self, at: &BlockId) -> Result { + self.runtime_api().configuration(at) + } + + fn current_epoch_start(&self, at: &BlockId) -> Result { + self.runtime_api().current_epoch_start(at) + } + + fn current_epoch(&self, at: &BlockId) -> Result { + self.runtime_api().current_epoch(at) + } + + fn next_epoch(&self, at: &BlockId) -> Result { + self.runtime_api().next_epoch(at) + } + + fn generate_key_ownership_proof( + &self, + at: &BlockId, + slot: Slot, + authority_id: AuthorityId, + ) -> Result, ApiError> { + self.runtime_api().generate_key_ownership_proof(at, slot, authority_id) + } + + fn submit_report_equivocation_unsigned_extrinsic( + &self, + at: &BlockId, + equivocation_proof: EquivocationProof
, + key_owner_proof: OpaqueKeyOwnershipProof, + ) -> Result, ApiError> { + self.runtime_api().submit_report_equivocation_unsigned_extrinsic( + at, + equivocation_proof, + key_owner_proof, + ) + } + + fn authorities( + &self, + at: &BlockId, + ) -> std::result::Result, ApiError> { + self.runtime_api().authorities(at) + } +} From 262c6f2bd3a5d24134832addad709022384e2518 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Thu, 24 Mar 2022 17:40:43 +0100 Subject: [PATCH 02/23] blockchainevents --- Cargo.lock | 400 ++++++++++++++++++------------- Cargo.toml | 222 +++++++++++++++++ node/core/runtime-api/Cargo.toml | 2 - node/core/runtime-api/src/lib.rs | 32 +-- node/overseer/Cargo.toml | 1 + node/overseer/src/lib.rs | 79 +++++- rustfmt.toml | 1 + 7 files changed, 539 insertions(+), 198 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3b6f138cf736..3ee34007bf1a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -450,7 +450,6 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "beefy-primitives", "fnv", @@ -479,7 +478,6 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -502,12 +500,10 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "parity-scale-codec", "scale-info", @@ -2024,7 +2020,6 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "parity-scale-codec", ] @@ -2042,7 +2037,6 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "frame-system", @@ -2064,7 +2058,6 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "Inflector", "chrono", @@ -2091,7 +2084,6 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "frame-system", @@ -2105,7 +2097,6 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "frame-system", @@ -2133,7 +2124,6 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "bitflags", "frame-metadata", @@ -2162,7 +2152,6 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2174,7 +2163,6 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", @@ -2186,7 +2174,6 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "proc-macro2", "quote", @@ -2196,7 +2183,6 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2219,7 +2205,6 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "frame-system", @@ -2230,7 +2215,6 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "log", @@ -2247,7 +2231,6 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -2262,7 +2245,6 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "parity-scale-codec", "sp-api", @@ -2271,7 +2253,6 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "sp-api", @@ -2467,7 +2448,6 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "chrono", "frame-election-provider-support", @@ -4913,7 +4893,6 @@ checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -4927,7 +4906,6 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "frame-system", @@ -4943,7 +4921,6 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "frame-system", @@ -4958,7 +4935,6 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -4982,7 +4958,6 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5002,7 +4977,6 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-election-provider-support", "frame-support", @@ -5022,7 +4996,6 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5037,7 +5010,6 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "beefy-primitives", "frame-support", @@ -5053,7 +5025,6 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -5078,7 +5049,6 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5162,7 +5132,6 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5179,7 +5148,6 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5195,7 +5163,6 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5218,7 +5185,6 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5236,7 +5202,6 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5251,7 +5216,6 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5274,7 +5238,6 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5290,7 +5253,6 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5310,7 +5272,6 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5327,7 +5288,6 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5344,7 +5304,6 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5362,7 +5321,6 @@ dependencies = [ [[package]] name = "pallet-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "frame-system", @@ -5378,7 +5336,6 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5395,7 +5352,6 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5410,7 +5366,6 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "frame-system", @@ -5424,7 +5379,6 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "frame-system", @@ -5441,7 +5395,6 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5464,7 +5417,6 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5480,7 +5432,6 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5495,7 +5446,6 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "frame-system", @@ -5509,7 +5459,6 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5525,7 +5474,6 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "frame-system", @@ -5546,7 +5494,6 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5562,7 +5509,6 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "frame-system", @@ -5576,7 +5522,6 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5599,7 +5544,6 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -5610,7 +5554,6 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "log", "sp-arithmetic", @@ -5619,7 +5562,6 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "frame-system", @@ -5633,7 +5575,6 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5651,7 +5592,6 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5670,7 +5610,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-support", "frame-system", @@ -5687,7 +5626,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5704,7 +5642,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5715,7 +5652,6 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5732,7 +5668,6 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -5748,7 +5683,6 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-benchmarking", "frame-support", @@ -6781,8 +6715,6 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "polkadot-primitives-test-helpers", - "sp-api", - "sp-authority-discovery", "sp-consensus-babe", "sp-core", "sp-keyring", @@ -8200,7 +8132,6 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "env_logger 0.9.0", "jsonrpsee 0.8.0", @@ -8547,7 +8478,6 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "log", "sp-core", @@ -8558,7 +8488,6 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "async-trait", "futures 0.3.21", @@ -8585,7 +8514,6 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "futures 0.3.21", "futures-timer", @@ -8608,7 +8536,6 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8624,7 +8551,6 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.0", @@ -8641,7 +8567,6 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -8652,7 +8577,6 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "chrono", "clap", @@ -8690,7 +8614,6 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "fnv", "futures 0.3.21", @@ -8718,7 +8641,6 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "hash-db", "kvdb", @@ -8743,7 +8665,6 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "async-trait", "futures 0.3.21", @@ -8767,7 +8688,6 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "async-trait", "fork-tree", @@ -8810,7 +8730,6 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -8834,7 +8753,6 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8847,7 +8765,6 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "async-trait", "futures 0.3.21", @@ -8872,7 +8789,6 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "sc-client-api", "sp-authorship", @@ -8883,7 +8799,6 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "lazy_static", "libsecp256k1", @@ -8911,7 +8826,6 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "environmental", "parity-scale-codec", @@ -8928,7 +8842,6 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "log", "parity-scale-codec", @@ -8944,7 +8857,6 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "cfg-if 1.0.0", "libc", @@ -8962,7 +8874,6 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "ahash", "async-trait", @@ -9001,7 +8912,6 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "finality-grandpa", "futures 0.3.21", @@ -9025,7 +8935,6 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "ansi_term", "futures 0.3.21", @@ -9042,7 +8951,6 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "async-trait", "hex", @@ -9057,7 +8965,6 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "async-trait", "asynchronous-codec 0.5.0", @@ -9106,7 +9013,6 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "ahash", "futures 0.3.21", @@ -9123,7 +9029,6 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "bytes 1.1.0", "fnv", @@ -9151,7 +9056,6 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "futures 0.3.21", "libp2p", @@ -9164,7 +9068,6 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9173,7 +9076,6 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "futures 0.3.21", "hash-db", @@ -9204,7 +9106,6 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -9229,7 +9130,6 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -9246,7 +9146,6 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "async-trait", "directories", @@ -9310,7 +9209,6 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "log", "parity-scale-codec", @@ -9324,7 +9222,6 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -9345,7 +9242,6 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "chrono", "futures 0.3.21", @@ -9363,7 +9259,6 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "ansi_term", "atty", @@ -9394,7 +9289,6 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -9405,7 +9299,6 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "futures 0.3.21", "futures-timer", @@ -9432,7 +9325,6 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "futures 0.3.21", "log", @@ -9445,7 +9337,6 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "futures 0.3.21", "futures-timer", @@ -9921,7 +9812,6 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "hash-db", "log", @@ -9938,7 +9828,6 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "blake2 0.10.2", "proc-macro-crate 1.1.3", @@ -9950,7 +9839,6 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "parity-scale-codec", "scale-info", @@ -9963,7 +9851,6 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "integer-sqrt", "num-traits", @@ -9978,7 +9865,6 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "parity-scale-codec", "scale-info", @@ -9991,7 +9877,6 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "async-trait", "parity-scale-codec", @@ -10003,7 +9888,6 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "parity-scale-codec", "sp-api", @@ -10015,7 +9899,6 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "futures 0.3.21", "log", @@ -10033,7 +9916,6 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "async-trait", "futures 0.3.21", @@ -10052,7 +9934,6 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "async-trait", "merlin", @@ -10075,7 +9956,6 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "parity-scale-codec", "scale-info", @@ -10089,7 +9969,6 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -10101,7 +9980,6 @@ dependencies = [ [[package]] name = "sp-core" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "base58", "bitflags", @@ -10146,7 +10024,6 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "blake2 0.10.2", "byteorder", @@ -10160,7 +10037,6 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "proc-macro2", "quote", @@ -10171,7 +10047,6 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "kvdb", "parking_lot 0.12.0", @@ -10180,7 +10055,6 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "proc-macro2", "quote", @@ -10190,7 +10064,6 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.11.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "environmental", "parity-scale-codec", @@ -10201,7 +10074,6 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "finality-grandpa", "log", @@ -10219,7 +10091,6 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10233,7 +10104,6 @@ dependencies = [ [[package]] name = "sp-io" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "futures 0.3.21", "hash-db", @@ -10257,7 +10127,6 @@ dependencies = [ [[package]] name = "sp-keyring" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "lazy_static", "sp-core", @@ -10268,7 +10137,6 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.11.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "async-trait", "futures 0.3.21", @@ -10285,7 +10153,6 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "thiserror", "zstd", @@ -10294,7 +10161,6 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "parity-scale-codec", "scale-info", @@ -10309,7 +10175,6 @@ dependencies = [ [[package]] name = "sp-npos-elections-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -10320,7 +10185,6 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "sp-api", "sp-core", @@ -10330,7 +10194,6 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "backtrace", "lazy_static", @@ -10340,7 +10203,6 @@ dependencies = [ [[package]] name = "sp-rpc" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "rustc-hash", "serde", @@ -10350,7 +10212,6 @@ dependencies = [ [[package]] name = "sp-runtime" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "either", "hash256-std-hasher", @@ -10372,7 +10233,6 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10389,7 +10249,6 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -10401,7 +10260,6 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "serde", "serde_json", @@ -10410,7 +10268,6 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "parity-scale-codec", "scale-info", @@ -10424,7 +10281,6 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "parity-scale-codec", "scale-info", @@ -10435,7 +10291,6 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.11.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "hash-db", "log", @@ -10458,12 +10313,10 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" [[package]] name = "sp-storage" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10476,7 +10329,6 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "log", "sp-core", @@ -10489,7 +10341,6 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "async-trait", "futures-timer", @@ -10505,7 +10356,6 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "parity-scale-codec", "sp-std", @@ -10517,7 +10367,6 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "sp-api", "sp-runtime", @@ -10526,7 +10375,6 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "async-trait", "log", @@ -10542,7 +10390,6 @@ dependencies = [ [[package]] name = "sp-trie" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "hash-db", "memory-db", @@ -10557,7 +10404,6 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10574,7 +10420,6 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10585,7 +10430,6 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "impl-trait-for-tuples", "log", @@ -10785,7 +10629,6 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "platforms", ] @@ -10793,7 +10636,6 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.21", @@ -10815,7 +10657,6 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "futures-util", "hyper", @@ -10828,7 +10669,6 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "async-trait", "futures 0.3.21", @@ -10854,7 +10694,6 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "futures 0.3.21", "substrate-test-utils-derive", @@ -10864,7 +10703,6 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -10875,7 +10713,6 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "ansi_term", "build-helper", @@ -11494,7 +11331,6 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#c22fce5a311beede13479c9a00cca85d823b6b00" dependencies = [ "clap", "jsonrpsee 0.4.1", @@ -12609,3 +12445,239 @@ dependencies = [ "cc", "libc", ] + +[[patch.unused]] +name = "chain-spec-builder" +version = "2.0.0" + +[[patch.unused]] +name = "frame-support-test-compile-pass" +version = "4.0.0-dev" + +[[patch.unused]] +name = "node-bench" +version = "0.9.0-dev" + +[[patch.unused]] +name = "node-cli" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-executor" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-inspect" +version = "0.9.0-dev" + +[[patch.unused]] +name = "node-primitives" +version = "2.0.0" + +[[patch.unused]] +name = "node-rpc" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-runtime" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-runtime-generate-bags" +version = "3.0.0" + +[[patch.unused]] +name = "node-template" +version = "4.0.0-dev" + +[[patch.unused]] +name = "node-template-runtime" +version = "4.0.0-dev" + +[[patch.unused]] +name = "node-testing" +version = "3.0.0-dev" + +[[patch.unused]] +name = "pallet-asset-tx-payment" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-atomic-swap" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-aura" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-bags-list-fuzzer" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-child-bounties" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts-primitives" +version = "5.0.0" + +[[patch.unused]] +name = "pallet-contracts-proc-macro" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts-rpc" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts-rpc-runtime-api" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-conviction-voting" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-basic" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-offchain-worker" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-parallel" +version = "3.0.0-dev" + +[[patch.unused]] +name = "pallet-lottery" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-node-authorization" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-randomness-collective-flip" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-referenda" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-scored-pool" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-template" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-transaction-storage" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-uniques" +version = "4.0.0-dev" + +[[patch.unused]] +name = "sc-consensus-aura" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-consensus-manual-seal" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-consensus-pow" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-network-test" +version = "0.8.0" + +[[patch.unused]] +name = "sc-runtime-test" +version = "2.0.0" + +[[patch.unused]] +name = "sc-service-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-api-test" +version = "2.0.1" + +[[patch.unused]] +name = "sp-application-crypto-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-arithmetic-fuzzer" +version = "2.0.0" + +[[patch.unused]] +name = "sp-consensus-aura" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sp-consensus-pow" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sp-npos-elections-fuzzer" +version = "2.0.0-alpha.5" + +[[patch.unused]] +name = "sp-runtime-interface-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-runtime-interface-test-wasm" +version = "2.0.0" + +[[patch.unused]] +name = "sp-runtime-interface-test-wasm-deprecated" +version = "2.0.0" + +[[patch.unused]] +name = "sp-sandbox" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sp-test-primitives" +version = "2.0.0" + +[[patch.unused]] +name = "subkey" +version = "2.0.1" + +[[patch.unused]] +name = "substrate-frame-cli" +version = "4.0.0-dev" + +[[patch.unused]] +name = "substrate-frame-rpc-support" +version = "3.0.0" + +[[patch.unused]] +name = "substrate-test-runtime" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-runtime-client" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-runtime-transaction-pool" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-utils-test-crate" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 190a3ca2f87a..2fd42985f962 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -144,6 +144,228 @@ try-runtime = [ "polkadot-cli/try-runtime" ] fast-runtime = [ "polkadot-cli/fast-runtime" ] runtime-metrics = [ "polkadot-cli/runtime-metrics" ] pyroscope = ["polkadot-cli/pyroscope"] +[patch."https://github.com/paritytech/substrate"] +node-template ={path = "/Users/skunert/work/repos/substrate/bin/node-template/node" } +frame-benchmarking ={path = "/Users/skunert/work/repos/substrate/frame/benchmarking" } +frame-support ={path = "/Users/skunert/work/repos/substrate/frame/support" } +frame-support-procedural ={path = "/Users/skunert/work/repos/substrate/frame/support/procedural" } +frame-support-procedural-tools ={path = "/Users/skunert/work/repos/substrate/frame/support/procedural/tools" } +frame-support-procedural-tools-derive ={path = "/Users/skunert/work/repos/substrate/frame/support/procedural/tools/derive" } +sp-arithmetic ={path = "/Users/skunert/work/repos/substrate/primitives/arithmetic" } +sp-debug-derive ={path = "/Users/skunert/work/repos/substrate/primitives/debug-derive" } +sp-std ={path = "/Users/skunert/work/repos/substrate/primitives/std" } +sp-core ={path = "/Users/skunert/work/repos/substrate/primitives/core" } +sp-core-hashing ={path = "/Users/skunert/work/repos/substrate/primitives/core/hashing" } +sp-externalities ={path = "/Users/skunert/work/repos/substrate/primitives/externalities" } +sp-storage ={path = "/Users/skunert/work/repos/substrate/primitives/storage" } +sp-runtime-interface ={path = "/Users/skunert/work/repos/substrate/primitives/runtime-interface" } +sp-runtime-interface-proc-macro ={path = "/Users/skunert/work/repos/substrate/primitives/runtime-interface/proc-macro" } +sp-tracing ={path = "/Users/skunert/work/repos/substrate/primitives/tracing" } +sp-wasm-interface ={path = "/Users/skunert/work/repos/substrate/primitives/wasm-interface" } +sp-io ={path = "/Users/skunert/work/repos/substrate/primitives/io" } +sp-keystore ={path = "/Users/skunert/work/repos/substrate/primitives/keystore" } +sp-state-machine ={path = "/Users/skunert/work/repos/substrate/primitives/state-machine" } +sp-panic-handler ={path = "/Users/skunert/work/repos/substrate/primitives/panic-handler" } +sp-trie ={path = "/Users/skunert/work/repos/substrate/primitives/trie" } +sp-runtime ={path = "/Users/skunert/work/repos/substrate/primitives/runtime" } +sp-application-crypto ={path = "/Users/skunert/work/repos/substrate/primitives/application-crypto" } +sp-api ={path = "/Users/skunert/work/repos/substrate/primitives/api" } +sp-api-proc-macro ={path = "/Users/skunert/work/repos/substrate/primitives/api/proc-macro" } +sp-version ={path = "/Users/skunert/work/repos/substrate/primitives/version" } +sp-core-hashing-proc-macro ={path = "/Users/skunert/work/repos/substrate/primitives/core/hashing/proc-macro" } +sp-version-proc-macro ={path = "/Users/skunert/work/repos/substrate/primitives/version/proc-macro" } +sp-test-primitives ={path = "/Users/skunert/work/repos/substrate/primitives/test-primitives" } +substrate-test-runtime-client ={path = "/Users/skunert/work/repos/substrate/test-utils/runtime/client" } +sc-block-builder ={path = "/Users/skunert/work/repos/substrate/client/block-builder" } +sc-client-api ={path = "/Users/skunert/work/repos/substrate/client/api" } +substrate-prometheus-endpoint ={path = "/Users/skunert/work/repos/substrate/utils/prometheus" } +sc-executor ={path = "/Users/skunert/work/repos/substrate/client/executor" } +sc-executor-common ={path = "/Users/skunert/work/repos/substrate/client/executor/common" } +sc-allocator ={path = "/Users/skunert/work/repos/substrate/client/allocator" } +sp-maybe-compressed-blob ={path = "/Users/skunert/work/repos/substrate/primitives/maybe-compressed-blob" } +sp-serializer ={path = "/Users/skunert/work/repos/substrate/primitives/serializer" } +sc-executor-wasmi ={path = "/Users/skunert/work/repos/substrate/client/executor/wasmi" } +sc-executor-wasmtime ={path = "/Users/skunert/work/repos/substrate/client/executor/wasmtime" } +sc-runtime-test ={path = "/Users/skunert/work/repos/substrate/client/executor/runtime-test" } +sp-sandbox ={path = "/Users/skunert/work/repos/substrate/primitives/sandbox" } +sp-tasks ={path = "/Users/skunert/work/repos/substrate/primitives/tasks" } +substrate-wasm-builder ={path = "/Users/skunert/work/repos/substrate/utils/wasm-builder" } +sc-tracing ={path = "/Users/skunert/work/repos/substrate/client/tracing" } +sc-rpc-server ={path = "/Users/skunert/work/repos/substrate/client/rpc-servers" } +sc-tracing-proc-macro ={path = "/Users/skunert/work/repos/substrate/client/tracing/proc-macro" } +sp-blockchain ={path = "/Users/skunert/work/repos/substrate/primitives/blockchain" } +sp-consensus ={path = "/Users/skunert/work/repos/substrate/primitives/consensus/common" } +sp-inherents ={path = "/Users/skunert/work/repos/substrate/primitives/inherents" } +sp-database ={path = "/Users/skunert/work/repos/substrate/primitives/database" } +sp-rpc ={path = "/Users/skunert/work/repos/substrate/primitives/rpc" } +substrate-test-runtime ={path = "/Users/skunert/work/repos/substrate/test-utils/runtime" } +frame-system ={path = "/Users/skunert/work/repos/substrate/frame/system" } +frame-system-rpc-runtime-api ={path = "/Users/skunert/work/repos/substrate/frame/system/rpc/runtime-api" } +pallet-babe ={path = "/Users/skunert/work/repos/substrate/frame/babe" } +pallet-authorship ={path = "/Users/skunert/work/repos/substrate/frame/authorship" } +sp-authorship ={path = "/Users/skunert/work/repos/substrate/primitives/authorship" } +pallet-session ={path = "/Users/skunert/work/repos/substrate/frame/session" } +pallet-timestamp ={path = "/Users/skunert/work/repos/substrate/frame/timestamp" } +sp-timestamp ={path = "/Users/skunert/work/repos/substrate/primitives/timestamp" } +sp-session ={path = "/Users/skunert/work/repos/substrate/primitives/session" } +sp-staking ={path = "/Users/skunert/work/repos/substrate/primitives/staking" } +sp-consensus-babe ={path = "/Users/skunert/work/repos/substrate/primitives/consensus/babe" } +sp-consensus-slots ={path = "/Users/skunert/work/repos/substrate/primitives/consensus/slots" } +sp-consensus-vrf ={path = "/Users/skunert/work/repos/substrate/primitives/consensus/vrf" } +frame-election-provider-support ={path = "/Users/skunert/work/repos/substrate/frame/election-provider-support" } +sp-npos-elections ={path = "/Users/skunert/work/repos/substrate/primitives/npos-elections" } +sp-npos-elections-solution-type ={path = "/Users/skunert/work/repos/substrate/primitives/npos-elections/solution-type" } +substrate-test-utils ={path = "/Users/skunert/work/repos/substrate/test-utils" } +substrate-test-utils-derive ={path = "/Users/skunert/work/repos/substrate/test-utils/derive" } +sc-service ={path = "/Users/skunert/work/repos/substrate/client/service" } +sc-chain-spec ={path = "/Users/skunert/work/repos/substrate/client/chain-spec" } +sc-chain-spec-derive ={path = "/Users/skunert/work/repos/substrate/client/chain-spec/derive" } +sc-network ={path = "/Users/skunert/work/repos/substrate/client/network" } +fork-tree ={path = "/Users/skunert/work/repos/substrate/utils/fork-tree" } +sc-consensus ={path = "/Users/skunert/work/repos/substrate/client/consensus/common" } +sc-utils ={path = "/Users/skunert/work/repos/substrate/client/utils" } +sc-peerset ={path = "/Users/skunert/work/repos/substrate/client/peerset" } +sp-finality-grandpa ={path = "/Users/skunert/work/repos/substrate/primitives/finality-grandpa" } +sc-telemetry ={path = "/Users/skunert/work/repos/substrate/client/telemetry" } +sc-client-db ={path = "/Users/skunert/work/repos/substrate/client/db" } +sc-state-db ={path = "/Users/skunert/work/repos/substrate/client/state-db" } +sc-informant ={path = "/Users/skunert/work/repos/substrate/client/informant" } +sc-transaction-pool-api ={path = "/Users/skunert/work/repos/substrate/client/transaction-pool/api" } +sc-keystore ={path = "/Users/skunert/work/repos/substrate/client/keystore" } +sc-offchain ={path = "/Users/skunert/work/repos/substrate/client/offchain" } +sp-offchain ={path = "/Users/skunert/work/repos/substrate/primitives/offchain" } +sc-transaction-pool ={path = "/Users/skunert/work/repos/substrate/client/transaction-pool" } +sp-transaction-pool ={path = "/Users/skunert/work/repos/substrate/primitives/transaction-pool" } +substrate-test-runtime-transaction-pool ={path = "/Users/skunert/work/repos/substrate/test-utils/runtime/transaction-pool" } +sc-rpc ={path = "/Users/skunert/work/repos/substrate/client/rpc" } +sc-rpc-api ={path = "/Users/skunert/work/repos/substrate/client/rpc-api" } +sp-block-builder ={path = "/Users/skunert/work/repos/substrate/primitives/block-builder" } +sp-transaction-storage-proof ={path = "/Users/skunert/work/repos/substrate/primitives/transaction-storage-proof" } +pallet-balances ={path = "/Users/skunert/work/repos/substrate/frame/balances" } +pallet-transaction-payment ={path = "/Users/skunert/work/repos/substrate/frame/transaction-payment" } +pallet-offences ={path = "/Users/skunert/work/repos/substrate/frame/offences" } +pallet-staking ={path = "/Users/skunert/work/repos/substrate/frame/staking" } +pallet-bags-list ={path = "/Users/skunert/work/repos/substrate/frame/bags-list" } +pallet-staking-reward-curve ={path = "/Users/skunert/work/repos/substrate/frame/staking/reward-curve" } +sp-consensus-aura ={path = "/Users/skunert/work/repos/substrate/primitives/consensus/aura" } +sp-keyring ={path = "/Users/skunert/work/repos/substrate/primitives/keyring" } +substrate-test-client ={path = "/Users/skunert/work/repos/substrate/test-utils/client" } +sp-runtime-interface-test-wasm ={path = "/Users/skunert/work/repos/substrate/primitives/runtime-interface/test-wasm" } +frame-benchmarking-cli ={path = "/Users/skunert/work/repos/substrate/utils/frame/benchmarking-cli" } +sc-cli ={path = "/Users/skunert/work/repos/substrate/client/cli" } +node-template-runtime ={path = "/Users/skunert/work/repos/substrate/bin/node-template/runtime" } +frame-executive ={path = "/Users/skunert/work/repos/substrate/frame/executive" } +frame-system-benchmarking ={path = "/Users/skunert/work/repos/substrate/frame/system/benchmarking" } +pallet-aura ={path = "/Users/skunert/work/repos/substrate/frame/aura" } +pallet-grandpa ={path = "/Users/skunert/work/repos/substrate/frame/grandpa" } +pallet-randomness-collective-flip ={path = "/Users/skunert/work/repos/substrate/frame/randomness-collective-flip" } +pallet-sudo ={path = "/Users/skunert/work/repos/substrate/frame/sudo" } +pallet-template ={path = "/Users/skunert/work/repos/substrate/bin/node-template/pallets/template" } +pallet-transaction-payment-rpc-runtime-api ={path = "/Users/skunert/work/repos/substrate/frame/transaction-payment/rpc/runtime-api" } +pallet-transaction-payment-rpc ={path = "/Users/skunert/work/repos/substrate/frame/transaction-payment/rpc" } +sc-basic-authorship ={path = "/Users/skunert/work/repos/substrate/client/basic-authorship" } +sc-proposer-metrics ={path = "/Users/skunert/work/repos/substrate/client/proposer-metrics" } +sc-consensus-aura ={path = "/Users/skunert/work/repos/substrate/client/consensus/aura" } +sc-consensus-slots ={path = "/Users/skunert/work/repos/substrate/client/consensus/slots" } +sc-network-test ={path = "/Users/skunert/work/repos/substrate/client/network/test" } +sc-finality-grandpa ={path = "/Users/skunert/work/repos/substrate/client/finality-grandpa" } +sc-network-gossip ={path = "/Users/skunert/work/repos/substrate/client/network-gossip" } +substrate-frame-rpc-system ={path = "/Users/skunert/work/repos/substrate/utils/frame/rpc/system" } +substrate-build-script-utils ={path = "/Users/skunert/work/repos/substrate/utils/build-script-utils" } +node-bench ={path = "/Users/skunert/work/repos/substrate/bin/node/bench" } +node-primitives ={path = "/Users/skunert/work/repos/substrate/bin/node/primitives" } +node-runtime ={path = "/Users/skunert/work/repos/substrate/bin/node/runtime" } +frame-try-runtime ={path = "/Users/skunert/work/repos/substrate/frame/try-runtime" } +pallet-asset-tx-payment ={path = "/Users/skunert/work/repos/substrate/frame/transaction-payment/asset-tx-payment" } +pallet-assets ={path = "/Users/skunert/work/repos/substrate/frame/assets" } +pallet-authority-discovery ={path = "/Users/skunert/work/repos/substrate/frame/authority-discovery" } +sp-authority-discovery ={path = "/Users/skunert/work/repos/substrate/primitives/authority-discovery" } +pallet-bounties ={path = "/Users/skunert/work/repos/substrate/frame/bounties" } +pallet-treasury ={path = "/Users/skunert/work/repos/substrate/frame/treasury" } +pallet-child-bounties ={path = "/Users/skunert/work/repos/substrate/frame/child-bounties" } +pallet-collective ={path = "/Users/skunert/work/repos/substrate/frame/collective" } +pallet-contracts ={path = "/Users/skunert/work/repos/substrate/frame/contracts" } +pallet-contracts-primitives ={path = "/Users/skunert/work/repos/substrate/frame/contracts/common" } +pallet-contracts-proc-macro ={path = "/Users/skunert/work/repos/substrate/frame/contracts/proc-macro" } +pallet-utility ={path = "/Users/skunert/work/repos/substrate/frame/utility" } +pallet-contracts-rpc-runtime-api ={path = "/Users/skunert/work/repos/substrate/frame/contracts/rpc/runtime-api" } +pallet-conviction-voting ={path = "/Users/skunert/work/repos/substrate/frame/conviction-voting" } +pallet-scheduler ={path = "/Users/skunert/work/repos/substrate/frame/scheduler" } +pallet-preimage ={path = "/Users/skunert/work/repos/substrate/frame/preimage" } +pallet-democracy ={path = "/Users/skunert/work/repos/substrate/frame/democracy" } +pallet-election-provider-multi-phase ={path = "/Users/skunert/work/repos/substrate/frame/election-provider-multi-phase" } +pallet-elections-phragmen ={path = "/Users/skunert/work/repos/substrate/frame/elections-phragmen" } +pallet-gilt ={path = "/Users/skunert/work/repos/substrate/frame/gilt" } +pallet-identity ={path = "/Users/skunert/work/repos/substrate/frame/identity" } +pallet-im-online ={path = "/Users/skunert/work/repos/substrate/frame/im-online" } +pallet-indices ={path = "/Users/skunert/work/repos/substrate/frame/indices" } +pallet-lottery ={path = "/Users/skunert/work/repos/substrate/frame/lottery" } +frame-support-test ={path = "/Users/skunert/work/repos/substrate/frame/support/test" } +frame-support-test-pallet ={path = "/Users/skunert/work/repos/substrate/frame/support/test/pallet" } +pallet-membership ={path = "/Users/skunert/work/repos/substrate/frame/membership" } +pallet-mmr ={path = "/Users/skunert/work/repos/substrate/frame/merkle-mountain-range" } +pallet-mmr-primitives ={path = "/Users/skunert/work/repos/substrate/frame/merkle-mountain-range/primitives" } +pallet-multisig ={path = "/Users/skunert/work/repos/substrate/frame/multisig" } +pallet-offences-benchmarking ={path = "/Users/skunert/work/repos/substrate/frame/offences/benchmarking" } +pallet-proxy ={path = "/Users/skunert/work/repos/substrate/frame/proxy" } +pallet-recovery ={path = "/Users/skunert/work/repos/substrate/frame/recovery" } +pallet-referenda ={path = "/Users/skunert/work/repos/substrate/frame/referenda" } +pallet-session-benchmarking ={path = "/Users/skunert/work/repos/substrate/frame/session/benchmarking" } +pallet-society ={path = "/Users/skunert/work/repos/substrate/frame/society" } +pallet-tips ={path = "/Users/skunert/work/repos/substrate/frame/tips" } +pallet-transaction-storage ={path = "/Users/skunert/work/repos/substrate/frame/transaction-storage" } +pallet-uniques ={path = "/Users/skunert/work/repos/substrate/frame/uniques" } +pallet-vesting ={path = "/Users/skunert/work/repos/substrate/frame/vesting" } +node-testing ={path = "/Users/skunert/work/repos/substrate/bin/node/testing" } +node-executor ={path = "/Users/skunert/work/repos/substrate/bin/node/executor" } +node-cli ={path = "/Users/skunert/work/repos/substrate/bin/node/cli" } +node-inspect ={path = "/Users/skunert/work/repos/substrate/bin/node/inspect" } +node-rpc ={path = "/Users/skunert/work/repos/substrate/bin/node/rpc" } +pallet-contracts-rpc ={path = "/Users/skunert/work/repos/substrate/frame/contracts/rpc" } +pallet-mmr-rpc ={path = "/Users/skunert/work/repos/substrate/frame/merkle-mountain-range/rpc" } +sc-consensus-babe ={path = "/Users/skunert/work/repos/substrate/client/consensus/babe" } +sc-consensus-epochs ={path = "/Users/skunert/work/repos/substrate/client/consensus/epochs" } +sc-consensus-babe-rpc ={path = "/Users/skunert/work/repos/substrate/client/consensus/babe/rpc" } +sc-finality-grandpa-rpc ={path = "/Users/skunert/work/repos/substrate/client/finality-grandpa/rpc" } +sc-sync-state-rpc ={path = "/Users/skunert/work/repos/substrate/client/sync-state-rpc" } +sc-authority-discovery ={path = "/Users/skunert/work/repos/substrate/client/authority-discovery" } +sc-consensus-uncles ={path = "/Users/skunert/work/repos/substrate/client/consensus/uncles" } +try-runtime-cli ={path = "/Users/skunert/work/repos/substrate/utils/frame/try-runtime/cli" } +remote-externalities ={path = "/Users/skunert/work/repos/substrate/utils/frame/remote-externalities" } +sc-service-test ={path = "/Users/skunert/work/repos/substrate/client/service/test" } +substrate-frame-cli ={path = "/Users/skunert/work/repos/substrate/utils/frame/frame-utilities-cli" } +chain-spec-builder ={path = "/Users/skunert/work/repos/substrate/bin/utils/chain-spec-builder" } +subkey ={path = "/Users/skunert/work/repos/substrate/bin/utils/subkey" } +beefy-gadget ={path = "/Users/skunert/work/repos/substrate/client/beefy" } +beefy-primitives ={path = "/Users/skunert/work/repos/substrate/primitives/beefy" } +beefy-gadget-rpc ={path = "/Users/skunert/work/repos/substrate/client/beefy/rpc" } +sc-consensus-manual-seal ={path = "/Users/skunert/work/repos/substrate/client/consensus/manual-seal" } +sc-consensus-pow ={path = "/Users/skunert/work/repos/substrate/client/consensus/pow" } +sp-consensus-pow ={path = "/Users/skunert/work/repos/substrate/primitives/consensus/pow" } +pallet-atomic-swap ={path = "/Users/skunert/work/repos/substrate/frame/atomic-swap" } +pallet-bags-list-fuzzer ={path = "/Users/skunert/work/repos/substrate/frame/bags-list/fuzzer" } +pallet-bags-list-remote-tests ={path = "/Users/skunert/work/repos/substrate/frame/bags-list/remote-tests" } +pallet-beefy ={path = "/Users/skunert/work/repos/substrate/frame/beefy" } +pallet-beefy-mmr ={path = "/Users/skunert/work/repos/substrate/frame/beefy-mmr" } +beefy-merkle-tree ={path = "/Users/skunert/work/repos/substrate/frame/beefy-mmr/primitives" } +pallet-example-basic ={path = "/Users/skunert/work/repos/substrate/frame/examples/basic" } +pallet-example-offchain-worker ={path = "/Users/skunert/work/repos/substrate/frame/examples/offchain-worker" } +pallet-example-parallel ={path = "/Users/skunert/work/repos/substrate/frame/examples/parallel" } +pallet-nicks ={path = "/Users/skunert/work/repos/substrate/frame/nicks" } +pallet-node-authorization ={path = "/Users/skunert/work/repos/substrate/frame/node-authorization" } +pallet-scored-pool ={path = "/Users/skunert/work/repos/substrate/frame/scored-pool" } +pallet-staking-reward-fn ={path = "/Users/skunert/work/repos/substrate/frame/staking/reward-fn" } +frame-support-test-compile-pass ={path = "/Users/skunert/work/repos/substrate/frame/support/test/compile_pass" } +sp-api-test ={path = "/Users/skunert/work/repos/substrate/primitives/api/test" } +sp-application-crypto-test ={path = "/Users/skunert/work/repos/substrate/primitives/application-crypto/test" } +sp-arithmetic-fuzzer ={path = "/Users/skunert/work/repos/substrate/primitives/arithmetic/fuzzer" } +sp-npos-elections-fuzzer ={path = "/Users/skunert/work/repos/substrate/primitives/npos-elections/fuzzer" } +sp-runtime-interface-test ={path = "/Users/skunert/work/repos/substrate/primitives/runtime-interface/test" } +sp-runtime-interface-test-wasm-deprecated ={path = "/Users/skunert/work/repos/substrate/primitives/runtime-interface/test-wasm-deprecated" } +substrate-test-utils-test-crate ={path = "/Users/skunert/work/repos/substrate/test-utils/test-crate" } +substrate-frame-rpc-support ={path = "/Users/skunert/work/repos/substrate/utils/frame/rpc/support" } +generate-bags ={path = "/Users/skunert/work/repos/substrate/utils/frame/generate-bags" } +node-runtime-generate-bags ={path = "/Users/skunert/work/repos/substrate/utils/frame/generate-bags/node-runtime" } # Configuration for building a .deb package - for use with `cargo-deb` [package.metadata.deb] diff --git a/node/core/runtime-api/Cargo.toml b/node/core/runtime-api/Cargo.toml index 5b8fe06cc7a5..0318e07d2408 100644 --- a/node/core/runtime-api/Cargo.toml +++ b/node/core/runtime-api/Cargo.toml @@ -10,8 +10,6 @@ tracing = "0.1.31" memory-lru = "0.1.0" parity-util-mem = { version = "0.11.0", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index e1e23d162061..41d217250c60 100644 --- a/node/core/runtime-api/src/lib.rs +++ b/node/core/runtime-api/src/lib.rs @@ -23,10 +23,8 @@ #![warn(missing_docs)] use polkadot_node_subsystem_util::metrics::{self, prometheus}; -use polkadot_primitives::{ - v1::{Block, BlockId, Hash}, - v2::ParachainHost, -}; +use polkadot_overseer::OverseerRuntimeClient; +use polkadot_primitives::v1::{BlockId, Hash}; use polkadot_subsystem::{ errors::RuntimeApiError, messages::{RuntimeApiMessage, RuntimeApiRequest as Request}, @@ -34,9 +32,6 @@ use polkadot_subsystem::{ SubsystemResult, }; -use sp_api::ProvideRuntimeApi; -use sp_authority_discovery::AuthorityDiscoveryApi; -use sp_consensus_babe::BabeApi; use sp_core::traits::SpawnNamed; use cache::{RequestResult, RequestResultCache}; @@ -92,8 +87,7 @@ impl RuntimeApiSubsystem { impl overseer::Subsystem for RuntimeApiSubsystem where - Client: ProvideRuntimeApi + Send + 'static + Sync, - Client::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, + Client: OverseerRuntimeClient + Send + Sync + 'static, Context: SubsystemContext, Context: overseer::SubsystemContext, { @@ -104,8 +98,7 @@ where impl RuntimeApiSubsystem where - Client: ProvideRuntimeApi + Send + 'static + Sync, - Client::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, + Client: OverseerRuntimeClient + Send + 'static + Sync, { fn store_cache(&mut self, result: RequestResult) { use RequestResult::*; @@ -328,8 +321,7 @@ async fn run( mut subsystem: RuntimeApiSubsystem, ) -> SubsystemResult<()> where - Client: ProvideRuntimeApi + Send + Sync + 'static, - Client::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, + Client: OverseerRuntimeClient + Send + Sync + 'static, Context: SubsystemContext, Context: overseer::SubsystemContext, { @@ -357,18 +349,16 @@ fn make_runtime_api_request( request: Request, ) -> Option where - Client: ProvideRuntimeApi, - Client::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, + Client: OverseerRuntimeClient + 'static, { let _timer = metrics.time_make_runtime_api_request(); macro_rules! query { ($req_variant:ident, $api_name:ident ($($param:expr),*), ver = $version:literal, $sender:expr) => {{ let sender = $sender; - let api = client.runtime_api(); + let api = client; - use sp_api::ApiExt; - let runtime_version = api.api_version::>(&BlockId::Hash(relay_parent)) + let runtime_version = api.api_version_parachain_host(&BlockId::Hash(relay_parent)) .unwrap_or_else(|e| { tracing::warn!( target: LOG_TARGET, @@ -448,13 +438,11 @@ where Request::CandidateEvents(sender) => query!(CandidateEvents, candidate_events(), ver = 1, sender), Request::SessionInfo(index, sender) => { - use sp_api::ApiExt; - - let api = client.runtime_api(); + let api = client; let block_id = BlockId::Hash(relay_parent); let api_version = api - .api_version::>(&BlockId::Hash(relay_parent)) + .api_version_parachain_host(&BlockId::Hash(relay_parent)) .unwrap_or_default() .unwrap_or_default(); diff --git a/node/overseer/Cargo.toml b/node/overseer/Cargo.toml index 6246b90f1d53..79166e6f8334 100644 --- a/node/overseer/Cargo.toml +++ b/node/overseer/Cargo.toml @@ -7,6 +7,7 @@ edition = "2021" [dependencies] client = { package = "sc-client-api", git = "https://github.com/paritytech/substrate", branch = "master" } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +# sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } futures = "0.3.21" diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index d5373b1dcece..b44e8a21219e 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -67,7 +67,7 @@ use std::{ time::Duration, }; -use futures::{channel::oneshot, future::BoxFuture, select, Future, FutureExt, StreamExt}; +use futures::{channel::oneshot, future::BoxFuture, select, Future, FutureExt, Stream, StreamExt}; use lru::LruCache; use client::{BlockImportNotification, BlockchainEvents, FinalityNotification}; @@ -98,7 +98,7 @@ pub use polkadot_node_subsystem_types::{ jaeger, ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, OverseerSignal, }; -use sp_api::{ApiError, BlockT}; +use sp_api::ApiError; use sp_authority_discovery::AuthorityDiscoveryApi; use sp_consensus_babe::{ AuthorityId, BabeApi, BabeGenesisConfiguration, Epoch, EquivocationProof, @@ -141,18 +141,12 @@ pub trait HeadSupportsParachains { impl HeadSupportsParachains for Arc where - Client: ProvideRuntimeApi, - Client::Api: ParachainHost, + Client: OverseerRuntimeClient, { fn head_supports_parachains(&self, head: &Hash) -> bool { let id = BlockId::Hash(*head); // Check that the `ParachainHost` runtime api is at least with version 1 present on chain. - self.runtime_api() - .api_version::>(&id) - .ok() - .flatten() - .unwrap_or(0) >= - 1 + self.api_version_parachain_host(&id).ok().flatten().unwrap_or(0) >= 1 } } @@ -309,6 +303,48 @@ pub async fn forward_events>(client: Arc

, mut hand } } +/// Glues together the [`Overseer`] and `BlockchainEvents` by forwarding +/// import and finality notifications into the [`OverseerHandle`]. +pub async fn forward_collator_events>( + client: Arc

, + mut handle: Handle, +) { + let mut finality = client.finality_notification_stream().fuse(); + let mut imports = client.import_notification_stream().fuse(); + + loop { + select! { + f = finality.next() => { + match f { + Some(header) => { + /// TODO Implement into + let block_info = BlockInfo { + hash: header.hash(), + parent_hash: header.parent_hash, + number: header.number + }; + handle.block_finalized(block_info).await; + } + None => break, + } + }, + i = imports.next() => { + match i { + Some(header) => { + let block_info = BlockInfo { + hash: header.hash(), + parent_hash: header.parent_hash, + number: header.number + }; + handle.block_imported(block_info).await; + } + None => break, + } + }, + complete => break, + } + } +} /// Create a new instance of the [`Overseer`] with a fixed set of [`Subsystem`]s. /// /// This returns the overseer along with an [`OverseerHandle`] which can @@ -924,6 +960,15 @@ pub trait OverseerRuntimeClient { index: SessionIndex, ) -> Result, ApiError>; + /// Get the session info for the given session, if stored. + /// + /// NOTE: This function is only available since parachain host version 2. + fn session_info_before_version_2( + &self, + at: &BlockId, + index: SessionIndex, + ) -> Result, ApiError>; + /// Submits a PVF pre-checking statement into the transaction pool. /// /// NOTE: This function is only available since parachain host version 2. @@ -1002,6 +1047,8 @@ pub trait OverseerRuntimeClient { &self, at: &BlockId, ) -> std::result::Result, ApiError>; + + fn api_version_parachain_host(&self, at: &BlockId) -> Result, ApiError>; } impl OverseerRuntimeClient for T @@ -1186,4 +1233,16 @@ where ) -> std::result::Result, ApiError> { self.runtime_api().authorities(at) } + + fn api_version_parachain_host(&self, at: &BlockId) -> Result, ApiError> { + self.runtime_api().api_version::>(at) + } + + fn session_info_before_version_2( + &self, + at: &BlockId, + index: SessionIndex, + ) -> Result, ApiError> { + self.runtime_api().session_info_before_version_2(at, index) + } } diff --git a/rustfmt.toml b/rustfmt.toml index 9b872649d842..542c561edd42 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -21,3 +21,4 @@ use_field_init_shorthand = true ignore = [ "bridges", ] +edition = "2021" From 0890e0891d08810b1b8f411c6c361b825ca8ee91 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Mon, 11 Apr 2022 15:05:00 +0200 Subject: [PATCH 03/23] Update patches --- Cargo.lock | 413 ++++++++++++++++++++++++++++++++--------------------- Cargo.toml | 16 ++- 2 files changed, 257 insertions(+), 172 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 075cc29f76e9..9384148d14f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -450,7 +450,6 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "beefy-primitives", "fnv", @@ -483,7 +482,6 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -506,12 +504,10 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "parity-scale-codec", "scale-info", @@ -2115,7 +2111,6 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "parity-scale-codec", ] @@ -2133,7 +2128,6 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support", "frame-system", @@ -2155,7 +2149,6 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "Inflector", "chrono", @@ -2200,7 +2193,6 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -2211,7 +2203,6 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2227,7 +2218,6 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support", "frame-system", @@ -2255,7 +2245,6 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "bitflags", "frame-metadata", @@ -2284,7 +2273,6 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2296,7 +2284,6 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", @@ -2308,7 +2295,6 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "proc-macro2", "quote", @@ -2318,7 +2304,6 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2341,7 +2326,6 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support", "frame-system", @@ -2352,7 +2336,6 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support", "log", @@ -2369,7 +2352,6 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -2384,7 +2366,6 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "parity-scale-codec", "sp-api", @@ -2393,7 +2374,6 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support", "sp-api", @@ -2589,7 +2569,6 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "chrono", "frame-election-provider-support", @@ -4991,7 +4970,6 @@ checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5005,7 +4983,6 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support", "frame-system", @@ -5021,7 +4998,6 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support", "frame-system", @@ -5036,7 +5012,6 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5060,7 +5035,6 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5080,7 +5054,6 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-election-provider-support", "frame-support", @@ -5100,7 +5073,6 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5115,7 +5087,6 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "beefy-primitives", "frame-support", @@ -5131,7 +5102,6 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -5156,7 +5126,6 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5238,7 +5207,6 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5257,7 +5225,6 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5274,7 +5241,6 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5290,7 +5256,6 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5313,7 +5278,6 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5331,7 +5295,6 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5346,7 +5309,6 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5369,7 +5331,6 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5385,7 +5346,6 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5405,7 +5365,6 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5422,7 +5381,6 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5439,7 +5397,6 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5457,7 +5414,6 @@ dependencies = [ [[package]] name = "pallet-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support", "frame-system", @@ -5473,7 +5429,6 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5490,7 +5445,6 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5505,7 +5459,6 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support", "frame-system", @@ -5519,7 +5472,6 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support", "frame-system", @@ -5536,7 +5488,6 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5559,7 +5510,6 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5575,7 +5525,6 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5590,7 +5539,6 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support", "frame-system", @@ -5604,7 +5552,6 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5620,7 +5567,6 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support", "frame-system", @@ -5641,7 +5587,6 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5657,7 +5602,6 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support", "frame-system", @@ -5671,7 +5615,6 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5694,7 +5637,6 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -5705,7 +5647,6 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "log", "sp-arithmetic", @@ -5714,7 +5655,6 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support", "frame-system", @@ -5728,7 +5668,6 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5746,7 +5685,6 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5765,7 +5703,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-support", "frame-system", @@ -5782,7 +5719,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5799,7 +5735,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5810,7 +5745,6 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5827,7 +5761,6 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -5843,7 +5776,6 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-benchmarking", "frame-support", @@ -6890,10 +6822,9 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", "polkadot-node-subsystem-util", + "polkadot-overseer", "polkadot-primitives", "polkadot-primitives-test-helpers", - "sp-api", - "sp-authority-discovery", "sp-consensus-babe", "sp-core", "sp-keyring", @@ -7090,6 +7021,8 @@ dependencies = [ "polkadot-primitives-test-helpers", "sc-client-api", "sp-api", + "sp-authority-discovery", + "sp-consensus-babe", "sp-core", "tracing-gum", ] @@ -8321,7 +8254,6 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "env_logger 0.9.0", "jsonrpsee", @@ -8670,7 +8602,6 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "log", "sp-core", @@ -8681,7 +8612,6 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "async-trait", "futures 0.3.21", @@ -8708,7 +8638,6 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "futures 0.3.21", "futures-timer", @@ -8731,7 +8660,6 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8747,7 +8675,6 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.0", @@ -8764,7 +8691,6 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -8775,7 +8701,6 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "chrono", "clap", @@ -8813,7 +8738,6 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "fnv", "futures 0.3.21", @@ -8841,7 +8765,6 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "hash-db", "kvdb", @@ -8866,7 +8789,6 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "async-trait", "futures 0.3.21", @@ -8890,7 +8812,6 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "async-trait", "fork-tree", @@ -8933,7 +8854,6 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -8957,7 +8877,6 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8970,7 +8889,6 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "async-trait", "futures 0.3.21", @@ -8995,7 +8913,6 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "sc-client-api", "sp-authorship", @@ -9006,7 +8923,6 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "lazy_static", "lru 0.7.5", @@ -9033,7 +8949,6 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "environmental", "parity-scale-codec", @@ -9050,7 +8965,6 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "log", "parity-scale-codec", @@ -9066,7 +8980,6 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "cfg-if 1.0.0", "libc", @@ -9084,7 +8997,6 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "ahash", "async-trait", @@ -9124,7 +9036,6 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "finality-grandpa", "futures 0.3.21", @@ -9148,7 +9059,6 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "ansi_term", "futures 0.3.21", @@ -9165,7 +9075,6 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "async-trait", "hex", @@ -9180,7 +9089,6 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "async-trait", "asynchronous-codec 0.5.0", @@ -9229,7 +9137,6 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "ahash", "futures 0.3.21", @@ -9246,7 +9153,6 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "bytes 1.1.0", "fnv", @@ -9274,7 +9180,6 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "futures 0.3.21", "libp2p", @@ -9287,7 +9192,6 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9296,7 +9200,6 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "futures 0.3.21", "hash-db", @@ -9327,7 +9230,6 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -9353,7 +9255,6 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -9370,7 +9271,6 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "async-trait", "directories", @@ -9434,7 +9334,6 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "log", "parity-scale-codec", @@ -9448,7 +9347,6 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -9469,7 +9367,6 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "chrono", "futures 0.3.21", @@ -9487,7 +9384,6 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "ansi_term", "atty", @@ -9518,7 +9414,6 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -9529,7 +9424,6 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "futures 0.3.21", "futures-timer", @@ -9556,7 +9450,6 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "futures 0.3.21", "log", @@ -9569,7 +9462,6 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "futures 0.3.21", "futures-timer", @@ -10082,7 +9974,6 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "hash-db", "log", @@ -10099,7 +9990,6 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "blake2 0.10.2", "proc-macro-crate 1.1.3", @@ -10111,7 +10001,6 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "parity-scale-codec", "scale-info", @@ -10124,7 +10013,6 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "integer-sqrt", "num-traits", @@ -10139,7 +10027,6 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "parity-scale-codec", "scale-info", @@ -10152,7 +10039,6 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "async-trait", "parity-scale-codec", @@ -10164,7 +10050,6 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "parity-scale-codec", "sp-api", @@ -10176,7 +10061,6 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "futures 0.3.21", "log", @@ -10194,7 +10078,6 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "async-trait", "futures 0.3.21", @@ -10213,7 +10096,6 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "async-trait", "merlin", @@ -10236,7 +10118,6 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "parity-scale-codec", "scale-info", @@ -10250,7 +10131,6 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -10262,7 +10142,6 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "base58", "bitflags", @@ -10308,7 +10187,6 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "blake2 0.10.2", "byteorder", @@ -10322,7 +10200,6 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "proc-macro2", "quote", @@ -10333,7 +10210,6 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "kvdb", "parking_lot 0.12.0", @@ -10342,7 +10218,6 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "proc-macro2", "quote", @@ -10352,7 +10227,6 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "environmental", "parity-scale-codec", @@ -10363,7 +10237,6 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "finality-grandpa", "log", @@ -10381,7 +10254,6 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10395,7 +10267,6 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "futures 0.3.21", "hash-db", @@ -10420,7 +10291,6 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "lazy_static", "sp-core", @@ -10431,7 +10301,6 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "async-trait", "futures 0.3.21", @@ -10448,7 +10317,6 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "thiserror", "zstd", @@ -10457,7 +10325,6 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "parity-scale-codec", "scale-info", @@ -10471,7 +10338,6 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "sp-api", "sp-core", @@ -10481,7 +10347,6 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "backtrace", "lazy_static", @@ -10491,7 +10356,6 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "rustc-hash", "serde", @@ -10501,7 +10365,6 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "either", "hash256-std-hasher", @@ -10523,7 +10386,6 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10540,7 +10402,6 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -10552,7 +10413,6 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "serde", "serde_json", @@ -10561,7 +10421,6 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "parity-scale-codec", "scale-info", @@ -10575,7 +10434,6 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "parity-scale-codec", "scale-info", @@ -10586,7 +10444,6 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "hash-db", "log", @@ -10608,12 +10465,10 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10626,7 +10481,6 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "log", "sp-core", @@ -10639,7 +10493,6 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "async-trait", "futures-timer", @@ -10655,7 +10508,6 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "parity-scale-codec", "sp-std", @@ -10667,7 +10519,6 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "sp-api", "sp-runtime", @@ -10676,7 +10527,6 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "async-trait", "log", @@ -10692,7 +10542,6 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "hash-db", "memory-db", @@ -10708,7 +10557,6 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10725,7 +10573,6 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10736,7 +10583,6 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "impl-trait-for-tuples", "log", @@ -10937,7 +10783,6 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "platforms", ] @@ -10945,7 +10790,6 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.21", @@ -10967,7 +10811,6 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "futures-util", "hyper", @@ -10980,7 +10823,6 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -11003,7 +10845,6 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "async-trait", "futures 0.3.21", @@ -11029,7 +10870,6 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "futures 0.3.21", "substrate-test-utils-derive", @@ -11039,7 +10879,6 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -11050,7 +10889,6 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "ansi_term", "build-helper", @@ -11753,7 +11591,6 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#174735ea1bb5fc4513519c45181d8df63d86f613" dependencies = [ "clap", "jsonrpsee", @@ -12879,3 +12716,247 @@ dependencies = [ "cc", "libc", ] + +[[patch.unused]] +name = "chain-spec-builder" +version = "2.0.0" + +[[patch.unused]] +name = "frame-election-solution-type-fuzzer" +version = "2.0.0-alpha.5" + +[[patch.unused]] +name = "frame-support-test-compile-pass" +version = "4.0.0-dev" + +[[patch.unused]] +name = "node-bench" +version = "0.9.0-dev" + +[[patch.unused]] +name = "node-cli" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-executor" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-inspect" +version = "0.9.0-dev" + +[[patch.unused]] +name = "node-primitives" +version = "2.0.0" + +[[patch.unused]] +name = "node-rpc" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-runtime" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-runtime-generate-bags" +version = "3.0.0" + +[[patch.unused]] +name = "node-template" +version = "4.0.0-dev" + +[[patch.unused]] +name = "node-template-runtime" +version = "4.0.0-dev" + +[[patch.unused]] +name = "node-testing" +version = "3.0.0-dev" + +[[patch.unused]] +name = "pallet-asset-tx-payment" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-atomic-swap" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-aura" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-bags-list-fuzzer" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts-primitives" +version = "6.0.0" + +[[patch.unused]] +name = "pallet-contracts-proc-macro" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts-rpc" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts-rpc-runtime-api" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-conviction-voting" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-basic" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-offchain-worker" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-parallel" +version = "3.0.0-dev" + +[[patch.unused]] +name = "pallet-lottery" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-node-authorization" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-randomness-collective-flip" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-referenda" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-scored-pool" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-state-trie-migration" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-template" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-transaction-storage" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-uniques" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-whitelist" +version = "4.0.0-dev" + +[[patch.unused]] +name = "sc-consensus-aura" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-consensus-manual-seal" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-consensus-pow" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-network-test" +version = "0.8.0" + +[[patch.unused]] +name = "sc-runtime-test" +version = "2.0.0" + +[[patch.unused]] +name = "sc-service-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-api-test" +version = "2.0.1" + +[[patch.unused]] +name = "sp-application-crypto-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-arithmetic-fuzzer" +version = "2.0.0" + +[[patch.unused]] +name = "sp-consensus-aura" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sp-consensus-pow" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sp-npos-elections-fuzzer" +version = "2.0.0-alpha.5" + +[[patch.unused]] +name = "sp-runtime-interface-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-runtime-interface-test-wasm" +version = "2.0.0" + +[[patch.unused]] +name = "sp-runtime-interface-test-wasm-deprecated" +version = "2.0.0" + +[[patch.unused]] +name = "sp-sandbox" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sp-test-primitives" +version = "2.0.0" + +[[patch.unused]] +name = "subkey" +version = "2.0.1" + +[[patch.unused]] +name = "substrate-frame-cli" +version = "4.0.0-dev" + +[[patch.unused]] +name = "substrate-frame-rpc-support" +version = "3.0.0" + +[[patch.unused]] +name = "substrate-test-runtime" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-runtime-client" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-runtime-transaction-pool" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-utils-test-crate" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 701415cc85a9..6b9b1a4449dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -203,6 +203,7 @@ sp-inherents ={path = "/Users/skunert/work/repos/substrate/primitives/inherents" sp-database ={path = "/Users/skunert/work/repos/substrate/primitives/database" } sp-rpc ={path = "/Users/skunert/work/repos/substrate/primitives/rpc" } substrate-test-runtime ={path = "/Users/skunert/work/repos/substrate/test-utils/runtime" } +beefy-primitives ={path = "/Users/skunert/work/repos/substrate/primitives/beefy" } frame-system ={path = "/Users/skunert/work/repos/substrate/frame/system" } frame-system-rpc-runtime-api ={path = "/Users/skunert/work/repos/substrate/frame/system/rpc/runtime-api" } pallet-babe ={path = "/Users/skunert/work/repos/substrate/frame/babe" } @@ -217,8 +218,8 @@ sp-consensus-babe ={path = "/Users/skunert/work/repos/substrate/primitives/conse sp-consensus-slots ={path = "/Users/skunert/work/repos/substrate/primitives/consensus/slots" } sp-consensus-vrf ={path = "/Users/skunert/work/repos/substrate/primitives/consensus/vrf" } frame-election-provider-support ={path = "/Users/skunert/work/repos/substrate/frame/election-provider-support" } +frame-election-provider-solution-type ={path = "/Users/skunert/work/repos/substrate/frame/election-provider-support/solution-type" } sp-npos-elections ={path = "/Users/skunert/work/repos/substrate/primitives/npos-elections" } -sp-npos-elections-solution-type ={path = "/Users/skunert/work/repos/substrate/primitives/npos-elections/solution-type" } substrate-test-utils ={path = "/Users/skunert/work/repos/substrate/test-utils" } substrate-test-utils-derive ={path = "/Users/skunert/work/repos/substrate/test-utils/derive" } sc-service ={path = "/Users/skunert/work/repos/substrate/client/service" } @@ -260,6 +261,7 @@ sc-cli ={path = "/Users/skunert/work/repos/substrate/client/cli" } node-template-runtime ={path = "/Users/skunert/work/repos/substrate/bin/node-template/runtime" } frame-executive ={path = "/Users/skunert/work/repos/substrate/frame/executive" } frame-system-benchmarking ={path = "/Users/skunert/work/repos/substrate/frame/system/benchmarking" } +frame-try-runtime ={path = "/Users/skunert/work/repos/substrate/frame/try-runtime" } pallet-aura ={path = "/Users/skunert/work/repos/substrate/frame/aura" } pallet-grandpa ={path = "/Users/skunert/work/repos/substrate/frame/grandpa" } pallet-randomness-collective-flip ={path = "/Users/skunert/work/repos/substrate/frame/randomness-collective-flip" } @@ -275,11 +277,13 @@ sc-network-test ={path = "/Users/skunert/work/repos/substrate/client/network/tes sc-finality-grandpa ={path = "/Users/skunert/work/repos/substrate/client/finality-grandpa" } sc-network-gossip ={path = "/Users/skunert/work/repos/substrate/client/network-gossip" } substrate-frame-rpc-system ={path = "/Users/skunert/work/repos/substrate/utils/frame/rpc/system" } +try-runtime-cli ={path = "/Users/skunert/work/repos/substrate/utils/frame/try-runtime/cli" } +remote-externalities ={path = "/Users/skunert/work/repos/substrate/utils/frame/remote-externalities" } +pallet-elections-phragmen ={path = "/Users/skunert/work/repos/substrate/frame/elections-phragmen" } substrate-build-script-utils ={path = "/Users/skunert/work/repos/substrate/utils/build-script-utils" } node-bench ={path = "/Users/skunert/work/repos/substrate/bin/node/bench" } node-primitives ={path = "/Users/skunert/work/repos/substrate/bin/node/primitives" } node-runtime ={path = "/Users/skunert/work/repos/substrate/bin/node/runtime" } -frame-try-runtime ={path = "/Users/skunert/work/repos/substrate/frame/try-runtime" } pallet-asset-tx-payment ={path = "/Users/skunert/work/repos/substrate/frame/transaction-payment/asset-tx-payment" } pallet-assets ={path = "/Users/skunert/work/repos/substrate/frame/assets" } pallet-authority-discovery ={path = "/Users/skunert/work/repos/substrate/frame/authority-discovery" } @@ -298,7 +302,6 @@ pallet-scheduler ={path = "/Users/skunert/work/repos/substrate/frame/scheduler" pallet-preimage ={path = "/Users/skunert/work/repos/substrate/frame/preimage" } pallet-democracy ={path = "/Users/skunert/work/repos/substrate/frame/democracy" } pallet-election-provider-multi-phase ={path = "/Users/skunert/work/repos/substrate/frame/election-provider-multi-phase" } -pallet-elections-phragmen ={path = "/Users/skunert/work/repos/substrate/frame/elections-phragmen" } pallet-gilt ={path = "/Users/skunert/work/repos/substrate/frame/gilt" } pallet-identity ={path = "/Users/skunert/work/repos/substrate/frame/identity" } pallet-im-online ={path = "/Users/skunert/work/repos/substrate/frame/im-online" } @@ -316,10 +319,13 @@ pallet-recovery ={path = "/Users/skunert/work/repos/substrate/frame/recovery" } pallet-referenda ={path = "/Users/skunert/work/repos/substrate/frame/referenda" } pallet-session-benchmarking ={path = "/Users/skunert/work/repos/substrate/frame/session/benchmarking" } pallet-society ={path = "/Users/skunert/work/repos/substrate/frame/society" } +pallet-state-trie-migration ={path = "/Users/skunert/work/repos/substrate/frame/state-trie-migration" } +substrate-state-trie-migration-rpc ={path = "/Users/skunert/work/repos/substrate/utils/frame/rpc/state-trie-migration-rpc" } pallet-tips ={path = "/Users/skunert/work/repos/substrate/frame/tips" } pallet-transaction-storage ={path = "/Users/skunert/work/repos/substrate/frame/transaction-storage" } pallet-uniques ={path = "/Users/skunert/work/repos/substrate/frame/uniques" } pallet-vesting ={path = "/Users/skunert/work/repos/substrate/frame/vesting" } +pallet-whitelist ={path = "/Users/skunert/work/repos/substrate/frame/whitelist" } node-testing ={path = "/Users/skunert/work/repos/substrate/bin/node/testing" } node-executor ={path = "/Users/skunert/work/repos/substrate/bin/node/executor" } node-cli ={path = "/Users/skunert/work/repos/substrate/bin/node/cli" } @@ -334,14 +340,11 @@ sc-finality-grandpa-rpc ={path = "/Users/skunert/work/repos/substrate/client/fin sc-sync-state-rpc ={path = "/Users/skunert/work/repos/substrate/client/sync-state-rpc" } sc-authority-discovery ={path = "/Users/skunert/work/repos/substrate/client/authority-discovery" } sc-consensus-uncles ={path = "/Users/skunert/work/repos/substrate/client/consensus/uncles" } -try-runtime-cli ={path = "/Users/skunert/work/repos/substrate/utils/frame/try-runtime/cli" } -remote-externalities ={path = "/Users/skunert/work/repos/substrate/utils/frame/remote-externalities" } sc-service-test ={path = "/Users/skunert/work/repos/substrate/client/service/test" } substrate-frame-cli ={path = "/Users/skunert/work/repos/substrate/utils/frame/frame-utilities-cli" } chain-spec-builder ={path = "/Users/skunert/work/repos/substrate/bin/utils/chain-spec-builder" } subkey ={path = "/Users/skunert/work/repos/substrate/bin/utils/subkey" } beefy-gadget ={path = "/Users/skunert/work/repos/substrate/client/beefy" } -beefy-primitives ={path = "/Users/skunert/work/repos/substrate/primitives/beefy" } beefy-gadget-rpc ={path = "/Users/skunert/work/repos/substrate/client/beefy/rpc" } sc-consensus-manual-seal ={path = "/Users/skunert/work/repos/substrate/client/consensus/manual-seal" } sc-consensus-pow ={path = "/Users/skunert/work/repos/substrate/client/consensus/pow" } @@ -352,6 +355,7 @@ pallet-bags-list-remote-tests ={path = "/Users/skunert/work/repos/substrate/fram pallet-beefy ={path = "/Users/skunert/work/repos/substrate/frame/beefy" } pallet-beefy-mmr ={path = "/Users/skunert/work/repos/substrate/frame/beefy-mmr" } beefy-merkle-tree ={path = "/Users/skunert/work/repos/substrate/frame/beefy-mmr/primitives" } +frame-election-solution-type-fuzzer ={path = "/Users/skunert/work/repos/substrate/frame/election-provider-support/solution-type/fuzzer" } pallet-example-basic ={path = "/Users/skunert/work/repos/substrate/frame/examples/basic" } pallet-example-offchain-worker ={path = "/Users/skunert/work/repos/substrate/frame/examples/offchain-worker" } pallet-example-parallel ={path = "/Users/skunert/work/repos/substrate/frame/examples/parallel" } From 59d3357d3301f3b758d408b227c00316036e328e Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Mon, 25 Apr 2022 10:30:15 +0200 Subject: [PATCH 04/23] Finish merging rntime-api subsystem --- node/core/runtime-api/src/lib.rs | 7 ++----- node/overseer/src/lib.rs | 22 ++++++++++------------ 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index e0cfca12b845..8cd9f19c2b88 100644 --- a/node/core/runtime-api/src/lib.rs +++ b/node/core/runtime-api/src/lib.rs @@ -355,8 +355,6 @@ fn make_runtime_api_request( where Client: OverseerRuntimeClient + 'static, { - use sp_api::ApiExt; - let _timer = metrics.time_make_runtime_api_request(); macro_rules! query { @@ -401,10 +399,9 @@ where match request { Request::Version(sender) => { - let api = client.runtime_api(); + let api = client; - let runtime_version = match api - .api_version::>(&BlockId::Hash(relay_parent)) + let runtime_version = match api.api_version_parachain_host(&BlockId::Hash(relay_parent)) { Ok(Some(v)) => Ok(v), Ok(None) => Err(RuntimeApiError::NotSupported { runtime_api_name: "api_version" }), diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index 4f60a8640559..ab179c350fa0 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -71,15 +71,12 @@ use futures::{channel::oneshot, future::BoxFuture, select, Future, FutureExt, St use lru::LruCache; use client::{BlockImportNotification, BlockchainEvents, FinalityNotification}; -use polkadot_primitives::{ - v1::{ - CandidateCommitments, CandidateEvent, - CommittedCandidateReceipt, CoreState, GroupRotationInfo, Hash, Header, Id, - InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, - PersistedValidationData, ScrapedOnChainVotes, SessionIndex, ValidationCode, - ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, - }, - v2::{Block, BlockId, BlockNumber, Hash, ParachainHost, ParachainHost, PvfCheckStatement, SessionInfo}, +use polkadot_primitives::v2::{ + Block, BlockId, BlockNumber, CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, + CoreState, GroupRotationInfo, Hash, Header, Id, InboundDownwardMessage, InboundHrmpMessage, + OccupiedCoreAssumption, ParachainHost, PersistedValidationData, PvfCheckStatement, + ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode, ValidationCodeHash, + ValidatorId, ValidatorIndex, ValidatorSignature, }; use sp_api::{ApiExt, ProvideRuntimeApi}; @@ -964,7 +961,7 @@ pub trait OverseerRuntimeClient { &self, at: &BlockId, index: SessionIndex, - ) -> Result, ApiError>; + ) -> Result, ApiError>; /// Submits a PVF pre-checking statement into the transaction pool. /// @@ -1239,7 +1236,8 @@ where &self, at: &BlockId, index: SessionIndex, - ) -> Result, ApiError> { - self.runtime_api().session_info_before_version_2(at, index) + ) -> Result, ApiError> { + // self.runtime_api().session_info_before_version_2(at, index) + todo!() } } From ab7dfeb6e22ae754a039182ba0276aa03825defd Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Fri, 6 May 2022 14:03:20 +0200 Subject: [PATCH 05/23] First version that is able to produce blocks --- Cargo.lock | 419 ++++++++++++++++++------------- Cargo.toml | 5 +- node/core/runtime-api/src/lib.rs | 1 + node/overseer/src/lib.rs | 13 +- 4 files changed, 263 insertions(+), 175 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c0dde2999c8f..81efff842618 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -444,7 +444,6 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "beefy-primitives", "fnv", @@ -478,7 +477,6 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -501,12 +499,10 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "parity-scale-codec", "scale-info", @@ -2160,7 +2156,6 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "parity-scale-codec", ] @@ -2178,7 +2173,6 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-support", "frame-system", @@ -2200,7 +2194,6 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "Inflector", "chrono", @@ -2248,7 +2241,6 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -2259,7 +2251,6 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2275,7 +2266,6 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-support", "frame-system", @@ -2303,7 +2293,6 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "bitflags", "frame-metadata", @@ -2333,7 +2322,6 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2345,7 +2333,6 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", @@ -2357,7 +2344,6 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "proc-macro2", "quote", @@ -2367,7 +2353,6 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2390,7 +2375,6 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-support", "frame-system", @@ -2401,7 +2385,6 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-support", "log", @@ -2418,7 +2401,6 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -2433,7 +2415,6 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "parity-scale-codec", "sp-api", @@ -2442,7 +2423,6 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-support", "sp-api", @@ -2638,7 +2618,6 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "chrono", "frame-election-provider-support", @@ -5036,7 +5015,6 @@ checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5050,7 +5028,6 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-support", "frame-system", @@ -5066,7 +5043,6 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-support", "frame-system", @@ -5081,7 +5057,6 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5105,7 +5080,6 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5125,7 +5099,6 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-election-provider-support", "frame-support", @@ -5145,7 +5118,6 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5160,7 +5132,6 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "beefy-primitives", "frame-support", @@ -5176,7 +5147,6 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -5199,7 +5169,6 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5281,7 +5250,6 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5300,7 +5268,6 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5317,7 +5284,6 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5333,7 +5299,6 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5356,7 +5321,6 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5369,7 +5333,6 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5387,7 +5350,6 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5402,7 +5364,6 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5425,7 +5386,6 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5441,7 +5401,6 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5461,7 +5420,6 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5478,7 +5436,6 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5495,7 +5452,6 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5513,7 +5469,6 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5530,7 +5485,6 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5545,7 +5499,6 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-support", "frame-system", @@ -5559,7 +5512,6 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-support", "frame-system", @@ -5576,7 +5528,6 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5599,7 +5550,6 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5615,7 +5565,6 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5630,7 +5579,6 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-support", "frame-system", @@ -5644,7 +5592,6 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5660,7 +5607,6 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-support", "frame-system", @@ -5681,7 +5627,6 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5697,7 +5642,6 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-support", "frame-system", @@ -5711,7 +5655,6 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5734,7 +5677,6 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -5745,7 +5687,6 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "log", "sp-arithmetic", @@ -5754,7 +5695,6 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-support", "frame-system", @@ -5768,7 +5708,6 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5786,7 +5725,6 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5805,7 +5743,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-support", "frame-system", @@ -5822,7 +5759,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5839,7 +5775,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5850,7 +5785,6 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5867,7 +5801,6 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -5883,7 +5816,6 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-benchmarking", "frame-support", @@ -6924,10 +6856,9 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", "polkadot-node-subsystem-util", + "polkadot-overseer", "polkadot-primitives", "polkadot-primitives-test-helpers", - "sp-api", - "sp-authority-discovery", "sp-consensus-babe", "sp-core", "sp-keyring", @@ -7124,6 +7055,8 @@ dependencies = [ "polkadot-primitives-test-helpers", "sc-client-api", "sp-api", + "sp-authority-discovery", + "sp-consensus-babe", "sp-core", "tracing-gum", ] @@ -8398,7 +8331,6 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "env_logger 0.9.0", "jsonrpsee", @@ -8770,7 +8702,6 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "log", "sp-core", @@ -8781,7 +8712,6 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "async-trait", "futures 0.3.21", @@ -8808,7 +8738,6 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "futures 0.3.21", "futures-timer", @@ -8831,7 +8760,6 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8847,7 +8775,6 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.0", @@ -8864,7 +8791,6 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -8875,7 +8801,6 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "chrono", "clap", @@ -8913,7 +8838,6 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "fnv", "futures 0.3.21", @@ -8941,7 +8865,6 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "hash-db", "kvdb", @@ -8966,7 +8889,6 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "async-trait", "futures 0.3.21", @@ -8990,7 +8912,6 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "async-trait", "fork-tree", @@ -9033,7 +8954,6 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -9057,7 +8977,6 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9070,7 +8989,6 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "async-trait", "futures 0.3.21", @@ -9095,7 +9013,6 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "sc-client-api", "sp-authorship", @@ -9106,7 +9023,6 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "lazy_static", "lru 0.7.5", @@ -9133,7 +9049,6 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "environmental", "parity-scale-codec", @@ -9150,7 +9065,6 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "log", "parity-scale-codec", @@ -9166,7 +9080,6 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "cfg-if 1.0.0", "libc", @@ -9184,7 +9097,6 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "ahash", "async-trait", @@ -9224,7 +9136,6 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "finality-grandpa", "futures 0.3.21", @@ -9248,7 +9159,6 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "ansi_term", "futures 0.3.21", @@ -9265,7 +9175,6 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "async-trait", "hex", @@ -9280,7 +9189,6 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "async-trait", "asynchronous-codec 0.5.0", @@ -9329,7 +9237,6 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "ahash", "futures 0.3.21", @@ -9346,7 +9253,6 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "bytes 1.1.0", "fnv", @@ -9374,7 +9280,6 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "futures 0.3.21", "libp2p", @@ -9387,7 +9292,6 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9396,7 +9300,6 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "futures 0.3.21", "hash-db", @@ -9427,7 +9330,6 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -9453,7 +9355,6 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -9470,7 +9371,6 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "async-trait", "directories", @@ -9535,7 +9435,6 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "log", "parity-scale-codec", @@ -9549,7 +9448,6 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -9570,7 +9468,6 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "futures 0.3.21", "libc", @@ -9589,7 +9486,6 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "chrono", "futures 0.3.21", @@ -9607,7 +9503,6 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "ansi_term", "atty", @@ -9638,7 +9533,6 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -9649,7 +9543,6 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "futures 0.3.21", "futures-timer", @@ -9676,7 +9569,6 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "futures 0.3.21", "log", @@ -9689,7 +9581,6 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "futures 0.3.21", "futures-timer", @@ -10202,7 +10093,6 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "hash-db", "log", @@ -10219,7 +10109,6 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "blake2 0.10.2", "proc-macro-crate 1.1.3", @@ -10231,7 +10120,6 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "parity-scale-codec", "scale-info", @@ -10244,7 +10132,6 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "integer-sqrt", "num-traits", @@ -10259,7 +10146,6 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "parity-scale-codec", "scale-info", @@ -10272,7 +10158,6 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "async-trait", "parity-scale-codec", @@ -10284,7 +10169,6 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "parity-scale-codec", "sp-api", @@ -10296,7 +10180,6 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "futures 0.3.21", "log", @@ -10314,7 +10197,6 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "async-trait", "futures 0.3.21", @@ -10333,7 +10215,6 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "async-trait", "merlin", @@ -10356,7 +10237,6 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "parity-scale-codec", "scale-info", @@ -10370,7 +10250,6 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -10382,7 +10261,6 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "base58", "bitflags", @@ -10428,7 +10306,6 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "blake2 0.10.2", "byteorder", @@ -10442,7 +10319,6 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "proc-macro2", "quote", @@ -10453,7 +10329,6 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "kvdb", "parking_lot 0.12.0", @@ -10462,7 +10337,6 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "proc-macro2", "quote", @@ -10472,7 +10346,6 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "environmental", "parity-scale-codec", @@ -10483,7 +10356,6 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "finality-grandpa", "log", @@ -10501,7 +10373,6 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10515,7 +10386,6 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "futures 0.3.21", "hash-db", @@ -10540,7 +10410,6 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "lazy_static", "sp-core", @@ -10551,7 +10420,6 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "async-trait", "futures 0.3.21", @@ -10568,7 +10436,6 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "thiserror", "zstd", @@ -10577,7 +10444,6 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "log", "parity-scale-codec", @@ -10592,7 +10458,6 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "parity-scale-codec", "scale-info", @@ -10606,7 +10471,6 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "sp-api", "sp-core", @@ -10616,7 +10480,6 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "backtrace", "lazy_static", @@ -10626,7 +10489,6 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "rustc-hash", "serde", @@ -10636,7 +10498,6 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "either", "hash256-std-hasher", @@ -10658,7 +10519,6 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10675,7 +10535,6 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -10687,7 +10546,6 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "serde", "serde_json", @@ -10696,7 +10554,6 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "parity-scale-codec", "scale-info", @@ -10710,7 +10567,6 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "parity-scale-codec", "scale-info", @@ -10721,7 +10577,6 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "hash-db", "log", @@ -10743,12 +10598,10 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10761,7 +10614,6 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "log", "sp-core", @@ -10774,7 +10626,6 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "async-trait", "futures-timer", @@ -10790,7 +10641,6 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "parity-scale-codec", "sp-std", @@ -10802,7 +10652,6 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "sp-api", "sp-runtime", @@ -10811,7 +10660,6 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "async-trait", "log", @@ -10827,7 +10675,6 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "hash-db", "memory-db", @@ -10843,7 +10690,6 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10860,7 +10706,6 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10871,7 +10716,6 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "impl-trait-for-tuples", "log", @@ -11063,7 +10907,6 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "platforms", ] @@ -11071,7 +10914,6 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.21", @@ -11093,7 +10935,6 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "futures-util", "hyper", @@ -11106,7 +10947,6 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -11129,7 +10969,6 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "async-trait", "futures 0.3.21", @@ -11155,7 +10994,6 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "futures 0.3.21", "substrate-test-utils-derive", @@ -11165,7 +11003,6 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -11176,7 +11013,6 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "ansi_term", "build-helper", @@ -11890,7 +11726,6 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7dd9798a5521343ae30ed3ac52212109febbab64" dependencies = [ "clap", "jsonrpsee", @@ -13038,3 +12873,251 @@ dependencies = [ "cc", "libc", ] + +[[patch.unused]] +name = "chain-spec-builder" +version = "2.0.0" + +[[patch.unused]] +name = "frame-election-solution-type-fuzzer" +version = "2.0.0-alpha.5" + +[[patch.unused]] +name = "frame-support-test-compile-pass" +version = "4.0.0-dev" + +[[patch.unused]] +name = "node-bench" +version = "0.9.0-dev" + +[[patch.unused]] +name = "node-cli" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-executor" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-inspect" +version = "0.9.0-dev" + +[[patch.unused]] +name = "node-primitives" +version = "2.0.0" + +[[patch.unused]] +name = "node-rpc" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-runtime" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-runtime-generate-bags" +version = "3.0.0" + +[[patch.unused]] +name = "node-template" +version = "4.0.0-dev" + +[[patch.unused]] +name = "node-template-runtime" +version = "4.0.0-dev" + +[[patch.unused]] +name = "node-testing" +version = "3.0.0-dev" + +[[patch.unused]] +name = "pallet-asset-tx-payment" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-atomic-swap" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-aura" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-bags-list-fuzzer" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts-primitives" +version = "6.0.0" + +[[patch.unused]] +name = "pallet-contracts-proc-macro" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts-rpc" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts-rpc-runtime-api" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-conviction-voting" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-basic" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-offchain-worker" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-parallel" +version = "3.0.0-dev" + +[[patch.unused]] +name = "pallet-lottery" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-node-authorization" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-randomness-collective-flip" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-referenda" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-remark" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-scored-pool" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-state-trie-migration" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-template" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-transaction-storage" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-uniques" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-whitelist" +version = "4.0.0-dev" + +[[patch.unused]] +name = "sc-consensus-aura" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-consensus-manual-seal" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-consensus-pow" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-network-test" +version = "0.8.0" + +[[patch.unused]] +name = "sc-runtime-test" +version = "2.0.0" + +[[patch.unused]] +name = "sc-service-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-api-test" +version = "2.0.1" + +[[patch.unused]] +name = "sp-application-crypto-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-arithmetic-fuzzer" +version = "2.0.0" + +[[patch.unused]] +name = "sp-consensus-aura" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sp-consensus-pow" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sp-npos-elections-fuzzer" +version = "2.0.0-alpha.5" + +[[patch.unused]] +name = "sp-runtime-interface-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-runtime-interface-test-wasm" +version = "2.0.0" + +[[patch.unused]] +name = "sp-runtime-interface-test-wasm-deprecated" +version = "2.0.0" + +[[patch.unused]] +name = "sp-sandbox" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sp-test-primitives" +version = "2.0.0" + +[[patch.unused]] +name = "subkey" +version = "2.0.1" + +[[patch.unused]] +name = "substrate-frame-cli" +version = "4.0.0-dev" + +[[patch.unused]] +name = "substrate-frame-rpc-support" +version = "3.0.0" + +[[patch.unused]] +name = "substrate-test-runtime" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-runtime-client" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-runtime-transaction-pool" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-utils-test-crate" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 606b7530f08b..5dbd26cefc46 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -299,6 +299,7 @@ sp-transaction-pool ={path = "/Users/skunert/work/repos/substrate/primitives/tra substrate-test-runtime-transaction-pool ={path = "/Users/skunert/work/repos/substrate/test-utils/runtime/transaction-pool" } sc-rpc ={path = "/Users/skunert/work/repos/substrate/client/rpc" } sc-rpc-api ={path = "/Users/skunert/work/repos/substrate/client/rpc-api" } +sc-sysinfo ={path = "/Users/skunert/work/repos/substrate/client/sysinfo" } sp-block-builder ={path = "/Users/skunert/work/repos/substrate/primitives/block-builder" } sp-transaction-storage-proof ={path = "/Users/skunert/work/repos/substrate/primitives/transaction-storage-proof" } pallet-balances ={path = "/Users/skunert/work/repos/substrate/frame/balances" } @@ -357,6 +358,7 @@ pallet-scheduler ={path = "/Users/skunert/work/repos/substrate/frame/scheduler" pallet-preimage ={path = "/Users/skunert/work/repos/substrate/frame/preimage" } pallet-democracy ={path = "/Users/skunert/work/repos/substrate/frame/democracy" } pallet-election-provider-multi-phase ={path = "/Users/skunert/work/repos/substrate/frame/election-provider-multi-phase" } +pallet-election-provider-support-benchmarking ={path = "/Users/skunert/work/repos/substrate/frame/election-provider-support/benchmarking" } pallet-gilt ={path = "/Users/skunert/work/repos/substrate/frame/gilt" } pallet-identity ={path = "/Users/skunert/work/repos/substrate/frame/identity" } pallet-im-online ={path = "/Users/skunert/work/repos/substrate/frame/im-online" } @@ -366,12 +368,13 @@ frame-support-test ={path = "/Users/skunert/work/repos/substrate/frame/support/t frame-support-test-pallet ={path = "/Users/skunert/work/repos/substrate/frame/support/test/pallet" } pallet-membership ={path = "/Users/skunert/work/repos/substrate/frame/membership" } pallet-mmr ={path = "/Users/skunert/work/repos/substrate/frame/merkle-mountain-range" } -pallet-mmr-primitives ={path = "/Users/skunert/work/repos/substrate/frame/merkle-mountain-range/primitives" } +sp-mmr-primitives ={path = "/Users/skunert/work/repos/substrate/primitives/merkle-mountain-range" } pallet-multisig ={path = "/Users/skunert/work/repos/substrate/frame/multisig" } pallet-offences-benchmarking ={path = "/Users/skunert/work/repos/substrate/frame/offences/benchmarking" } pallet-proxy ={path = "/Users/skunert/work/repos/substrate/frame/proxy" } pallet-recovery ={path = "/Users/skunert/work/repos/substrate/frame/recovery" } pallet-referenda ={path = "/Users/skunert/work/repos/substrate/frame/referenda" } +pallet-remark ={path = "/Users/skunert/work/repos/substrate/frame/remark" } pallet-session-benchmarking ={path = "/Users/skunert/work/repos/substrate/frame/session/benchmarking" } pallet-society ={path = "/Users/skunert/work/repos/substrate/frame/society" } pallet-state-trie-migration ={path = "/Users/skunert/work/repos/substrate/frame/state-trie-migration" } diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index f66bc722eb9e..d8ca775718ca 100644 --- a/node/core/runtime-api/src/lib.rs +++ b/node/core/runtime-api/src/lib.rs @@ -275,6 +275,7 @@ where let metrics = self.metrics.clone(); let (sender, receiver) = oneshot::channel(); + gum::debug!(target: LOG_TARGET, "Runtime API call was requested: {:?}", request); let request = match self.query_cache(relay_parent.clone(), request) { Some(request) => request, None => return, diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index 99ed1db57c19..2da285a07b9d 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -71,14 +71,15 @@ use futures::{channel::oneshot, future::BoxFuture, select, Future, FutureExt, St use lru::LruCache; use client::{BlockImportNotification, BlockchainEvents, FinalityNotification}; -use polkadot_primitives::v2::{ - Block, BlockId, BlockNumber, CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, - CoreState, GroupRotationInfo, Hash, Header, Id, InboundDownwardMessage, InboundHrmpMessage, - OccupiedCoreAssumption, PersistedValidationData, PvfCheckStatement, - ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode, ValidationCodeHash, - ValidatorId, ValidatorIndex, ValidatorSignature, use polkadot_primitives::{ runtime_api::ParachainHost, + v2::{ + Block, BlockId, BlockNumber, CandidateCommitments, CandidateEvent, + CommittedCandidateReceipt, CoreState, GroupRotationInfo, Hash, Header, Id, + InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, + PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, + ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, + }, }; use sp_api::{ApiExt, ProvideRuntimeApi}; From e37cdf98345e40d6279ad39f6bf8f1ed429110f3 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Wed, 18 May 2022 17:10:27 +0200 Subject: [PATCH 06/23] Make OverseerRuntimeClient async --- Cargo.lock | 1 + node/core/runtime-api/src/lib.rs | 39 ++++----- node/overseer/Cargo.toml | 1 + node/overseer/src/lib.rs | 134 +++++++++++++++++-------------- 4 files changed, 97 insertions(+), 78 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 177ec70e7aaa..f74b80ed456e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6911,6 +6911,7 @@ name = "polkadot-overseer" version = "0.9.19" dependencies = [ "assert_matches", + "async-trait", "femme", "futures 0.3.21", "futures-timer", diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index c771ed07f8ee..9a4b2a0ed069 100644 --- a/node/core/runtime-api/src/lib.rs +++ b/node/core/runtime-api/src/lib.rs @@ -282,14 +282,13 @@ where let metrics = self.metrics.clone(); let (sender, receiver) = oneshot::channel(); - gum::debug!(target: LOG_TARGET, "Runtime API call was requested: {:?}", request); let request = match self.query_cache(relay_parent.clone(), request) { Some(request) => request, None => return, }; let request = async move { - let result = make_runtime_api_request(client, metrics, relay_parent, request); + let result = make_runtime_api_request(client, metrics, relay_parent, request).await; let _ = sender.send(result); } .boxed(); @@ -357,7 +356,7 @@ where } } -fn make_runtime_api_request( +async fn make_runtime_api_request( client: Arc, metrics: Metrics, relay_parent: Hash, @@ -373,7 +372,7 @@ where let sender = $sender; let api = client; - let runtime_version = api.api_version_parachain_host(&BlockId::Hash(relay_parent)) + let runtime_version = api.api_version_parachain_host(&BlockId::Hash(relay_parent)).await .unwrap_or_else(|e| { gum::warn!( target: LOG_TARGET, @@ -391,7 +390,7 @@ where }); let res = if runtime_version >= $version { - api.$api_name(&BlockId::Hash(relay_parent) $(, $param.clone() )*) + api.$api_name(&BlockId::Hash(relay_parent) $(, $param.clone() )*).await .map_err(|e| RuntimeApiError::Execution { runtime_api_name: stringify!($api_name), source: std::sync::Arc::new(e), @@ -412,15 +411,16 @@ where Request::Version(sender) => { let api = client; - let runtime_version = match api.api_version_parachain_host(&BlockId::Hash(relay_parent)) - { - Ok(Some(v)) => Ok(v), - Ok(None) => Err(RuntimeApiError::NotSupported { runtime_api_name: "api_version" }), - Err(e) => Err(RuntimeApiError::Execution { - runtime_api_name: "api_version", - source: std::sync::Arc::new(e), - }), - }; + let runtime_version = + match api.api_version_parachain_host(&BlockId::Hash(relay_parent)).await { + Ok(Some(v)) => Ok(v), + Ok(None) => + Err(RuntimeApiError::NotSupported { runtime_api_name: "api_version" }), + Err(e) => Err(RuntimeApiError::Execution { + runtime_api_name: "api_version", + source: std::sync::Arc::new(e), + }), + }; let _ = sender.send(runtime_version.clone()); runtime_version.ok().map(|v| RequestResult::Version(relay_parent, v)) @@ -475,20 +475,23 @@ where let api_version = api .api_version_parachain_host(&BlockId::Hash(relay_parent)) + .await .unwrap_or_default() .unwrap_or_default(); let res = if api_version >= 2 { - let res = - api.session_info(&block_id, index).map_err(|e| RuntimeApiError::Execution { + let res = api + .session_info(&block_id, index) + .map_err(|e| RuntimeApiError::Execution { runtime_api_name: "SessionInfo", source: std::sync::Arc::new(e), - }); + }) + .await; metrics.on_request(res.is_ok()); res } else { #[allow(deprecated)] - let res = api.session_info_before_version_2(&block_id, index).map_err(|e| { + let res = api.session_info_before_version_2(&block_id, index).await.map_err(|e| { RuntimeApiError::Execution { runtime_api_name: "SessionInfo", source: std::sync::Arc::new(e), diff --git a/node/overseer/Cargo.toml b/node/overseer/Cargo.toml index fa69cc9fa0fc..ac936fe826d8 100644 --- a/node/overseer/Cargo.toml +++ b/node/overseer/Cargo.toml @@ -22,6 +22,7 @@ polkadot-overseer-gen = { path = "./overseer-gen" } gum = { package = "tracing-gum", path = "../gum" } lru = "0.7" parity-util-mem = { version = "0.11.0", default-features = false } +async-trait = "0.1.53" [dev-dependencies] metered-channel = { path = "../metered-channel" } diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index bdcd59a814ab..2a293cdd4299 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -68,6 +68,7 @@ use std::{ }; use futures::{channel::oneshot, future::BoxFuture, select, Future, FutureExt, Stream, StreamExt}; +use gen::async_trait; use lru::LruCache; use client::{BlockImportNotification, BlockchainEvents, FinalityNotification}; @@ -143,10 +144,9 @@ impl HeadSupportsParachains for Arc where Client: OverseerRuntimeClient, { + // TODO Introduce actual check here fn head_supports_parachains(&self, head: &Hash) -> bool { - let id = BlockId::Hash(*head); - // Check that the `ParachainHost` runtime api is at least with version 1 present on chain. - self.api_version_parachain_host(&id).ok().flatten().unwrap_or(0) >= 1 + true } } @@ -850,17 +850,18 @@ where } } +#[async_trait] pub trait OverseerRuntimeClient { - fn validators(&self, at: &BlockId) -> Result, ApiError>; + async fn validators(&self, at: &BlockId) -> Result, ApiError>; - fn validator_groups( + async fn validator_groups( &self, at: &BlockId, ) -> Result<(Vec>, GroupRotationInfo), ApiError>; /// Yields information on all availability cores as relevant to the child block. /// Cores are either free or occupied. Free cores can have paras assigned to them. - fn availability_cores( + async fn availability_cores( &self, at: &BlockId, ) -> Result>, ApiError>; @@ -870,7 +871,7 @@ pub trait OverseerRuntimeClient { /// /// Returns `None` if either the para is not registered or the assumption is `Freed` /// and the para already occupies a core. - fn persisted_validation_data( + async fn persisted_validation_data( &self, at: &BlockId, para_id: Id, @@ -880,7 +881,7 @@ pub trait OverseerRuntimeClient { /// Returns the persisted validation data for the given `ParaId` along with the corresponding /// validation code hash. Instead of accepting assumption about the para, matches the validation /// data hash against an expected one and yields `None` if they're not equal. - fn assumed_validation_data( + async fn assumed_validation_data( &self, at: &BlockId, para_id: Id, @@ -888,7 +889,7 @@ pub trait OverseerRuntimeClient { ) -> Result, ValidationCodeHash)>, ApiError>; /// Checks if the given validation outputs pass the acceptance criteria. - fn check_validation_outputs( + async fn check_validation_outputs( &self, at: &BlockId, para_id: Id, @@ -898,13 +899,13 @@ pub trait OverseerRuntimeClient { /// Returns the session index expected at a child of the block. /// /// This can be used to instantiate a `SigningContext`. - fn session_index_for_child(&self, at: &BlockId) -> Result; + async fn session_index_for_child(&self, at: &BlockId) -> Result; /// Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`. /// /// Returns `None` if either the para is not registered or the assumption is `Freed` /// and the para already occupies a core. - fn validation_code( + async fn validation_code( &self, at: &BlockId, para_id: Id, @@ -913,17 +914,17 @@ pub trait OverseerRuntimeClient { /// Get the receipt of a candidate pending availability. This returns `Some` for any paras /// assigned to occupied cores in `availability_cores` and `None` otherwise. - fn candidate_pending_availability( + async fn candidate_pending_availability( &self, at: &BlockId, para_id: Id, ) -> Result>, ApiError>; /// Get a vector of events concerning candidates that occurred within a block. - fn candidate_events(&self, at: &BlockId) -> Result>, ApiError>; + async fn candidate_events(&self, at: &BlockId) -> Result>, ApiError>; /// Get all the pending inbound messages in the downward message queue for a para. - fn dmq_contents( + async fn dmq_contents( &self, at: &BlockId, recipient: Id, @@ -931,28 +932,31 @@ pub trait OverseerRuntimeClient { /// Get the contents of all channels addressed to the given recipient. Channels that have no /// messages in them are also included. - fn inbound_hrmp_channels_contents( + async fn inbound_hrmp_channels_contents( &self, at: &BlockId, recipient: Id, ) -> Result>>, ApiError>; /// Get the validation code from its hash. - fn validation_code_by_hash( + async fn validation_code_by_hash( &self, at: &BlockId, hash: ValidationCodeHash, ) -> Result, ApiError>; /// Scrape dispute relevant from on-chain, backing votes and resolved disputes. - fn on_chain_votes(&self, at: &BlockId) -> Result>, ApiError>; + async fn on_chain_votes( + &self, + at: &BlockId, + ) -> Result>, ApiError>; /***** Added in v2 *****/ /// Get the session info for the given session, if stored. /// /// NOTE: This function is only available since parachain host version 2. - fn session_info( + async fn session_info( &self, at: &BlockId, index: SessionIndex, @@ -961,7 +965,7 @@ pub trait OverseerRuntimeClient { /// Get the session info for the given session, if stored. /// /// NOTE: This function is only available since parachain host version 2. - fn session_info_before_version_2( + async fn session_info_before_version_2( &self, at: &BlockId, index: SessionIndex, @@ -970,7 +974,7 @@ pub trait OverseerRuntimeClient { /// Submits a PVF pre-checking statement into the transaction pool. /// /// NOTE: This function is only available since parachain host version 2. - fn submit_pvf_check_statement( + async fn submit_pvf_check_statement( &self, at: &BlockId, stmt: PvfCheckStatement, @@ -980,12 +984,15 @@ pub trait OverseerRuntimeClient { /// Returns code hashes of PVFs that require pre-checking by validators in the active set. /// /// NOTE: This function is only available since parachain host version 2. - fn pvfs_require_precheck(&self, at: &BlockId) -> Result, ApiError>; + async fn pvfs_require_precheck( + &self, + at: &BlockId, + ) -> Result, ApiError>; /// Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`. /// /// NOTE: This function is only available since parachain host version 2. - fn validation_code_hash( + async fn validation_code_hash( &self, at: &BlockId, para_id: Id, @@ -996,17 +1003,17 @@ pub trait OverseerRuntimeClient { /// /// /// Return the genesis configuration for BABE. The configuration is only read on genesis. - fn configuration(&self, at: &BlockId) -> Result; + async fn configuration(&self, at: &BlockId) -> Result; /// Returns the slot that started the current epoch. - fn current_epoch_start(&self, at: &BlockId) -> Result; + async fn current_epoch_start(&self, at: &BlockId) -> Result; /// Returns information regarding the current epoch. - fn current_epoch(&self, at: &BlockId) -> Result; + async fn current_epoch(&self, at: &BlockId) -> Result; /// Returns information regarding the next epoch (which was already /// previously announced). - fn next_epoch(&self, at: &BlockId) -> Result; + async fn next_epoch(&self, at: &BlockId) -> Result; /// Generates a proof of key ownership for the given authority in the /// current epoch. An example usage of this module is coupled with the @@ -1019,7 +1026,7 @@ pub trait OverseerRuntimeClient { /// which the epoch for the given slot is live on-chain. Future /// implementations will instead use indexed data through an offchain /// worker, not requiring older states to be available. - fn generate_key_ownership_proof( + async fn generate_key_ownership_proof( &self, at: &BlockId, slot: Slot, @@ -1034,50 +1041,51 @@ pub trait OverseerRuntimeClient { /// `None` when creation of the extrinsic fails, e.g. if equivocation /// reporting is disabled for the given runtime (i.e. this method is /// hardcoded to return `None`). Only useful in an offchain context. - fn submit_report_equivocation_unsigned_extrinsic( + async fn submit_report_equivocation_unsigned_extrinsic( &self, at: &BlockId, equivocation_proof: EquivocationProof

, key_owner_proof: OpaqueKeyOwnershipProof, ) -> Result, ApiError>; - fn authorities( + async fn authorities( &self, at: &BlockId, ) -> std::result::Result, ApiError>; - fn api_version_parachain_host(&self, at: &BlockId) -> Result, ApiError>; + async fn api_version_parachain_host(&self, at: &BlockId) -> Result, ApiError>; - fn staging_get_disputes( + async fn staging_get_disputes( &self, at: &BlockId, ) -> Result)>, ApiError>; } +#[async_trait] impl OverseerRuntimeClient for T where - T: ProvideRuntimeApi, + T: ProvideRuntimeApi + Send + Sync, T::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, { - fn validators(&self, at: &BlockId) -> Result, ApiError> { + async fn validators(&self, at: &BlockId) -> Result, ApiError> { self.runtime_api().validators(at) } - fn validator_groups( + async fn validator_groups( &self, at: &BlockId, ) -> Result<(Vec>, GroupRotationInfo), ApiError> { self.runtime_api().validator_groups(at) } - fn availability_cores( + async fn availability_cores( &self, at: &BlockId, ) -> Result>, ApiError> { self.runtime_api().availability_cores(at) } - fn persisted_validation_data( + async fn persisted_validation_data( &self, at: &BlockId, para_id: Id, @@ -1086,7 +1094,7 @@ where self.runtime_api().persisted_validation_data(at, para_id, assumption) } - fn assumed_validation_data( + async fn assumed_validation_data( &self, at: &BlockId, para_id: Id, @@ -1100,7 +1108,7 @@ where ) } - fn check_validation_outputs( + async fn check_validation_outputs( &self, at: &BlockId, para_id: Id, @@ -1109,11 +1117,11 @@ where self.runtime_api().check_validation_outputs(at, para_id, outputs) } - fn session_index_for_child(&self, at: &BlockId) -> Result { + async fn session_index_for_child(&self, at: &BlockId) -> Result { self.runtime_api().session_index_for_child(at) } - fn validation_code( + async fn validation_code( &self, at: &BlockId, para_id: Id, @@ -1122,7 +1130,7 @@ where self.runtime_api().validation_code(at, para_id, assumption) } - fn candidate_pending_availability( + async fn candidate_pending_availability( &self, at: &BlockId, para_id: Id, @@ -1130,11 +1138,11 @@ where self.runtime_api().candidate_pending_availability(at, para_id) } - fn candidate_events(&self, at: &BlockId) -> Result>, ApiError> { + async fn candidate_events(&self, at: &BlockId) -> Result>, ApiError> { self.runtime_api().candidate_events(at) } - fn dmq_contents( + async fn dmq_contents( &self, at: &BlockId, recipient: Id, @@ -1142,7 +1150,7 @@ where self.runtime_api().dmq_contents(at, recipient) } - fn inbound_hrmp_channels_contents( + async fn inbound_hrmp_channels_contents( &self, at: &BlockId, recipient: Id, @@ -1150,7 +1158,7 @@ where self.runtime_api().inbound_hrmp_channels_contents(at, recipient) } - fn validation_code_by_hash( + async fn validation_code_by_hash( &self, at: &BlockId, hash: ValidationCodeHash, @@ -1158,11 +1166,14 @@ where self.runtime_api().validation_code_by_hash(at, hash) } - fn on_chain_votes(&self, at: &BlockId) -> Result>, ApiError> { + async fn on_chain_votes( + &self, + at: &BlockId, + ) -> Result>, ApiError> { self.runtime_api().on_chain_votes(at) } - fn session_info( + async fn session_info( &self, at: &BlockId, index: SessionIndex, @@ -1170,7 +1181,7 @@ where self.runtime_api().session_info(at, index) } - fn submit_pvf_check_statement( + async fn submit_pvf_check_statement( &self, at: &BlockId, stmt: PvfCheckStatement, @@ -1179,11 +1190,14 @@ where self.runtime_api().submit_pvf_check_statement(at, stmt, signature) } - fn pvfs_require_precheck(&self, at: &BlockId) -> Result, ApiError> { + async fn pvfs_require_precheck( + &self, + at: &BlockId, + ) -> Result, ApiError> { self.runtime_api().pvfs_require_precheck(at) } - fn validation_code_hash( + async fn validation_code_hash( &self, at: &BlockId, para_id: Id, @@ -1192,23 +1206,23 @@ where self.runtime_api().validation_code_hash(at, para_id, assumption) } - fn configuration(&self, at: &BlockId) -> Result { + async fn configuration(&self, at: &BlockId) -> Result { self.runtime_api().configuration(at) } - fn current_epoch_start(&self, at: &BlockId) -> Result { + async fn current_epoch_start(&self, at: &BlockId) -> Result { self.runtime_api().current_epoch_start(at) } - fn current_epoch(&self, at: &BlockId) -> Result { + async fn current_epoch(&self, at: &BlockId) -> Result { self.runtime_api().current_epoch(at) } - fn next_epoch(&self, at: &BlockId) -> Result { + async fn next_epoch(&self, at: &BlockId) -> Result { self.runtime_api().next_epoch(at) } - fn generate_key_ownership_proof( + async fn generate_key_ownership_proof( &self, at: &BlockId, slot: Slot, @@ -1217,7 +1231,7 @@ where self.runtime_api().generate_key_ownership_proof(at, slot, authority_id) } - fn submit_report_equivocation_unsigned_extrinsic( + async fn submit_report_equivocation_unsigned_extrinsic( &self, at: &BlockId, equivocation_proof: EquivocationProof
, @@ -1230,18 +1244,18 @@ where ) } - fn authorities( + async fn authorities( &self, at: &BlockId, ) -> std::result::Result, ApiError> { self.runtime_api().authorities(at) } - fn api_version_parachain_host(&self, at: &BlockId) -> Result, ApiError> { + async fn api_version_parachain_host(&self, at: &BlockId) -> Result, ApiError> { self.runtime_api().api_version::>(at) } - fn session_info_before_version_2( + async fn session_info_before_version_2( &self, at: &BlockId, index: SessionIndex, @@ -1250,7 +1264,7 @@ where todo!() } - fn staging_get_disputes( + async fn staging_get_disputes( &self, at: &BlockId, ) -> Result)>, ApiError> { From 684696f35656d3a444fdd4654ed0c6613898d4b7 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Fri, 27 May 2022 16:48:56 +0200 Subject: [PATCH 07/23] Move overseer notification stream forwarding to cumulus --- node/overseer/src/lib.rs | 48 +++++----------------------------------- 1 file changed, 6 insertions(+), 42 deletions(-) diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index 2a293cdd4299..e0efc0e57021 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -230,6 +230,12 @@ pub struct BlockInfo { pub number: BlockNumber, } +impl From
for BlockInfo { + fn from(h: Header) -> Self { + BlockInfo { hash: h.hash(), parent_hash: h.parent_hash, number: h.number } + } +} + impl From> for BlockInfo { fn from(n: BlockImportNotification) -> Self { BlockInfo { hash: n.hash, parent_hash: n.header.parent_hash, number: n.header.number } @@ -303,48 +309,6 @@ pub async fn forward_events>(client: Arc

, mut hand } } -/// Glues together the [`Overseer`] and `BlockchainEvents` by forwarding -/// import and finality notifications into the [`OverseerHandle`]. -pub async fn forward_collator_events>( - client: Arc

, - mut handle: Handle, -) { - let mut finality = client.finality_notification_stream().fuse(); - let mut imports = client.import_notification_stream().fuse(); - - loop { - select! { - f = finality.next() => { - match f { - Some(header) => { - /// TODO Implement into - let block_info = BlockInfo { - hash: header.hash(), - parent_hash: header.parent_hash, - number: header.number - }; - handle.block_finalized(block_info).await; - } - None => break, - } - }, - i = imports.next() => { - match i { - Some(header) => { - let block_info = BlockInfo { - hash: header.hash(), - parent_hash: header.parent_hash, - number: header.number - }; - handle.block_imported(block_info).await; - } - None => break, - } - }, - complete => break, - } - } -} /// Create a new instance of the [`Overseer`] with a fixed set of [`Subsystem`]s. /// /// This returns the overseer along with an [`OverseerHandle`] which can From 2f4ea7607d1e434010037c456979e4c440e56034 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Wed, 1 Jun 2022 12:49:15 +0200 Subject: [PATCH 08/23] Remove unused imports --- node/core/runtime-api/Cargo.toml | 1 - node/core/runtime-api/src/lib.rs | 8 +------- node/service/src/overseer.rs | 1 + 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/node/core/runtime-api/Cargo.toml b/node/core/runtime-api/Cargo.toml index 147681bf9311..0ca00dd7c4c6 100644 --- a/node/core/runtime-api/Cargo.toml +++ b/node/core/runtime-api/Cargo.toml @@ -10,7 +10,6 @@ gum = { package = "tracing-gum", path = "../../gum" } memory-lru = "0.1.0" parity-util-mem = { version = "0.11.0", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-primitives = { path = "../../../primitives" } diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index 8919ee808faf..eb169956ccc7 100644 --- a/node/core/runtime-api/src/lib.rs +++ b/node/core/runtime-api/src/lib.rs @@ -27,14 +27,8 @@ use polkadot_node_subsystem::{ messages::{RuntimeApiMessage, RuntimeApiRequest as Request}, overseer, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, SubsystemResult, }; -use polkadot_node_subsystem_util::metrics::prometheus; use polkadot_overseer::OverseerRuntimeClient; -use polkadot_primitives::{ - runtime_api::ParachainHost, - v2::{Block, BlockId, Hash}, -}; - -use sp_core::traits::SpawnNamed; +use polkadot_primitives::v2::{BlockId, Hash}; use cache::{RequestResult, RequestResultCache}; use futures::{channel::oneshot, prelude::*, select, stream::FuturesUnordered}; diff --git a/node/service/src/overseer.rs b/node/service/src/overseer.rs index 06d47d7de0c5..0ea74bf23084 100644 --- a/node/service/src/overseer.rs +++ b/node/service/src/overseer.rs @@ -68,6 +68,7 @@ pub use polkadot_node_core_provisioner::ProvisionerSubsystem; pub use polkadot_node_core_pvf_checker::PvfCheckerSubsystem; pub use polkadot_node_core_runtime_api::RuntimeApiSubsystem; use polkadot_node_subsystem_util::rand::{self, SeedableRng}; +pub use polkadot_primitives::v2::CollatorPair; pub use polkadot_statement_distribution::StatementDistributionSubsystem; /// Arguments passed for overseer construction. From 3a1a5866c0b3cd7ef0135ccdc30a58b37d9a7d69 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Thu, 16 Jun 2022 17:17:15 +0200 Subject: [PATCH 09/23] Add more logging to collator-protocol --- node/network/collator-protocol/src/collator_side/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/node/network/collator-protocol/src/collator_side/mod.rs b/node/network/collator-protocol/src/collator_side/mod.rs index 66b404551c52..b4e39d35af71 100644 --- a/node/network/collator-protocol/src/collator_side/mod.rs +++ b/node/network/collator-protocol/src/collator_side/mod.rs @@ -450,6 +450,15 @@ async fn distribute_collation( .insert(relay_parent, Collation { receipt, pov, status: CollationStatus::Created }); let interested = state.peers_interested_in_leaf(&relay_parent); + + gum::debug!( + target: LOG_TARGET, + para_id = %id, + relay_parent = %relay_parent, + interested = ?interested, + core = ?our_core, + "Advertising to collators." + ); // Make sure already connected peers get collations: for peer_id in interested { advertise_collation(ctx, state, relay_parent, peer_id).await; From fba6b8f73a6e70caedbbeb0e22cda3d91329613b Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Mon, 20 Jun 2022 15:38:06 +0200 Subject: [PATCH 10/23] Lockfile --- Cargo.lock | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7f3224ce843f..f88833f3b7b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -328,9 +328,9 @@ checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" [[package]] name = "async-trait" -version = "0.1.53" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" dependencies = [ "proc-macro2", "quote", @@ -8655,6 +8655,7 @@ dependencies = [ name = "sc-client-api" version = "4.0.0-dev" dependencies = [ + "async-trait", "fnv", "futures 0.3.21", "hash-db", @@ -10892,9 +10893,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.95" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbaf6116ab8924f39d52792136fb74fd60a80194cf1b1c6ffa6453eef1c3f942" +checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" dependencies = [ "proc-macro2", "quote", From 19123f71c8f6bbab3038b7c5d49353821a14858e Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Mon, 11 Jul 2022 13:39:43 +0200 Subject: [PATCH 11/23] Use hashes in OverseerRuntimeClient --- Cargo.lock | 429 ++++++++++++++++++------------- node/core/runtime-api/src/lib.rs | 31 +-- node/overseer/src/lib.rs | 182 +++++++------ 3 files changed, 357 insertions(+), 285 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b33442bcad0a..372fde950954 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -328,9 +328,9 @@ checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" [[package]] name = "async-trait" -version = "0.1.53" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" dependencies = [ "proc-macro2", "quote", @@ -424,7 +424,6 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "beefy-primitives", "fnv", @@ -458,7 +457,6 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -478,12 +476,10 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "parity-scale-codec", "scale-info", @@ -2098,7 +2094,6 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "parity-scale-codec", ] @@ -2116,7 +2111,6 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-support", "frame-system", @@ -2138,7 +2132,6 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "Inflector", "chrono", @@ -2189,7 +2182,6 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2200,7 +2192,6 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2216,7 +2207,6 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-support", "frame-system", @@ -2244,7 +2234,6 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "bitflags", "frame-metadata", @@ -2274,7 +2263,6 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2286,7 +2274,6 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2298,7 +2285,6 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "proc-macro2", "quote", @@ -2308,7 +2294,6 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2331,7 +2316,6 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-support", "frame-system", @@ -2342,7 +2326,6 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-support", "log", @@ -2359,7 +2342,6 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -2374,7 +2356,6 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "parity-scale-codec", "sp-api", @@ -2383,7 +2364,6 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-support", "sp-api", @@ -2556,7 +2536,6 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "chrono", "frame-election-provider-support", @@ -4940,7 +4919,6 @@ checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4954,7 +4932,6 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-support", "frame-system", @@ -4970,7 +4947,6 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-support", "frame-system", @@ -4985,7 +4961,6 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5009,7 +4984,6 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5029,7 +5003,6 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-election-provider-support", "frame-support", @@ -5048,7 +5021,6 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5063,7 +5035,6 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "beefy-primitives", "frame-support", @@ -5079,7 +5050,6 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -5102,7 +5072,6 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5184,7 +5153,6 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5203,7 +5171,6 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5220,7 +5187,6 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5236,7 +5202,6 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5259,7 +5224,6 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5272,7 +5236,6 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5290,7 +5253,6 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5305,7 +5267,6 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5328,7 +5289,6 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5344,7 +5304,6 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5364,7 +5323,6 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5381,7 +5339,6 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5398,7 +5355,6 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5416,7 +5372,6 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -5431,7 +5386,6 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5446,7 +5400,6 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-support", "frame-system", @@ -5463,7 +5416,6 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5482,7 +5434,6 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-support", "frame-system", @@ -5499,7 +5450,6 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5522,7 +5472,6 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5538,7 +5487,6 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5553,7 +5501,6 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5568,7 +5515,6 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5584,7 +5530,6 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-support", "frame-system", @@ -5605,7 +5550,6 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5621,7 +5565,6 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-support", "frame-system", @@ -5635,7 +5578,6 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5658,7 +5600,6 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5669,7 +5610,6 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "log", "sp-arithmetic", @@ -5678,7 +5618,6 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-support", "frame-system", @@ -5692,7 +5631,6 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5710,7 +5648,6 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5729,7 +5666,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-support", "frame-system", @@ -5745,7 +5681,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5760,7 +5695,6 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5771,7 +5705,6 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5788,7 +5721,6 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5804,7 +5736,6 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6814,10 +6745,9 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", "polkadot-node-subsystem-util", + "polkadot-overseer", "polkadot-primitives", "polkadot-primitives-test-helpers", - "sp-api", - "sp-authority-discovery", "sp-consensus-babe", "sp-core", "sp-keyring", @@ -7018,6 +6948,8 @@ dependencies = [ "prioritized-metered-channel", "sc-client-api", "sp-api", + "sp-authority-discovery", + "sp-consensus-babe", "sp-core", "tracing-gum", ] @@ -8330,7 +8262,6 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "env_logger 0.9.0", "jsonrpsee", @@ -8682,7 +8613,6 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "log", "sp-core", @@ -8693,7 +8623,6 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "async-trait", "futures", @@ -8720,7 +8649,6 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "futures", "futures-timer", @@ -8743,7 +8671,6 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8759,7 +8686,6 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.0", @@ -8776,7 +8702,6 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8787,7 +8712,6 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "chrono", "clap", @@ -8826,8 +8750,8 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ + "async-trait", "fnv", "futures", "hash-db", @@ -8854,7 +8778,6 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "hash-db", "kvdb", @@ -8879,7 +8802,6 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "async-trait", "futures", @@ -8903,7 +8825,6 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "async-trait", "fork-tree", @@ -8946,7 +8867,6 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "futures", "jsonrpsee", @@ -8968,7 +8888,6 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8981,7 +8900,6 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "async-trait", "futures", @@ -9006,7 +8924,6 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "sc-client-api", "sp-authorship", @@ -9017,7 +8934,6 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "lazy_static", "lru 0.7.7", @@ -9044,7 +8960,6 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "environmental", "parity-scale-codec", @@ -9061,7 +8976,6 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "log", "parity-scale-codec", @@ -9076,7 +8990,6 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "cfg-if 1.0.0", "libc", @@ -9094,7 +9007,6 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "ahash", "async-trait", @@ -9134,7 +9046,6 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "finality-grandpa", "futures", @@ -9155,7 +9066,6 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "ansi_term", "futures", @@ -9172,7 +9082,6 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "async-trait", "hex", @@ -9187,7 +9096,6 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "async-trait", "asynchronous-codec", @@ -9239,7 +9147,6 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "futures", "libp2p", @@ -9252,7 +9159,6 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "ahash", "futures", @@ -9269,7 +9175,6 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "futures", "libp2p", @@ -9289,7 +9194,6 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "bitflags", "either", @@ -9318,7 +9222,6 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "bytes", "fnv", @@ -9346,7 +9249,6 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "futures", "libp2p", @@ -9359,7 +9261,6 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9368,7 +9269,6 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "futures", "hash-db", @@ -9398,7 +9298,6 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "futures", "jsonrpsee", @@ -9421,7 +9320,6 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "futures", "jsonrpsee", @@ -9434,7 +9332,6 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "async-trait", "directories", @@ -9499,7 +9396,6 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "log", "parity-scale-codec", @@ -9513,7 +9409,6 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9532,7 +9427,6 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "futures", "libc", @@ -9551,7 +9445,6 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "chrono", "futures", @@ -9569,7 +9462,6 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "ansi_term", "atty", @@ -9600,7 +9492,6 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9611,7 +9502,6 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "futures", "futures-timer", @@ -9638,7 +9528,6 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "futures", "log", @@ -9651,7 +9540,6 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "futures", "futures-timer", @@ -10118,7 +10006,6 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "hash-db", "log", @@ -10135,7 +10022,6 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "blake2", "proc-macro-crate", @@ -10147,7 +10033,6 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "parity-scale-codec", "scale-info", @@ -10160,7 +10045,6 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "integer-sqrt", "num-traits", @@ -10175,7 +10059,6 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "parity-scale-codec", "scale-info", @@ -10188,7 +10071,6 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "async-trait", "parity-scale-codec", @@ -10200,7 +10082,6 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "parity-scale-codec", "sp-api", @@ -10212,7 +10093,6 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "futures", "log", @@ -10230,7 +10110,6 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "async-trait", "futures", @@ -10249,7 +10128,6 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "async-trait", "merlin", @@ -10272,7 +10150,6 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "parity-scale-codec", "scale-info", @@ -10286,7 +10163,6 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "parity-scale-codec", "scale-info", @@ -10299,7 +10175,6 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "base58", "bitflags", @@ -10345,7 +10220,6 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "blake2", "byteorder", @@ -10359,7 +10233,6 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "proc-macro2", "quote", @@ -10370,7 +10243,6 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "kvdb", "parking_lot 0.12.0", @@ -10379,7 +10251,6 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "proc-macro2", "quote", @@ -10389,7 +10260,6 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "environmental", "parity-scale-codec", @@ -10400,7 +10270,6 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "finality-grandpa", "log", @@ -10418,7 +10287,6 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10432,7 +10300,6 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "futures", "hash-db", @@ -10457,7 +10324,6 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "lazy_static", "sp-core", @@ -10468,7 +10334,6 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "async-trait", "futures", @@ -10485,7 +10350,6 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "thiserror", "zstd", @@ -10494,7 +10358,6 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "log", "parity-scale-codec", @@ -10509,7 +10372,6 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "parity-scale-codec", "scale-info", @@ -10523,7 +10385,6 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "sp-api", "sp-core", @@ -10533,7 +10394,6 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "backtrace", "lazy_static", @@ -10543,7 +10403,6 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "rustc-hash", "serde", @@ -10553,7 +10412,6 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "either", "hash256-std-hasher", @@ -10575,7 +10433,6 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10592,7 +10449,6 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "Inflector", "proc-macro-crate", @@ -10604,7 +10460,6 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "log", "parity-scale-codec", @@ -10618,7 +10473,6 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "serde", "serde_json", @@ -10627,7 +10481,6 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "parity-scale-codec", "scale-info", @@ -10641,7 +10494,6 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "parity-scale-codec", "scale-info", @@ -10652,7 +10504,6 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "hash-db", "log", @@ -10674,12 +10525,10 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10692,7 +10541,6 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "log", "sp-core", @@ -10705,7 +10553,6 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "async-trait", "futures-timer", @@ -10721,7 +10568,6 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "parity-scale-codec", "sp-std", @@ -10733,7 +10579,6 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "sp-api", "sp-runtime", @@ -10742,7 +10587,6 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "async-trait", "log", @@ -10758,7 +10602,6 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "hash-db", "memory-db", @@ -10774,7 +10617,6 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10791,7 +10633,6 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10802,7 +10643,6 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "impl-trait-for-tuples", "log", @@ -10994,7 +10834,6 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "platforms", ] @@ -11002,7 +10841,6 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11023,7 +10861,6 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "futures-util", "hyper", @@ -11036,7 +10873,6 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "jsonrpsee", "log", @@ -11057,7 +10893,6 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "async-trait", "futures", @@ -11083,7 +10918,6 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11093,7 +10927,6 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11104,7 +10937,6 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "ansi_term", "build-helper", @@ -11820,7 +11652,6 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4ea2ac87de6cd66ca1e6038d10212c7c4e07a86a" dependencies = [ "clap", "jsonrpsee", @@ -12951,3 +12782,251 @@ dependencies = [ "cc", "libc", ] + +[[patch.unused]] +name = "chain-spec-builder" +version = "2.0.0" + +[[patch.unused]] +name = "frame-election-solution-type-fuzzer" +version = "2.0.0-alpha.5" + +[[patch.unused]] +name = "frame-support-test-compile-pass" +version = "4.0.0-dev" + +[[patch.unused]] +name = "node-bench" +version = "0.9.0-dev" + +[[patch.unused]] +name = "node-cli" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-executor" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-inspect" +version = "0.9.0-dev" + +[[patch.unused]] +name = "node-primitives" +version = "2.0.0" + +[[patch.unused]] +name = "node-rpc" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-runtime" +version = "3.0.0-dev" + +[[patch.unused]] +name = "node-runtime-generate-bags" +version = "3.0.0" + +[[patch.unused]] +name = "node-template" +version = "4.0.0-dev" + +[[patch.unused]] +name = "node-template-runtime" +version = "4.0.0-dev" + +[[patch.unused]] +name = "node-testing" +version = "3.0.0-dev" + +[[patch.unused]] +name = "pallet-asset-tx-payment" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-atomic-swap" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-aura" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-bags-list-fuzzer" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts-primitives" +version = "6.0.0" + +[[patch.unused]] +name = "pallet-contracts-proc-macro" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts-rpc" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-contracts-rpc-runtime-api" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-conviction-voting" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-basic" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-offchain-worker" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-example-parallel" +version = "3.0.0-dev" + +[[patch.unused]] +name = "pallet-lottery" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-nicks" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-node-authorization" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-randomness-collective-flip" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-referenda" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-remark" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-scored-pool" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-state-trie-migration" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-template" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-transaction-storage" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-uniques" +version = "4.0.0-dev" + +[[patch.unused]] +name = "pallet-whitelist" +version = "4.0.0-dev" + +[[patch.unused]] +name = "sc-consensus-aura" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-consensus-manual-seal" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-consensus-pow" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sc-network-test" +version = "0.8.0" + +[[patch.unused]] +name = "sc-runtime-test" +version = "2.0.0" + +[[patch.unused]] +name = "sc-service-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-api-test" +version = "2.0.1" + +[[patch.unused]] +name = "sp-application-crypto-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-arithmetic-fuzzer" +version = "2.0.0" + +[[patch.unused]] +name = "sp-consensus-aura" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sp-consensus-pow" +version = "0.10.0-dev" + +[[patch.unused]] +name = "sp-npos-elections-fuzzer" +version = "2.0.0-alpha.5" + +[[patch.unused]] +name = "sp-runtime-interface-test" +version = "2.0.0" + +[[patch.unused]] +name = "sp-runtime-interface-test-wasm" +version = "2.0.0" + +[[patch.unused]] +name = "sp-runtime-interface-test-wasm-deprecated" +version = "2.0.0" + +[[patch.unused]] +name = "sp-test-primitives" +version = "2.0.0" + +[[patch.unused]] +name = "subkey" +version = "2.0.2" + +[[patch.unused]] +name = "substrate-frame-cli" +version = "4.0.0-dev" + +[[patch.unused]] +name = "substrate-frame-rpc-support" +version = "3.0.0" + +[[patch.unused]] +name = "substrate-test-runtime" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-runtime-client" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-runtime-transaction-pool" +version = "2.0.0" + +[[patch.unused]] +name = "substrate-test-utils-test-crate" +version = "0.1.0" diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index eb169956ccc7..1cfafaaaa14b 100644 --- a/node/core/runtime-api/src/lib.rs +++ b/node/core/runtime-api/src/lib.rs @@ -28,7 +28,7 @@ use polkadot_node_subsystem::{ overseer, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, SubsystemResult, }; use polkadot_overseer::OverseerRuntimeClient; -use polkadot_primitives::v2::{BlockId, Hash}; +use polkadot_primitives::v2::Hash; use cache::{RequestResult, RequestResultCache}; use futures::{channel::oneshot, prelude::*, select, stream::FuturesUnordered}; @@ -355,7 +355,7 @@ where let sender = $sender; let api = client; - let runtime_version = api.api_version_parachain_host(&BlockId::Hash(relay_parent)).await + let runtime_version = api.api_version_parachain_host(relay_parent).await .unwrap_or_else(|e| { gum::warn!( target: LOG_TARGET, @@ -373,7 +373,7 @@ where }); let res = if runtime_version >= $version { - api.$api_name(&BlockId::Hash(relay_parent) $(, $param.clone() )*).await + api.$api_name(relay_parent $(, $param.clone() )*).await .map_err(|e| RuntimeApiError::Execution { runtime_api_name: stringify!($api_name), source: std::sync::Arc::new(e), @@ -394,16 +394,14 @@ where Request::Version(sender) => { let api = client; - let runtime_version = - match api.api_version_parachain_host(&BlockId::Hash(relay_parent)).await { - Ok(Some(v)) => Ok(v), - Ok(None) => - Err(RuntimeApiError::NotSupported { runtime_api_name: "api_version" }), - Err(e) => Err(RuntimeApiError::Execution { - runtime_api_name: "api_version", - source: std::sync::Arc::new(e), - }), - }; + let runtime_version = match api.api_version_parachain_host(relay_parent).await { + Ok(Some(v)) => Ok(v), + Ok(None) => Err(RuntimeApiError::NotSupported { runtime_api_name: "api_version" }), + Err(e) => Err(RuntimeApiError::Execution { + runtime_api_name: "api_version", + source: std::sync::Arc::new(e), + }), + }; let _ = sender.send(runtime_version.clone()); runtime_version.ok().map(|v| RequestResult::Version(relay_parent, v)) @@ -454,17 +452,16 @@ where query!(CandidateEvents, candidate_events(), ver = 1, sender), Request::SessionInfo(index, sender) => { let api = client; - let block_id = BlockId::Hash(relay_parent); let api_version = api - .api_version_parachain_host(&BlockId::Hash(relay_parent)) + .api_version_parachain_host(relay_parent) .await .unwrap_or_default() .unwrap_or_default(); let res = if api_version >= 2 { let res = api - .session_info(&block_id, index) + .session_info(relay_parent, index) .map_err(|e| RuntimeApiError::Execution { runtime_api_name: "SessionInfo", source: std::sync::Arc::new(e), @@ -474,7 +471,7 @@ where res } else { #[allow(deprecated)] - let res = api.session_info_before_version_2(&block_id, index).await.map_err(|e| { + let res = api.session_info_before_version_2(relay_parent, index).await.map_err(|e| { RuntimeApiError::Execution { runtime_api_name: "SessionInfo", source: std::sync::Arc::new(e), diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index d45784db9149..ee4eb57a9ec8 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -936,18 +936,18 @@ where #[async_trait] pub trait OverseerRuntimeClient { - async fn validators(&self, at: &BlockId) -> Result, ApiError>; + async fn validators(&self, at: Hash) -> Result, ApiError>; async fn validator_groups( &self, - at: &BlockId, + at: Hash, ) -> Result<(Vec>, GroupRotationInfo), ApiError>; /// Yields information on all availability cores as relevant to the child block. /// Cores are either free or occupied. Free cores can have paras assigned to them. async fn availability_cores( &self, - at: &BlockId, + at: Hash, ) -> Result>, ApiError>; /// Yields the persisted validation data for the given `ParaId` along with an assumption that @@ -957,7 +957,7 @@ pub trait OverseerRuntimeClient { /// and the para already occupies a core. async fn persisted_validation_data( &self, - at: &BlockId, + at: Hash, para_id: Id, assumption: OccupiedCoreAssumption, ) -> Result>, ApiError>; @@ -967,7 +967,7 @@ pub trait OverseerRuntimeClient { /// data hash against an expected one and yields `None` if they're not equal. async fn assumed_validation_data( &self, - at: &BlockId, + at: Hash, para_id: Id, expected_persisted_validation_data_hash: Hash, ) -> Result, ValidationCodeHash)>, ApiError>; @@ -975,7 +975,7 @@ pub trait OverseerRuntimeClient { /// Checks if the given validation outputs pass the acceptance criteria. async fn check_validation_outputs( &self, - at: &BlockId, + at: Hash, para_id: Id, outputs: CandidateCommitments, ) -> Result; @@ -983,7 +983,7 @@ pub trait OverseerRuntimeClient { /// Returns the session index expected at a child of the block. /// /// This can be used to instantiate a `SigningContext`. - async fn session_index_for_child(&self, at: &BlockId) -> Result; + async fn session_index_for_child(&self, at: Hash) -> Result; /// Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`. /// @@ -991,7 +991,7 @@ pub trait OverseerRuntimeClient { /// and the para already occupies a core. async fn validation_code( &self, - at: &BlockId, + at: Hash, para_id: Id, assumption: OccupiedCoreAssumption, ) -> Result, ApiError>; @@ -1000,17 +1000,17 @@ pub trait OverseerRuntimeClient { /// assigned to occupied cores in `availability_cores` and `None` otherwise. async fn candidate_pending_availability( &self, - at: &BlockId, + at: Hash, para_id: Id, ) -> Result>, ApiError>; /// Get a vector of events concerning candidates that occurred within a block. - async fn candidate_events(&self, at: &BlockId) -> Result>, ApiError>; + async fn candidate_events(&self, at: Hash) -> Result>, ApiError>; /// Get all the pending inbound messages in the downward message queue for a para. async fn dmq_contents( &self, - at: &BlockId, + at: Hash, recipient: Id, ) -> Result>, ApiError>; @@ -1018,22 +1018,20 @@ pub trait OverseerRuntimeClient { /// messages in them are also included. async fn inbound_hrmp_channels_contents( &self, - at: &BlockId, + at: Hash, recipient: Id, ) -> Result>>, ApiError>; /// Get the validation code from its hash. async fn validation_code_by_hash( &self, - at: &BlockId, + at: Hash, hash: ValidationCodeHash, ) -> Result, ApiError>; /// Scrape dispute relevant from on-chain, backing votes and resolved disputes. - async fn on_chain_votes( - &self, - at: &BlockId, - ) -> Result>, ApiError>; + async fn on_chain_votes(&self, at: Hash) + -> Result>, ApiError>; /***** Added in v2 *****/ @@ -1042,7 +1040,7 @@ pub trait OverseerRuntimeClient { /// NOTE: This function is only available since parachain host version 2. async fn session_info( &self, - at: &BlockId, + at: Hash, index: SessionIndex, ) -> Result, ApiError>; @@ -1051,7 +1049,7 @@ pub trait OverseerRuntimeClient { /// NOTE: This function is only available since parachain host version 2. async fn session_info_before_version_2( &self, - at: &BlockId, + at: Hash, index: SessionIndex, ) -> Result, ApiError>; @@ -1060,7 +1058,7 @@ pub trait OverseerRuntimeClient { /// NOTE: This function is only available since parachain host version 2. async fn submit_pvf_check_statement( &self, - at: &BlockId, + at: Hash, stmt: PvfCheckStatement, signature: ValidatorSignature, ) -> Result<(), ApiError>; @@ -1068,17 +1066,14 @@ pub trait OverseerRuntimeClient { /// Returns code hashes of PVFs that require pre-checking by validators in the active set. /// /// NOTE: This function is only available since parachain host version 2. - async fn pvfs_require_precheck( - &self, - at: &BlockId, - ) -> Result, ApiError>; + async fn pvfs_require_precheck(&self, at: Hash) -> Result, ApiError>; /// Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`. /// /// NOTE: This function is only available since parachain host version 2. async fn validation_code_hash( &self, - at: &BlockId, + at: Hash, para_id: Id, assumption: OccupiedCoreAssumption, ) -> Result, ApiError>; @@ -1087,17 +1082,17 @@ pub trait OverseerRuntimeClient { /// /// /// Return the genesis configuration for BABE. The configuration is only read on genesis. - async fn configuration(&self, at: &BlockId) -> Result; + async fn configuration(&self, at: Hash) -> Result; /// Returns the slot that started the current epoch. - async fn current_epoch_start(&self, at: &BlockId) -> Result; + async fn current_epoch_start(&self, at: Hash) -> Result; /// Returns information regarding the current epoch. - async fn current_epoch(&self, at: &BlockId) -> Result; + async fn current_epoch(&self, at: Hash) -> Result; /// Returns information regarding the next epoch (which was already /// previously announced). - async fn next_epoch(&self, at: &BlockId) -> Result; + async fn next_epoch(&self, at: Hash) -> Result; /// Generates a proof of key ownership for the given authority in the /// current epoch. An example usage of this module is coupled with the @@ -1112,7 +1107,7 @@ pub trait OverseerRuntimeClient { /// worker, not requiring older states to be available. async fn generate_key_ownership_proof( &self, - at: &BlockId, + at: Hash, slot: Slot, authority_id: AuthorityId, ) -> Result, ApiError>; @@ -1127,21 +1122,21 @@ pub trait OverseerRuntimeClient { /// hardcoded to return `None`). Only useful in an offchain context. async fn submit_report_equivocation_unsigned_extrinsic( &self, - at: &BlockId, + at: Hash, equivocation_proof: EquivocationProof

, key_owner_proof: OpaqueKeyOwnershipProof, ) -> Result, ApiError>; async fn authorities( &self, - at: &BlockId, + at: Hash, ) -> std::result::Result, ApiError>; - async fn api_version_parachain_host(&self, at: &BlockId) -> Result, ApiError>; + async fn api_version_parachain_host(&self, at: Hash) -> Result, ApiError>; async fn staging_get_disputes( &self, - at: &BlockId, + at: Hash, ) -> Result)>, ApiError>; } @@ -1151,42 +1146,43 @@ where T: ProvideRuntimeApi + Send + Sync, T::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, { - async fn validators(&self, at: &BlockId) -> Result, ApiError> { - self.runtime_api().validators(at) + async fn validators(&self, at: Hash) -> Result, ApiError> { + self.runtime_api().validators(&BlockId::Hash(at)) } async fn validator_groups( &self, - at: &BlockId, + at: Hash, ) -> Result<(Vec>, GroupRotationInfo), ApiError> { - self.runtime_api().validator_groups(at) + self.runtime_api().validator_groups(&BlockId::Hash(at)) } async fn availability_cores( &self, - at: &BlockId, + at: Hash, ) -> Result>, ApiError> { - self.runtime_api().availability_cores(at) + self.runtime_api().availability_cores(&BlockId::Hash(at)) } async fn persisted_validation_data( &self, - at: &BlockId, + at: Hash, para_id: Id, assumption: OccupiedCoreAssumption, ) -> Result>, ApiError> { - self.runtime_api().persisted_validation_data(at, para_id, assumption) + self.runtime_api() + .persisted_validation_data(&BlockId::Hash(at), para_id, assumption) } async fn assumed_validation_data( &self, - at: &BlockId, + at: Hash, para_id: Id, expected_persisted_validation_data_hash: Hash, ) -> Result, ValidationCodeHash)>, ApiError> { self.runtime_api().assumed_validation_data( - at, + &BlockId::Hash(at), para_id, expected_persisted_validation_data_hash, ) @@ -1194,135 +1190,135 @@ where async fn check_validation_outputs( &self, - at: &BlockId, + at: Hash, para_id: Id, outputs: CandidateCommitments, ) -> Result { - self.runtime_api().check_validation_outputs(at, para_id, outputs) + self.runtime_api() + .check_validation_outputs(&BlockId::Hash(at), para_id, outputs) } - async fn session_index_for_child(&self, at: &BlockId) -> Result { - self.runtime_api().session_index_for_child(at) + async fn session_index_for_child(&self, at: Hash) -> Result { + self.runtime_api().session_index_for_child(&BlockId::Hash(at)) } async fn validation_code( &self, - at: &BlockId, + at: Hash, para_id: Id, assumption: OccupiedCoreAssumption, ) -> Result, ApiError> { - self.runtime_api().validation_code(at, para_id, assumption) + self.runtime_api().validation_code(&BlockId::Hash(at), para_id, assumption) } async fn candidate_pending_availability( &self, - at: &BlockId, + at: Hash, para_id: Id, ) -> Result>, ApiError> { - self.runtime_api().candidate_pending_availability(at, para_id) + self.runtime_api().candidate_pending_availability(&BlockId::Hash(at), para_id) } - async fn candidate_events(&self, at: &BlockId) -> Result>, ApiError> { - self.runtime_api().candidate_events(at) + async fn candidate_events(&self, at: Hash) -> Result>, ApiError> { + self.runtime_api().candidate_events(&BlockId::Hash(at)) } async fn dmq_contents( &self, - at: &BlockId, + at: Hash, recipient: Id, ) -> Result>, ApiError> { - self.runtime_api().dmq_contents(at, recipient) + self.runtime_api().dmq_contents(&BlockId::Hash(at), recipient) } async fn inbound_hrmp_channels_contents( &self, - at: &BlockId, + at: Hash, recipient: Id, ) -> Result>>, ApiError> { - self.runtime_api().inbound_hrmp_channels_contents(at, recipient) + self.runtime_api().inbound_hrmp_channels_contents(&BlockId::Hash(at), recipient) } async fn validation_code_by_hash( &self, - at: &BlockId, + at: Hash, hash: ValidationCodeHash, ) -> Result, ApiError> { - self.runtime_api().validation_code_by_hash(at, hash) + self.runtime_api().validation_code_by_hash(&BlockId::Hash(at), hash) } async fn on_chain_votes( &self, - at: &BlockId, + at: Hash, ) -> Result>, ApiError> { - self.runtime_api().on_chain_votes(at) + self.runtime_api().on_chain_votes(&BlockId::Hash(at)) } async fn session_info( &self, - at: &BlockId, + at: Hash, index: SessionIndex, ) -> Result, ApiError> { - self.runtime_api().session_info(at, index) + self.runtime_api().session_info(&BlockId::Hash(at), index) } async fn submit_pvf_check_statement( &self, - at: &BlockId, + at: Hash, stmt: PvfCheckStatement, signature: ValidatorSignature, ) -> Result<(), ApiError> { - self.runtime_api().submit_pvf_check_statement(at, stmt, signature) + self.runtime_api() + .submit_pvf_check_statement(&BlockId::Hash(at), stmt, signature) } - async fn pvfs_require_precheck( - &self, - at: &BlockId, - ) -> Result, ApiError> { - self.runtime_api().pvfs_require_precheck(at) + async fn pvfs_require_precheck(&self, at: Hash) -> Result, ApiError> { + self.runtime_api().pvfs_require_precheck(&BlockId::Hash(at)) } async fn validation_code_hash( &self, - at: &BlockId, + at: Hash, para_id: Id, assumption: OccupiedCoreAssumption, ) -> Result, ApiError> { - self.runtime_api().validation_code_hash(at, para_id, assumption) + self.runtime_api().validation_code_hash(&BlockId::Hash(at), para_id, assumption) } - async fn configuration(&self, at: &BlockId) -> Result { - self.runtime_api().configuration(at) + async fn configuration(&self, at: Hash) -> Result { + self.runtime_api().configuration(&BlockId::Hash(at)) } - async fn current_epoch_start(&self, at: &BlockId) -> Result { - self.runtime_api().current_epoch_start(at) + async fn current_epoch_start(&self, at: Hash) -> Result { + self.runtime_api().current_epoch_start(&BlockId::Hash(at)) } - async fn current_epoch(&self, at: &BlockId) -> Result { - self.runtime_api().current_epoch(at) + async fn current_epoch(&self, at: Hash) -> Result { + self.runtime_api().current_epoch(&BlockId::Hash(at)) } - async fn next_epoch(&self, at: &BlockId) -> Result { - self.runtime_api().next_epoch(at) + async fn next_epoch(&self, at: Hash) -> Result { + self.runtime_api().next_epoch(&BlockId::Hash(at)) } async fn generate_key_ownership_proof( &self, - at: &BlockId, + at: Hash, slot: Slot, authority_id: AuthorityId, ) -> Result, ApiError> { - self.runtime_api().generate_key_ownership_proof(at, slot, authority_id) + self.runtime_api() + .generate_key_ownership_proof(&BlockId::Hash(at), slot, authority_id) } async fn submit_report_equivocation_unsigned_extrinsic( &self, - at: &BlockId, + at: Hash, equivocation_proof: EquivocationProof
, key_owner_proof: OpaqueKeyOwnershipProof, ) -> Result, ApiError> { self.runtime_api().submit_report_equivocation_unsigned_extrinsic( - at, + &BlockId::Hash(at), equivocation_proof, key_owner_proof, ) @@ -1330,28 +1326,28 @@ where async fn authorities( &self, - at: &BlockId, + at: Hash, ) -> std::result::Result, ApiError> { - self.runtime_api().authorities(at) + self.runtime_api().authorities(&BlockId::Hash(at)) } - async fn api_version_parachain_host(&self, at: &BlockId) -> Result, ApiError> { - self.runtime_api().api_version::>(at) + async fn api_version_parachain_host(&self, at: Hash) -> Result, ApiError> { + self.runtime_api().api_version::>(&BlockId::Hash(at)) } async fn session_info_before_version_2( &self, - at: &BlockId, + at: Hash, index: SessionIndex, ) -> Result, ApiError> { - // self.runtime_api().session_info_before_version_2(at, index) + // self.runtime_api().session_info_before_version_2(&BlockId::Hash(at), index) todo!() } async fn staging_get_disputes( &self, - at: &BlockId, + at: Hash, ) -> Result)>, ApiError> { - self.runtime_api().staging_get_disputes(at) + self.runtime_api().staging_get_disputes(&BlockId::Hash(at)) } } From accd10da890b756d0f1f1fac9d3e9d79c2bf8cca Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Tue, 12 Jul 2022 16:44:48 +0200 Subject: [PATCH 12/23] Move OverseerRuntimeClient into extra module --- Cargo.lock | 1 + node/overseer/Cargo.toml | 1 + node/overseer/src/lib.rs | 446 +--------------------------- node/overseer/src/runtime_client.rs | 445 +++++++++++++++++++++++++++ 4 files changed, 454 insertions(+), 439 deletions(-) create mode 100644 node/overseer/src/runtime_client.rs diff --git a/Cargo.lock b/Cargo.lock index 7f35461e956a..6b479aec6369 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6936,6 +6936,7 @@ name = "polkadot-overseer" version = "0.9.25" dependencies = [ "assert_matches", + "async-trait", "femme", "futures", "futures-timer", diff --git a/node/overseer/Cargo.toml b/node/overseer/Cargo.toml index 323039cfbc42..00dc901d6e4e 100644 --- a/node/overseer/Cargo.toml +++ b/node/overseer/Cargo.toml @@ -22,6 +22,7 @@ parity-util-mem = { version = "0.11.0", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } +async-trait = "0.1.56" [dev-dependencies] metered = { package = "prioritized-metered-channel", path = "../metered-channel" } diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index ee4eb57a9ec8..d8628690c265 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -60,7 +60,7 @@ #![warn(missing_docs)] use std::{ - collections::{hash_map, BTreeMap, HashMap}, + collections::{hash_map, HashMap}, fmt::{self, Debug}, pin::Pin, sync::Arc, @@ -68,21 +68,10 @@ use std::{ }; use futures::{channel::oneshot, future::BoxFuture, select, Future, FutureExt, Stream, StreamExt}; -use gen::async_trait; use lru::LruCache; use client::{BlockImportNotification, BlockchainEvents, FinalityNotification}; -use polkadot_primitives::{ - runtime_api::ParachainHost, - v2::{ - Block, BlockId, BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash, - CommittedCandidateReceipt, CoreState, DisputeState, GroupRotationInfo, Hash, Header, Id, - InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, - PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, - ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, - }, -}; -use sp_api::{ApiExt, ProvideRuntimeApi}; +use polkadot_primitives::v2::{Block, BlockNumber, Hash, Header}; use polkadot_node_subsystem_types::messages::{ ApprovalDistributionMessage, ApprovalVotingMessage, AvailabilityDistributionMessage, @@ -98,13 +87,6 @@ pub use polkadot_node_subsystem_types::{ jaeger, ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, OverseerSignal, }; -use sp_api::ApiError; -use sp_authority_discovery::AuthorityDiscoveryApi; -use sp_consensus_babe::{ - AuthorityId, BabeApi, BabeGenesisConfiguration, Epoch, EquivocationProof, - OpaqueKeyOwnershipProof, Slot, -}; - pub mod metrics; pub use self::metrics::Metrics as OverseerMetrics; @@ -112,6 +94,9 @@ pub use self::metrics::Metrics as OverseerMetrics; pub mod dummy; pub use self::dummy::DummySubsystem; +mod runtime_client; +pub use runtime_client::OverseerRuntimeClient; + pub use polkadot_node_metrics::{ metrics::{prometheus, Metrics as MetricsTrait}, Metronome, @@ -180,9 +165,10 @@ impl HeadSupportsParachains for Arc where Client: OverseerRuntimeClient, { - // TODO Introduce actual check here fn head_supports_parachains(&self, head: &Hash) -> bool { + // Check that the `ParachainHost` runtime api is at least with version 1 present on chain. true + // self.api_version_parachain_host(head).ok().flatten().unwrap_or(0) >= 1 } } @@ -933,421 +919,3 @@ where self.spawner.spawn_blocking(task_name, subsystem_name, j); } } - -#[async_trait] -pub trait OverseerRuntimeClient { - async fn validators(&self, at: Hash) -> Result, ApiError>; - - async fn validator_groups( - &self, - at: Hash, - ) -> Result<(Vec>, GroupRotationInfo), ApiError>; - - /// Yields information on all availability cores as relevant to the child block. - /// Cores are either free or occupied. Free cores can have paras assigned to them. - async fn availability_cores( - &self, - at: Hash, - ) -> Result>, ApiError>; - - /// Yields the persisted validation data for the given `ParaId` along with an assumption that - /// should be used if the para currently occupies a core. - /// - /// Returns `None` if either the para is not registered or the assumption is `Freed` - /// and the para already occupies a core. - async fn persisted_validation_data( - &self, - at: Hash, - para_id: Id, - assumption: OccupiedCoreAssumption, - ) -> Result>, ApiError>; - - /// Returns the persisted validation data for the given `ParaId` along with the corresponding - /// validation code hash. Instead of accepting assumption about the para, matches the validation - /// data hash against an expected one and yields `None` if they're not equal. - async fn assumed_validation_data( - &self, - at: Hash, - para_id: Id, - expected_persisted_validation_data_hash: Hash, - ) -> Result, ValidationCodeHash)>, ApiError>; - - /// Checks if the given validation outputs pass the acceptance criteria. - async fn check_validation_outputs( - &self, - at: Hash, - para_id: Id, - outputs: CandidateCommitments, - ) -> Result; - - /// Returns the session index expected at a child of the block. - /// - /// This can be used to instantiate a `SigningContext`. - async fn session_index_for_child(&self, at: Hash) -> Result; - - /// Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`. - /// - /// Returns `None` if either the para is not registered or the assumption is `Freed` - /// and the para already occupies a core. - async fn validation_code( - &self, - at: Hash, - para_id: Id, - assumption: OccupiedCoreAssumption, - ) -> Result, ApiError>; - - /// Get the receipt of a candidate pending availability. This returns `Some` for any paras - /// assigned to occupied cores in `availability_cores` and `None` otherwise. - async fn candidate_pending_availability( - &self, - at: Hash, - para_id: Id, - ) -> Result>, ApiError>; - - /// Get a vector of events concerning candidates that occurred within a block. - async fn candidate_events(&self, at: Hash) -> Result>, ApiError>; - - /// Get all the pending inbound messages in the downward message queue for a para. - async fn dmq_contents( - &self, - at: Hash, - recipient: Id, - ) -> Result>, ApiError>; - - /// Get the contents of all channels addressed to the given recipient. Channels that have no - /// messages in them are also included. - async fn inbound_hrmp_channels_contents( - &self, - at: Hash, - recipient: Id, - ) -> Result>>, ApiError>; - - /// Get the validation code from its hash. - async fn validation_code_by_hash( - &self, - at: Hash, - hash: ValidationCodeHash, - ) -> Result, ApiError>; - - /// Scrape dispute relevant from on-chain, backing votes and resolved disputes. - async fn on_chain_votes(&self, at: Hash) - -> Result>, ApiError>; - - /***** Added in v2 *****/ - - /// Get the session info for the given session, if stored. - /// - /// NOTE: This function is only available since parachain host version 2. - async fn session_info( - &self, - at: Hash, - index: SessionIndex, - ) -> Result, ApiError>; - - /// Get the session info for the given session, if stored. - /// - /// NOTE: This function is only available since parachain host version 2. - async fn session_info_before_version_2( - &self, - at: Hash, - index: SessionIndex, - ) -> Result, ApiError>; - - /// Submits a PVF pre-checking statement into the transaction pool. - /// - /// NOTE: This function is only available since parachain host version 2. - async fn submit_pvf_check_statement( - &self, - at: Hash, - stmt: PvfCheckStatement, - signature: ValidatorSignature, - ) -> Result<(), ApiError>; - - /// Returns code hashes of PVFs that require pre-checking by validators in the active set. - /// - /// NOTE: This function is only available since parachain host version 2. - async fn pvfs_require_precheck(&self, at: Hash) -> Result, ApiError>; - - /// Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`. - /// - /// NOTE: This function is only available since parachain host version 2. - async fn validation_code_hash( - &self, - at: Hash, - para_id: Id, - assumption: OccupiedCoreAssumption, - ) -> Result, ApiError>; - - /// ===BABE=== - /// - /// - /// Return the genesis configuration for BABE. The configuration is only read on genesis. - async fn configuration(&self, at: Hash) -> Result; - - /// Returns the slot that started the current epoch. - async fn current_epoch_start(&self, at: Hash) -> Result; - - /// Returns information regarding the current epoch. - async fn current_epoch(&self, at: Hash) -> Result; - - /// Returns information regarding the next epoch (which was already - /// previously announced). - async fn next_epoch(&self, at: Hash) -> Result; - - /// Generates a proof of key ownership for the given authority in the - /// current epoch. An example usage of this module is coupled with the - /// session historical module to prove that a given authority key is - /// tied to a given staking identity during a specific session. Proofs - /// of key ownership are necessary for submitting equivocation reports. - /// NOTE: even though the API takes a `slot` as parameter the current - /// implementations ignores this parameter and instead relies on this - /// method being called at the correct block height, i.e. any point at - /// which the epoch for the given slot is live on-chain. Future - /// implementations will instead use indexed data through an offchain - /// worker, not requiring older states to be available. - async fn generate_key_ownership_proof( - &self, - at: Hash, - slot: Slot, - authority_id: AuthorityId, - ) -> Result, ApiError>; - - /// Submits an unsigned extrinsic to report an equivocation. The caller - /// must provide the equivocation proof and a key ownership proof - /// (should be obtained using `generate_key_ownership_proof`). The - /// extrinsic will be unsigned and should only be accepted for local - /// authorship (not to be broadcast to the network). This method returns - /// `None` when creation of the extrinsic fails, e.g. if equivocation - /// reporting is disabled for the given runtime (i.e. this method is - /// hardcoded to return `None`). Only useful in an offchain context. - async fn submit_report_equivocation_unsigned_extrinsic( - &self, - at: Hash, - equivocation_proof: EquivocationProof
, - key_owner_proof: OpaqueKeyOwnershipProof, - ) -> Result, ApiError>; - - async fn authorities( - &self, - at: Hash, - ) -> std::result::Result, ApiError>; - - async fn api_version_parachain_host(&self, at: Hash) -> Result, ApiError>; - - async fn staging_get_disputes( - &self, - at: Hash, - ) -> Result)>, ApiError>; -} - -#[async_trait] -impl OverseerRuntimeClient for T -where - T: ProvideRuntimeApi + Send + Sync, - T::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, -{ - async fn validators(&self, at: Hash) -> Result, ApiError> { - self.runtime_api().validators(&BlockId::Hash(at)) - } - - async fn validator_groups( - &self, - at: Hash, - ) -> Result<(Vec>, GroupRotationInfo), ApiError> { - self.runtime_api().validator_groups(&BlockId::Hash(at)) - } - - async fn availability_cores( - &self, - at: Hash, - ) -> Result>, ApiError> { - self.runtime_api().availability_cores(&BlockId::Hash(at)) - } - - async fn persisted_validation_data( - &self, - at: Hash, - para_id: Id, - assumption: OccupiedCoreAssumption, - ) -> Result>, ApiError> { - self.runtime_api() - .persisted_validation_data(&BlockId::Hash(at), para_id, assumption) - } - - async fn assumed_validation_data( - &self, - at: Hash, - para_id: Id, - expected_persisted_validation_data_hash: Hash, - ) -> Result, ValidationCodeHash)>, ApiError> - { - self.runtime_api().assumed_validation_data( - &BlockId::Hash(at), - para_id, - expected_persisted_validation_data_hash, - ) - } - - async fn check_validation_outputs( - &self, - at: Hash, - para_id: Id, - outputs: CandidateCommitments, - ) -> Result { - self.runtime_api() - .check_validation_outputs(&BlockId::Hash(at), para_id, outputs) - } - - async fn session_index_for_child(&self, at: Hash) -> Result { - self.runtime_api().session_index_for_child(&BlockId::Hash(at)) - } - - async fn validation_code( - &self, - at: Hash, - para_id: Id, - assumption: OccupiedCoreAssumption, - ) -> Result, ApiError> { - self.runtime_api().validation_code(&BlockId::Hash(at), para_id, assumption) - } - - async fn candidate_pending_availability( - &self, - at: Hash, - para_id: Id, - ) -> Result>, ApiError> { - self.runtime_api().candidate_pending_availability(&BlockId::Hash(at), para_id) - } - - async fn candidate_events(&self, at: Hash) -> Result>, ApiError> { - self.runtime_api().candidate_events(&BlockId::Hash(at)) - } - - async fn dmq_contents( - &self, - at: Hash, - recipient: Id, - ) -> Result>, ApiError> { - self.runtime_api().dmq_contents(&BlockId::Hash(at), recipient) - } - - async fn inbound_hrmp_channels_contents( - &self, - at: Hash, - recipient: Id, - ) -> Result>>, ApiError> { - self.runtime_api().inbound_hrmp_channels_contents(&BlockId::Hash(at), recipient) - } - - async fn validation_code_by_hash( - &self, - at: Hash, - hash: ValidationCodeHash, - ) -> Result, ApiError> { - self.runtime_api().validation_code_by_hash(&BlockId::Hash(at), hash) - } - - async fn on_chain_votes( - &self, - at: Hash, - ) -> Result>, ApiError> { - self.runtime_api().on_chain_votes(&BlockId::Hash(at)) - } - - async fn session_info( - &self, - at: Hash, - index: SessionIndex, - ) -> Result, ApiError> { - self.runtime_api().session_info(&BlockId::Hash(at), index) - } - - async fn submit_pvf_check_statement( - &self, - at: Hash, - stmt: PvfCheckStatement, - signature: ValidatorSignature, - ) -> Result<(), ApiError> { - self.runtime_api() - .submit_pvf_check_statement(&BlockId::Hash(at), stmt, signature) - } - - async fn pvfs_require_precheck(&self, at: Hash) -> Result, ApiError> { - self.runtime_api().pvfs_require_precheck(&BlockId::Hash(at)) - } - - async fn validation_code_hash( - &self, - at: Hash, - para_id: Id, - assumption: OccupiedCoreAssumption, - ) -> Result, ApiError> { - self.runtime_api().validation_code_hash(&BlockId::Hash(at), para_id, assumption) - } - - async fn configuration(&self, at: Hash) -> Result { - self.runtime_api().configuration(&BlockId::Hash(at)) - } - - async fn current_epoch_start(&self, at: Hash) -> Result { - self.runtime_api().current_epoch_start(&BlockId::Hash(at)) - } - - async fn current_epoch(&self, at: Hash) -> Result { - self.runtime_api().current_epoch(&BlockId::Hash(at)) - } - - async fn next_epoch(&self, at: Hash) -> Result { - self.runtime_api().next_epoch(&BlockId::Hash(at)) - } - - async fn generate_key_ownership_proof( - &self, - at: Hash, - slot: Slot, - authority_id: AuthorityId, - ) -> Result, ApiError> { - self.runtime_api() - .generate_key_ownership_proof(&BlockId::Hash(at), slot, authority_id) - } - - async fn submit_report_equivocation_unsigned_extrinsic( - &self, - at: Hash, - equivocation_proof: EquivocationProof
, - key_owner_proof: OpaqueKeyOwnershipProof, - ) -> Result, ApiError> { - self.runtime_api().submit_report_equivocation_unsigned_extrinsic( - &BlockId::Hash(at), - equivocation_proof, - key_owner_proof, - ) - } - - async fn authorities( - &self, - at: Hash, - ) -> std::result::Result, ApiError> { - self.runtime_api().authorities(&BlockId::Hash(at)) - } - - async fn api_version_parachain_host(&self, at: Hash) -> Result, ApiError> { - self.runtime_api().api_version::>(&BlockId::Hash(at)) - } - - async fn session_info_before_version_2( - &self, - at: Hash, - index: SessionIndex, - ) -> Result, ApiError> { - // self.runtime_api().session_info_before_version_2(&BlockId::Hash(at), index) - todo!() - } - - async fn staging_get_disputes( - &self, - at: Hash, - ) -> Result)>, ApiError> { - self.runtime_api().staging_get_disputes(&BlockId::Hash(at)) - } -} diff --git a/node/overseer/src/runtime_client.rs b/node/overseer/src/runtime_client.rs new file mode 100644 index 000000000000..1949c2d92092 --- /dev/null +++ b/node/overseer/src/runtime_client.rs @@ -0,0 +1,445 @@ +use async_trait::async_trait; +use polkadot_primitives::{ + runtime_api::ParachainHost, + v2::{ + Block, BlockId, BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash, + CommittedCandidateReceipt, CoreState, DisputeState, GroupRotationInfo, Hash, Header, Id, + InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, + PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, + Slot, ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, + }, +}; +use sp_api::{ApiError, ApiExt, ProvideRuntimeApi}; +use sp_authority_discovery::AuthorityDiscoveryApi; +use sp_consensus_babe::{ + AuthorityId, BabeApi, BabeGenesisConfiguration, Epoch, EquivocationProof, + OpaqueKeyOwnershipProof, +}; +use std::collections::BTreeMap; + +/// Exposes all runtime calls that are used by the runtime api subsystem. +#[async_trait] +pub trait OverseerRuntimeClient { + /// Get the current validators. + async fn validators(&self, at: Hash) -> Result, ApiError>; + + /// Returns the validator groups and rotation info localized based on the hypothetical child + /// of a block whose state this is invoked on. Note that `now` in the `GroupRotationInfo` + /// should be the successor of the number of the block. + async fn validator_groups( + &self, + at: Hash, + ) -> Result<(Vec>, GroupRotationInfo), ApiError>; + + /// Yields information on all availability cores as relevant to the child block. + /// Cores are either free or occupied. Free cores can have paras assigned to them. + async fn availability_cores( + &self, + at: Hash, + ) -> Result>, ApiError>; + + /// Yields the persisted validation data for the given `ParaId` along with an assumption that + /// should be used if the para currently occupies a core. + /// + /// Returns `None` if either the para is not registered or the assumption is `Freed` + /// and the para already occupies a core. + async fn persisted_validation_data( + &self, + at: Hash, + para_id: Id, + assumption: OccupiedCoreAssumption, + ) -> Result>, ApiError>; + + /// Returns the persisted validation data for the given `ParaId` along with the corresponding + /// validation code hash. Instead of accepting assumption about the para, matches the validation + /// data hash against an expected one and yields `None` if they're not equal. + async fn assumed_validation_data( + &self, + at: Hash, + para_id: Id, + expected_persisted_validation_data_hash: Hash, + ) -> Result, ValidationCodeHash)>, ApiError>; + + /// Checks if the given validation outputs pass the acceptance criteria. + async fn check_validation_outputs( + &self, + at: Hash, + para_id: Id, + outputs: CandidateCommitments, + ) -> Result; + + /// Returns the session index expected at a child of the block. + /// + /// This can be used to instantiate a `SigningContext`. + async fn session_index_for_child(&self, at: Hash) -> Result; + + /// Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`. + /// + /// Returns `None` if either the para is not registered or the assumption is `Freed` + /// and the para already occupies a core. + async fn validation_code( + &self, + at: Hash, + para_id: Id, + assumption: OccupiedCoreAssumption, + ) -> Result, ApiError>; + + /// Get the receipt of a candidate pending availability. This returns `Some` for any paras + /// assigned to occupied cores in `availability_cores` and `None` otherwise. + async fn candidate_pending_availability( + &self, + at: Hash, + para_id: Id, + ) -> Result>, ApiError>; + + /// Get a vector of events concerning candidates that occurred within a block. + async fn candidate_events(&self, at: Hash) -> Result>, ApiError>; + + /// Get all the pending inbound messages in the downward message queue for a para. + async fn dmq_contents( + &self, + at: Hash, + recipient: Id, + ) -> Result>, ApiError>; + + /// Get the contents of all channels addressed to the given recipient. Channels that have no + /// messages in them are also included. + async fn inbound_hrmp_channels_contents( + &self, + at: Hash, + recipient: Id, + ) -> Result>>, ApiError>; + + /// Get the validation code from its hash. + async fn validation_code_by_hash( + &self, + at: Hash, + hash: ValidationCodeHash, + ) -> Result, ApiError>; + + /// Scrape dispute relevant from on-chain, backing votes and resolved disputes. + async fn on_chain_votes(&self, at: Hash) + -> Result>, ApiError>; + + /***** Added in v2 *****/ + + /// Get the session info for the given session, if stored. + /// + /// NOTE: This function is only available since parachain host version 2. + async fn session_info( + &self, + at: Hash, + index: SessionIndex, + ) -> Result, ApiError>; + + /// Get the session info for the given session, if stored. + /// + /// NOTE: This function is only available since parachain host version 2. + async fn session_info_before_version_2( + &self, + at: Hash, + index: SessionIndex, + ) -> Result, ApiError>; + + /// Submits a PVF pre-checking statement into the transaction pool. + /// + /// NOTE: This function is only available since parachain host version 2. + async fn submit_pvf_check_statement( + &self, + at: Hash, + stmt: PvfCheckStatement, + signature: ValidatorSignature, + ) -> Result<(), ApiError>; + + /// Returns code hashes of PVFs that require pre-checking by validators in the active set. + /// + /// NOTE: This function is only available since parachain host version 2. + async fn pvfs_require_precheck(&self, at: Hash) -> Result, ApiError>; + + /// Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`. + /// + /// NOTE: This function is only available since parachain host version 2. + async fn validation_code_hash( + &self, + at: Hash, + para_id: Id, + assumption: OccupiedCoreAssumption, + ) -> Result, ApiError>; + + /// ===BABE=== + /// + /// + /// Return the genesis configuration for BABE. The configuration is only read on genesis. + async fn configuration(&self, at: Hash) -> Result; + + /// Returns the slot that started the current epoch. + async fn current_epoch_start(&self, at: Hash) -> Result; + + /// Returns information regarding the current epoch. + async fn current_epoch(&self, at: Hash) -> Result; + + /// Returns information regarding the next epoch (which was already + /// previously announced). + async fn next_epoch(&self, at: Hash) -> Result; + + /// Generates a proof of key ownership for the given authority in the + /// current epoch. An example usage of this module is coupled with the + /// session historical module to prove that a given authority key is + /// tied to a given staking identity during a specific session. Proofs + /// of key ownership are necessary for submitting equivocation reports. + /// NOTE: even though the API takes a `slot` as parameter the current + /// implementations ignores this parameter and instead relies on this + /// method being called at the correct block height, i.e. any point at + /// which the epoch for the given slot is live on-chain. Future + /// implementations will instead use indexed data through an offchain + /// worker, not requiring older states to be available. + async fn generate_key_ownership_proof( + &self, + at: Hash, + slot: Slot, + authority_id: AuthorityId, + ) -> Result, ApiError>; + + /// Submits an unsigned extrinsic to report an equivocation. The caller + /// must provide the equivocation proof and a key ownership proof + /// (should be obtained using `generate_key_ownership_proof`). The + /// extrinsic will be unsigned and should only be accepted for local + /// authorship (not to be broadcast to the network). This method returns + /// `None` when creation of the extrinsic fails, e.g. if equivocation + /// reporting is disabled for the given runtime (i.e. this method is + /// hardcoded to return `None`). Only useful in an offchain context. + async fn submit_report_equivocation_unsigned_extrinsic( + &self, + at: Hash, + equivocation_proof: EquivocationProof
, + key_owner_proof: OpaqueKeyOwnershipProof, + ) -> Result, ApiError>; + + /// Retrieve authority identifiers of the current and next authority set. + async fn authorities( + &self, + at: Hash, + ) -> std::result::Result, ApiError>; + + // Parachain host api version + async fn api_version_parachain_host(&self, at: Hash) -> Result, ApiError>; + + /// Returns all onchain disputes. + /// This is a staging method! Do not use on production runtimes! + async fn staging_get_disputes( + &self, + at: Hash, + ) -> Result)>, ApiError>; +} + +#[async_trait] +impl OverseerRuntimeClient for T +where + T: ProvideRuntimeApi + Send + Sync, + T::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, +{ + async fn validators(&self, at: Hash) -> Result, ApiError> { + self.runtime_api().validators(&BlockId::Hash(at)) + } + + async fn validator_groups( + &self, + at: Hash, + ) -> Result<(Vec>, GroupRotationInfo), ApiError> { + self.runtime_api().validator_groups(&BlockId::Hash(at)) + } + + async fn availability_cores( + &self, + at: Hash, + ) -> Result>, ApiError> { + self.runtime_api().availability_cores(&BlockId::Hash(at)) + } + + async fn persisted_validation_data( + &self, + at: Hash, + para_id: Id, + assumption: OccupiedCoreAssumption, + ) -> Result>, ApiError> { + self.runtime_api() + .persisted_validation_data(&BlockId::Hash(at), para_id, assumption) + } + + async fn assumed_validation_data( + &self, + at: Hash, + para_id: Id, + expected_persisted_validation_data_hash: Hash, + ) -> Result, ValidationCodeHash)>, ApiError> + { + self.runtime_api().assumed_validation_data( + &BlockId::Hash(at), + para_id, + expected_persisted_validation_data_hash, + ) + } + + async fn check_validation_outputs( + &self, + at: Hash, + para_id: Id, + outputs: CandidateCommitments, + ) -> Result { + self.runtime_api() + .check_validation_outputs(&BlockId::Hash(at), para_id, outputs) + } + + async fn session_index_for_child(&self, at: Hash) -> Result { + self.runtime_api().session_index_for_child(&BlockId::Hash(at)) + } + + async fn validation_code( + &self, + at: Hash, + para_id: Id, + assumption: OccupiedCoreAssumption, + ) -> Result, ApiError> { + self.runtime_api().validation_code(&BlockId::Hash(at), para_id, assumption) + } + + async fn candidate_pending_availability( + &self, + at: Hash, + para_id: Id, + ) -> Result>, ApiError> { + self.runtime_api().candidate_pending_availability(&BlockId::Hash(at), para_id) + } + + async fn candidate_events(&self, at: Hash) -> Result>, ApiError> { + self.runtime_api().candidate_events(&BlockId::Hash(at)) + } + + async fn dmq_contents( + &self, + at: Hash, + recipient: Id, + ) -> Result>, ApiError> { + self.runtime_api().dmq_contents(&BlockId::Hash(at), recipient) + } + + async fn inbound_hrmp_channels_contents( + &self, + at: Hash, + recipient: Id, + ) -> Result>>, ApiError> { + self.runtime_api().inbound_hrmp_channels_contents(&BlockId::Hash(at), recipient) + } + + async fn validation_code_by_hash( + &self, + at: Hash, + hash: ValidationCodeHash, + ) -> Result, ApiError> { + self.runtime_api().validation_code_by_hash(&BlockId::Hash(at), hash) + } + + async fn on_chain_votes( + &self, + at: Hash, + ) -> Result>, ApiError> { + self.runtime_api().on_chain_votes(&BlockId::Hash(at)) + } + + async fn session_info( + &self, + at: Hash, + index: SessionIndex, + ) -> Result, ApiError> { + self.runtime_api().session_info(&BlockId::Hash(at), index) + } + + async fn submit_pvf_check_statement( + &self, + at: Hash, + stmt: PvfCheckStatement, + signature: ValidatorSignature, + ) -> Result<(), ApiError> { + self.runtime_api() + .submit_pvf_check_statement(&BlockId::Hash(at), stmt, signature) + } + + async fn pvfs_require_precheck(&self, at: Hash) -> Result, ApiError> { + self.runtime_api().pvfs_require_precheck(&BlockId::Hash(at)) + } + + async fn validation_code_hash( + &self, + at: Hash, + para_id: Id, + assumption: OccupiedCoreAssumption, + ) -> Result, ApiError> { + self.runtime_api().validation_code_hash(&BlockId::Hash(at), para_id, assumption) + } + + async fn configuration(&self, at: Hash) -> Result { + self.runtime_api().configuration(&BlockId::Hash(at)) + } + + async fn current_epoch_start(&self, at: Hash) -> Result { + self.runtime_api().current_epoch_start(&BlockId::Hash(at)) + } + + async fn current_epoch(&self, at: Hash) -> Result { + self.runtime_api().current_epoch(&BlockId::Hash(at)) + } + + async fn next_epoch(&self, at: Hash) -> Result { + self.runtime_api().next_epoch(&BlockId::Hash(at)) + } + + async fn generate_key_ownership_proof( + &self, + at: Hash, + slot: Slot, + authority_id: AuthorityId, + ) -> Result, ApiError> { + self.runtime_api() + .generate_key_ownership_proof(&BlockId::Hash(at), slot, authority_id) + } + + async fn submit_report_equivocation_unsigned_extrinsic( + &self, + at: Hash, + equivocation_proof: EquivocationProof
, + key_owner_proof: OpaqueKeyOwnershipProof, + ) -> Result, ApiError> { + self.runtime_api().submit_report_equivocation_unsigned_extrinsic( + &BlockId::Hash(at), + equivocation_proof, + key_owner_proof, + ) + } + + async fn authorities( + &self, + at: Hash, + ) -> std::result::Result, ApiError> { + self.runtime_api().authorities(&BlockId::Hash(at)) + } + + async fn api_version_parachain_host(&self, at: Hash) -> Result, ApiError> { + self.runtime_api().api_version::>(&BlockId::Hash(at)) + } + + async fn session_info_before_version_2( + &self, + at: Hash, + index: SessionIndex, + ) -> Result, ApiError> { + // self.runtime_api().session_info_before_version_2(&BlockId::Hash(at), index) + todo!() + } + + async fn staging_get_disputes( + &self, + at: Hash, + ) -> Result)>, ApiError> { + self.runtime_api().staging_get_disputes(&BlockId::Hash(at)) + } +} From 71f8bb12ea0f8987e58a6eaeb2fca4699504774d Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Wed, 13 Jul 2022 14:09:48 +0200 Subject: [PATCH 13/23] Fix old session info call and make HeadSupportsParachain async --- Cargo.lock | 3 +++ node/core/approval-voting/Cargo.toml | 1 + node/core/approval-voting/src/tests.rs | 4 +++- node/core/runtime-api/Cargo.toml | 2 ++ node/core/runtime-api/src/tests.rs | 18 ++++++++++------ node/overseer/examples/minimal-example.rs | 5 ++++- node/overseer/src/lib.rs | 26 +++++++++++++---------- node/overseer/src/runtime_client.rs | 11 +++++----- node/overseer/src/tests.rs | 4 +++- node/subsystem-test-helpers/src/lib.rs | 4 +++- 10 files changed, 52 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6b479aec6369..4c3ee89d673f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6454,6 +6454,7 @@ name = "polkadot-node-core-approval-voting" version = "0.9.25" dependencies = [ "assert_matches", + "async-trait", "bitvec", "derive_more", "futures", @@ -6752,6 +6753,8 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "polkadot-primitives-test-helpers", + "sp-api", + "sp-authority-discovery", "sp-consensus-babe", "sp-core", "sp-keyring", diff --git a/node/core/approval-voting/Cargo.toml b/node/core/approval-voting/Cargo.toml index a436f51c6f5e..5895ebb3b63f 100644 --- a/node/core/approval-voting/Cargo.toml +++ b/node/core/approval-voting/Cargo.toml @@ -31,6 +31,7 @@ sp-application-crypto = { git = "https://github.com/paritytech/substrate", branc sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } [dev-dependencies] +async-trait = "0.1.56" parking_lot = "0.12.0" rand_core = "0.5.1" # should match schnorrkel sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/core/approval-voting/src/tests.rs b/node/core/approval-voting/src/tests.rs index 25dcfcdb4e81..d3408a3a6488 100644 --- a/node/core/approval-voting/src/tests.rs +++ b/node/core/approval-voting/src/tests.rs @@ -23,6 +23,7 @@ use polkadot_node_primitives::{ AvailableData, BlockData, PoV, }; use polkadot_node_subsystem::{ + gen::async_trait, messages::{ AllMessages, ApprovalVotingMessage, AssignmentCheckResult, AvailabilityRecoveryMessage, }, @@ -117,8 +118,9 @@ pub mod test_constants { struct MockSupportsParachains; +#[async_trait] impl HeadSupportsParachains for MockSupportsParachains { - fn head_supports_parachains(&self, _head: &Hash) -> bool { + async fn head_supports_parachains(&self, _head: &Hash) -> bool { true } } diff --git a/node/core/runtime-api/Cargo.toml b/node/core/runtime-api/Cargo.toml index 89f8e2a21386..f138d72e32f8 100644 --- a/node/core/runtime-api/Cargo.toml +++ b/node/core/runtime-api/Cargo.toml @@ -19,8 +19,10 @@ polkadot-node-subsystem-util = { path = "../../subsystem-util" } [dev-dependencies] sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } futures = { version = "0.3.21", features = ["thread-pool"] } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } polkadot-node-primitives = { path = "../../primitives" } test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" } diff --git a/node/core/runtime-api/src/tests.rs b/node/core/runtime-api/src/tests.rs index fdcd66ecf2a7..b1a1bba73769 100644 --- a/node/core/runtime-api/src/tests.rs +++ b/node/core/runtime-api/src/tests.rs @@ -20,13 +20,19 @@ use ::test_helpers::{dummy_committed_candidate_receipt, dummy_validation_code}; use polkadot_node_primitives::{BabeAllowedSlots, BabeEpoch, BabeEpochConfiguration}; use polkadot_node_subsystem::SpawnGlue; use polkadot_node_subsystem_test_helpers::make_subsystem_context; -use polkadot_primitives::v2::{ - AuthorityDiscoveryId, BlockNumber, CandidateEvent, CandidateHash, CommittedCandidateReceipt, - CoreState, DisputeState, GroupRotationInfo, Id as ParaId, InboundDownwardMessage, - InboundHrmpMessage, OccupiedCoreAssumption, PersistedValidationData, PvfCheckStatement, - ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode, ValidationCodeHash, - ValidatorId, ValidatorIndex, ValidatorSignature, +use polkadot_primitives::{ + runtime_api::ParachainHost, + v2::{ + AuthorityDiscoveryId, Block, BlockNumber, CandidateEvent, CandidateHash, + CommittedCandidateReceipt, CoreState, DisputeState, GroupRotationInfo, Id as ParaId, + InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, + PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, + ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, + }, }; +use sp_api::ProvideRuntimeApi; +use sp_authority_discovery::AuthorityDiscoveryApi; +use sp_consensus_babe::BabeApi; use sp_core::testing::TaskExecutor; use std::{ collections::{BTreeMap, HashMap}, diff --git a/node/overseer/examples/minimal-example.rs b/node/overseer/examples/minimal-example.rs index 6033815ddd50..be6779819eb7 100644 --- a/node/overseer/examples/minimal-example.rs +++ b/node/overseer/examples/minimal-example.rs @@ -20,6 +20,7 @@ use futures::{channel::oneshot, pending, pin_mut, select, stream, FutureExt, StreamExt}; use futures_timer::Delay; +use orchestra::async_trait; use std::time::Duration; use ::test_helpers::{dummy_candidate_descriptor, dummy_hash}; @@ -34,8 +35,10 @@ use polkadot_overseer::{ use polkadot_primitives::v2::{CandidateReceipt, Hash}; struct AlwaysSupportsParachains; + +#[async_trait] impl HeadSupportsParachains for AlwaysSupportsParachains { - fn head_supports_parachains(&self, _head: &Hash) -> bool { + async fn head_supports_parachains(&self, _head: &Hash) -> bool { true } } diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index d8628690c265..ae6ca9aee784 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -67,7 +67,7 @@ use std::{ time::Duration, }; -use futures::{channel::oneshot, future::BoxFuture, select, Future, FutureExt, Stream, StreamExt}; +use futures::{channel::oneshot, future::BoxFuture, select, Future, FutureExt, StreamExt}; use lru::LruCache; use client::{BlockImportNotification, BlockchainEvents, FinalityNotification}; @@ -156,19 +156,20 @@ impl crate::gen::Spawner for SpawnGlue { } /// Whether a header supports parachain consensus or not. +#[async_trait::async_trait] pub trait HeadSupportsParachains { /// Return true if the given header supports parachain consensus. Otherwise, false. - fn head_supports_parachains(&self, head: &Hash) -> bool; + async fn head_supports_parachains(&self, head: &Hash) -> bool; } +#[async_trait::async_trait] impl HeadSupportsParachains for Arc where - Client: OverseerRuntimeClient, + Client: OverseerRuntimeClient + Sync + Send, { - fn head_supports_parachains(&self, head: &Hash) -> bool { + async fn head_supports_parachains(&self, head: &Hash) -> bool { // Check that the `ParachainHost` runtime api is at least with version 1 present on chain. - true - // self.api_version_parachain_host(head).ok().flatten().unwrap_or(0) >= 1 + self.api_version_parachain_host(*head).await.ok().flatten().unwrap_or(0) >= 1 } } @@ -420,9 +421,12 @@ pub async fn forward_events>(client: Arc

, mut hand /// # fn main() { executor::block_on(async move { /// /// struct AlwaysSupportsParachains; +/// +/// #[async_trait::async_trait] /// impl HeadSupportsParachains for AlwaysSupportsParachains { -/// fn head_supports_parachains(&self, _head: &Hash) -> bool { true } +/// async fn head_supports_parachains(&self, _head: &Hash) -> bool { true } /// } +/// /// let spawner = sp_core::testing::TaskExecutor::new(); /// let (overseer, _handle) = dummy_overseer_builder(spawner, AlwaysSupportsParachains, None) /// .unwrap() @@ -713,7 +717,7 @@ where // Notify about active leaves on startup before starting the loop for (hash, number) in std::mem::take(&mut self.leaves) { let _ = self.active_leaves.insert(hash, number); - if let Some((span, status)) = self.on_head_activated(&hash, None) { + if let Some((span, status)) = self.on_head_activated(&hash, None).await { let update = ActiveLeavesUpdate::start_work(ActivatedLeaf { hash, number, status, span }); self.broadcast_signal(OverseerSignal::ActiveLeaves(update)).await?; @@ -775,7 +779,7 @@ where }, }; - let mut update = match self.on_head_activated(&block.hash, Some(block.parent_hash)) { + let mut update = match self.on_head_activated(&block.hash, Some(block.parent_hash)).await { Some((span, status)) => ActiveLeavesUpdate::start_work(ActivatedLeaf { hash: block.hash, number: block.number, @@ -832,12 +836,12 @@ where /// Handles a header activation. If the header's state doesn't support the parachains API, /// this returns `None`. - fn on_head_activated( + async fn on_head_activated( &mut self, hash: &Hash, parent_hash: Option, ) -> Option<(Arc, LeafStatus)> { - if !self.supports_parachains.head_supports_parachains(hash) { + if !self.supports_parachains.head_supports_parachains(hash).await { return None } diff --git a/node/overseer/src/runtime_client.rs b/node/overseer/src/runtime_client.rs index 1949c2d92092..9e6d9fe203cb 100644 --- a/node/overseer/src/runtime_client.rs +++ b/node/overseer/src/runtime_client.rs @@ -139,7 +139,7 @@ pub trait OverseerRuntimeClient { &self, at: Hash, index: SessionIndex, - ) -> Result, ApiError>; + ) -> Result, ApiError>; /// Submits a PVF pre-checking statement into the transaction pool. /// @@ -221,7 +221,7 @@ pub trait OverseerRuntimeClient { at: Hash, ) -> std::result::Result, ApiError>; - // Parachain host api version + /// Parachain host api version async fn api_version_parachain_host(&self, at: Hash) -> Result, ApiError>; /// Returns all onchain disputes. @@ -427,13 +427,14 @@ where self.runtime_api().api_version::>(&BlockId::Hash(at)) } + #[warn(deprecated)] async fn session_info_before_version_2( &self, at: Hash, index: SessionIndex, - ) -> Result, ApiError> { - // self.runtime_api().session_info_before_version_2(&BlockId::Hash(at), index) - todo!() + ) -> Result, ApiError> { + #[allow(deprecated)] + self.runtime_api().session_info_before_version_2(&BlockId::Hash(at), index) } async fn staging_get_disputes( diff --git a/node/overseer/src/tests.rs b/node/overseer/src/tests.rs index a3f304466626..46feaa745e95 100644 --- a/node/overseer/src/tests.rs +++ b/node/overseer/src/tests.rs @@ -15,6 +15,7 @@ // along with Polkadot. If not, see . use futures::{executor, pending, pin_mut, poll, select, stream, FutureExt}; +use gen::async_trait; use std::{collections::HashMap, sync::atomic, task::Poll}; use ::test_helpers::{dummy_candidate_descriptor, dummy_candidate_receipt, dummy_hash}; @@ -154,8 +155,9 @@ where struct MockSupportsParachains; +#[async_trait] impl HeadSupportsParachains for MockSupportsParachains { - fn head_supports_parachains(&self, _head: &Hash) -> bool { + async fn head_supports_parachains(&self, _head: &Hash) -> bool { true } } diff --git a/node/subsystem-test-helpers/src/lib.rs b/node/subsystem-test-helpers/src/lib.rs index 6ea0caabaddc..81b2fbb964a5 100644 --- a/node/subsystem-test-helpers/src/lib.rs +++ b/node/subsystem-test-helpers/src/lib.rs @@ -384,8 +384,10 @@ mod tests { use sp_core::traits::SpawnNamed; struct AlwaysSupportsParachains; + + #[async_trait::async_trait] impl HeadSupportsParachains for AlwaysSupportsParachains { - fn head_supports_parachains(&self, _head: &Hash) -> bool { + async fn head_supports_parachains(&self, _head: &Hash) -> bool { true } } From 01b633ef6791c657553a835c8109102f505187cd Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Thu, 14 Jul 2022 13:10:32 +0200 Subject: [PATCH 14/23] Improve naming of trait --- node/core/runtime-api/src/lib.rs | 10 +++++----- node/overseer/src/lib.rs | 4 ++-- node/overseer/src/runtime_client.rs | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index 1cfafaaaa14b..b881e4537ee6 100644 --- a/node/core/runtime-api/src/lib.rs +++ b/node/core/runtime-api/src/lib.rs @@ -27,7 +27,7 @@ use polkadot_node_subsystem::{ messages::{RuntimeApiMessage, RuntimeApiRequest as Request}, overseer, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, SubsystemResult, }; -use polkadot_overseer::OverseerRuntimeClient; +use polkadot_overseer::RuntimeApiSubsystemClient; use polkadot_primitives::v2::Hash; use cache::{RequestResult, RequestResultCache}; @@ -82,7 +82,7 @@ impl RuntimeApiSubsystem { #[overseer::subsystem(RuntimeApi, error = SubsystemError, prefix = self::overseer)] impl RuntimeApiSubsystem where - Client: OverseerRuntimeClient + Send + Sync + 'static, + Client: RuntimeApiSubsystemClient + Send + Sync + 'static, { fn start(self, ctx: Context) -> SpawnedSubsystem { SpawnedSubsystem { future: run(ctx, self).boxed(), name: "runtime-api-subsystem" } @@ -91,7 +91,7 @@ where impl RuntimeApiSubsystem where - Client: OverseerRuntimeClient + Send + 'static + Sync, + Client: RuntimeApiSubsystemClient + Send + 'static + Sync, { fn store_cache(&mut self, result: RequestResult) { use RequestResult::*; @@ -309,7 +309,7 @@ async fn run( mut subsystem: RuntimeApiSubsystem, ) -> SubsystemResult<()> where - Client: OverseerRuntimeClient + Send + Sync + 'static, + Client: RuntimeApiSubsystemClient + Send + Sync + 'static, { loop { // Let's add some back pressure when the subsystem is running at `MAX_PARALLEL_REQUESTS`. @@ -346,7 +346,7 @@ async fn make_runtime_api_request( request: Request, ) -> Option where - Client: OverseerRuntimeClient + 'static, + Client: RuntimeApiSubsystemClient + 'static, { let _timer = metrics.time_make_runtime_api_request(); diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index ae6ca9aee784..9882fb52b84a 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -95,7 +95,7 @@ pub mod dummy; pub use self::dummy::DummySubsystem; mod runtime_client; -pub use runtime_client::OverseerRuntimeClient; +pub use runtime_client::RuntimeApiSubsystemClient; pub use polkadot_node_metrics::{ metrics::{prometheus, Metrics as MetricsTrait}, @@ -165,7 +165,7 @@ pub trait HeadSupportsParachains { #[async_trait::async_trait] impl HeadSupportsParachains for Arc where - Client: OverseerRuntimeClient + Sync + Send, + Client: RuntimeApiSubsystemClient + Sync + Send, { async fn head_supports_parachains(&self, head: &Hash) -> bool { // Check that the `ParachainHost` runtime api is at least with version 1 present on chain. diff --git a/node/overseer/src/runtime_client.rs b/node/overseer/src/runtime_client.rs index 9e6d9fe203cb..c7e9347a61d9 100644 --- a/node/overseer/src/runtime_client.rs +++ b/node/overseer/src/runtime_client.rs @@ -19,7 +19,7 @@ use std::collections::BTreeMap; /// Exposes all runtime calls that are used by the runtime api subsystem. #[async_trait] -pub trait OverseerRuntimeClient { +pub trait RuntimeApiSubsystemClient { /// Get the current validators. async fn validators(&self, at: Hash) -> Result, ApiError>; @@ -233,7 +233,7 @@ pub trait OverseerRuntimeClient { } #[async_trait] -impl OverseerRuntimeClient for T +impl RuntimeApiSubsystemClient for T where T: ProvideRuntimeApi + Send + Sync, T::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, From d04ec5757d0564f2e87b0979a6f751535819c127 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Thu, 14 Jul 2022 14:59:21 +0200 Subject: [PATCH 15/23] Cleanup --- Cargo.lock | 9 +- Cargo.toml | 233 ------------------------- node/core/approval-voting/src/tests.rs | 2 +- node/core/runtime-api/src/lib.rs | 25 +-- 4 files changed, 17 insertions(+), 252 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 26cecc02e7a1..32174fd63cd4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -328,9 +328,9 @@ checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" [[package]] name = "async-trait" -version = "0.1.53" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" dependencies = [ "proc-macro2", "quote", @@ -6289,6 +6289,7 @@ name = "polkadot-node-core-approval-voting" version = "0.9.26" dependencies = [ "assert_matches", + "async-trait", "bitvec", "derive_more", "futures", @@ -6585,6 +6586,7 @@ dependencies = [ "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", "polkadot-node-subsystem-util", + "polkadot-overseer", "polkadot-primitives", "polkadot-primitives-test-helpers", "sp-api", @@ -6773,6 +6775,7 @@ name = "polkadot-overseer" version = "0.9.26" dependencies = [ "assert_matches", + "async-trait", "femme", "futures", "futures-timer", @@ -6789,6 +6792,8 @@ dependencies = [ "prioritized-metered-channel", "sc-client-api", "sp-api", + "sp-authority-discovery", + "sp-consensus-babe", "sp-core", "tracing-gum", ] diff --git a/Cargo.toml b/Cargo.toml index 6ffbdaeec9bc..0e0b168420c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -200,239 +200,6 @@ fast-runtime = [ "polkadot-cli/fast-runtime" ] runtime-metrics = [ "polkadot-cli/runtime-metrics" ] pyroscope = ["polkadot-cli/pyroscope"] staging-client = ["polkadot-cli/staging-client"] -[patch."https://github.com/paritytech/substrate"] -node-template ={path = "/Users/skunert/work/repos/substrate/bin/node-template/node" } -frame-benchmarking ={path = "/Users/skunert/work/repos/substrate/frame/benchmarking" } -frame-support ={path = "/Users/skunert/work/repos/substrate/frame/support" } -frame-support-procedural ={path = "/Users/skunert/work/repos/substrate/frame/support/procedural" } -frame-support-procedural-tools ={path = "/Users/skunert/work/repos/substrate/frame/support/procedural/tools" } -frame-support-procedural-tools-derive ={path = "/Users/skunert/work/repos/substrate/frame/support/procedural/tools/derive" } -sp-arithmetic ={path = "/Users/skunert/work/repos/substrate/primitives/arithmetic" } -sp-debug-derive ={path = "/Users/skunert/work/repos/substrate/primitives/debug-derive" } -sp-std ={path = "/Users/skunert/work/repos/substrate/primitives/std" } -sp-core ={path = "/Users/skunert/work/repos/substrate/primitives/core" } -sp-core-hashing ={path = "/Users/skunert/work/repos/substrate/primitives/core/hashing" } -sp-externalities ={path = "/Users/skunert/work/repos/substrate/primitives/externalities" } -sp-storage ={path = "/Users/skunert/work/repos/substrate/primitives/storage" } -sp-runtime-interface ={path = "/Users/skunert/work/repos/substrate/primitives/runtime-interface" } -sp-runtime-interface-proc-macro ={path = "/Users/skunert/work/repos/substrate/primitives/runtime-interface/proc-macro" } -sp-tracing ={path = "/Users/skunert/work/repos/substrate/primitives/tracing" } -sp-wasm-interface ={path = "/Users/skunert/work/repos/substrate/primitives/wasm-interface" } -sp-io ={path = "/Users/skunert/work/repos/substrate/primitives/io" } -sp-keystore ={path = "/Users/skunert/work/repos/substrate/primitives/keystore" } -sp-state-machine ={path = "/Users/skunert/work/repos/substrate/primitives/state-machine" } -sp-panic-handler ={path = "/Users/skunert/work/repos/substrate/primitives/panic-handler" } -sp-trie ={path = "/Users/skunert/work/repos/substrate/primitives/trie" } -sp-runtime ={path = "/Users/skunert/work/repos/substrate/primitives/runtime" } -sp-application-crypto ={path = "/Users/skunert/work/repos/substrate/primitives/application-crypto" } -sp-api ={path = "/Users/skunert/work/repos/substrate/primitives/api" } -sp-api-proc-macro ={path = "/Users/skunert/work/repos/substrate/primitives/api/proc-macro" } -sp-version ={path = "/Users/skunert/work/repos/substrate/primitives/version" } -sp-core-hashing-proc-macro ={path = "/Users/skunert/work/repos/substrate/primitives/core/hashing/proc-macro" } -sp-version-proc-macro ={path = "/Users/skunert/work/repos/substrate/primitives/version/proc-macro" } -sp-test-primitives ={path = "/Users/skunert/work/repos/substrate/primitives/test-primitives" } -substrate-test-runtime-client ={path = "/Users/skunert/work/repos/substrate/test-utils/runtime/client" } -sc-block-builder ={path = "/Users/skunert/work/repos/substrate/client/block-builder" } -sc-client-api ={path = "/Users/skunert/work/repos/substrate/client/api" } -substrate-prometheus-endpoint ={path = "/Users/skunert/work/repos/substrate/utils/prometheus" } -sc-executor ={path = "/Users/skunert/work/repos/substrate/client/executor" } -sc-executor-common ={path = "/Users/skunert/work/repos/substrate/client/executor/common" } -sc-allocator ={path = "/Users/skunert/work/repos/substrate/client/allocator" } -sp-maybe-compressed-blob ={path = "/Users/skunert/work/repos/substrate/primitives/maybe-compressed-blob" } -sp-sandbox ={path = "/Users/skunert/work/repos/substrate/primitives/sandbox" } -sp-serializer ={path = "/Users/skunert/work/repos/substrate/primitives/serializer" } -sc-executor-wasmi ={path = "/Users/skunert/work/repos/substrate/client/executor/wasmi" } -sc-executor-wasmtime ={path = "/Users/skunert/work/repos/substrate/client/executor/wasmtime" } -sc-runtime-test ={path = "/Users/skunert/work/repos/substrate/client/executor/runtime-test" } -sp-tasks ={path = "/Users/skunert/work/repos/substrate/primitives/tasks" } -substrate-wasm-builder ={path = "/Users/skunert/work/repos/substrate/utils/wasm-builder" } -sc-tracing ={path = "/Users/skunert/work/repos/substrate/client/tracing" } -sc-rpc-server ={path = "/Users/skunert/work/repos/substrate/client/rpc-servers" } -sc-tracing-proc-macro ={path = "/Users/skunert/work/repos/substrate/client/tracing/proc-macro" } -sp-blockchain ={path = "/Users/skunert/work/repos/substrate/primitives/blockchain" } -sp-consensus ={path = "/Users/skunert/work/repos/substrate/primitives/consensus/common" } -sp-inherents ={path = "/Users/skunert/work/repos/substrate/primitives/inherents" } -sp-database ={path = "/Users/skunert/work/repos/substrate/primitives/database" } -sp-rpc ={path = "/Users/skunert/work/repos/substrate/primitives/rpc" } -substrate-test-runtime ={path = "/Users/skunert/work/repos/substrate/test-utils/runtime" } -beefy-primitives ={path = "/Users/skunert/work/repos/substrate/primitives/beefy" } -frame-system ={path = "/Users/skunert/work/repos/substrate/frame/system" } -frame-system-rpc-runtime-api ={path = "/Users/skunert/work/repos/substrate/frame/system/rpc/runtime-api" } -pallet-babe ={path = "/Users/skunert/work/repos/substrate/frame/babe" } -pallet-authorship ={path = "/Users/skunert/work/repos/substrate/frame/authorship" } -sp-authorship ={path = "/Users/skunert/work/repos/substrate/primitives/authorship" } -pallet-session ={path = "/Users/skunert/work/repos/substrate/frame/session" } -pallet-timestamp ={path = "/Users/skunert/work/repos/substrate/frame/timestamp" } -sp-timestamp ={path = "/Users/skunert/work/repos/substrate/primitives/timestamp" } -sp-session ={path = "/Users/skunert/work/repos/substrate/primitives/session" } -sp-staking ={path = "/Users/skunert/work/repos/substrate/primitives/staking" } -sp-consensus-babe ={path = "/Users/skunert/work/repos/substrate/primitives/consensus/babe" } -sp-consensus-slots ={path = "/Users/skunert/work/repos/substrate/primitives/consensus/slots" } -sp-consensus-vrf ={path = "/Users/skunert/work/repos/substrate/primitives/consensus/vrf" } -frame-election-provider-support ={path = "/Users/skunert/work/repos/substrate/frame/election-provider-support" } -frame-election-provider-solution-type ={path = "/Users/skunert/work/repos/substrate/frame/election-provider-support/solution-type" } -sp-npos-elections ={path = "/Users/skunert/work/repos/substrate/primitives/npos-elections" } -substrate-test-utils ={path = "/Users/skunert/work/repos/substrate/test-utils" } -substrate-test-utils-derive ={path = "/Users/skunert/work/repos/substrate/test-utils/derive" } -sc-service ={path = "/Users/skunert/work/repos/substrate/client/service" } -sc-chain-spec ={path = "/Users/skunert/work/repos/substrate/client/chain-spec" } -sc-chain-spec-derive ={path = "/Users/skunert/work/repos/substrate/client/chain-spec/derive" } -sc-network ={path = "/Users/skunert/work/repos/substrate/client/network" } -fork-tree ={path = "/Users/skunert/work/repos/substrate/utils/fork-tree" } -sc-consensus ={path = "/Users/skunert/work/repos/substrate/client/consensus/common" } -sc-utils ={path = "/Users/skunert/work/repos/substrate/client/utils" } -sc-network-common ={path = "/Users/skunert/work/repos/substrate/client/network/common" } -sc-peerset ={path = "/Users/skunert/work/repos/substrate/client/peerset" } -sc-network-sync ={path = "/Users/skunert/work/repos/substrate/client/network/sync" } -sp-finality-grandpa ={path = "/Users/skunert/work/repos/substrate/primitives/finality-grandpa" } -sc-telemetry ={path = "/Users/skunert/work/repos/substrate/client/telemetry" } -sc-client-db ={path = "/Users/skunert/work/repos/substrate/client/db" } -sc-state-db ={path = "/Users/skunert/work/repos/substrate/client/state-db" } -sc-informant ={path = "/Users/skunert/work/repos/substrate/client/informant" } -sc-transaction-pool-api ={path = "/Users/skunert/work/repos/substrate/client/transaction-pool/api" } -sc-keystore ={path = "/Users/skunert/work/repos/substrate/client/keystore" } -sc-offchain ={path = "/Users/skunert/work/repos/substrate/client/offchain" } -sp-offchain ={path = "/Users/skunert/work/repos/substrate/primitives/offchain" } -sc-transaction-pool ={path = "/Users/skunert/work/repos/substrate/client/transaction-pool" } -sp-transaction-pool ={path = "/Users/skunert/work/repos/substrate/primitives/transaction-pool" } -substrate-test-runtime-transaction-pool ={path = "/Users/skunert/work/repos/substrate/test-utils/runtime/transaction-pool" } -sc-rpc ={path = "/Users/skunert/work/repos/substrate/client/rpc" } -sc-rpc-api ={path = "/Users/skunert/work/repos/substrate/client/rpc-api" } -sc-sysinfo ={path = "/Users/skunert/work/repos/substrate/client/sysinfo" } -sp-block-builder ={path = "/Users/skunert/work/repos/substrate/primitives/block-builder" } -sp-transaction-storage-proof ={path = "/Users/skunert/work/repos/substrate/primitives/transaction-storage-proof" } -pallet-balances ={path = "/Users/skunert/work/repos/substrate/frame/balances" } -pallet-transaction-payment ={path = "/Users/skunert/work/repos/substrate/frame/transaction-payment" } -pallet-offences ={path = "/Users/skunert/work/repos/substrate/frame/offences" } -pallet-staking ={path = "/Users/skunert/work/repos/substrate/frame/staking" } -pallet-bags-list ={path = "/Users/skunert/work/repos/substrate/frame/bags-list" } -pallet-staking-reward-curve ={path = "/Users/skunert/work/repos/substrate/frame/staking/reward-curve" } -sp-consensus-aura ={path = "/Users/skunert/work/repos/substrate/primitives/consensus/aura" } -sp-keyring ={path = "/Users/skunert/work/repos/substrate/primitives/keyring" } -substrate-test-client ={path = "/Users/skunert/work/repos/substrate/test-utils/client" } -sp-runtime-interface-test-wasm ={path = "/Users/skunert/work/repos/substrate/primitives/runtime-interface/test-wasm" } -frame-benchmarking-cli ={path = "/Users/skunert/work/repos/substrate/utils/frame/benchmarking-cli" } -sc-cli ={path = "/Users/skunert/work/repos/substrate/client/cli" } -node-template-runtime ={path = "/Users/skunert/work/repos/substrate/bin/node-template/runtime" } -frame-executive ={path = "/Users/skunert/work/repos/substrate/frame/executive" } -frame-system-benchmarking ={path = "/Users/skunert/work/repos/substrate/frame/system/benchmarking" } -frame-try-runtime ={path = "/Users/skunert/work/repos/substrate/frame/try-runtime" } -pallet-aura ={path = "/Users/skunert/work/repos/substrate/frame/aura" } -pallet-grandpa ={path = "/Users/skunert/work/repos/substrate/frame/grandpa" } -pallet-randomness-collective-flip ={path = "/Users/skunert/work/repos/substrate/frame/randomness-collective-flip" } -pallet-sudo ={path = "/Users/skunert/work/repos/substrate/frame/sudo" } -pallet-template ={path = "/Users/skunert/work/repos/substrate/bin/node-template/pallets/template" } -pallet-transaction-payment-rpc-runtime-api ={path = "/Users/skunert/work/repos/substrate/frame/transaction-payment/rpc/runtime-api" } -pallet-transaction-payment-rpc ={path = "/Users/skunert/work/repos/substrate/frame/transaction-payment/rpc" } -sc-basic-authorship ={path = "/Users/skunert/work/repos/substrate/client/basic-authorship" } -sc-proposer-metrics ={path = "/Users/skunert/work/repos/substrate/client/proposer-metrics" } -sc-consensus-aura ={path = "/Users/skunert/work/repos/substrate/client/consensus/aura" } -sc-consensus-slots ={path = "/Users/skunert/work/repos/substrate/client/consensus/slots" } -sc-network-test ={path = "/Users/skunert/work/repos/substrate/client/network/test" } -sc-finality-grandpa ={path = "/Users/skunert/work/repos/substrate/client/finality-grandpa" } -sc-network-gossip ={path = "/Users/skunert/work/repos/substrate/client/network-gossip" } -substrate-frame-rpc-system ={path = "/Users/skunert/work/repos/substrate/utils/frame/rpc/system" } -try-runtime-cli ={path = "/Users/skunert/work/repos/substrate/utils/frame/try-runtime/cli" } -remote-externalities ={path = "/Users/skunert/work/repos/substrate/utils/frame/remote-externalities" } -pallet-elections-phragmen ={path = "/Users/skunert/work/repos/substrate/frame/elections-phragmen" } -substrate-build-script-utils ={path = "/Users/skunert/work/repos/substrate/utils/build-script-utils" } -node-bench ={path = "/Users/skunert/work/repos/substrate/bin/node/bench" } -node-primitives ={path = "/Users/skunert/work/repos/substrate/bin/node/primitives" } -node-runtime ={path = "/Users/skunert/work/repos/substrate/bin/node/runtime" } -pallet-asset-tx-payment ={path = "/Users/skunert/work/repos/substrate/frame/transaction-payment/asset-tx-payment" } -pallet-assets ={path = "/Users/skunert/work/repos/substrate/frame/assets" } -pallet-authority-discovery ={path = "/Users/skunert/work/repos/substrate/frame/authority-discovery" } -sp-authority-discovery ={path = "/Users/skunert/work/repos/substrate/primitives/authority-discovery" } -pallet-bounties ={path = "/Users/skunert/work/repos/substrate/frame/bounties" } -pallet-treasury ={path = "/Users/skunert/work/repos/substrate/frame/treasury" } -pallet-child-bounties ={path = "/Users/skunert/work/repos/substrate/frame/child-bounties" } -pallet-collective ={path = "/Users/skunert/work/repos/substrate/frame/collective" } -pallet-contracts ={path = "/Users/skunert/work/repos/substrate/frame/contracts" } -pallet-contracts-primitives ={path = "/Users/skunert/work/repos/substrate/frame/contracts/common" } -pallet-contracts-proc-macro ={path = "/Users/skunert/work/repos/substrate/frame/contracts/proc-macro" } -pallet-utility ={path = "/Users/skunert/work/repos/substrate/frame/utility" } -pallet-contracts-rpc-runtime-api ={path = "/Users/skunert/work/repos/substrate/frame/contracts/rpc/runtime-api" } -pallet-conviction-voting ={path = "/Users/skunert/work/repos/substrate/frame/conviction-voting" } -pallet-scheduler ={path = "/Users/skunert/work/repos/substrate/frame/scheduler" } -pallet-preimage ={path = "/Users/skunert/work/repos/substrate/frame/preimage" } -pallet-democracy ={path = "/Users/skunert/work/repos/substrate/frame/democracy" } -pallet-election-provider-multi-phase ={path = "/Users/skunert/work/repos/substrate/frame/election-provider-multi-phase" } -pallet-election-provider-support-benchmarking ={path = "/Users/skunert/work/repos/substrate/frame/election-provider-support/benchmarking" } -pallet-gilt ={path = "/Users/skunert/work/repos/substrate/frame/gilt" } -pallet-identity ={path = "/Users/skunert/work/repos/substrate/frame/identity" } -pallet-im-online ={path = "/Users/skunert/work/repos/substrate/frame/im-online" } -pallet-indices ={path = "/Users/skunert/work/repos/substrate/frame/indices" } -pallet-lottery ={path = "/Users/skunert/work/repos/substrate/frame/lottery" } -frame-support-test ={path = "/Users/skunert/work/repos/substrate/frame/support/test" } -frame-support-test-pallet ={path = "/Users/skunert/work/repos/substrate/frame/support/test/pallet" } -pallet-membership ={path = "/Users/skunert/work/repos/substrate/frame/membership" } -pallet-mmr ={path = "/Users/skunert/work/repos/substrate/frame/merkle-mountain-range" } -sp-mmr-primitives ={path = "/Users/skunert/work/repos/substrate/primitives/merkle-mountain-range" } -pallet-multisig ={path = "/Users/skunert/work/repos/substrate/frame/multisig" } -pallet-nomination-pools ={path = "/Users/skunert/work/repos/substrate/frame/nomination-pools" } -pallet-nomination-pools-benchmarking ={path = "/Users/skunert/work/repos/substrate/frame/nomination-pools/benchmarking" } -pallet-offences-benchmarking ={path = "/Users/skunert/work/repos/substrate/frame/offences/benchmarking" } -pallet-proxy ={path = "/Users/skunert/work/repos/substrate/frame/proxy" } -pallet-recovery ={path = "/Users/skunert/work/repos/substrate/frame/recovery" } -pallet-referenda ={path = "/Users/skunert/work/repos/substrate/frame/referenda" } -pallet-remark ={path = "/Users/skunert/work/repos/substrate/frame/remark" } -pallet-session-benchmarking ={path = "/Users/skunert/work/repos/substrate/frame/session/benchmarking" } -pallet-society ={path = "/Users/skunert/work/repos/substrate/frame/society" } -pallet-state-trie-migration ={path = "/Users/skunert/work/repos/substrate/frame/state-trie-migration" } -substrate-state-trie-migration-rpc ={path = "/Users/skunert/work/repos/substrate/utils/frame/rpc/state-trie-migration-rpc" } -pallet-tips ={path = "/Users/skunert/work/repos/substrate/frame/tips" } -pallet-transaction-storage ={path = "/Users/skunert/work/repos/substrate/frame/transaction-storage" } -pallet-uniques ={path = "/Users/skunert/work/repos/substrate/frame/uniques" } -pallet-vesting ={path = "/Users/skunert/work/repos/substrate/frame/vesting" } -pallet-whitelist ={path = "/Users/skunert/work/repos/substrate/frame/whitelist" } -node-testing ={path = "/Users/skunert/work/repos/substrate/bin/node/testing" } -node-executor ={path = "/Users/skunert/work/repos/substrate/bin/node/executor" } -node-cli ={path = "/Users/skunert/work/repos/substrate/bin/node/cli" } -node-inspect ={path = "/Users/skunert/work/repos/substrate/bin/node/inspect" } -node-rpc ={path = "/Users/skunert/work/repos/substrate/bin/node/rpc" } -pallet-contracts-rpc ={path = "/Users/skunert/work/repos/substrate/frame/contracts/rpc" } -pallet-mmr-rpc ={path = "/Users/skunert/work/repos/substrate/frame/merkle-mountain-range/rpc" } -sc-consensus-babe ={path = "/Users/skunert/work/repos/substrate/client/consensus/babe" } -sc-consensus-epochs ={path = "/Users/skunert/work/repos/substrate/client/consensus/epochs" } -sc-consensus-babe-rpc ={path = "/Users/skunert/work/repos/substrate/client/consensus/babe/rpc" } -sc-finality-grandpa-rpc ={path = "/Users/skunert/work/repos/substrate/client/finality-grandpa/rpc" } -sc-sync-state-rpc ={path = "/Users/skunert/work/repos/substrate/client/sync-state-rpc" } -sc-authority-discovery ={path = "/Users/skunert/work/repos/substrate/client/authority-discovery" } -sc-consensus-uncles ={path = "/Users/skunert/work/repos/substrate/client/consensus/uncles" } -sc-service-test ={path = "/Users/skunert/work/repos/substrate/client/service/test" } -substrate-frame-cli ={path = "/Users/skunert/work/repos/substrate/utils/frame/frame-utilities-cli" } -chain-spec-builder ={path = "/Users/skunert/work/repos/substrate/bin/utils/chain-spec-builder" } -subkey ={path = "/Users/skunert/work/repos/substrate/bin/utils/subkey" } -beefy-gadget ={path = "/Users/skunert/work/repos/substrate/client/beefy" } -beefy-gadget-rpc ={path = "/Users/skunert/work/repos/substrate/client/beefy/rpc" } -sc-consensus-manual-seal ={path = "/Users/skunert/work/repos/substrate/client/consensus/manual-seal" } -sc-consensus-pow ={path = "/Users/skunert/work/repos/substrate/client/consensus/pow" } -sp-consensus-pow ={path = "/Users/skunert/work/repos/substrate/primitives/consensus/pow" } -pallet-atomic-swap ={path = "/Users/skunert/work/repos/substrate/frame/atomic-swap" } -pallet-bags-list-fuzzer ={path = "/Users/skunert/work/repos/substrate/frame/bags-list/fuzzer" } -pallet-bags-list-remote-tests ={path = "/Users/skunert/work/repos/substrate/frame/bags-list/remote-tests" } -pallet-beefy ={path = "/Users/skunert/work/repos/substrate/frame/beefy" } -pallet-beefy-mmr ={path = "/Users/skunert/work/repos/substrate/frame/beefy-mmr" } -beefy-merkle-tree ={path = "/Users/skunert/work/repos/substrate/frame/beefy-mmr/primitives" } -frame-election-solution-type-fuzzer ={path = "/Users/skunert/work/repos/substrate/frame/election-provider-support/solution-type/fuzzer" } -pallet-example-basic ={path = "/Users/skunert/work/repos/substrate/frame/examples/basic" } -pallet-example-offchain-worker ={path = "/Users/skunert/work/repos/substrate/frame/examples/offchain-worker" } -pallet-example-parallel ={path = "/Users/skunert/work/repos/substrate/frame/examples/parallel" } -pallet-nicks ={path = "/Users/skunert/work/repos/substrate/frame/nicks" } -pallet-node-authorization ={path = "/Users/skunert/work/repos/substrate/frame/node-authorization" } -pallet-scored-pool ={path = "/Users/skunert/work/repos/substrate/frame/scored-pool" } -pallet-staking-reward-fn ={path = "/Users/skunert/work/repos/substrate/frame/staking/reward-fn" } -frame-support-test-compile-pass ={path = "/Users/skunert/work/repos/substrate/frame/support/test/compile_pass" } -sp-api-test ={path = "/Users/skunert/work/repos/substrate/primitives/api/test" } -sp-application-crypto-test ={path = "/Users/skunert/work/repos/substrate/primitives/application-crypto/test" } -sp-arithmetic-fuzzer ={path = "/Users/skunert/work/repos/substrate/primitives/arithmetic/fuzzer" } -sp-npos-elections-fuzzer ={path = "/Users/skunert/work/repos/substrate/primitives/npos-elections/fuzzer" } -sp-runtime-interface-test ={path = "/Users/skunert/work/repos/substrate/primitives/runtime-interface/test" } -sp-runtime-interface-test-wasm-deprecated ={path = "/Users/skunert/work/repos/substrate/primitives/runtime-interface/test-wasm-deprecated" } -substrate-test-utils-test-crate ={path = "/Users/skunert/work/repos/substrate/test-utils/test-crate" } -substrate-frame-rpc-support ={path = "/Users/skunert/work/repos/substrate/utils/frame/rpc/support" } -generate-bags ={path = "/Users/skunert/work/repos/substrate/utils/frame/generate-bags" } -node-runtime-generate-bags ={path = "/Users/skunert/work/repos/substrate/utils/frame/generate-bags/node-runtime" } # Configuration for building a .deb package - for use with `cargo-deb` [package.metadata.deb] diff --git a/node/core/approval-voting/src/tests.rs b/node/core/approval-voting/src/tests.rs index d3408a3a6488..641e6cb3a4f9 100644 --- a/node/core/approval-voting/src/tests.rs +++ b/node/core/approval-voting/src/tests.rs @@ -23,7 +23,6 @@ use polkadot_node_primitives::{ AvailableData, BlockData, PoV, }; use polkadot_node_subsystem::{ - gen::async_trait, messages::{ AllMessages, ApprovalVotingMessage, AssignmentCheckResult, AvailabilityRecoveryMessage, }, @@ -39,6 +38,7 @@ use polkadot_primitives::v2::{ use std::time::Duration; use assert_matches::assert_matches; +use async_trait::async_trait; use parking_lot::Mutex; use sp_keyring::sr25519::Keyring as Sr25519Keyring; use sp_keystore::CryptoStore; diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index b881e4537ee6..0eb9dfe08153 100644 --- a/node/core/runtime-api/src/lib.rs +++ b/node/core/runtime-api/src/lib.rs @@ -353,9 +353,7 @@ where macro_rules! query { ($req_variant:ident, $api_name:ident ($($param:expr),*), ver = $version:literal, $sender:expr) => {{ let sender = $sender; - let api = client; - - let runtime_version = api.api_version_parachain_host(relay_parent).await + let runtime_version = client.api_version_parachain_host(relay_parent).await .unwrap_or_else(|e| { gum::warn!( target: LOG_TARGET, @@ -373,7 +371,7 @@ where }); let res = if runtime_version >= $version { - api.$api_name(relay_parent $(, $param.clone() )*).await + client.$api_name(relay_parent $(, $param.clone() )*).await .map_err(|e| RuntimeApiError::Execution { runtime_api_name: stringify!($api_name), source: std::sync::Arc::new(e), @@ -392,9 +390,7 @@ where match request { Request::Version(sender) => { - let api = client; - - let runtime_version = match api.api_version_parachain_host(relay_parent).await { + let runtime_version = match client.api_version_parachain_host(relay_parent).await { Ok(Some(v)) => Ok(v), Ok(None) => Err(RuntimeApiError::NotSupported { runtime_api_name: "api_version" }), Err(e) => Err(RuntimeApiError::Execution { @@ -451,27 +447,24 @@ where Request::CandidateEvents(sender) => query!(CandidateEvents, candidate_events(), ver = 1, sender), Request::SessionInfo(index, sender) => { - let api = client; - - let api_version = api + let api_version = client .api_version_parachain_host(relay_parent) .await .unwrap_or_default() .unwrap_or_default(); let res = if api_version >= 2 { - let res = api - .session_info(relay_parent, index) - .map_err(|e| RuntimeApiError::Execution { + let res = client.session_info(relay_parent, index).await.map_err(|e| { + RuntimeApiError::Execution { runtime_api_name: "SessionInfo", source: std::sync::Arc::new(e), - }) - .await; + } + }); metrics.on_request(res.is_ok()); res } else { #[allow(deprecated)] - let res = api.session_info_before_version_2(relay_parent, index).await.map_err(|e| { + let res = client.session_info_before_version_2(relay_parent, index).await.map_err(|e| { RuntimeApiError::Execution { runtime_api_name: "SessionInfo", source: std::sync::Arc::new(e), From 9f5f0845e7ec204cb7db30f574a1feb4c059891e Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Thu, 14 Jul 2022 15:39:51 +0200 Subject: [PATCH 16/23] Remove unused From trait implementation --- node/overseer/src/lib.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index a20e171c0c71..78f4175c2a09 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -253,12 +253,6 @@ pub struct BlockInfo { pub number: BlockNumber, } -impl From

for BlockInfo { - fn from(h: Header) -> Self { - BlockInfo { hash: h.hash(), parent_hash: h.parent_hash, number: h.number } - } -} - impl From> for BlockInfo { fn from(n: BlockImportNotification) -> Self { BlockInfo { hash: n.hash, parent_hash: n.header.parent_hash, number: n.header.number } From ed2b7ca3b55e29813c3c8aba7b9fd3edb8bef907 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Thu, 14 Jul 2022 16:45:28 +0200 Subject: [PATCH 17/23] Remove unwanted debug print --- node/core/runtime-api/Cargo.toml | 4 ++-- node/network/collator-protocol/src/collator_side/mod.rs | 9 --------- node/overseer/src/lib.rs | 2 +- node/overseer/src/tests.rs | 2 +- node/service/src/overseer.rs | 1 - 5 files changed, 4 insertions(+), 14 deletions(-) diff --git a/node/core/runtime-api/Cargo.toml b/node/core/runtime-api/Cargo.toml index 94b296b9510c..b1a3ea152f31 100644 --- a/node/core/runtime-api/Cargo.toml +++ b/node/core/runtime-api/Cargo.toml @@ -18,11 +18,11 @@ polkadot-node-subsystem = {path = "../../subsystem" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } futures = { version = "0.3.21", features = ["thread-pool"] } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } polkadot-node-primitives = { path = "../../primitives" } test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" } diff --git a/node/network/collator-protocol/src/collator_side/mod.rs b/node/network/collator-protocol/src/collator_side/mod.rs index 56e36637dc83..c1a20a2a670b 100644 --- a/node/network/collator-protocol/src/collator_side/mod.rs +++ b/node/network/collator-protocol/src/collator_side/mod.rs @@ -450,15 +450,6 @@ async fn distribute_collation( .insert(relay_parent, Collation { receipt, pov, status: CollationStatus::Created }); let interested = state.peers_interested_in_leaf(&relay_parent); - - gum::debug!( - target: LOG_TARGET, - para_id = %id, - relay_parent = %relay_parent, - interested = ?interested, - core = ?our_core, - "Advertising to collators." - ); // Make sure already connected peers get collations: for peer_id in interested { advertise_collation(ctx, state, relay_parent, peer_id).await; diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index 78f4175c2a09..9e4898af64fd 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -71,7 +71,7 @@ use futures::{channel::oneshot, future::BoxFuture, select, Future, FutureExt, St use lru::LruCache; use client::{BlockImportNotification, BlockchainEvents, FinalityNotification}; -use polkadot_primitives::v2::{Block, BlockNumber, Hash, Header}; +use polkadot_primitives::v2::{Block, BlockNumber, Hash}; use polkadot_node_subsystem_types::messages::{ ApprovalDistributionMessage, ApprovalVotingMessage, AvailabilityDistributionMessage, diff --git a/node/overseer/src/tests.rs b/node/overseer/src/tests.rs index a51e0418273b..121c707c2541 100644 --- a/node/overseer/src/tests.rs +++ b/node/overseer/src/tests.rs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . +use async_trait::async_trait; use futures::{executor, pending, pin_mut, poll, select, stream, FutureExt}; -use gen::async_trait; use std::{collections::HashMap, sync::atomic, task::Poll}; use ::test_helpers::{dummy_candidate_descriptor, dummy_candidate_receipt, dummy_hash}; diff --git a/node/service/src/overseer.rs b/node/service/src/overseer.rs index 146aa59424c9..efc36de15423 100644 --- a/node/service/src/overseer.rs +++ b/node/service/src/overseer.rs @@ -68,7 +68,6 @@ pub use polkadot_node_core_provisioner::ProvisionerSubsystem; pub use polkadot_node_core_pvf_checker::PvfCheckerSubsystem; pub use polkadot_node_core_runtime_api::RuntimeApiSubsystem; use polkadot_node_subsystem_util::rand::{self, SeedableRng}; -pub use polkadot_primitives::v2::CollatorPair; pub use polkadot_statement_distribution::StatementDistributionSubsystem; /// Arguments passed for overseer construction. From 894ab5b08bf0f493585d3f72fcc8d6c68ff5050c Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Fri, 15 Jul 2022 12:48:32 +0200 Subject: [PATCH 18/23] Move trait to polkadot-node-subsystem-types --- Cargo.lock | 8 +++++--- node/core/runtime-api/Cargo.toml | 2 +- node/core/runtime-api/src/lib.rs | 2 +- node/overseer/Cargo.toml | 2 -- node/overseer/src/lib.rs | 4 +--- node/subsystem-types/Cargo.toml | 4 ++++ node/subsystem-types/src/lib.rs | 3 +++ node/{overseer => subsystem-types}/src/runtime_client.rs | 0 8 files changed, 15 insertions(+), 10 deletions(-) rename node/{overseer => subsystem-types}/src/runtime_client.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 32174fd63cd4..d17c6fa0fd6c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6585,8 +6585,8 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", + "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", - "polkadot-overseer", "polkadot-primitives", "polkadot-primitives-test-helpers", "sp-api", @@ -6716,6 +6716,7 @@ dependencies = [ name = "polkadot-node-subsystem-types" version = "0.9.26" dependencies = [ + "async-trait", "derive_more", "futures", "orchestra", @@ -6726,6 +6727,9 @@ dependencies = [ "polkadot-statement-table", "sc-network", "smallvec", + "sp-api", + "sp-authority-discovery", + "sp-consensus-babe", "substrate-prometheus-endpoint", "thiserror", ] @@ -6792,8 +6796,6 @@ dependencies = [ "prioritized-metered-channel", "sc-client-api", "sp-api", - "sp-authority-discovery", - "sp-consensus-babe", "sp-core", "tracing-gum", ] diff --git a/node/core/runtime-api/Cargo.toml b/node/core/runtime-api/Cargo.toml index b1a3ea152f31..f0ee9565b4cd 100644 --- a/node/core/runtime-api/Cargo.toml +++ b/node/core/runtime-api/Cargo.toml @@ -13,8 +13,8 @@ parity-util-mem = { version = "0.11.0", default-features = false } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-primitives = { path = "../../../primitives" } -polkadot-overseer = { path = "../../overseer" } polkadot-node-subsystem = {path = "../../subsystem" } +polkadot-node-subsystem-types = {path = "../../subsystem-types" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } [dev-dependencies] diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index 0eb9dfe08153..a815b76a8d7c 100644 --- a/node/core/runtime-api/src/lib.rs +++ b/node/core/runtime-api/src/lib.rs @@ -27,7 +27,7 @@ use polkadot_node_subsystem::{ messages::{RuntimeApiMessage, RuntimeApiRequest as Request}, overseer, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, SubsystemResult, }; -use polkadot_overseer::RuntimeApiSubsystemClient; +use polkadot_node_subsystem_types::RuntimeApiSubsystemClient; use polkadot_primitives::v2::Hash; use cache::{RequestResult, RequestResultCache}; diff --git a/node/overseer/Cargo.toml b/node/overseer/Cargo.toml index 916bfa6ab21d..c586f748f95a 100644 --- a/node/overseer/Cargo.toml +++ b/node/overseer/Cargo.toml @@ -20,8 +20,6 @@ gum = { package = "tracing-gum", path = "../gum" } lru = "0.7" parity-util-mem = { version = "0.11.0", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } async-trait = "0.1.56" [dev-dependencies] diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index 9e4898af64fd..43386352b77a 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -85,6 +85,7 @@ use polkadot_node_subsystem_types::messages::{ pub use polkadot_node_subsystem_types::{ errors::{SubsystemError, SubsystemResult}, jaeger, ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, OverseerSignal, + RuntimeApiSubsystemClient, }; pub mod metrics; @@ -94,9 +95,6 @@ pub use self::metrics::Metrics as OverseerMetrics; pub mod dummy; pub use self::dummy::DummySubsystem; -mod runtime_client; -pub use runtime_client::RuntimeApiSubsystemClient; - pub use polkadot_node_metrics::{ metrics::{prometheus, Metrics as MetricsTrait}, Metronome, diff --git a/node/subsystem-types/Cargo.toml b/node/subsystem-types/Cargo.toml index 2e17acf6ff7b..9a646d81965c 100644 --- a/node/subsystem-types/Cargo.toml +++ b/node/subsystem-types/Cargo.toml @@ -15,6 +15,10 @@ polkadot-statement-table = { path = "../../statement-table" } polkadot-node-jaeger = { path = "../jaeger" } orchestra = { path = "../orchestra" } sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } smallvec = "1.8.0" substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "master" } thiserror = "1.0.31" +async-trait = "0.1.56" diff --git a/node/subsystem-types/src/lib.rs b/node/subsystem-types/src/lib.rs index f6ff9bea7374..b5a8c67fc581 100644 --- a/node/subsystem-types/src/lib.rs +++ b/node/subsystem-types/src/lib.rs @@ -30,6 +30,9 @@ use smallvec::SmallVec; pub mod errors; pub mod messages; +mod runtime_client; +pub use runtime_client::RuntimeApiSubsystemClient; + pub use jaeger::*; pub use polkadot_node_jaeger as jaeger; diff --git a/node/overseer/src/runtime_client.rs b/node/subsystem-types/src/runtime_client.rs similarity index 100% rename from node/overseer/src/runtime_client.rs rename to node/subsystem-types/src/runtime_client.rs From 18ff03a6c8b65911eac89573b4d45660c93a2aa2 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Fri, 15 Jul 2022 15:43:03 +0200 Subject: [PATCH 19/23] Add sections to runtime client Co-authored-by: Davide Galassi --- node/subsystem-types/src/runtime_client.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/node/subsystem-types/src/runtime_client.rs b/node/subsystem-types/src/runtime_client.rs index c7e9347a61d9..3fd3e0c3bbe9 100644 --- a/node/subsystem-types/src/runtime_client.rs +++ b/node/subsystem-types/src/runtime_client.rs @@ -20,6 +20,8 @@ use std::collections::BTreeMap; /// Exposes all runtime calls that are used by the runtime api subsystem. #[async_trait] pub trait RuntimeApiSubsystemClient { + // === ParachainHost API === + /// Get the current validators. async fn validators(&self, at: Hash) -> Result, ApiError>; @@ -166,9 +168,8 @@ pub trait RuntimeApiSubsystemClient { assumption: OccupiedCoreAssumption, ) -> Result, ApiError>; - /// ===BABE=== - /// - /// + // === BABE API === + /// Return the genesis configuration for BABE. The configuration is only read on genesis. async fn configuration(&self, at: Hash) -> Result; @@ -215,6 +216,8 @@ pub trait RuntimeApiSubsystemClient { key_owner_proof: OpaqueKeyOwnershipProof, ) -> Result, ApiError>; + // === AuthorityDiscovery API === + /// Retrieve authority identifiers of the current and next authority set. async fn authorities( &self, From b1fa6164c8bfa6dadf77f3a5617ef2cad7d8c8db Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Fri, 15 Jul 2022 15:47:15 +0200 Subject: [PATCH 20/23] Reorder methods --- node/subsystem-types/src/runtime_client.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/node/subsystem-types/src/runtime_client.rs b/node/subsystem-types/src/runtime_client.rs index 3fd3e0c3bbe9..b28f803a3f23 100644 --- a/node/subsystem-types/src/runtime_client.rs +++ b/node/subsystem-types/src/runtime_client.rs @@ -20,6 +20,9 @@ use std::collections::BTreeMap; /// Exposes all runtime calls that are used by the runtime api subsystem. #[async_trait] pub trait RuntimeApiSubsystemClient { + /// Parachain host api version + async fn api_version_parachain_host(&self, at: Hash) -> Result, ApiError>; + // === ParachainHost API === /// Get the current validators. @@ -168,6 +171,13 @@ pub trait RuntimeApiSubsystemClient { assumption: OccupiedCoreAssumption, ) -> Result, ApiError>; + /// Returns all onchain disputes. + /// This is a staging method! Do not use on production runtimes! + async fn staging_get_disputes( + &self, + at: Hash, + ) -> Result)>, ApiError>; + // === BABE API === /// Return the genesis configuration for BABE. The configuration is only read on genesis. @@ -223,16 +233,6 @@ pub trait RuntimeApiSubsystemClient { &self, at: Hash, ) -> std::result::Result, ApiError>; - - /// Parachain host api version - async fn api_version_parachain_host(&self, at: Hash) -> Result, ApiError>; - - /// Returns all onchain disputes. - /// This is a staging method! Do not use on production runtimes! - async fn staging_get_disputes( - &self, - at: Hash, - ) -> Result)>, ApiError>; } #[async_trait] From b0d1a25c6c78d86833f12d2ee100012e618709bc Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Mon, 18 Jul 2022 10:14:19 +0200 Subject: [PATCH 21/23] Fix spelling --- node/subsystem-types/src/runtime_client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/subsystem-types/src/runtime_client.rs b/node/subsystem-types/src/runtime_client.rs index b28f803a3f23..7197e1618d63 100644 --- a/node/subsystem-types/src/runtime_client.rs +++ b/node/subsystem-types/src/runtime_client.rs @@ -17,10 +17,10 @@ use sp_consensus_babe::{ }; use std::collections::BTreeMap; -/// Exposes all runtime calls that are used by the runtime api subsystem. +/// Exposes all runtime calls that are used by the runtime API subsystem. #[async_trait] pub trait RuntimeApiSubsystemClient { - /// Parachain host api version + /// Parachain host API version async fn api_version_parachain_host(&self, at: Hash) -> Result, ApiError>; // === ParachainHost API === From e6934058b0889ff53feba8f1fd0cd14cba8e32fb Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Mon, 18 Jul 2022 10:16:30 +0200 Subject: [PATCH 22/23] Fix spacing in Cargo.toml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bastian Köcher --- node/core/runtime-api/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/core/runtime-api/Cargo.toml b/node/core/runtime-api/Cargo.toml index f0ee9565b4cd..bf14836b9b1b 100644 --- a/node/core/runtime-api/Cargo.toml +++ b/node/core/runtime-api/Cargo.toml @@ -13,8 +13,8 @@ parity-util-mem = { version = "0.11.0", default-features = false } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-primitives = { path = "../../../primitives" } -polkadot-node-subsystem = {path = "../../subsystem" } -polkadot-node-subsystem-types = {path = "../../subsystem-types" } +polkadot-node-subsystem = { path = "../../subsystem" } +polkadot-node-subsystem-types = { path = "../../subsystem-types" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } [dev-dependencies] From 56c47df3c639f4dc0cbd56577308b4be388a10af Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Mon, 18 Jul 2022 11:22:21 +0200 Subject: [PATCH 23/23] Remove unused babe methods --- node/subsystem-types/src/runtime_client.rs | 103 ++++----------------- 1 file changed, 19 insertions(+), 84 deletions(-) diff --git a/node/subsystem-types/src/runtime_client.rs b/node/subsystem-types/src/runtime_client.rs index 7197e1618d63..2aa9e2bffb82 100644 --- a/node/subsystem-types/src/runtime_client.rs +++ b/node/subsystem-types/src/runtime_client.rs @@ -1,20 +1,33 @@ +// Copyright 2022 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot 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. + +// Polkadot 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 Polkadot. If not, see . + use async_trait::async_trait; use polkadot_primitives::{ runtime_api::ParachainHost, v2::{ Block, BlockId, BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash, - CommittedCandidateReceipt, CoreState, DisputeState, GroupRotationInfo, Hash, Header, Id, + CommittedCandidateReceipt, CoreState, DisputeState, GroupRotationInfo, Hash, Id, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, - Slot, ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, + ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, }, }; use sp_api::{ApiError, ApiExt, ProvideRuntimeApi}; use sp_authority_discovery::AuthorityDiscoveryApi; -use sp_consensus_babe::{ - AuthorityId, BabeApi, BabeGenesisConfiguration, Epoch, EquivocationProof, - OpaqueKeyOwnershipProof, -}; +use sp_consensus_babe::{BabeApi, Epoch}; use std::collections::BTreeMap; /// Exposes all runtime calls that are used by the runtime API subsystem. @@ -180,52 +193,9 @@ pub trait RuntimeApiSubsystemClient { // === BABE API === - /// Return the genesis configuration for BABE. The configuration is only read on genesis. - async fn configuration(&self, at: Hash) -> Result; - - /// Returns the slot that started the current epoch. - async fn current_epoch_start(&self, at: Hash) -> Result; - /// Returns information regarding the current epoch. async fn current_epoch(&self, at: Hash) -> Result; - /// Returns information regarding the next epoch (which was already - /// previously announced). - async fn next_epoch(&self, at: Hash) -> Result; - - /// Generates a proof of key ownership for the given authority in the - /// current epoch. An example usage of this module is coupled with the - /// session historical module to prove that a given authority key is - /// tied to a given staking identity during a specific session. Proofs - /// of key ownership are necessary for submitting equivocation reports. - /// NOTE: even though the API takes a `slot` as parameter the current - /// implementations ignores this parameter and instead relies on this - /// method being called at the correct block height, i.e. any point at - /// which the epoch for the given slot is live on-chain. Future - /// implementations will instead use indexed data through an offchain - /// worker, not requiring older states to be available. - async fn generate_key_ownership_proof( - &self, - at: Hash, - slot: Slot, - authority_id: AuthorityId, - ) -> Result, ApiError>; - - /// Submits an unsigned extrinsic to report an equivocation. The caller - /// must provide the equivocation proof and a key ownership proof - /// (should be obtained using `generate_key_ownership_proof`). The - /// extrinsic will be unsigned and should only be accepted for local - /// authorship (not to be broadcast to the network). This method returns - /// `None` when creation of the extrinsic fails, e.g. if equivocation - /// reporting is disabled for the given runtime (i.e. this method is - /// hardcoded to return `None`). Only useful in an offchain context. - async fn submit_report_equivocation_unsigned_extrinsic( - &self, - at: Hash, - equivocation_proof: EquivocationProof
, - key_owner_proof: OpaqueKeyOwnershipProof, - ) -> Result, ApiError>; - // === AuthorityDiscovery API === /// Retrieve authority identifiers of the current and next authority set. @@ -380,45 +350,10 @@ where self.runtime_api().validation_code_hash(&BlockId::Hash(at), para_id, assumption) } - async fn configuration(&self, at: Hash) -> Result { - self.runtime_api().configuration(&BlockId::Hash(at)) - } - - async fn current_epoch_start(&self, at: Hash) -> Result { - self.runtime_api().current_epoch_start(&BlockId::Hash(at)) - } - async fn current_epoch(&self, at: Hash) -> Result { self.runtime_api().current_epoch(&BlockId::Hash(at)) } - async fn next_epoch(&self, at: Hash) -> Result { - self.runtime_api().next_epoch(&BlockId::Hash(at)) - } - - async fn generate_key_ownership_proof( - &self, - at: Hash, - slot: Slot, - authority_id: AuthorityId, - ) -> Result, ApiError> { - self.runtime_api() - .generate_key_ownership_proof(&BlockId::Hash(at), slot, authority_id) - } - - async fn submit_report_equivocation_unsigned_extrinsic( - &self, - at: Hash, - equivocation_proof: EquivocationProof
, - key_owner_proof: OpaqueKeyOwnershipProof, - ) -> Result, ApiError> { - self.runtime_api().submit_report_equivocation_unsigned_extrinsic( - &BlockId::Hash(at), - equivocation_proof, - key_owner_proof, - ) - } - async fn authorities( &self, at: Hash,