From 3b2b067d949c02ece20c76f1590066f2cd87b2b8 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 9 Jul 2022 09:36:33 +0100 Subject: [PATCH 01/15] Implement prune only stagnant check mode (#5761) * Limit number of elements loaded from the stagnant key This will likely be required if we enable stagnant prunning as currently database has way too many entries to be prunned in a single iteration * Fmt run * Slightly improve logging * Some more debug nits * Fmt pass * Add stagnant prunning delay * Enable stagnant check worker * Implement stagnant pruning without stagnant checks * Update node/core/chain-selection/src/tree.rs Co-authored-by: Andronik * Apply suggestions from code review Co-authored-by: Andronik Co-authored-by: Andronik --- node/core/chain-selection/src/lib.rs | 62 +++++++++++++++++++++++--- node/core/chain-selection/src/tests.rs | 1 + node/core/chain-selection/src/tree.rs | 35 ++++++++++++++- node/service/src/lib.rs | 4 +- 4 files changed, 95 insertions(+), 7 deletions(-) diff --git a/node/core/chain-selection/src/lib.rs b/node/core/chain-selection/src/lib.rs index be6509e54a29..eb5ceac9b768 100644 --- a/node/core/chain-selection/src/lib.rs +++ b/node/core/chain-selection/src/lib.rs @@ -50,6 +50,8 @@ type Timestamp = u64; // If a block isn't approved in 120 seconds, nodes will abandon it // and begin building on another chain. const STAGNANT_TIMEOUT: Timestamp = 120; +// Delay prunning of the stagnant keys in prune only mode by 25 hours to avoid interception with the finality +const STAGNANT_PRUNE_DELAY: Timestamp = 25 * 60 * 60; // Maximum number of stagnant entries cleaned during one `STAGNANT_TIMEOUT` iteration const MAX_STAGNANT_ENTRIES: usize = 1000; @@ -297,6 +299,19 @@ impl StagnantCheckInterval { } } +/// Mode of the stagnant check operations: check and prune or prune only +#[derive(Debug, Clone)] +pub enum StagnantCheckMode { + CheckAndPrune, + PruneOnly, +} + +impl Default for StagnantCheckMode { + fn default() -> Self { + StagnantCheckMode::PruneOnly + } +} + /// Configuration for the chain selection subsystem. #[derive(Debug, Clone)] pub struct Config { @@ -304,6 +319,8 @@ pub struct Config { pub col_data: u32, /// How often to check for stagnant blocks. pub stagnant_check_interval: StagnantCheckInterval, + /// Mode of stagnant checks + pub stagnant_check_mode: StagnantCheckMode, } /// The chain selection subsystem. @@ -340,9 +357,15 @@ impl ChainSelectionSubsystem { ); SpawnedSubsystem { - future: run(ctx, backend, self.config.stagnant_check_interval, Box::new(SystemClock)) - .map(Ok) - .boxed(), + future: run( + ctx, + backend, + self.config.stagnant_check_interval, + self.config.stagnant_check_mode, + Box::new(SystemClock), + ) + .map(Ok) + .boxed(), name: "chain-selection-subsystem", } } @@ -353,12 +376,20 @@ async fn run( mut ctx: Context, mut backend: B, stagnant_check_interval: StagnantCheckInterval, + stagnant_check_mode: StagnantCheckMode, clock: Box, ) where B: Backend, { loop { - let res = run_until_error(&mut ctx, &mut backend, &stagnant_check_interval, &*clock).await; + let res = run_until_error( + &mut ctx, + &mut backend, + &stagnant_check_interval, + &stagnant_check_mode, + &*clock, + ) + .await; match res { Err(e) => { e.trace(); @@ -383,6 +414,7 @@ async fn run_until_error( ctx: &mut Context, backend: &mut B, stagnant_check_interval: &StagnantCheckInterval, + stagnant_check_mode: &StagnantCheckMode, clock: &(dyn Clock + Sync), ) -> Result<(), Error> where @@ -437,7 +469,13 @@ where } } _ = stagnant_check_stream.next().fuse() => { - detect_stagnant(backend, clock.timestamp_now(), MAX_STAGNANT_ENTRIES)?; + match stagnant_check_mode { + StagnantCheckMode::CheckAndPrune => detect_stagnant(backend, clock.timestamp_now(), MAX_STAGNANT_ENTRIES), + StagnantCheckMode::PruneOnly => { + let now_timestamp = clock.timestamp_now(); + prune_only_stagnant(backend, now_timestamp - STAGNANT_PRUNE_DELAY, MAX_STAGNANT_ENTRIES) + }, + }?; } } } @@ -653,6 +691,20 @@ fn detect_stagnant( backend.write(ops) } +fn prune_only_stagnant( + backend: &mut impl Backend, + up_to: Timestamp, + max_elements: usize, +) -> Result<(), Error> { + let ops = { + let overlay = tree::prune_only_stagnant(&*backend, up_to, max_elements)?; + + overlay.into_write_ops() + }; + + backend.write(ops) +} + // Load the leaves from the backend. If there are no leaves, then return // the finalized block. async fn load_leaves( diff --git a/node/core/chain-selection/src/tests.rs b/node/core/chain-selection/src/tests.rs index 20c4700dff57..404b854d894b 100644 --- a/node/core/chain-selection/src/tests.rs +++ b/node/core/chain-selection/src/tests.rs @@ -244,6 +244,7 @@ fn test_harness>( context, backend.clone(), StagnantCheckInterval::new(TEST_STAGNANT_INTERVAL), + StagnantCheckMode::CheckAndPrune, Box::new(clock.clone()), ); diff --git a/node/core/chain-selection/src/tree.rs b/node/core/chain-selection/src/tree.rs index 5edb6748934d..aafd75de5f97 100644 --- a/node/core/chain-selection/src/tree.rs +++ b/node/core/chain-selection/src/tree.rs @@ -552,7 +552,7 @@ pub(super) fn detect_stagnant<'a, B: 'a + Backend>( ?up_to, ?min_ts, ?max_ts, - "Prepared {} stagnant entries for pruning", + "Prepared {} stagnant entries for checking/pruning", stagnant_up_to.len() ); @@ -594,6 +594,39 @@ pub(super) fn detect_stagnant<'a, B: 'a + Backend>( Ok(backend) } +/// Prune stagnant entries at some timestamp without other checks +/// This function is intended just to clean leftover entries when the real +/// stagnant checks are disabled +pub(super) fn prune_only_stagnant<'a, B: 'a + Backend>( + backend: &'a B, + up_to: Timestamp, + max_elements: usize, +) -> Result, Error> { + let stagnant_up_to = backend.load_stagnant_at_up_to(up_to, max_elements)?; + let mut backend = OverlayedBackend::new(backend); + + let (min_ts, max_ts) = match stagnant_up_to.len() { + 0 => (0 as Timestamp, 0 as Timestamp), + 1 => (stagnant_up_to[0].0, stagnant_up_to[0].0), + n => (stagnant_up_to[0].0, stagnant_up_to[n - 1].0), + }; + + gum::debug!( + target: LOG_TARGET, + ?up_to, + ?min_ts, + ?max_ts, + "Prepared {} stagnant entries for pruning", + stagnant_up_to.len() + ); + + for (timestamp, _) in stagnant_up_to { + backend.delete_stagnant_at(timestamp); + } + + Ok(backend) +} + /// Revert the tree to the block relative to `hash`. /// /// This accepts a fresh backend and returns an overlay on top of it representing diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index 95b613d998f0..0f131280b51d 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -930,7 +930,8 @@ where let chain_selection_config = ChainSelectionConfig { col_data: parachains_db::REAL_COLUMNS.col_chain_selection_data, - stagnant_check_interval: chain_selection_subsystem::StagnantCheckInterval::never(), + stagnant_check_interval: Default::default(), + stagnant_check_mode: chain_selection_subsystem::StagnantCheckMode::PruneOnly, }; let dispute_coordinator_config = DisputeCoordinatorConfig { @@ -1477,6 +1478,7 @@ fn revert_chain_selection(db: Arc, hash: Hash) -> sp_blockchain::R let config = chain_selection_subsystem::Config { col_data: parachains_db::REAL_COLUMNS.col_chain_selection_data, stagnant_check_interval: chain_selection_subsystem::StagnantCheckInterval::never(), + stagnant_check_mode: chain_selection_subsystem::StagnantCheckMode::PruneOnly, }; let chain_selection = chain_selection_subsystem::ChainSelectionSubsystem::new(config, db); From ffed273daba5e5c66e917c09469e6a042b994ed8 Mon Sep 17 00:00:00 2001 From: Bernhard Schuster Date: Tue, 12 Jul 2022 18:22:36 +0200 Subject: [PATCH 02/15] split NetworkBridge into two subsystems (#5616) * foo * rolling session window * fixup * remove use statemetn * fmt * split NetworkBridge into two subsystems Pending cleanup * split * chore: reexport OrchestraError as OverseerError * chore: silence warnings * fixup tests * chore: add default timenout of 30s to subsystem test helper ctx handle * single item channel * fixins * fmt * cleanup * remove dead code * remove sync bounds again * wire up shared state * deal with some FIXMEs * use distinct tags Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com> * use tag Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com> * address naming tx and rx are common in networking and also have an implicit meaning regarding networking compared to incoming and outgoing which are already used with subsystems themselvesq * remove unused sync oracle * remove unneeded state * fix tests * chore: fmt * do not try to register twice * leak Metrics type Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com> Co-authored-by: Andronik --- Cargo.lock | 2 + node/network/approval-distribution/src/lib.rs | 16 +- .../approval-distribution/src/tests.rs | 62 +- .../src/pov_requester/mod.rs | 9 +- .../src/requester/fetch_task/mod.rs | 9 +- .../src/requester/fetch_task/tests.rs | 2 +- .../src/requester/tests.rs | 4 +- .../src/tests/state.rs | 4 +- node/network/availability-recovery/src/lib.rs | 6 +- .../availability-recovery/src/tests.rs | 8 +- node/network/bitfield-distribution/src/lib.rs | 6 +- .../bitfield-distribution/src/tests.rs | 52 +- node/network/bridge/Cargo.toml | 2 + node/network/bridge/src/errors.rs | 20 + node/network/bridge/src/lib.rs | 1071 +---------------- node/network/bridge/src/metrics.rs | 1 + node/network/bridge/src/network.rs | 3 +- node/network/bridge/src/rx/mod.rs | 874 ++++++++++++++ node/network/bridge/src/{ => rx}/tests.rs | 146 +-- node/network/bridge/src/tx/mod.rs | 301 +++++ node/network/bridge/src/tx/tests.rs | 298 +++++ .../src/collator_side/mod.rs | 16 +- .../src/collator_side/tests.rs | 16 +- node/network/collator-protocol/src/lib.rs | 4 +- .../src/validator_side/mod.rs | 8 +- .../src/validator_side/tests.rs | 18 +- .../src/sender/send_task.rs | 4 +- .../dispute-distribution/src/tests/mod.rs | 6 +- node/network/gossip-support/src/lib.rs | 10 +- node/network/gossip-support/src/tests.rs | 12 +- .../protocol/src/request_response/outgoing.rs | 2 +- .../network/statement-distribution/src/lib.rs | 22 +- .../statement-distribution/src/tests.rs | 94 +- node/overseer/src/dummy.rs | 8 +- node/overseer/src/lib.rs | 36 +- node/overseer/src/tests.rs | 33 +- node/service/src/overseer.rs | 29 +- node/subsystem-test-helpers/src/lib.rs | 23 +- node/subsystem-types/src/messages.rs | 52 +- .../src/rolling_session_window.rs | 20 +- 40 files changed, 1880 insertions(+), 1429 deletions(-) create mode 100644 node/network/bridge/src/errors.rs create mode 100644 node/network/bridge/src/rx/mod.rs rename node/network/bridge/src/{ => rx}/tests.rs (89%) create mode 100644 node/network/bridge/src/tx/mod.rs create mode 100644 node/network/bridge/src/tx/tests.rs diff --git a/Cargo.lock b/Cargo.lock index 5d624605b6e9..38b6cc561915 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6299,6 +6299,7 @@ dependencies = [ "assert_matches", "async-trait", "bytes", + "fatality", "futures", "futures-timer", "parity-scale-codec", @@ -6314,6 +6315,7 @@ dependencies = [ "sp-consensus", "sp-core", "sp-keyring", + "thiserror", "tracing-gum", ] diff --git a/node/network/approval-distribution/src/lib.rs b/node/network/approval-distribution/src/lib.rs index 900fd5339dcb..b839a120bef9 100644 --- a/node/network/approval-distribution/src/lib.rs +++ b/node/network/approval-distribution/src/lib.rs @@ -32,7 +32,7 @@ use polkadot_node_primitives::approval::{ use polkadot_node_subsystem::{ messages::{ ApprovalCheckResult, ApprovalDistributionMessage, ApprovalVotingMessage, - AssignmentCheckResult, NetworkBridgeEvent, NetworkBridgeMessage, + AssignmentCheckResult, NetworkBridgeEvent, NetworkBridgeTxMessage, }, overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, }; @@ -938,7 +938,7 @@ impl State { "Sending an assignment to peers", ); - ctx.send_message(NetworkBridgeMessage::SendValidationMessage( + ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage( peers, Versioned::V1(protocol_v1::ValidationProtocol::ApprovalDistribution( protocol_v1::ApprovalDistributionMessage::Assignments(assignments), @@ -1200,7 +1200,7 @@ impl State { "Sending an approval to peers", ); - ctx.send_message(NetworkBridgeMessage::SendValidationMessage( + ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage( peers, Versioned::V1(protocol_v1::ValidationProtocol::ApprovalDistribution( protocol_v1::ApprovalDistributionMessage::Approvals(approvals), @@ -1328,7 +1328,7 @@ impl State { ); sender - .send_message(NetworkBridgeMessage::SendValidationMessage( + .send_message(NetworkBridgeTxMessage::SendValidationMessage( vec![peer_id.clone()], Versioned::V1(protocol_v1::ValidationProtocol::ApprovalDistribution( protocol_v1::ApprovalDistributionMessage::Assignments(assignments_to_send), @@ -1346,7 +1346,7 @@ impl State { ); sender - .send_message(NetworkBridgeMessage::SendValidationMessage( + .send_message(NetworkBridgeTxMessage::SendValidationMessage( vec![peer_id], Versioned::V1(protocol_v1::ValidationProtocol::ApprovalDistribution( protocol_v1::ApprovalDistributionMessage::Approvals(approvals_to_send), @@ -1549,7 +1549,7 @@ async fn adjust_required_routing_and_propagate( ); let full_req = Requests::PoVFetchingV1(req); - ctx.send_message(NetworkBridgeMessage::SendRequests( + ctx.send_message(NetworkBridgeTxMessage::SendRequests( vec![full_req], IfDisconnected::ImmediateError, )) @@ -195,7 +195,10 @@ mod tests { )) => { tx.send(Ok(Some(make_session_info()))).unwrap(); }, - AllMessages::NetworkBridge(NetworkBridgeMessage::SendRequests(mut reqs, _)) => { + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::SendRequests( + mut reqs, + _, + )) => { let req = assert_matches!( reqs.pop(), Some(Requests::PoVFetchingV1(outgoing)) => {outgoing} diff --git a/node/network/availability-distribution/src/requester/fetch_task/mod.rs b/node/network/availability-distribution/src/requester/fetch_task/mod.rs index ff1e5e6a73f3..89b634a5ce7e 100644 --- a/node/network/availability-distribution/src/requester/fetch_task/mod.rs +++ b/node/network/availability-distribution/src/requester/fetch_task/mod.rs @@ -30,7 +30,7 @@ use polkadot_node_network_protocol::request_response::{ use polkadot_node_primitives::ErasureChunk; use polkadot_node_subsystem::{ jaeger, - messages::{AvailabilityStoreMessage, IfDisconnected, NetworkBridgeMessage}, + messages::{AvailabilityStoreMessage, IfDisconnected, NetworkBridgeTxMessage}, overseer, }; use polkadot_primitives::v2::{ @@ -332,8 +332,11 @@ impl RunningTask { self.sender .send(FromFetchTask::Message( - NetworkBridgeMessage::SendRequests(vec![requests], IfDisconnected::ImmediateError) - .into(), + NetworkBridgeTxMessage::SendRequests( + vec![requests], + IfDisconnected::ImmediateError, + ) + .into(), )) .await .map_err(|_| TaskError::ShuttingDown)?; diff --git a/node/network/availability-distribution/src/requester/fetch_task/tests.rs b/node/network/availability-distribution/src/requester/fetch_task/tests.rs index 3030cb877ec7..7bc91c0a4d12 100644 --- a/node/network/availability-distribution/src/requester/fetch_task/tests.rs +++ b/node/network/availability-distribution/src/requester/fetch_task/tests.rs @@ -233,7 +233,7 @@ impl TestRun { ) -> bool { let msg = AllMessages::from(msg); match msg { - AllMessages::NetworkBridge(NetworkBridgeMessage::SendRequests( + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::SendRequests( reqs, IfDisconnected::ImmediateError, )) => { diff --git a/node/network/availability-distribution/src/requester/tests.rs b/node/network/availability-distribution/src/requester/tests.rs index 9fd738a04388..bd39e7748ca8 100644 --- a/node/network/availability-distribution/src/requester/tests.rs +++ b/node/network/availability-distribution/src/requester/tests.rs @@ -30,7 +30,7 @@ use sp_core::traits::SpawnNamed; use polkadot_node_subsystem::{ messages::{ AllMessages, AvailabilityDistributionMessage, AvailabilityStoreMessage, ChainApiMessage, - NetworkBridgeMessage, RuntimeApiMessage, RuntimeApiRequest, + NetworkBridgeTxMessage, RuntimeApiMessage, RuntimeApiRequest, }, ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, SpawnGlue, }; @@ -85,7 +85,7 @@ fn spawn_virtual_overseer( break } match msg.unwrap() { - AllMessages::NetworkBridge(NetworkBridgeMessage::SendRequests(..)) => {}, + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::SendRequests(..)) => {}, AllMessages::AvailabilityStore(AvailabilityStoreMessage::QueryChunk( .., tx, diff --git a/node/network/availability-distribution/src/tests/state.rs b/node/network/availability-distribution/src/tests/state.rs index 140713b9c4aa..c021f1bfb81b 100644 --- a/node/network/availability-distribution/src/tests/state.rs +++ b/node/network/availability-distribution/src/tests/state.rs @@ -42,7 +42,7 @@ use polkadot_node_primitives::ErasureChunk; use polkadot_node_subsystem::{ messages::{ AllMessages, AvailabilityDistributionMessage, AvailabilityStoreMessage, ChainApiMessage, - NetworkBridgeMessage, RuntimeApiMessage, RuntimeApiRequest, + NetworkBridgeTxMessage, RuntimeApiMessage, RuntimeApiRequest, }, ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, LeafStatus, OverseerSignal, }; @@ -214,7 +214,7 @@ impl TestState { gum::trace!(target: LOG_TARGET, remaining_stores, "Stores left to go"); let msg = overseer_recv(&mut rx).await; match msg { - AllMessages::NetworkBridge(NetworkBridgeMessage::SendRequests( + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::SendRequests( reqs, IfDisconnected::ImmediateError, )) => { diff --git a/node/network/availability-recovery/src/lib.rs b/node/network/availability-recovery/src/lib.rs index 1d50dcfef5cb..92eefeaaeb79 100644 --- a/node/network/availability-recovery/src/lib.rs +++ b/node/network/availability-recovery/src/lib.rs @@ -50,7 +50,7 @@ use polkadot_node_primitives::{AvailableData, ErasureChunk}; use polkadot_node_subsystem::{ errors::RecoveryError, jaeger, - messages::{AvailabilityRecoveryMessage, AvailabilityStoreMessage, NetworkBridgeMessage}, + messages::{AvailabilityRecoveryMessage, AvailabilityStoreMessage, NetworkBridgeTxMessage}, overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, SubsystemResult, }; @@ -198,7 +198,7 @@ impl RequestFromBackers { ); sender - .send_message(NetworkBridgeMessage::SendRequests( + .send_message(NetworkBridgeTxMessage::SendRequests( vec![Requests::AvailableDataFetchingV1(req)], IfDisconnected::ImmediateError, )) @@ -356,7 +356,7 @@ impl RequestChunksFromValidators { } sender - .send_message(NetworkBridgeMessage::SendRequests( + .send_message(NetworkBridgeTxMessage::SendRequests( requests, IfDisconnected::ImmediateError, )) diff --git a/node/network/availability-recovery/src/tests.rs b/node/network/availability-recovery/src/tests.rs index 3a19c07e1082..3c16157f4882 100644 --- a/node/network/availability-recovery/src/tests.rs +++ b/node/network/availability-recovery/src/tests.rs @@ -282,8 +282,8 @@ impl TestState { // Receive a request for a chunk. assert_matches!( overseer_recv(virtual_overseer).await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendRequests( + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendRequests( requests, IfDisconnected::ImmediateError, ) @@ -331,8 +331,8 @@ impl TestState { // Receive a request for a chunk. assert_matches!( overseer_recv(virtual_overseer).await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendRequests( + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendRequests( mut requests, IfDisconnected::ImmediateError, ) diff --git a/node/network/bitfield-distribution/src/lib.rs b/node/network/bitfield-distribution/src/lib.rs index 06bad64911b1..a0f82dc5ed1d 100644 --- a/node/network/bitfield-distribution/src/lib.rs +++ b/node/network/bitfield-distribution/src/lib.rs @@ -281,7 +281,7 @@ async fn modify_reputation( ) { gum::trace!(target: LOG_TARGET, ?relay_parent, ?rep, %peer, "reputation change"); - sender.send_message(NetworkBridgeMessage::ReportPeer(peer, rep)).await + sender.send_message(NetworkBridgeTxMessage::ReportPeer(peer, rep)).await } /// Distribute a given valid and signature checked bitfield message. /// @@ -427,7 +427,7 @@ async fn relay_message( ); } else { let _span = span.child("gossip"); - ctx.send_message(NetworkBridgeMessage::SendValidationMessage( + ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage( interested_peers, message.into_validation_protocol(), )) @@ -722,7 +722,7 @@ async fn send_tracked_gossip_message( .or_default() .insert(validator.clone()); - ctx.send_message(NetworkBridgeMessage::SendValidationMessage( + ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage( vec![dest], message.into_validation_protocol(), )) diff --git a/node/network/bitfield-distribution/src/tests.rs b/node/network/bitfield-distribution/src/tests.rs index 9bd17c542f8f..6509db3ba660 100644 --- a/node/network/bitfield-distribution/src/tests.rs +++ b/node/network/bitfield-distribution/src/tests.rs @@ -227,8 +227,8 @@ fn receive_invalid_signature() { // reputation change due to invalid signature assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(peer, rep) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(peer, rep) ) => { assert_eq!(peer, peer_b); assert_eq!(rep, COST_SIGNATURE_INVALID) @@ -288,8 +288,8 @@ fn receive_invalid_validator_index() { // reputation change due to invalid validator index assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(peer, rep) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(peer, rep) ) => { assert_eq!(peer, peer_b); assert_eq!(rep, COST_VALIDATOR_INDEX_INVALID) @@ -364,8 +364,8 @@ fn receive_duplicate_messages() { assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(peer, rep) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(peer, rep) ) => { assert_eq!(peer, peer_b); assert_eq!(rep, BENEFIT_VALID_MESSAGE_FIRST) @@ -383,8 +383,8 @@ fn receive_duplicate_messages() { assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(peer, rep) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(peer, rep) ) => { assert_eq!(peer, peer_a); assert_eq!(rep, BENEFIT_VALID_MESSAGE) @@ -402,8 +402,8 @@ fn receive_duplicate_messages() { assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(peer, rep) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(peer, rep) ) => { assert_eq!(peer, peer_b); assert_eq!(rep, COST_PEER_DUPLICATE_MESSAGE) @@ -484,8 +484,8 @@ fn do_not_relay_message_twice() { assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendValidationMessage(peers, send_msg), + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendValidationMessage(peers, send_msg), ) => { assert_eq!(2, peers.len()); assert!(peers.contains(&peer_a)); @@ -607,8 +607,8 @@ fn changing_view() { // reputation change for peer B assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(peer, rep) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(peer, rep) ) => { assert_eq!(peer, peer_b); assert_eq!(rep, BENEFIT_VALID_MESSAGE_FIRST) @@ -639,8 +639,8 @@ fn changing_view() { // reputation change for peer B assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(peer, rep) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(peer, rep) ) => { assert_eq!(peer, peer_b); assert_eq!(rep, COST_PEER_DUPLICATE_MESSAGE) @@ -671,8 +671,8 @@ fn changing_view() { // reputation change for peer B assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(peer, rep) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(peer, rep) ) => { assert_eq!(peer, peer_a); assert_eq!(rep, COST_NOT_IN_VIEW) @@ -745,8 +745,8 @@ fn do_not_send_message_back_to_origin() { assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendValidationMessage(peers, send_msg), + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendValidationMessage(peers, send_msg), ) => { assert_eq!(1, peers.len()); assert!(peers.contains(&peer_a)); @@ -756,8 +756,8 @@ fn do_not_send_message_back_to_origin() { assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(peer, rep) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(peer, rep) ) => { assert_eq!(peer, peer_b); assert_eq!(rep, BENEFIT_VALID_MESSAGE_FIRST) @@ -851,8 +851,8 @@ fn topology_test() { assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendValidationMessage(peers, send_msg), + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendValidationMessage(peers, send_msg), ) => { let topology = state.topologies.get_current_topology(); // It should send message to all peers in y direction and to 4 random peers in x direction @@ -867,8 +867,8 @@ fn topology_test() { assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(peer, rep) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(peer, rep) ) => { assert_eq!(peer, peers_x[0]); assert_eq!(rep, BENEFIT_VALID_MESSAGE_FIRST) diff --git a/node/network/bridge/Cargo.toml b/node/network/bridge/Cargo.toml index b92b152e8b04..40ae9cac7fe2 100644 --- a/node/network/bridge/Cargo.toml +++ b/node/network/bridge/Cargo.toml @@ -19,6 +19,8 @@ polkadot-node-network-protocol = { path = "../protocol" } polkadot-node-subsystem-util = { path = "../../subsystem-util"} parking_lot = "0.12.0" bytes = "1" +fatality = "0.0.6" +thiserror = "1" [dev-dependencies] assert_matches = "1.4.0" diff --git a/node/network/bridge/src/errors.rs b/node/network/bridge/src/errors.rs new file mode 100644 index 000000000000..43ba61a58902 --- /dev/null +++ b/node/network/bridge/src/errors.rs @@ -0,0 +1,20 @@ +use polkadot_node_subsystem::SubsystemError; +pub(crate) use polkadot_overseer::OverseerError; + +#[fatality::fatality(splitable)] +pub(crate) enum Error { + /// Received error from overseer: + #[fatal] + #[error(transparent)] + SubsystemError(#[from] SubsystemError), + /// The stream of incoming events concluded. + #[fatal] + #[error("Event stream closed unexpectedly")] + EventStreamConcluded, +} + +impl From for Error { + fn from(e: OverseerError) -> Self { + Error::SubsystemError(SubsystemError::from(e)) + } +} diff --git a/node/network/bridge/src/lib.rs b/node/network/bridge/src/lib.rs index f10f7fa5b67a..d599ae25d9c1 100644 --- a/node/network/bridge/src/lib.rs +++ b/node/network/bridge/src/lib.rs @@ -15,48 +15,28 @@ // along with Polkadot. If not, see . //! The Network Bridge Subsystem - protocol multiplexer for Polkadot. +//! +//! Split into incoming (`..In`) and outgoing (`..Out`) subsystems. #![deny(unused_crate_dependencies)] #![warn(missing_docs)] -use always_assert::never; -use bytes::Bytes; -use futures::{prelude::*, stream::BoxStream}; -use parity_scale_codec::{Decode, DecodeAll, Encode}; +use futures::prelude::*; +use parity_scale_codec::{Decode, Encode}; use parking_lot::Mutex; -use sc_network::Event as NetworkEvent; + use sp_consensus::SyncOracle; use polkadot_node_network_protocol::{ - self as net_protocol, - peer_set::{PeerSet, PerPeerSet}, - v1 as protocol_v1, ObservedRole, OurView, PeerId, ProtocolVersion, - UnifiedReputationChange as Rep, Versioned, View, -}; - -use polkadot_node_subsystem::{ - errors::{SubsystemError, SubsystemResult}, - messages::{ - network_bridge_event::{NewGossipTopology, TopologyPeerInfo}, - ApprovalDistributionMessage, BitfieldDistributionMessage, CollatorProtocolMessage, - GossipSupportMessage, NetworkBridgeEvent, NetworkBridgeMessage, - StatementDistributionMessage, - }, - overseer, ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, + peer_set::PeerSet, PeerId, ProtocolVersion, UnifiedReputationChange as Rep, View, }; -use polkadot_overseer::gen::OrchestraError as OverseerError; -use polkadot_primitives::v2::{AuthorityDiscoveryId, BlockNumber, Hash, ValidatorIndex}; /// Peer set info for network initialization. /// /// To be added to [`NetworkConfiguration::extra_sets`]. pub use polkadot_node_network_protocol::peer_set::{peer_sets_info, IsAuthority}; -use std::{ - collections::{hash_map, HashMap}, - iter::ExactSizeIterator, - sync::Arc, -}; +use std::{collections::HashMap, sync::Arc}; mod validator_discovery; @@ -64,34 +44,36 @@ mod validator_discovery; /// /// Defines the `Network` trait with an implementation for an `Arc`. mod network; -use network::{send_message, Network}; - -use crate::network::get_peer_id_by_authority_id; +use self::network::Network; mod metrics; -use self::metrics::Metrics; +pub use self::metrics::Metrics; -#[cfg(test)] -mod tests; +mod errors; +pub(crate) use self::errors::Error; + +mod tx; +pub use self::tx::*; + +mod rx; +pub use self::rx::*; /// The maximum amount of heads a peer is allowed to have in their view at any time. /// /// We use the same limit to compute the view sent to peers locally. -const MAX_VIEW_HEADS: usize = 5; +pub(crate) const MAX_VIEW_HEADS: usize = 5; -const MALFORMED_MESSAGE_COST: Rep = Rep::CostMajor("Malformed Network-bridge message"); -const UNCONNECTED_PEERSET_COST: Rep = Rep::CostMinor("Message sent to un-connected peer-set"); -const MALFORMED_VIEW_COST: Rep = Rep::CostMajor("Malformed view"); -const EMPTY_VIEW_COST: Rep = Rep::CostMajor("Peer sent us an empty view"); - -// network bridge log target -const LOG_TARGET: &'static str = "parachain::network-bridge"; +pub(crate) const MALFORMED_MESSAGE_COST: Rep = Rep::CostMajor("Malformed Network-bridge message"); +pub(crate) const UNCONNECTED_PEERSET_COST: Rep = + Rep::CostMinor("Message sent to un-connected peer-set"); +pub(crate) const MALFORMED_VIEW_COST: Rep = Rep::CostMajor("Malformed view"); +pub(crate) const EMPTY_VIEW_COST: Rep = Rep::CostMajor("Peer sent us an empty view"); /// Messages from and to the network. /// /// As transmitted to and received from subsystems. #[derive(Debug, Encode, Decode, Clone)] -pub enum WireMessage { +pub(crate) enum WireMessage { /// A message from a peer on a specific protocol. #[codec(index = 1)] ProtocolMessage(M), @@ -100,78 +82,16 @@ pub enum WireMessage { ViewUpdate(View), } -/// The network bridge subsystem. -pub struct NetworkBridge { - /// `Network` trait implementing type. - network_service: N, - authority_discovery_service: AD, - sync_oracle: Box, - metrics: Metrics, -} - -impl NetworkBridge { - /// Create a new network bridge subsystem with underlying network service and authority discovery service. - /// - /// This assumes that the network service has had the notifications protocol for the network - /// bridge already registered. See [`peers_sets_info`](peers_sets_info). - pub fn new( - network_service: N, - authority_discovery_service: AD, - sync_oracle: Box, - metrics: Metrics, - ) -> Self { - NetworkBridge { network_service, authority_discovery_service, sync_oracle, metrics } - } -} - -#[overseer::subsystem(NetworkBridge, error = SubsystemError, prefix = self::overseer)] -impl NetworkBridge -where - Net: Network + Sync, - AD: validator_discovery::AuthorityDiscovery + Clone, -{ - fn start(mut self, ctx: Context) -> SpawnedSubsystem { - // The stream of networking events has to be created at initialization, otherwise the - // networking might open connections before the stream of events has been grabbed. - let network_stream = self.network_service.event_stream(); - - // Swallow error because failure is fatal to the node and we log with more precision - // within `run_network`. - let future = run_network(self, ctx, network_stream) - .map_err(|e| SubsystemError::with_origin("network-bridge", e)) - .boxed(); - SpawnedSubsystem { name: "network-bridge-subsystem", future } - } -} - -struct PeerData { +pub(crate) struct PeerData { /// The Latest view sent by the peer. view: View, version: ProtocolVersion, } -#[derive(Debug)] -enum UnexpectedAbort { - /// Received error from overseer: - SubsystemError(SubsystemError), - /// The stream of incoming events concluded. - EventStreamConcluded, -} - -impl From for UnexpectedAbort { - fn from(e: SubsystemError) -> Self { - UnexpectedAbort::SubsystemError(e) - } -} - -impl From for UnexpectedAbort { - fn from(e: OverseerError) -> Self { - UnexpectedAbort::SubsystemError(SubsystemError::from(e)) - } -} +/// Shared state between incoming and outgoing. #[derive(Default, Clone)] -struct Shared(Arc>); +pub(crate) struct Shared(Arc>); #[derive(Default)] struct SharedInner { @@ -180,942 +100,7 @@ struct SharedInner { collation_peers: HashMap, } -enum Mode { +pub(crate) enum Mode { Syncing(Box), Active, } - -#[overseer::contextbounds(NetworkBridge, prefix = self::overseer)] -async fn handle_subsystem_messages( - mut ctx: Context, - mut network_service: N, - mut authority_discovery_service: AD, - shared: Shared, - sync_oracle: Box, - metrics: Metrics, -) -> Result<(), UnexpectedAbort> -where - N: Network, - AD: validator_discovery::AuthorityDiscovery + Clone, -{ - // This is kept sorted, descending, by block number. - let mut live_heads: Vec = Vec::with_capacity(MAX_VIEW_HEADS); - let mut finalized_number = 0; - let mut validator_discovery = validator_discovery::Service::::new(); - - let mut mode = Mode::Syncing(sync_oracle); - - loop { - futures::select! { - msg = ctx.recv().fuse() => match msg { - Ok(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(active_leaves))) => { - let ActiveLeavesUpdate { activated, deactivated } = active_leaves; - gum::trace!( - target: LOG_TARGET, - action = "ActiveLeaves", - has_activated = activated.is_some(), - num_deactivated = %deactivated.len(), - ); - - for activated in activated { - let pos = live_heads - .binary_search_by(|probe| probe.number.cmp(&activated.number).reverse()) - .unwrap_or_else(|i| i); - - live_heads.insert(pos, activated); - } - live_heads.retain(|h| !deactivated.contains(&h.hash)); - - // if we're done syncing, set the mode to `Mode::Active`. - // Otherwise, we don't need to send view updates. - { - let is_done_syncing = match mode { - Mode::Active => true, - Mode::Syncing(ref mut sync_oracle) => !sync_oracle.is_major_syncing(), - }; - - if is_done_syncing { - mode = Mode::Active; - - update_our_view( - &mut network_service, - &mut ctx, - &live_heads, - &shared, - finalized_number, - &metrics, - ); - } - } - } - Ok(FromOrchestra::Signal(OverseerSignal::BlockFinalized(_hash, number))) => { - gum::trace!( - target: LOG_TARGET, - action = "BlockFinalized" - ); - - debug_assert!(finalized_number < number); - - // we don't send the view updates here, but delay them until the next `ActiveLeaves` - // otherwise it might break assumptions of some of the subsystems - // that we never send the same `ActiveLeavesUpdate` - finalized_number = number; - } - Ok(FromOrchestra::Signal(OverseerSignal::Conclude)) => { - return Ok(()); - } - Ok(FromOrchestra::Communication { msg }) => match msg { - NetworkBridgeMessage::ReportPeer(peer, rep) => { - if !rep.is_benefit() { - gum::debug!( - target: LOG_TARGET, - ?peer, - ?rep, - action = "ReportPeer" - ); - } - - metrics.on_report_event(); - network_service.report_peer(peer, rep); - } - NetworkBridgeMessage::DisconnectPeer(peer, peer_set) => { - gum::trace!( - target: LOG_TARGET, - action = "DisconnectPeer", - ?peer, - peer_set = ?peer_set, - ); - - network_service.disconnect_peer(peer, peer_set); - } - NetworkBridgeMessage::SendValidationMessage(peers, msg) => { - gum::trace!( - target: LOG_TARGET, - action = "SendValidationMessages", - num_messages = 1usize, - ); - - match msg { - Versioned::V1(msg) => send_validation_message_v1( - &mut network_service, - peers, - WireMessage::ProtocolMessage(msg), - &metrics, - ), - } - } - NetworkBridgeMessage::SendValidationMessages(msgs) => { - gum::trace!( - target: LOG_TARGET, - action = "SendValidationMessages", - num_messages = %msgs.len(), - ); - - for (peers, msg) in msgs { - match msg { - Versioned::V1(msg) => send_validation_message_v1( - &mut network_service, - peers, - WireMessage::ProtocolMessage(msg), - &metrics, - ), - } - } - } - NetworkBridgeMessage::SendCollationMessage(peers, msg) => { - gum::trace!( - target: LOG_TARGET, - action = "SendCollationMessages", - num_messages = 1usize, - ); - - match msg { - Versioned::V1(msg) => send_collation_message_v1( - &mut network_service, - peers, - WireMessage::ProtocolMessage(msg), - &metrics, - ), - } - } - NetworkBridgeMessage::SendCollationMessages(msgs) => { - gum::trace!( - target: LOG_TARGET, - action = "SendCollationMessages", - num_messages = %msgs.len(), - ); - - for (peers, msg) in msgs { - match msg { - Versioned::V1(msg) => send_collation_message_v1( - &mut network_service, - peers, - WireMessage::ProtocolMessage(msg), - &metrics, - ), - } - } - } - NetworkBridgeMessage::SendRequests(reqs, if_disconnected) => { - gum::trace!( - target: LOG_TARGET, - action = "SendRequests", - num_requests = %reqs.len(), - ); - - for req in reqs { - network_service - .start_request(&mut authority_discovery_service, req, if_disconnected) - .await; - } - } - NetworkBridgeMessage::ConnectToValidators { - validator_ids, - peer_set, - failed, - } => { - gum::trace!( - target: LOG_TARGET, - action = "ConnectToValidators", - peer_set = ?peer_set, - ids = ?validator_ids, - "Received a validator connection request", - ); - - metrics.note_desired_peer_count(peer_set, validator_ids.len()); - - let (ns, ads) = validator_discovery.on_request( - validator_ids, - peer_set, - failed, - network_service, - authority_discovery_service, - ).await; - - network_service = ns; - authority_discovery_service = ads; - } - NetworkBridgeMessage::ConnectToResolvedValidators { - validator_addrs, - peer_set, - } => { - gum::trace!( - target: LOG_TARGET, - action = "ConnectToPeers", - peer_set = ?peer_set, - ?validator_addrs, - "Received a resolved validator connection request", - ); - - metrics.note_desired_peer_count(peer_set, validator_addrs.len()); - - let all_addrs = validator_addrs.into_iter().flatten().collect(); - network_service = validator_discovery.on_resolved_request( - all_addrs, - peer_set, - network_service, - ).await; - } - NetworkBridgeMessage::NewGossipTopology { - session, - our_neighbors_x, - our_neighbors_y, - } => { - gum::debug!( - target: LOG_TARGET, - action = "NewGossipTopology", - neighbors_x = our_neighbors_x.len(), - neighbors_y = our_neighbors_y.len(), - "Gossip topology has changed", - ); - - let gossip_peers_x = update_gossip_peers_1d( - &mut authority_discovery_service, - our_neighbors_x, - ).await; - - let gossip_peers_y = update_gossip_peers_1d( - &mut authority_discovery_service, - our_neighbors_y, - ).await; - - dispatch_validation_event_to_all_unbounded( - NetworkBridgeEvent::NewGossipTopology( - NewGossipTopology { - session, - our_neighbors_x: gossip_peers_x, - our_neighbors_y: gossip_peers_y, - } - ), - ctx.sender(), - ); - } - } - Err(e) => return Err(e.into()), - }, - } - } -} - -async fn update_gossip_peers_1d( - ads: &mut AD, - neighbors: N, -) -> HashMap -where - AD: validator_discovery::AuthorityDiscovery, - N: IntoIterator, - N::IntoIter: std::iter::ExactSizeIterator, -{ - let neighbors = neighbors.into_iter(); - let mut peers = HashMap::with_capacity(neighbors.len()); - for (authority, validator_index) in neighbors { - let addr = get_peer_id_by_authority_id(ads, authority.clone()).await; - - if let Some(peer_id) = addr { - peers.insert(authority, TopologyPeerInfo { peer_ids: vec![peer_id], validator_index }); - } - } - - peers -} - -async fn handle_network_messages( - mut sender: impl overseer::NetworkBridgeSenderTrait, - mut network_service: impl Network, - network_stream: BoxStream<'static, NetworkEvent>, - mut authority_discovery_service: AD, - metrics: Metrics, - shared: Shared, -) -> Result<(), UnexpectedAbort> { - let mut network_stream = network_stream.fuse(); - loop { - match network_stream.next().await { - None => return Err(UnexpectedAbort::EventStreamConcluded), - Some(NetworkEvent::Dht(_)) | - Some(NetworkEvent::SyncConnected { .. }) | - Some(NetworkEvent::SyncDisconnected { .. }) => {}, - Some(NetworkEvent::NotificationStreamOpened { - remote: peer, - protocol, - role, - negotiated_fallback, - }) => { - let role = ObservedRole::from(role); - let (peer_set, version) = { - let (peer_set, version) = match PeerSet::try_from_protocol_name(&protocol) { - None => continue, - Some(p) => p, - }; - - if let Some(fallback) = negotiated_fallback { - match PeerSet::try_from_protocol_name(&fallback) { - None => { - gum::debug!( - target: LOG_TARGET, - fallback = &*fallback, - ?peer, - ?peer_set, - "Unknown fallback", - ); - - continue - }, - Some((p2, v2)) => { - if p2 != peer_set { - gum::debug!( - target: LOG_TARGET, - fallback = &*fallback, - fallback_peerset = ?p2, - protocol = &*protocol, - peerset = ?peer_set, - "Fallback mismatched peer-set", - ); - - continue - } - - (p2, v2) - }, - } - } else { - (peer_set, version) - } - }; - - gum::debug!( - target: LOG_TARGET, - action = "PeerConnected", - peer_set = ?peer_set, - version, - peer = ?peer, - role = ?role - ); - - let local_view = { - let mut shared = shared.0.lock(); - let peer_map = match peer_set { - PeerSet::Validation => &mut shared.validation_peers, - PeerSet::Collation => &mut shared.collation_peers, - }; - - match peer_map.entry(peer.clone()) { - hash_map::Entry::Occupied(_) => continue, - hash_map::Entry::Vacant(vacant) => { - vacant.insert(PeerData { view: View::default(), version }); - }, - } - - metrics.on_peer_connected(peer_set, version); - metrics.note_peer_count(peer_set, version, peer_map.len()); - - shared.local_view.clone().unwrap_or(View::default()) - }; - - let maybe_authority = - authority_discovery_service.get_authority_ids_by_peer_id(peer).await; - - match peer_set { - PeerSet::Validation => { - dispatch_validation_events_to_all( - vec![ - NetworkBridgeEvent::PeerConnected( - peer.clone(), - role, - 1, - maybe_authority, - ), - NetworkBridgeEvent::PeerViewChange(peer.clone(), View::default()), - ], - &mut sender, - ) - .await; - - send_message( - &mut network_service, - vec![peer], - PeerSet::Validation, - version, - WireMessage::::ViewUpdate(local_view), - &metrics, - ); - }, - PeerSet::Collation => { - dispatch_collation_events_to_all( - vec![ - NetworkBridgeEvent::PeerConnected( - peer.clone(), - role, - 1, - maybe_authority, - ), - NetworkBridgeEvent::PeerViewChange(peer.clone(), View::default()), - ], - &mut sender, - ) - .await; - - send_message( - &mut network_service, - vec![peer], - PeerSet::Collation, - version, - WireMessage::::ViewUpdate(local_view), - &metrics, - ); - }, - } - }, - Some(NetworkEvent::NotificationStreamClosed { remote: peer, protocol }) => { - let (peer_set, version) = match PeerSet::try_from_protocol_name(&protocol) { - None => continue, - Some(peer_set) => peer_set, - }; - - gum::debug!( - target: LOG_TARGET, - action = "PeerDisconnected", - peer_set = ?peer_set, - peer = ?peer - ); - - let was_connected = { - let mut shared = shared.0.lock(); - let peer_map = match peer_set { - PeerSet::Validation => &mut shared.validation_peers, - PeerSet::Collation => &mut shared.collation_peers, - }; - - let w = peer_map.remove(&peer).is_some(); - - metrics.on_peer_disconnected(peer_set, version); - metrics.note_peer_count(peer_set, version, peer_map.len()); - - w - }; - - if was_connected && version == peer_set.get_default_version() { - match peer_set { - PeerSet::Validation => - dispatch_validation_event_to_all( - NetworkBridgeEvent::PeerDisconnected(peer), - &mut sender, - ) - .await, - PeerSet::Collation => - dispatch_collation_event_to_all( - NetworkBridgeEvent::PeerDisconnected(peer), - &mut sender, - ) - .await, - } - } - }, - Some(NetworkEvent::NotificationsReceived { remote, messages }) => { - let expected_versions = { - let mut versions = PerPeerSet::>::default(); - let shared = shared.0.lock(); - if let Some(peer_data) = shared.validation_peers.get(&remote) { - versions[PeerSet::Validation] = Some(peer_data.version); - } - - if let Some(peer_data) = shared.collation_peers.get(&remote) { - versions[PeerSet::Collation] = Some(peer_data.version); - } - - versions - }; - - // non-decoded, but version-checked validation messages. - let v_messages: Result, _> = messages - .iter() - .filter_map(|(protocol, msg_bytes)| { - // version doesn't matter because we always receive on the 'correct' - // protocol name, not the negotiated fallback. - let (peer_set, _version) = PeerSet::try_from_protocol_name(protocol)?; - if peer_set == PeerSet::Validation { - if expected_versions[PeerSet::Validation].is_none() { - return Some(Err(UNCONNECTED_PEERSET_COST)) - } - - Some(Ok(msg_bytes.clone())) - } else { - None - } - }) - .collect(); - - let v_messages = match v_messages { - Err(rep) => { - gum::debug!(target: LOG_TARGET, action = "ReportPeer"); - network_service.report_peer(remote, rep); - - continue - }, - Ok(v) => v, - }; - - // non-decoded, but version-checked colldation messages. - let c_messages: Result, _> = messages - .iter() - .filter_map(|(protocol, msg_bytes)| { - // version doesn't matter because we always receive on the 'correct' - // protocol name, not the negotiated fallback. - let (peer_set, _version) = PeerSet::try_from_protocol_name(protocol)?; - - if peer_set == PeerSet::Collation { - if expected_versions[PeerSet::Collation].is_none() { - return Some(Err(UNCONNECTED_PEERSET_COST)) - } - - Some(Ok(msg_bytes.clone())) - } else { - None - } - }) - .collect(); - - let c_messages = match c_messages { - Err(rep) => { - gum::debug!(target: LOG_TARGET, action = "ReportPeer"); - network_service.report_peer(remote, rep); - - continue - }, - Ok(v) => v, - }; - - if v_messages.is_empty() && c_messages.is_empty() { - continue - } - - gum::trace!( - target: LOG_TARGET, - action = "PeerMessages", - peer = ?remote, - num_validation_messages = %v_messages.len(), - num_collation_messages = %c_messages.len() - ); - - if !v_messages.is_empty() { - let (events, reports) = - if expected_versions[PeerSet::Validation] == Some(1) { - handle_v1_peer_messages::( - remote.clone(), - PeerSet::Validation, - &mut shared.0.lock().validation_peers, - v_messages, - &metrics, - ) - } else { - gum::warn!( - target: LOG_TARGET, - version = ?expected_versions[PeerSet::Validation], - "Major logic bug. Peer somehow has unsupported validation protocol version." - ); - - never!("Only version 1 is supported; peer set connection checked above; qed"); - - // If a peer somehow triggers this, we'll disconnect them - // eventually. - (Vec::new(), vec![UNCONNECTED_PEERSET_COST]) - }; - - for report in reports { - network_service.report_peer(remote.clone(), report); - } - - dispatch_validation_events_to_all(events, &mut sender).await; - } - - if !c_messages.is_empty() { - let (events, reports) = - if expected_versions[PeerSet::Collation] == Some(1) { - handle_v1_peer_messages::( - remote.clone(), - PeerSet::Collation, - &mut shared.0.lock().collation_peers, - c_messages, - &metrics, - ) - } else { - gum::warn!( - target: LOG_TARGET, - version = ?expected_versions[PeerSet::Collation], - "Major logic bug. Peer somehow has unsupported collation protocol version." - ); - - never!("Only version 1 is supported; peer set connection checked above; qed"); - - // If a peer somehow triggers this, we'll disconnect them - // eventually. - (Vec::new(), vec![UNCONNECTED_PEERSET_COST]) - }; - - for report in reports { - network_service.report_peer(remote.clone(), report); - } - - dispatch_collation_events_to_all(events, &mut sender).await; - } - }, - } - } -} - -/// Main driver, processing network events and messages from other subsystems. -/// -/// THIS IS A HACK. We need to ensure we never hold the mutex across a `.await` boundary -/// and `parking_lot` currently does not provide `Send`, which helps us enforce that. -/// If this breaks, we need to find another way to protect ourselves. -/// -/// ```compile_fail -/// #use parking_lot::MutexGuard; -/// #fn is_send(); -/// #is_send::(); -/// ``` -#[overseer::contextbounds(NetworkBridge, prefix = self::overseer)] -async fn run_network( - bridge: NetworkBridge, - mut ctx: Context, - network_stream: BoxStream<'static, NetworkEvent>, -) -> SubsystemResult<()> -where - N: Network, - AD: validator_discovery::AuthorityDiscovery + Clone, -{ - let shared = Shared::default(); - - let NetworkBridge { network_service, authority_discovery_service, metrics, sync_oracle } = - bridge; - - let (remote, network_event_handler) = handle_network_messages( - ctx.sender().clone(), - network_service.clone(), - network_stream, - authority_discovery_service.clone(), - metrics.clone(), - shared.clone(), - ) - .remote_handle(); - - ctx.spawn("network-bridge-network-worker", Box::pin(remote))?; - - let subsystem_event_handler = handle_subsystem_messages( - ctx, - network_service, - authority_discovery_service, - shared, - sync_oracle, - metrics, - ); - - futures::pin_mut!(subsystem_event_handler); - - match futures::future::select(subsystem_event_handler, network_event_handler) - .await - .factor_first() - .0 - { - Ok(()) => Ok(()), - Err(UnexpectedAbort::SubsystemError(err)) => { - gum::warn!( - target: LOG_TARGET, - err = ?err, - "Shutting down Network Bridge due to error" - ); - - Err(SubsystemError::Context(format!( - "Received SubsystemError from overseer: {:?}", - err - ))) - }, - Err(UnexpectedAbort::EventStreamConcluded) => { - gum::info!( - target: LOG_TARGET, - "Shutting down Network Bridge: underlying request stream concluded" - ); - Err(SubsystemError::Context("Incoming network event stream concluded.".to_string())) - }, - } -} - -fn construct_view( - live_heads: impl DoubleEndedIterator, - finalized_number: BlockNumber, -) -> View { - View::new(live_heads.take(MAX_VIEW_HEADS), finalized_number) -} - -#[overseer::contextbounds(NetworkBridge, prefix = self::overseer)] -fn update_our_view( - net: &mut Net, - ctx: &mut Context, - live_heads: &[ActivatedLeaf], - shared: &Shared, - finalized_number: BlockNumber, - metrics: &Metrics, -) where - Net: Network, -{ - let new_view = construct_view(live_heads.iter().map(|v| v.hash), finalized_number); - - let (validation_peers, collation_peers) = { - let mut shared = shared.0.lock(); - - // We only want to send a view update when the heads changed. - // A change in finalized block number only is _not_ sufficient. - // - // If this is the first view update since becoming active, but our view is empty, - // there is no need to send anything. - match shared.local_view { - Some(ref v) if v.check_heads_eq(&new_view) => return, - None if live_heads.is_empty() => { - shared.local_view = Some(new_view); - return - }, - _ => { - shared.local_view = Some(new_view.clone()); - }, - } - - ( - shared.validation_peers.keys().cloned().collect::>(), - shared.collation_peers.keys().cloned().collect::>(), - ) - }; - - send_validation_message_v1( - net, - validation_peers, - WireMessage::ViewUpdate(new_view.clone()), - metrics, - ); - - send_collation_message_v1(net, collation_peers, WireMessage::ViewUpdate(new_view), metrics); - - let our_view = OurView::new( - live_heads.iter().take(MAX_VIEW_HEADS).cloned().map(|a| (a.hash, a.span)), - finalized_number, - ); - - dispatch_validation_event_to_all_unbounded( - NetworkBridgeEvent::OurViewChange(our_view.clone()), - ctx.sender(), - ); - - dispatch_collation_event_to_all_unbounded( - NetworkBridgeEvent::OurViewChange(our_view), - ctx.sender(), - ); -} - -// Handle messages on a specific v1 peer-set. The peer is expected to be connected on that -// peer-set. -fn handle_v1_peer_messages>( - peer: PeerId, - peer_set: PeerSet, - peers: &mut HashMap, - messages: Vec, - metrics: &Metrics, -) -> (Vec>, Vec) { - let peer_data = match peers.get_mut(&peer) { - None => return (Vec::new(), vec![UNCONNECTED_PEERSET_COST]), - Some(d) => d, - }; - - let mut outgoing_events = Vec::with_capacity(messages.len()); - let mut reports = Vec::new(); - - for message in messages { - metrics.on_notification_received(peer_set, peer_data.version, message.len()); - let message = match WireMessage::::decode_all(&mut message.as_ref()) { - Err(_) => { - reports.push(MALFORMED_MESSAGE_COST); - continue - }, - Ok(m) => m, - }; - - outgoing_events.push(match message { - WireMessage::ViewUpdate(new_view) => { - if new_view.len() > MAX_VIEW_HEADS || - new_view.finalized_number < peer_data.view.finalized_number - { - reports.push(MALFORMED_VIEW_COST); - continue - } else if new_view.is_empty() { - reports.push(EMPTY_VIEW_COST); - continue - } else if new_view == peer_data.view { - continue - } else { - peer_data.view = new_view; - - NetworkBridgeEvent::PeerViewChange(peer.clone(), peer_data.view.clone()) - } - }, - WireMessage::ProtocolMessage(message) => - NetworkBridgeEvent::PeerMessage(peer.clone(), message.into()), - }) - } - - (outgoing_events, reports) -} - -fn send_validation_message_v1( - net: &mut impl Network, - peers: Vec, - message: WireMessage, - metrics: &Metrics, -) { - send_message(net, peers, PeerSet::Validation, 1, message, metrics); -} - -fn send_collation_message_v1( - net: &mut impl Network, - peers: Vec, - message: WireMessage, - metrics: &Metrics, -) { - send_message(net, peers, PeerSet::Collation, 1, message, metrics) -} - -async fn dispatch_validation_event_to_all( - event: NetworkBridgeEvent, - ctx: &mut impl overseer::NetworkBridgeSenderTrait, -) { - dispatch_validation_events_to_all(std::iter::once(event), ctx).await -} - -async fn dispatch_collation_event_to_all( - event: NetworkBridgeEvent, - ctx: &mut impl overseer::NetworkBridgeSenderTrait, -) { - dispatch_collation_events_to_all(std::iter::once(event), ctx).await -} - -fn dispatch_validation_event_to_all_unbounded( - event: NetworkBridgeEvent, - sender: &mut impl overseer::NetworkBridgeSenderTrait, -) { - event - .focus() - .ok() - .map(StatementDistributionMessage::from) - .and_then(|msg| Some(sender.send_unbounded_message(msg))); - event - .focus() - .ok() - .map(BitfieldDistributionMessage::from) - .and_then(|msg| Some(sender.send_unbounded_message(msg))); - event - .focus() - .ok() - .map(ApprovalDistributionMessage::from) - .and_then(|msg| Some(sender.send_unbounded_message(msg))); - event - .focus() - .ok() - .map(GossipSupportMessage::from) - .and_then(|msg| Some(sender.send_unbounded_message(msg))); -} - -fn dispatch_collation_event_to_all_unbounded( - event: NetworkBridgeEvent, - sender: &mut impl overseer::NetworkBridgeSenderTrait, -) { - if let Ok(msg) = event.focus() { - sender.send_unbounded_message(CollatorProtocolMessage::NetworkBridgeUpdate(msg)) - } -} - -async fn dispatch_validation_events_to_all( - events: I, - sender: &mut impl overseer::NetworkBridgeSenderTrait, -) where - I: IntoIterator>, - I::IntoIter: Send, -{ - for event in events { - sender - .send_messages(event.focus().map(StatementDistributionMessage::from)) - .await; - sender.send_messages(event.focus().map(BitfieldDistributionMessage::from)).await; - sender.send_messages(event.focus().map(ApprovalDistributionMessage::from)).await; - sender.send_messages(event.focus().map(GossipSupportMessage::from)).await; - } -} - -async fn dispatch_collation_events_to_all( - events: I, - ctx: &mut impl overseer::NetworkBridgeSenderTrait, -) where - I: IntoIterator>, - I::IntoIter: Send, -{ - let messages_for = |event: NetworkBridgeEvent| { - event.focus().ok().map(|m| CollatorProtocolMessage::NetworkBridgeUpdate(m)) - }; - - ctx.send_messages(events.into_iter().flat_map(messages_for)).await -} diff --git a/node/network/bridge/src/metrics.rs b/node/network/bridge/src/metrics.rs index 4ecdd5bd6f13..0224c4960ac9 100644 --- a/node/network/bridge/src/metrics.rs +++ b/node/network/bridge/src/metrics.rs @@ -26,6 +26,7 @@ fn peer_set_label(peer_set: PeerSet, version: ProtocolVersion) -> &'static str { peer_set.get_protocol_name_static(version).unwrap_or("") } +#[allow(missing_docs)] impl Metrics { pub fn on_peer_connected(&self, peer_set: PeerSet, version: ProtocolVersion) { self.0.as_ref().map(|metrics| { diff --git a/node/network/bridge/src/network.rs b/node/network/bridge/src/network.rs index 538958602d25..e1310f57414c 100644 --- a/node/network/bridge/src/network.rs +++ b/node/network/bridge/src/network.rs @@ -35,7 +35,8 @@ use polkadot_primitives::v2::{AuthorityDiscoveryId, Block, Hash}; use crate::validator_discovery::AuthorityDiscovery; -use super::LOG_TARGET; +// network bridge network abstraction log target +const LOG_TARGET: &'static str = "parachain::network-bridge-net"; /// Send a message to the network. /// diff --git a/node/network/bridge/src/rx/mod.rs b/node/network/bridge/src/rx/mod.rs new file mode 100644 index 000000000000..f135b006f114 --- /dev/null +++ b/node/network/bridge/src/rx/mod.rs @@ -0,0 +1,874 @@ +// Copyright 2020 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 . + +//! The Network Bridge Subsystem - handles _incoming_ messages from the network, forwarded to the relevant subsystems. +use super::*; + +use always_assert::never; +use bytes::Bytes; +use futures::stream::BoxStream; +use parity_scale_codec::{Decode, DecodeAll}; + +use sc_network::Event as NetworkEvent; +use sp_consensus::SyncOracle; + +use polkadot_node_network_protocol::{ + self as net_protocol, + peer_set::{PeerSet, PerPeerSet}, + v1 as protocol_v1, ObservedRole, OurView, PeerId, ProtocolVersion, + UnifiedReputationChange as Rep, View, +}; + +use polkadot_node_subsystem::{ + errors::SubsystemError, + messages::{ + network_bridge_event::{NewGossipTopology, TopologyPeerInfo}, + ApprovalDistributionMessage, BitfieldDistributionMessage, CollatorProtocolMessage, + GossipSupportMessage, NetworkBridgeEvent, NetworkBridgeRxMessage, + StatementDistributionMessage, + }, + overseer, ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, +}; + +use polkadot_primitives::v2::{AuthorityDiscoveryId, BlockNumber, Hash, ValidatorIndex}; + +/// Peer set info for network initialization. +/// +/// To be added to [`NetworkConfiguration::extra_sets`]. +pub use polkadot_node_network_protocol::peer_set::{peer_sets_info, IsAuthority}; + +use std::{ + collections::{hash_map, HashMap}, + iter::ExactSizeIterator, +}; + +use super::validator_discovery; + +/// Actual interfacing to the network based on the `Network` trait. +/// +/// Defines the `Network` trait with an implementation for an `Arc`. +use crate::network::{send_message, Network}; + +use crate::network::get_peer_id_by_authority_id; + +use super::metrics::Metrics; + +#[cfg(test)] +mod tests; + +// network bridge log target +const LOG_TARGET: &'static str = "parachain::network-bridge-rx"; + +/// The network bridge subsystem - network receiving side. +pub struct NetworkBridgeRx { + /// `Network` trait implementing type. + network_service: N, + authority_discovery_service: AD, + sync_oracle: Box, + shared: Shared, + metrics: Metrics, +} + +impl NetworkBridgeRx { + /// Create a new network bridge subsystem with underlying network service and authority discovery service. + /// + /// This assumes that the network service has had the notifications protocol for the network + /// bridge already registered. See [`peers_sets_info`](peers_sets_info). + pub fn new( + network_service: N, + authority_discovery_service: AD, + sync_oracle: Box, + metrics: Metrics, + ) -> Self { + let shared = Shared::default(); + Self { network_service, authority_discovery_service, sync_oracle, shared, metrics } + } +} + +#[overseer::subsystem(NetworkBridgeRx, error = SubsystemError, prefix = self::overseer)] +impl NetworkBridgeRx +where + Net: Network + Sync, + AD: validator_discovery::AuthorityDiscovery + Clone + Sync, +{ + fn start(mut self, ctx: Context) -> SpawnedSubsystem { + // The stream of networking events has to be created at initialization, otherwise the + // networking might open connections before the stream of events has been grabbed. + let network_stream = self.network_service.event_stream(); + + // Swallow error because failure is fatal to the node and we log with more precision + // within `run_network`. + let future = run_network_in(self, ctx, network_stream) + .map_err(|e| SubsystemError::with_origin("network-bridge", e)) + .boxed(); + SpawnedSubsystem { name: "network-bridge-subsystem", future } + } +} + +async fn update_gossip_peers_1d( + ads: &mut AD, + neighbors: N, +) -> HashMap +where + AD: validator_discovery::AuthorityDiscovery, + N: IntoIterator, + N::IntoIter: std::iter::ExactSizeIterator, +{ + let neighbors = neighbors.into_iter(); + let mut peers = HashMap::with_capacity(neighbors.len()); + for (authority, validator_index) in neighbors { + let addr = get_peer_id_by_authority_id(ads, authority.clone()).await; + + if let Some(peer_id) = addr { + peers.insert(authority, TopologyPeerInfo { peer_ids: vec![peer_id], validator_index }); + } + } + + peers +} + +async fn handle_network_messages( + mut sender: impl overseer::NetworkBridgeRxSenderTrait, + mut network_service: impl Network, + network_stream: BoxStream<'static, NetworkEvent>, + mut authority_discovery_service: AD, + metrics: Metrics, + shared: Shared, +) -> Result<(), Error> +where + AD: validator_discovery::AuthorityDiscovery + Send, +{ + let mut network_stream = network_stream.fuse(); + loop { + match network_stream.next().await { + None => return Err(Error::EventStreamConcluded), + Some(NetworkEvent::Dht(_)) | + Some(NetworkEvent::SyncConnected { .. }) | + Some(NetworkEvent::SyncDisconnected { .. }) => {}, + Some(NetworkEvent::NotificationStreamOpened { + remote: peer, + protocol, + role, + negotiated_fallback, + }) => { + let role = ObservedRole::from(role); + let (peer_set, version) = { + let (peer_set, version) = match PeerSet::try_from_protocol_name(&protocol) { + None => continue, + Some(p) => p, + }; + + if let Some(fallback) = negotiated_fallback { + match PeerSet::try_from_protocol_name(&fallback) { + None => { + gum::debug!( + target: LOG_TARGET, + fallback = &*fallback, + ?peer, + ?peer_set, + "Unknown fallback", + ); + + continue + }, + Some((p2, v2)) => { + if p2 != peer_set { + gum::debug!( + target: LOG_TARGET, + fallback = &*fallback, + fallback_peerset = ?p2, + protocol = &*protocol, + peerset = ?peer_set, + "Fallback mismatched peer-set", + ); + + continue + } + + (p2, v2) + }, + } + } else { + (peer_set, version) + } + }; + + gum::debug!( + target: LOG_TARGET, + action = "PeerConnected", + peer_set = ?peer_set, + version, + peer = ?peer, + role = ?role + ); + + let local_view = { + let mut shared = shared.0.lock(); + let peer_map = match peer_set { + PeerSet::Validation => &mut shared.validation_peers, + PeerSet::Collation => &mut shared.collation_peers, + }; + + match peer_map.entry(peer.clone()) { + hash_map::Entry::Occupied(_) => continue, + hash_map::Entry::Vacant(vacant) => { + vacant.insert(PeerData { view: View::default(), version }); + }, + } + + metrics.on_peer_connected(peer_set, version); + metrics.note_peer_count(peer_set, version, peer_map.len()); + + shared.local_view.clone().unwrap_or(View::default()) + }; + + let maybe_authority = + authority_discovery_service.get_authority_ids_by_peer_id(peer).await; + + match peer_set { + PeerSet::Validation => { + dispatch_validation_events_to_all( + vec![ + NetworkBridgeEvent::PeerConnected( + peer.clone(), + role, + 1, + maybe_authority, + ), + NetworkBridgeEvent::PeerViewChange(peer.clone(), View::default()), + ], + &mut sender, + ) + .await; + + send_message( + &mut network_service, + vec![peer], + PeerSet::Validation, + version, + WireMessage::::ViewUpdate(local_view), + &metrics, + ); + }, + PeerSet::Collation => { + dispatch_collation_events_to_all( + vec![ + NetworkBridgeEvent::PeerConnected( + peer.clone(), + role, + 1, + maybe_authority, + ), + NetworkBridgeEvent::PeerViewChange(peer.clone(), View::default()), + ], + &mut sender, + ) + .await; + + send_message( + &mut network_service, + vec![peer], + PeerSet::Collation, + version, + WireMessage::::ViewUpdate(local_view), + &metrics, + ); + }, + } + }, + Some(NetworkEvent::NotificationStreamClosed { remote: peer, protocol }) => { + let (peer_set, version) = match PeerSet::try_from_protocol_name(&protocol) { + None => continue, + Some(peer_set) => peer_set, + }; + + gum::debug!( + target: LOG_TARGET, + action = "PeerDisconnected", + peer_set = ?peer_set, + peer = ?peer + ); + + let was_connected = { + let mut shared = shared.0.lock(); + let peer_map = match peer_set { + PeerSet::Validation => &mut shared.validation_peers, + PeerSet::Collation => &mut shared.collation_peers, + }; + + let w = peer_map.remove(&peer).is_some(); + + metrics.on_peer_disconnected(peer_set, version); + metrics.note_peer_count(peer_set, version, peer_map.len()); + + w + }; + + if was_connected && version == peer_set.get_default_version() { + match peer_set { + PeerSet::Validation => + dispatch_validation_event_to_all( + NetworkBridgeEvent::PeerDisconnected(peer), + &mut sender, + ) + .await, + PeerSet::Collation => + dispatch_collation_event_to_all( + NetworkBridgeEvent::PeerDisconnected(peer), + &mut sender, + ) + .await, + } + } + }, + Some(NetworkEvent::NotificationsReceived { remote, messages }) => { + let expected_versions = { + let mut versions = PerPeerSet::>::default(); + let shared = shared.0.lock(); + if let Some(peer_data) = shared.validation_peers.get(&remote) { + versions[PeerSet::Validation] = Some(peer_data.version); + } + + if let Some(peer_data) = shared.collation_peers.get(&remote) { + versions[PeerSet::Collation] = Some(peer_data.version); + } + + versions + }; + + // non-decoded, but version-checked validation messages. + let v_messages: Result, _> = messages + .iter() + .filter_map(|(protocol, msg_bytes)| { + // version doesn't matter because we always receive on the 'correct' + // protocol name, not the negotiated fallback. + let (peer_set, _version) = PeerSet::try_from_protocol_name(protocol)?; + if peer_set == PeerSet::Validation { + if expected_versions[PeerSet::Validation].is_none() { + return Some(Err(UNCONNECTED_PEERSET_COST)) + } + + Some(Ok(msg_bytes.clone())) + } else { + None + } + }) + .collect(); + + let v_messages = match v_messages { + Err(rep) => { + gum::debug!(target: LOG_TARGET, action = "ReportPeer"); + network_service.report_peer(remote, rep); + + continue + }, + Ok(v) => v, + }; + + // non-decoded, but version-checked colldation messages. + let c_messages: Result, _> = messages + .iter() + .filter_map(|(protocol, msg_bytes)| { + // version doesn't matter because we always receive on the 'correct' + // protocol name, not the negotiated fallback. + let (peer_set, _version) = PeerSet::try_from_protocol_name(protocol)?; + + if peer_set == PeerSet::Collation { + if expected_versions[PeerSet::Collation].is_none() { + return Some(Err(UNCONNECTED_PEERSET_COST)) + } + + Some(Ok(msg_bytes.clone())) + } else { + None + } + }) + .collect(); + + let c_messages = match c_messages { + Err(rep) => { + gum::debug!(target: LOG_TARGET, action = "ReportPeer"); + network_service.report_peer(remote, rep); + + continue + }, + Ok(v) => v, + }; + + if v_messages.is_empty() && c_messages.is_empty() { + continue + } + + gum::trace!( + target: LOG_TARGET, + action = "PeerMessages", + peer = ?remote, + num_validation_messages = %v_messages.len(), + num_collation_messages = %c_messages.len() + ); + + if !v_messages.is_empty() { + let (events, reports) = + if expected_versions[PeerSet::Validation] == Some(1) { + handle_v1_peer_messages::( + remote.clone(), + PeerSet::Validation, + &mut shared.0.lock().validation_peers, + v_messages, + &metrics, + ) + } else { + gum::warn!( + target: LOG_TARGET, + version = ?expected_versions[PeerSet::Validation], + "Major logic bug. Peer somehow has unsupported validation protocol version." + ); + + never!("Only version 1 is supported; peer set connection checked above; qed"); + + // If a peer somehow triggers this, we'll disconnect them + // eventually. + (Vec::new(), vec![UNCONNECTED_PEERSET_COST]) + }; + + for report in reports { + network_service.report_peer(remote.clone(), report); + } + + dispatch_validation_events_to_all(events, &mut sender).await; + } + + if !c_messages.is_empty() { + let (events, reports) = + if expected_versions[PeerSet::Collation] == Some(1) { + handle_v1_peer_messages::( + remote.clone(), + PeerSet::Collation, + &mut shared.0.lock().collation_peers, + c_messages, + &metrics, + ) + } else { + gum::warn!( + target: LOG_TARGET, + version = ?expected_versions[PeerSet::Collation], + "Major logic bug. Peer somehow has unsupported collation protocol version." + ); + + never!("Only version 1 is supported; peer set connection checked above; qed"); + + // If a peer somehow triggers this, we'll disconnect them + // eventually. + (Vec::new(), vec![UNCONNECTED_PEERSET_COST]) + }; + + for report in reports { + network_service.report_peer(remote.clone(), report); + } + + dispatch_collation_events_to_all(events, &mut sender).await; + } + }, + } + } +} + +#[overseer::contextbounds(NetworkBridgeRx, prefix = self::overseer)] +async fn run_incoming_orchestra_signals( + mut ctx: Context, + mut network_service: N, + mut authority_discovery_service: AD, + shared: Shared, + sync_oracle: Box, + metrics: Metrics, +) -> Result<(), Error> +where + N: Network, + AD: validator_discovery::AuthorityDiscovery + Clone, +{ + // This is kept sorted, descending, by block number. + let mut live_heads: Vec = Vec::with_capacity(MAX_VIEW_HEADS); + let mut finalized_number = 0; + + let mut mode = Mode::Syncing(sync_oracle); + loop { + match ctx.recv().fuse().await? { + FromOrchestra::Communication { + msg: + NetworkBridgeRxMessage::NewGossipTopology { + session, + our_neighbors_x, + our_neighbors_y, + }, + } => { + gum::debug!( + target: LOG_TARGET, + action = "NewGossipTopology", + neighbors_x = our_neighbors_x.len(), + neighbors_y = our_neighbors_y.len(), + "Gossip topology has changed", + ); + + let gossip_peers_x = + update_gossip_peers_1d(&mut authority_discovery_service, our_neighbors_x).await; + + let gossip_peers_y = + update_gossip_peers_1d(&mut authority_discovery_service, our_neighbors_y).await; + + dispatch_validation_event_to_all_unbounded( + NetworkBridgeEvent::NewGossipTopology(NewGossipTopology { + session, + our_neighbors_x: gossip_peers_x, + our_neighbors_y: gossip_peers_y, + }), + ctx.sender(), + ); + }, + FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()), + FromOrchestra::Signal(OverseerSignal::ActiveLeaves(active_leaves)) => { + let ActiveLeavesUpdate { activated, deactivated } = active_leaves; + gum::trace!( + target: LOG_TARGET, + action = "ActiveLeaves", + has_activated = activated.is_some(), + num_deactivated = %deactivated.len(), + ); + + for activated in activated { + let pos = live_heads + .binary_search_by(|probe| probe.number.cmp(&activated.number).reverse()) + .unwrap_or_else(|i| i); + + live_heads.insert(pos, activated); + } + live_heads.retain(|h| !deactivated.contains(&h.hash)); + + // if we're done syncing, set the mode to `Mode::Active`. + // Otherwise, we don't need to send view updates. + { + let is_done_syncing = match mode { + Mode::Active => true, + Mode::Syncing(ref mut sync_oracle) => !sync_oracle.is_major_syncing(), + }; + + if is_done_syncing { + mode = Mode::Active; + + update_our_view( + &mut network_service, + &mut ctx, + &live_heads, + &shared, + finalized_number, + &metrics, + ); + } + } + }, + FromOrchestra::Signal(OverseerSignal::BlockFinalized(_hash, number)) => { + gum::trace!(target: LOG_TARGET, action = "BlockFinalized"); + + debug_assert!(finalized_number < number); + + // we don't send the view updates here, but delay them until the next `ActiveLeaves` + // otherwise it might break assumptions of some of the subsystems + // that we never send the same `ActiveLeavesUpdate` + finalized_number = number; + }, + } + } +} + +/// Main driver, processing network events and overseer signals. +/// +/// THIS IS A HACK. We need to ensure we never hold the mutex across an `.await` boundary +/// and `parking_lot` currently does not provide `Send`, which helps us enforce that. +/// If this breaks, we need to find another way to protect ourselves. +/// +/// ```compile_fail +/// #use parking_lot::MutexGuard; +/// #fn is_send(); +/// #is_send::(); +/// ``` +#[overseer::contextbounds(NetworkBridgeRx, prefix = self::overseer)] +async fn run_network_in( + bridge: NetworkBridgeRx, + mut ctx: Context, + network_stream: BoxStream<'static, NetworkEvent>, +) -> Result<(), Error> +where + N: Network, + AD: validator_discovery::AuthorityDiscovery + Clone, +{ + let NetworkBridgeRx { + network_service, + authority_discovery_service, + metrics, + sync_oracle, + shared, + } = bridge; + + let (task, network_event_handler) = handle_network_messages( + ctx.sender().clone(), + network_service.clone(), + network_stream, + authority_discovery_service.clone(), + metrics.clone(), + shared.clone(), + ) + .remote_handle(); + + ctx.spawn("network-bridge-in-network-worker", Box::pin(task))?; + futures::pin_mut!(network_event_handler); + + let orchestra_signal_handler = run_incoming_orchestra_signals( + ctx, + network_service, + authority_discovery_service, + shared, + sync_oracle, + metrics, + ); + + futures::pin_mut!(orchestra_signal_handler); + + futures::future::select(orchestra_signal_handler, network_event_handler) + .await + .factor_first() + .0?; + Ok(()) +} + +fn construct_view( + live_heads: impl DoubleEndedIterator, + finalized_number: BlockNumber, +) -> View { + View::new(live_heads.take(MAX_VIEW_HEADS), finalized_number) +} + +#[overseer::contextbounds(NetworkBridgeRx, prefix = self::overseer)] +fn update_our_view( + net: &mut Net, + ctx: &mut Context, + live_heads: &[ActivatedLeaf], + shared: &Shared, + finalized_number: BlockNumber, + metrics: &Metrics, +) where + Net: Network, +{ + let new_view = construct_view(live_heads.iter().map(|v| v.hash), finalized_number); + + let (validation_peers, collation_peers) = { + let mut shared = shared.0.lock(); + + // We only want to send a view update when the heads changed. + // A change in finalized block number only is _not_ sufficient. + // + // If this is the first view update since becoming active, but our view is empty, + // there is no need to send anything. + match shared.local_view { + Some(ref v) if v.check_heads_eq(&new_view) => return, + None if live_heads.is_empty() => { + shared.local_view = Some(new_view); + return + }, + _ => { + shared.local_view = Some(new_view.clone()); + }, + } + + ( + shared.validation_peers.keys().cloned().collect::>(), + shared.collation_peers.keys().cloned().collect::>(), + ) + }; + + send_validation_message_v1( + net, + validation_peers, + WireMessage::ViewUpdate(new_view.clone()), + metrics, + ); + + send_collation_message_v1(net, collation_peers, WireMessage::ViewUpdate(new_view), metrics); + + let our_view = OurView::new( + live_heads.iter().take(MAX_VIEW_HEADS).cloned().map(|a| (a.hash, a.span)), + finalized_number, + ); + + dispatch_validation_event_to_all_unbounded( + NetworkBridgeEvent::OurViewChange(our_view.clone()), + ctx.sender(), + ); + + dispatch_collation_event_to_all_unbounded( + NetworkBridgeEvent::OurViewChange(our_view), + ctx.sender(), + ); +} + +// Handle messages on a specific v1 peer-set. The peer is expected to be connected on that +// peer-set. +fn handle_v1_peer_messages>( + peer: PeerId, + peer_set: PeerSet, + peers: &mut HashMap, + messages: Vec, + metrics: &Metrics, +) -> (Vec>, Vec) { + let peer_data = match peers.get_mut(&peer) { + None => return (Vec::new(), vec![UNCONNECTED_PEERSET_COST]), + Some(d) => d, + }; + + let mut outgoing_events = Vec::with_capacity(messages.len()); + let mut reports = Vec::new(); + + for message in messages { + metrics.on_notification_received(peer_set, peer_data.version, message.len()); + let message = match WireMessage::::decode_all(&mut message.as_ref()) { + Err(_) => { + reports.push(MALFORMED_MESSAGE_COST); + continue + }, + Ok(m) => m, + }; + + outgoing_events.push(match message { + WireMessage::ViewUpdate(new_view) => { + if new_view.len() > MAX_VIEW_HEADS || + new_view.finalized_number < peer_data.view.finalized_number + { + reports.push(MALFORMED_VIEW_COST); + continue + } else if new_view.is_empty() { + reports.push(EMPTY_VIEW_COST); + continue + } else if new_view == peer_data.view { + continue + } else { + peer_data.view = new_view; + + NetworkBridgeEvent::PeerViewChange(peer.clone(), peer_data.view.clone()) + } + }, + WireMessage::ProtocolMessage(message) => + NetworkBridgeEvent::PeerMessage(peer.clone(), message.into()), + }) + } + + (outgoing_events, reports) +} + +fn send_validation_message_v1( + net: &mut impl Network, + peers: Vec, + message: WireMessage, + metrics: &Metrics, +) { + send_message(net, peers, PeerSet::Validation, 1, message, metrics); +} + +fn send_collation_message_v1( + net: &mut impl Network, + peers: Vec, + message: WireMessage, + metrics: &Metrics, +) { + send_message(net, peers, PeerSet::Collation, 1, message, metrics) +} + +async fn dispatch_validation_event_to_all( + event: NetworkBridgeEvent, + ctx: &mut impl overseer::NetworkBridgeRxSenderTrait, +) { + dispatch_validation_events_to_all(std::iter::once(event), ctx).await +} + +async fn dispatch_collation_event_to_all( + event: NetworkBridgeEvent, + ctx: &mut impl overseer::NetworkBridgeRxSenderTrait, +) { + dispatch_collation_events_to_all(std::iter::once(event), ctx).await +} + +fn dispatch_validation_event_to_all_unbounded( + event: NetworkBridgeEvent, + sender: &mut impl overseer::NetworkBridgeRxSenderTrait, +) { + event + .focus() + .ok() + .map(StatementDistributionMessage::from) + .and_then(|msg| Some(sender.send_unbounded_message(msg))); + event + .focus() + .ok() + .map(BitfieldDistributionMessage::from) + .and_then(|msg| Some(sender.send_unbounded_message(msg))); + event + .focus() + .ok() + .map(ApprovalDistributionMessage::from) + .and_then(|msg| Some(sender.send_unbounded_message(msg))); + event + .focus() + .ok() + .map(GossipSupportMessage::from) + .and_then(|msg| Some(sender.send_unbounded_message(msg))); +} + +fn dispatch_collation_event_to_all_unbounded( + event: NetworkBridgeEvent, + sender: &mut impl overseer::NetworkBridgeRxSenderTrait, +) { + if let Ok(msg) = event.focus() { + sender.send_unbounded_message(CollatorProtocolMessage::NetworkBridgeUpdate(msg)) + } +} + +async fn dispatch_validation_events_to_all( + events: I, + sender: &mut impl overseer::NetworkBridgeRxSenderTrait, +) where + I: IntoIterator>, + I::IntoIter: Send, +{ + for event in events { + sender + .send_messages(event.focus().map(StatementDistributionMessage::from)) + .await; + sender.send_messages(event.focus().map(BitfieldDistributionMessage::from)).await; + sender.send_messages(event.focus().map(ApprovalDistributionMessage::from)).await; + sender.send_messages(event.focus().map(GossipSupportMessage::from)).await; + } +} + +async fn dispatch_collation_events_to_all( + events: I, + ctx: &mut impl overseer::NetworkBridgeRxSenderTrait, +) where + I: IntoIterator>, + I::IntoIter: Send, +{ + let messages_for = |event: NetworkBridgeEvent| { + event.focus().ok().map(|m| CollatorProtocolMessage::NetworkBridgeUpdate(m)) + }; + + ctx.send_messages(events.into_iter().flat_map(messages_for)).await +} diff --git a/node/network/bridge/src/tests.rs b/node/network/bridge/src/rx/tests.rs similarity index 89% rename from node/network/bridge/src/tests.rs rename to node/network/bridge/src/rx/tests.rs index 80929580d165..d7e95a966bcc 100644 --- a/node/network/bridge/src/tests.rs +++ b/node/network/bridge/src/rx/tests.rs @@ -16,6 +16,8 @@ use super::*; use futures::{channel::oneshot, executor, stream::BoxStream}; +use polkadot_node_network_protocol::{self as net_protocol, OurView}; +use polkadot_node_subsystem::{messages::NetworkBridgeEvent, ActivatedLeaf}; use assert_matches::assert_matches; use async_trait::async_trait; @@ -44,7 +46,7 @@ use polkadot_node_subsystem_test_helpers::{ }; use polkadot_node_subsystem_util::metered; use polkadot_primitives::v2::AuthorityDiscoveryId; -use polkadot_primitives_test_helpers::dummy_collator_signature; + use sc_network::Multiaddr; use sp_keyring::Sr25519Keyring; @@ -214,18 +216,18 @@ fn assert_network_actions_contains(actions: &[NetworkAction], action: &NetworkAc #[derive(Clone)] struct TestSyncOracle { - flag: Arc, + is_major_syncing: Arc, done_syncing_sender: Arc>>>, } struct TestSyncOracleHandle { done_syncing_receiver: oneshot::Receiver<()>, - flag: Arc, + is_major_syncing: Arc, } impl TestSyncOracleHandle { fn set_done(&self) { - self.flag.store(false, Ordering::SeqCst); + self.is_major_syncing.store(false, Ordering::SeqCst); } async fn await_mode_switch(self) { @@ -235,7 +237,7 @@ impl TestSyncOracleHandle { impl SyncOracle for TestSyncOracle { fn is_major_syncing(&mut self) -> bool { - let is_major_syncing = self.flag.load(Ordering::SeqCst); + let is_major_syncing = self.is_major_syncing.load(Ordering::SeqCst); if !is_major_syncing { if let Some(sender) = self.done_syncing_sender.lock().take() { @@ -252,13 +254,16 @@ impl SyncOracle for TestSyncOracle { } // val - result of `is_major_syncing`. -fn make_sync_oracle(val: bool) -> (TestSyncOracle, TestSyncOracleHandle) { +fn make_sync_oracle(is_major_syncing: bool) -> (TestSyncOracle, TestSyncOracleHandle) { let (tx, rx) = oneshot::channel(); - let flag = Arc::new(AtomicBool::new(val)); + let is_major_syncing = Arc::new(AtomicBool::new(is_major_syncing)); ( - TestSyncOracle { flag: flag.clone(), done_syncing_sender: Arc::new(Mutex::new(Some(tx))) }, - TestSyncOracleHandle { flag, done_syncing_receiver: rx }, + TestSyncOracle { + is_major_syncing: is_major_syncing.clone(), + done_syncing_sender: Arc::new(Mutex::new(Some(tx))), + }, + TestSyncOracleHandle { is_major_syncing, done_syncing_receiver: rx }, ) } @@ -267,7 +272,7 @@ fn done_syncing_oracle() -> Box { Box::new(oracle) } -type VirtualOverseer = TestSubsystemContextHandle; +type VirtualOverseer = TestSubsystemContextHandle; struct TestHarness { network_handle: TestNetworkHandle, @@ -284,14 +289,15 @@ fn test_harness>( polkadot_node_subsystem_test_helpers::make_subsystem_context(pool); let network_stream = network.event_stream(); - let bridge = NetworkBridge { + let bridge = NetworkBridgeRx { network_service: network, authority_discovery_service: discovery, metrics: Metrics(None), sync_oracle, + shared: Shared::default(), }; - let network_bridge = run_network(bridge, context, network_stream) + let network_bridge = run_network_in(bridge, context, network_stream) .map_err(|_| panic!("subsystem execution failed")) .map(|_| ()); @@ -311,7 +317,7 @@ fn test_harness>( async fn assert_sends_validation_event_to_all( event: NetworkBridgeEvent, - virtual_overseer: &mut TestSubsystemContextHandle, + virtual_overseer: &mut TestSubsystemContextHandle, ) { // Ordering must be consistent across: // `fn dispatch_validation_event_to_all_unbounded` @@ -347,7 +353,7 @@ async fn assert_sends_validation_event_to_all( async fn assert_sends_collation_event_to_all( event: NetworkBridgeEvent, - virtual_overseer: &mut TestSubsystemContextHandle, + virtual_overseer: &mut TestSubsystemContextHandle, ) { assert_matches!( virtual_overseer.recv().await, @@ -485,6 +491,7 @@ fn do_not_send_view_update_until_synced() { let peer_a = PeerId::random(); let peer_b = PeerId::random(); + assert_ne!(peer_a, peer_b); network_handle .connect_peer(peer_a.clone(), PeerSet::Validation, ObservedRole::Full) @@ -1082,117 +1089,6 @@ fn view_finalized_number_can_not_go_down() { }); } -#[test] -fn send_messages_to_peers() { - test_harness(done_syncing_oracle(), |test_harness| async move { - let TestHarness { mut network_handle, mut virtual_overseer } = test_harness; - - let peer = PeerId::random(); - - network_handle - .connect_peer(peer.clone(), PeerSet::Validation, ObservedRole::Full) - .await; - network_handle - .connect_peer(peer.clone(), PeerSet::Collation, ObservedRole::Full) - .await; - - // bridge will inform about all connected peers. - { - assert_sends_validation_event_to_all( - NetworkBridgeEvent::PeerConnected(peer.clone(), ObservedRole::Full, 1, None), - &mut virtual_overseer, - ) - .await; - - assert_sends_validation_event_to_all( - NetworkBridgeEvent::PeerViewChange(peer.clone(), View::default()), - &mut virtual_overseer, - ) - .await; - } - - { - assert_sends_collation_event_to_all( - NetworkBridgeEvent::PeerConnected(peer.clone(), ObservedRole::Full, 1, None), - &mut virtual_overseer, - ) - .await; - - assert_sends_collation_event_to_all( - NetworkBridgeEvent::PeerViewChange(peer.clone(), View::default()), - &mut virtual_overseer, - ) - .await; - } - - // consume peer view changes - { - let _peer_view_changes = network_handle.next_network_actions(2).await; - } - - // send a validation protocol message. - - { - let approval_distribution_message = - protocol_v1::ApprovalDistributionMessage::Approvals(Vec::new()); - - let message_v1 = protocol_v1::ValidationProtocol::ApprovalDistribution( - approval_distribution_message.clone(), - ); - - virtual_overseer - .send(FromOrchestra::Communication { - msg: NetworkBridgeMessage::SendValidationMessage( - vec![peer.clone()], - Versioned::V1(message_v1.clone()), - ), - }) - .await; - - assert_eq!( - network_handle.next_network_action().await, - NetworkAction::WriteNotification( - peer.clone(), - PeerSet::Validation, - WireMessage::ProtocolMessage(message_v1).encode(), - ) - ); - } - - // send a collation protocol message. - - { - let collator_protocol_message = protocol_v1::CollatorProtocolMessage::Declare( - Sr25519Keyring::Alice.public().into(), - 0_u32.into(), - dummy_collator_signature(), - ); - - let message_v1 = - protocol_v1::CollationProtocol::CollatorProtocol(collator_protocol_message.clone()); - - virtual_overseer - .send(FromOrchestra::Communication { - msg: NetworkBridgeMessage::SendCollationMessage( - vec![peer.clone()], - Versioned::V1(message_v1.clone()), - ), - }) - .await; - - assert_eq!( - network_handle.next_network_action().await, - NetworkAction::WriteNotification( - peer.clone(), - PeerSet::Collation, - WireMessage::ProtocolMessage(message_v1).encode(), - ) - ); - } - virtual_overseer - }); -} - #[test] fn our_view_updates_decreasing_order_and_limited_to_max() { test_harness(done_syncing_oracle(), |test_harness| async move { diff --git a/node/network/bridge/src/tx/mod.rs b/node/network/bridge/src/tx/mod.rs new file mode 100644 index 000000000000..d58ccf8fbb95 --- /dev/null +++ b/node/network/bridge/src/tx/mod.rs @@ -0,0 +1,301 @@ +// Copyright 2020 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 . + +//! The Network Bridge Subsystem - handles _outgoing_ messages, from subsystem to the network. +use super::*; + +use polkadot_node_network_protocol::{peer_set::PeerSet, v1 as protocol_v1, PeerId, Versioned}; + +use polkadot_node_subsystem::{ + errors::SubsystemError, messages::NetworkBridgeTxMessage, overseer, FromOrchestra, + OverseerSignal, SpawnedSubsystem, +}; + +/// Peer set info for network initialization. +/// +/// To be added to [`NetworkConfiguration::extra_sets`]. +pub use polkadot_node_network_protocol::peer_set::{peer_sets_info, IsAuthority}; + +use crate::validator_discovery; + +/// Actual interfacing to the network based on the `Network` trait. +/// +/// Defines the `Network` trait with an implementation for an `Arc`. +use crate::network::{send_message, Network}; + +use crate::metrics::Metrics; + +#[cfg(test)] +mod tests; + +// network bridge log target +const LOG_TARGET: &'static str = "parachain::network-bridge-tx"; + +/// The network bridge subsystem. +pub struct NetworkBridgeTx { + /// `Network` trait implementing type. + network_service: N, + authority_discovery_service: AD, + metrics: Metrics, +} + +impl NetworkBridgeTx { + /// Create a new network bridge subsystem with underlying network service and authority discovery service. + /// + /// This assumes that the network service has had the notifications protocol for the network + /// bridge already registered. See [`peers_sets_info`](peers_sets_info). + pub fn new(network_service: N, authority_discovery_service: AD, metrics: Metrics) -> Self { + Self { network_service, authority_discovery_service, metrics } + } +} + +#[overseer::subsystem(NetworkBridgeTx, error = SubsystemError, prefix = self::overseer)] +impl NetworkBridgeTx +where + Net: Network + Sync, + AD: validator_discovery::AuthorityDiscovery + Clone + Sync, +{ + fn start(self, ctx: Context) -> SpawnedSubsystem { + let future = run_network_out(self, ctx) + .map_err(|e| SubsystemError::with_origin("network-bridge", e)) + .boxed(); + SpawnedSubsystem { name: "network-bridge-subsystem", future } + } +} + +#[overseer::contextbounds(NetworkBridgeTx, prefix = self::overseer)] +async fn handle_subsystem_messages( + mut ctx: Context, + mut network_service: N, + mut authority_discovery_service: AD, + metrics: Metrics, +) -> Result<(), Error> +where + N: Network, + AD: validator_discovery::AuthorityDiscovery + Clone, +{ + let mut validator_discovery = validator_discovery::Service::::new(); + + loop { + match ctx.recv().fuse().await? { + FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()), + FromOrchestra::Signal(_) => { /* handled by incoming */ }, + FromOrchestra::Communication { msg } => { + (network_service, authority_discovery_service) = + handle_incoming_subsystem_communication( + &mut ctx, + network_service, + &mut validator_discovery, + authority_discovery_service.clone(), + msg, + &metrics, + ) + .await; + }, + } + } +} + +#[overseer::contextbounds(NetworkBridgeTx, prefix = self::overseer)] +async fn handle_incoming_subsystem_communication( + _ctx: &mut Context, + mut network_service: N, + validator_discovery: &mut validator_discovery::Service, + mut authority_discovery_service: AD, + msg: NetworkBridgeTxMessage, + metrics: &Metrics, +) -> (N, AD) +where + N: Network, + AD: validator_discovery::AuthorityDiscovery + Clone, +{ + match msg { + NetworkBridgeTxMessage::ReportPeer(peer, rep) => { + if !rep.is_benefit() { + gum::debug!(target: LOG_TARGET, ?peer, ?rep, action = "ReportPeer"); + } + + metrics.on_report_event(); + network_service.report_peer(peer, rep); + }, + NetworkBridgeTxMessage::DisconnectPeer(peer, peer_set) => { + gum::trace!( + target: LOG_TARGET, + action = "DisconnectPeer", + ?peer, + peer_set = ?peer_set, + ); + + network_service.disconnect_peer(peer, peer_set); + }, + NetworkBridgeTxMessage::SendValidationMessage(peers, msg) => { + gum::trace!( + target: LOG_TARGET, + action = "SendValidationMessages", + num_messages = 1usize, + ); + + match msg { + Versioned::V1(msg) => send_validation_message_v1( + &mut network_service, + peers, + WireMessage::ProtocolMessage(msg), + &metrics, + ), + } + }, + NetworkBridgeTxMessage::SendValidationMessages(msgs) => { + gum::trace!( + target: LOG_TARGET, + action = "SendValidationMessages", + num_messages = %msgs.len(), + ); + + for (peers, msg) in msgs { + match msg { + Versioned::V1(msg) => send_validation_message_v1( + &mut network_service, + peers, + WireMessage::ProtocolMessage(msg), + &metrics, + ), + } + } + }, + NetworkBridgeTxMessage::SendCollationMessage(peers, msg) => { + gum::trace!( + target: LOG_TARGET, + action = "SendCollationMessages", + num_messages = 1usize, + ); + + match msg { + Versioned::V1(msg) => send_collation_message_v1( + &mut network_service, + peers, + WireMessage::ProtocolMessage(msg), + &metrics, + ), + } + }, + NetworkBridgeTxMessage::SendCollationMessages(msgs) => { + gum::trace!( + target: LOG_TARGET, + action = "SendCollationMessages", + num_messages = %msgs.len(), + ); + + for (peers, msg) in msgs { + match msg { + Versioned::V1(msg) => send_collation_message_v1( + &mut network_service, + peers, + WireMessage::ProtocolMessage(msg), + &metrics, + ), + } + } + }, + NetworkBridgeTxMessage::SendRequests(reqs, if_disconnected) => { + gum::trace!( + target: LOG_TARGET, + action = "SendRequests", + num_requests = %reqs.len(), + ); + + for req in reqs { + network_service + .start_request(&mut authority_discovery_service, req, if_disconnected) + .await; + } + }, + NetworkBridgeTxMessage::ConnectToValidators { validator_ids, peer_set, failed } => { + gum::trace!( + target: LOG_TARGET, + action = "ConnectToValidators", + peer_set = ?peer_set, + ids = ?validator_ids, + "Received a validator connection request", + ); + + metrics.note_desired_peer_count(peer_set, validator_ids.len()); + + let (network_service, ads) = validator_discovery + .on_request( + validator_ids, + peer_set, + failed, + network_service, + authority_discovery_service, + ) + .await; + + return (network_service, ads) + }, + NetworkBridgeTxMessage::ConnectToResolvedValidators { validator_addrs, peer_set } => { + gum::trace!( + target: LOG_TARGET, + action = "ConnectToPeers", + peer_set = ?peer_set, + ?validator_addrs, + "Received a resolved validator connection request", + ); + + metrics.note_desired_peer_count(peer_set, validator_addrs.len()); + + let all_addrs = validator_addrs.into_iter().flatten().collect(); + let network_service = validator_discovery + .on_resolved_request(all_addrs, peer_set, network_service) + .await; + return (network_service, authority_discovery_service) + }, + } + (network_service, authority_discovery_service) +} + +#[overseer::contextbounds(NetworkBridgeTx, prefix = self::overseer)] +async fn run_network_out( + bridge: NetworkBridgeTx, + ctx: Context, +) -> Result<(), Error> +where + N: Network, + AD: validator_discovery::AuthorityDiscovery + Clone + Sync, +{ + let NetworkBridgeTx { network_service, authority_discovery_service, metrics } = bridge; + + handle_subsystem_messages(ctx, network_service, authority_discovery_service, metrics).await?; + + Ok(()) +} + +fn send_validation_message_v1( + net: &mut impl Network, + peers: Vec, + message: WireMessage, + metrics: &Metrics, +) { + send_message(net, peers, PeerSet::Validation, 1, message, metrics); +} + +fn send_collation_message_v1( + net: &mut impl Network, + peers: Vec, + message: WireMessage, + metrics: &Metrics, +) { + send_message(net, peers, PeerSet::Collation, 1, message, metrics) +} diff --git a/node/network/bridge/src/tx/tests.rs b/node/network/bridge/src/tx/tests.rs new file mode 100644 index 000000000000..63d9730e6599 --- /dev/null +++ b/node/network/bridge/src/tx/tests.rs @@ -0,0 +1,298 @@ +// Copyright 2020 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 super::*; +use futures::{executor, stream::BoxStream}; +use polkadot_node_subsystem_util::TimeoutExt; + +use async_trait::async_trait; +use parking_lot::Mutex; +use std::{borrow::Cow, collections::HashSet}; + +use sc_network::{Event as NetworkEvent, IfDisconnected}; + +use polkadot_node_network_protocol::{ + request_response::outgoing::Requests, ObservedRole, Versioned, +}; +use polkadot_node_subsystem::{FromOrchestra, OverseerSignal}; +use polkadot_node_subsystem_test_helpers::TestSubsystemContextHandle; +use polkadot_node_subsystem_util::metered; +use polkadot_primitives::v2::AuthorityDiscoveryId; +use polkadot_primitives_test_helpers::dummy_collator_signature; +use sc_network::Multiaddr; +use sp_keyring::Sr25519Keyring; + +const TIMEOUT: std::time::Duration = polkadot_node_subsystem_test_helpers::TestSubsystemContextHandle::::TIMEOUT; + +use crate::{network::Network, validator_discovery::AuthorityDiscovery, Rep}; + +#[derive(Debug, PartialEq)] +pub enum NetworkAction { + /// Note a change in reputation for a peer. + ReputationChange(PeerId, Rep), + /// Disconnect a peer from the given peer-set. + DisconnectPeer(PeerId, PeerSet), + /// Write a notification to a given peer on the given peer-set. + WriteNotification(PeerId, PeerSet, Vec), +} + +// The subsystem's view of the network - only supports a single call to `event_stream`. +#[derive(Clone)] +struct TestNetwork { + net_events: Arc>>>, + action_tx: Arc>>, +} + +#[derive(Clone, Debug)] +struct TestAuthorityDiscovery; + +// The test's view of the network. This receives updates from the subsystem in the form +// of `NetworkAction`s. +struct TestNetworkHandle { + action_rx: metered::UnboundedMeteredReceiver, + net_tx: metered::MeteredSender, +} + +fn new_test_network() -> (TestNetwork, TestNetworkHandle, TestAuthorityDiscovery) { + let (net_tx, net_rx) = metered::channel(10); + let (action_tx, action_rx) = metered::unbounded(); + + ( + TestNetwork { + net_events: Arc::new(Mutex::new(Some(net_rx))), + action_tx: Arc::new(Mutex::new(action_tx)), + }, + TestNetworkHandle { action_rx, net_tx }, + TestAuthorityDiscovery, + ) +} + +#[async_trait] +impl Network for TestNetwork { + fn event_stream(&mut self) -> BoxStream<'static, NetworkEvent> { + self.net_events + .lock() + .take() + .expect("Subsystem made more than one call to `event_stream`") + .boxed() + } + + async fn set_reserved_peers( + &mut self, + _protocol: Cow<'static, str>, + _: HashSet, + ) -> Result<(), String> { + Ok(()) + } + + async fn remove_from_peers_set(&mut self, _protocol: Cow<'static, str>, _: Vec) {} + + async fn start_request( + &self, + _: &mut AD, + _: Requests, + _: IfDisconnected, + ) { + } + + fn report_peer(&self, who: PeerId, cost_benefit: Rep) { + self.action_tx + .lock() + .unbounded_send(NetworkAction::ReputationChange(who, cost_benefit)) + .unwrap(); + } + + fn disconnect_peer(&self, who: PeerId, peer_set: PeerSet) { + self.action_tx + .lock() + .unbounded_send(NetworkAction::DisconnectPeer(who, peer_set)) + .unwrap(); + } + + fn write_notification(&self, who: PeerId, peer_set: PeerSet, message: Vec) { + self.action_tx + .lock() + .unbounded_send(NetworkAction::WriteNotification(who, peer_set, message)) + .unwrap(); + } +} + +#[async_trait] +impl validator_discovery::AuthorityDiscovery for TestAuthorityDiscovery { + async fn get_addresses_by_authority_id( + &mut self, + _authority: AuthorityDiscoveryId, + ) -> Option> { + None + } + + async fn get_authority_ids_by_peer_id( + &mut self, + _peer_id: PeerId, + ) -> Option> { + None + } +} + +impl TestNetworkHandle { + // Get the next network action. + async fn next_network_action(&mut self) -> NetworkAction { + self.action_rx.next().await.expect("subsystem concluded early") + } + + async fn connect_peer(&mut self, peer: PeerId, peer_set: PeerSet, role: ObservedRole) { + self.send_network_event(NetworkEvent::NotificationStreamOpened { + remote: peer, + protocol: peer_set.into_default_protocol_name(), + negotiated_fallback: None, + role: role.into(), + }) + .await; + } + + async fn send_network_event(&mut self, event: NetworkEvent) { + self.net_tx.send(event).await.expect("subsystem concluded early"); + } +} + +type VirtualOverseer = TestSubsystemContextHandle; + +struct TestHarness { + network_handle: TestNetworkHandle, + virtual_overseer: VirtualOverseer, +} + +fn test_harness>(test: impl FnOnce(TestHarness) -> T) { + let pool = sp_core::testing::TaskExecutor::new(); + let (network, network_handle, discovery) = new_test_network(); + + let (context, virtual_overseer) = + polkadot_node_subsystem_test_helpers::make_subsystem_context(pool); + + let bridge_out = NetworkBridgeTx::new(network, discovery, Metrics(None)); + + let network_bridge_out_fut = run_network_out(bridge_out, context) + .map_err(|e| panic!("bridge-out subsystem execution failed {:?}", e)) + .map(|_| ()); + + let test_fut = test(TestHarness { network_handle, virtual_overseer }); + + futures::pin_mut!(test_fut); + futures::pin_mut!(network_bridge_out_fut); + + let _ = executor::block_on(future::join( + async move { + let mut virtual_overseer = test_fut.await; + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; + }, + network_bridge_out_fut, + )); +} + +#[test] +fn send_messages_to_peers() { + test_harness(|test_harness| async move { + let TestHarness { mut network_handle, mut virtual_overseer } = test_harness; + + let peer = PeerId::random(); + + network_handle + .connect_peer(peer.clone(), PeerSet::Validation, ObservedRole::Full) + .timeout(TIMEOUT) + .await + .expect("Timeout does not occur"); + + // the outgoing side does not consume network messages + // so the single item sink has to be free explicitly + + network_handle + .connect_peer(peer.clone(), PeerSet::Collation, ObservedRole::Full) + .timeout(TIMEOUT) + .await + .expect("Timeout does not occur"); + + // send a validation protocol message. + + { + let approval_distribution_message = + protocol_v1::ApprovalDistributionMessage::Approvals(Vec::new()); + + let message_v1 = protocol_v1::ValidationProtocol::ApprovalDistribution( + approval_distribution_message.clone(), + ); + + virtual_overseer + .send(FromOrchestra::Communication { + msg: NetworkBridgeTxMessage::SendValidationMessage( + vec![peer.clone()], + Versioned::V1(message_v1.clone()), + ), + }) + .timeout(TIMEOUT) + .await + .expect("Timeout does not occur"); + + assert_eq!( + network_handle + .next_network_action() + .timeout(TIMEOUT) + .await + .expect("Timeout does not occur"), + NetworkAction::WriteNotification( + peer.clone(), + PeerSet::Validation, + WireMessage::ProtocolMessage(message_v1).encode(), + ) + ); + } + + // send a collation protocol message. + + { + let collator_protocol_message = protocol_v1::CollatorProtocolMessage::Declare( + Sr25519Keyring::Alice.public().into(), + 0_u32.into(), + dummy_collator_signature(), + ); + + let message_v1 = + protocol_v1::CollationProtocol::CollatorProtocol(collator_protocol_message.clone()); + + virtual_overseer + .send(FromOrchestra::Communication { + msg: NetworkBridgeTxMessage::SendCollationMessage( + vec![peer.clone()], + Versioned::V1(message_v1.clone()), + ), + }) + .await; + + assert_eq!( + network_handle + .next_network_action() + .timeout(TIMEOUT) + .await + .expect("Timeout does not occur"), + NetworkAction::WriteNotification( + peer.clone(), + PeerSet::Collation, + WireMessage::ProtocolMessage(message_v1).encode(), + ) + ); + } + virtual_overseer + }); +} diff --git a/node/network/collator-protocol/src/collator_side/mod.rs b/node/network/collator-protocol/src/collator_side/mod.rs index 66b404551c52..c1a20a2a670b 100644 --- a/node/network/collator-protocol/src/collator_side/mod.rs +++ b/node/network/collator-protocol/src/collator_side/mod.rs @@ -39,7 +39,7 @@ use polkadot_node_primitives::{CollationSecondedSignal, PoV, Statement}; use polkadot_node_subsystem::{ jaeger, messages::{ - CollatorProtocolMessage, NetworkBridgeEvent, NetworkBridgeMessage, RuntimeApiMessage, + CollatorProtocolMessage, NetworkBridgeEvent, NetworkBridgeTxMessage, RuntimeApiMessage, }, overseer, FromOrchestra, OverseerSignal, PerLeafSpan, }; @@ -533,7 +533,7 @@ async fn declare(ctx: &mut Context, state: &mut State, peer: PeerId) { state.collator_pair.sign(&declare_signature_payload), ); - ctx.send_message(NetworkBridgeMessage::SendCollationMessage( + ctx.send_message(NetworkBridgeTxMessage::SendCollationMessage( vec![peer], Versioned::V1(protocol_v1::CollationProtocol::CollatorProtocol(wire_message)), )) @@ -551,7 +551,7 @@ async fn connect_to_validators( // ignore address resolution failure // will reissue a new request on new collation let (failed, _) = oneshot::channel(); - ctx.send_message(NetworkBridgeMessage::ConnectToValidators { + ctx.send_message(NetworkBridgeTxMessage::ConnectToValidators { validator_ids, peer_set: PeerSet::Collation, failed, @@ -608,7 +608,7 @@ async fn advertise_collation( let wire_message = protocol_v1::CollatorProtocolMessage::AdvertiseCollation(relay_parent); - ctx.send_message(NetworkBridgeMessage::SendCollationMessage( + ctx.send_message(NetworkBridgeTxMessage::SendCollationMessage( vec![peer.clone()], Versioned::V1(protocol_v1::CollationProtocol::CollatorProtocol(wire_message)), )) @@ -751,7 +751,7 @@ async fn handle_incoming_peer_message( ); // If we are declared to, this is another collator, and we should disconnect. - ctx.send_message(NetworkBridgeMessage::DisconnectPeer(origin, PeerSet::Collation)) + ctx.send_message(NetworkBridgeTxMessage::DisconnectPeer(origin, PeerSet::Collation)) .await; }, AdvertiseCollation(_) => { @@ -761,14 +761,14 @@ async fn handle_incoming_peer_message( "AdvertiseCollation message is not expected on the collator side of the protocol", ); - ctx.send_message(NetworkBridgeMessage::ReportPeer( + ctx.send_message(NetworkBridgeTxMessage::ReportPeer( origin.clone(), COST_UNEXPECTED_MESSAGE, )) .await; // If we are advertised to, this is another collator, and we should disconnect. - ctx.send_message(NetworkBridgeMessage::DisconnectPeer(origin, PeerSet::Collation)) + ctx.send_message(NetworkBridgeTxMessage::DisconnectPeer(origin, PeerSet::Collation)) .await; }, CollationSeconded(relay_parent, statement) => { @@ -851,7 +851,7 @@ async fn handle_incoming_request( target: LOG_TARGET, "Dropping incoming request as peer has a request in flight already." ); - ctx.send_message(NetworkBridgeMessage::ReportPeer(req.peer, COST_APPARENT_FLOOD)) + ctx.send_message(NetworkBridgeTxMessage::ReportPeer(req.peer, COST_APPARENT_FLOOD)) .await; return Ok(()) } diff --git a/node/network/collator-protocol/src/collator_side/tests.rs b/node/network/collator-protocol/src/collator_side/tests.rs index 41cabb39a600..4d95b7c807e2 100644 --- a/node/network/collator-protocol/src/collator_side/tests.rs +++ b/node/network/collator-protocol/src/collator_side/tests.rs @@ -369,8 +369,8 @@ async fn distribute_collation( if should_connect { assert_matches!( overseer_recv(virtual_overseer).await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ConnectToValidators { + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ConnectToValidators { .. } ) => {} @@ -424,8 +424,8 @@ async fn expect_declare_msg( ) { assert_matches!( overseer_recv(virtual_overseer).await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendCollationMessage( + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendCollationMessage( to, Versioned::V1(protocol_v1::CollationProtocol::CollatorProtocol(wire_message)), ) @@ -458,8 +458,8 @@ async fn expect_advertise_collation_msg( ) { assert_matches!( overseer_recv(virtual_overseer).await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendCollationMessage( + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendCollationMessage( to, Versioned::V1(protocol_v1::CollationProtocol::CollatorProtocol(wire_message)), ) @@ -570,7 +570,7 @@ fn advertise_and_send_collation() { .unwrap(); assert_matches!( overseer_recv(&mut virtual_overseer).await, - AllMessages::NetworkBridge(NetworkBridgeMessage::ReportPeer(bad_peer, _)) => { + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::ReportPeer(bad_peer, _)) => { assert_eq!(bad_peer, peer); } ); @@ -838,7 +838,7 @@ fn collators_reject_declare_messages() { assert_matches!( overseer_recv(virtual_overseer).await, - AllMessages::NetworkBridge(NetworkBridgeMessage::DisconnectPeer( + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::DisconnectPeer( p, PeerSet::Collation, )) if p == peer diff --git a/node/network/collator-protocol/src/lib.rs b/node/network/collator-protocol/src/lib.rs index bdf8904b7d07..66659e4b5bee 100644 --- a/node/network/collator-protocol/src/lib.rs +++ b/node/network/collator-protocol/src/lib.rs @@ -34,7 +34,7 @@ use polkadot_node_network_protocol::{ use polkadot_primitives::v2::CollatorPair; use polkadot_node_subsystem::{ - errors::SubsystemError, messages::NetworkBridgeMessage, overseer, SpawnedSubsystem, + errors::SubsystemError, messages::NetworkBridgeTxMessage, overseer, SpawnedSubsystem, }; mod error; @@ -132,5 +132,5 @@ async fn modify_reputation( "reputation change for peer", ); - sender.send_message(NetworkBridgeMessage::ReportPeer(peer, rep)).await; + sender.send_message(NetworkBridgeTxMessage::ReportPeer(peer, rep)).await; } diff --git a/node/network/collator-protocol/src/validator_side/mod.rs b/node/network/collator-protocol/src/validator_side/mod.rs index 592feaf9124a..997ad62a9804 100644 --- a/node/network/collator-protocol/src/validator_side/mod.rs +++ b/node/network/collator-protocol/src/validator_side/mod.rs @@ -48,7 +48,7 @@ use polkadot_node_subsystem::{ jaeger, messages::{ CandidateBackingMessage, CollatorProtocolMessage, IfDisconnected, NetworkBridgeEvent, - NetworkBridgeMessage, RuntimeApiMessage, + NetworkBridgeTxMessage, RuntimeApiMessage, }, overseer, FromOrchestra, OverseerSignal, PerLeafSpan, SubsystemSender, }; @@ -632,7 +632,7 @@ fn collator_peer_id( async fn disconnect_peer(sender: &mut impl overseer::CollatorProtocolSenderTrait, peer_id: PeerId) { sender - .send_message(NetworkBridgeMessage::DisconnectPeer(peer_id, PeerSet::Collation)) + .send_message(NetworkBridgeTxMessage::DisconnectPeer(peer_id, PeerSet::Collation)) .await } @@ -712,7 +712,7 @@ async fn notify_collation_seconded( let wire_message = protocol_v1::CollatorProtocolMessage::CollationSeconded(relay_parent, statement.into()); sender - .send_message(NetworkBridgeMessage::SendCollationMessage( + .send_message(NetworkBridgeTxMessage::SendCollationMessage( vec![peer_id], Versioned::V1(protocol_v1::CollationProtocol::CollatorProtocol(wire_message)), )) @@ -800,7 +800,7 @@ async fn request_collation( ); sender - .send_message(NetworkBridgeMessage::SendRequests( + .send_message(NetworkBridgeTxMessage::SendRequests( vec![requests], IfDisconnected::ImmediateError, )) diff --git a/node/network/collator-protocol/src/validator_side/tests.rs b/node/network/collator-protocol/src/validator_side/tests.rs index 77c209361422..cfb8b967bb34 100644 --- a/node/network/collator-protocol/src/validator_side/tests.rs +++ b/node/network/collator-protocol/src/validator_side/tests.rs @@ -260,7 +260,7 @@ async fn assert_candidate_backing_second( async fn assert_collator_disconnect(virtual_overseer: &mut VirtualOverseer, expected_peer: PeerId) { assert_matches!( overseer_recv(virtual_overseer).await, - AllMessages::NetworkBridge(NetworkBridgeMessage::DisconnectPeer( + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::DisconnectPeer( peer, peer_set, )) => { @@ -278,7 +278,7 @@ async fn assert_fetch_collation_request( ) -> ResponseSender { assert_matches!( overseer_recv(virtual_overseer).await, - AllMessages::NetworkBridge(NetworkBridgeMessage::SendRequests(reqs, IfDisconnected::ImmediateError) + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::SendRequests(reqs, IfDisconnected::ImmediateError) ) => { let req = reqs.into_iter().next() .expect("There should be exactly one request"); @@ -431,8 +431,8 @@ fn collator_reporting_works() { assert_matches!( overseer_recv(&mut virtual_overseer).await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(peer, rep), + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(peer, rep), ) => { assert_eq!(peer, peer_b); assert_eq!(rep, COST_REPORT_BAD); @@ -481,8 +481,8 @@ fn collator_authentication_verification_works() { // it should be reported for sending a message with an invalid signature assert_matches!( overseer_recv(&mut virtual_overseer).await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(peer, rep), + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(peer, rep), ) => { assert_eq!(peer, peer_b); assert_eq!(rep, COST_INVALID_SIGNATURE); @@ -697,7 +697,7 @@ fn reject_connection_to_next_group() { assert_matches!( overseer_recv(&mut virtual_overseer).await, - AllMessages::NetworkBridge(NetworkBridgeMessage::ReportPeer( + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::ReportPeer( peer, rep, )) => { @@ -790,7 +790,7 @@ fn fetch_next_collation_on_invalid_collation() { assert_matches!( overseer_recv(&mut virtual_overseer).await, - AllMessages::NetworkBridge(NetworkBridgeMessage::ReportPeer( + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::ReportPeer( peer, rep, )) => { @@ -1005,7 +1005,7 @@ fn disconnect_if_wrong_declare() { assert_matches!( overseer_recv(&mut virtual_overseer).await, - AllMessages::NetworkBridge(NetworkBridgeMessage::ReportPeer( + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::ReportPeer( peer, rep, )) => { diff --git a/node/network/dispute-distribution/src/sender/send_task.rs b/node/network/dispute-distribution/src/sender/send_task.rs index 03ce192697bb..a2b8cdcf7441 100644 --- a/node/network/dispute-distribution/src/sender/send_task.rs +++ b/node/network/dispute-distribution/src/sender/send_task.rs @@ -26,7 +26,7 @@ use polkadot_node_network_protocol::{ }, IfDisconnected, }; -use polkadot_node_subsystem::{messages::NetworkBridgeMessage, overseer}; +use polkadot_node_subsystem::{messages::NetworkBridgeTxMessage, overseer}; use polkadot_node_subsystem_util::{metrics, runtime::RuntimeInfo}; use polkadot_primitives::v2::{ AuthorityDiscoveryId, CandidateHash, Hash, SessionIndex, ValidatorIndex, @@ -270,7 +270,7 @@ async fn send_requests( statuses.insert(receiver, DeliveryStatus::Pending(remote_handle)); } - let msg = NetworkBridgeMessage::SendRequests(reqs, IfDisconnected::ImmediateError); + let msg = NetworkBridgeTxMessage::SendRequests(reqs, IfDisconnected::ImmediateError); ctx.send_message(msg).await; Ok(statuses) } diff --git a/node/network/dispute-distribution/src/tests/mod.rs b/node/network/dispute-distribution/src/tests/mod.rs index dd9cd1da9420..9c843f3e786b 100644 --- a/node/network/dispute-distribution/src/tests/mod.rs +++ b/node/network/dispute-distribution/src/tests/mod.rs @@ -44,7 +44,7 @@ use polkadot_node_primitives::{CandidateVotes, UncheckedDisputeMessage}; use polkadot_node_subsystem::{ messages::{ AllMessages, DisputeCoordinatorMessage, DisputeDistributionMessage, ImportStatementsResult, - NetworkBridgeMessage, RuntimeApiMessage, RuntimeApiRequest, + NetworkBridgeTxMessage, RuntimeApiMessage, RuntimeApiRequest, }, ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, LeafStatus, OverseerSignal, Span, }; @@ -662,8 +662,8 @@ async fn check_sent_requests( // Sends to concerned validators: assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendRequests(reqs, IfDisconnected::ImmediateError) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendRequests(reqs, IfDisconnected::ImmediateError) ) => { let reqs: Vec<_> = reqs.into_iter().map(|r| assert_matches!( diff --git a/node/network/gossip-support/src/lib.rs b/node/network/gossip-support/src/lib.rs index 1cebcc64f78e..df90914b6f58 100644 --- a/node/network/gossip-support/src/lib.rs +++ b/node/network/gossip-support/src/lib.rs @@ -22,7 +22,7 @@ //! which limits the amount of messages sent and received //! to be an order of sqrt of the validators. Our neighbors //! in this graph will be forwarded to the network bridge with -//! the `NetworkBridgeMessage::NewGossipTopology` message. +//! the `NetworkBridgeRxMessage::NewGossipTopology` message. use std::{ collections::{HashMap, HashSet}, @@ -45,8 +45,8 @@ use polkadot_node_network_protocol::{ }; use polkadot_node_subsystem::{ messages::{ - GossipSupportMessage, NetworkBridgeEvent, NetworkBridgeMessage, RuntimeApiMessage, - RuntimeApiRequest, + GossipSupportMessage, NetworkBridgeEvent, NetworkBridgeRxMessage, NetworkBridgeTxMessage, + RuntimeApiMessage, RuntimeApiRequest, }, overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, }; @@ -345,7 +345,7 @@ where gum::debug!(target: LOG_TARGET, %num, "Issuing a connection request"); sender - .send_message(NetworkBridgeMessage::ConnectToResolvedValidators { + .send_message(NetworkBridgeTxMessage::ConnectToResolvedValidators { validator_addrs, peer_set: PeerSet::Validation, }) @@ -545,7 +545,7 @@ async fn update_gossip_topology( .collect(); sender - .send_message(NetworkBridgeMessage::NewGossipTopology { + .send_message(NetworkBridgeRxMessage::NewGossipTopology { session: session_index, our_neighbors_x: row_neighbors, our_neighbors_y: column_neighbors, diff --git a/node/network/gossip-support/src/tests.rs b/node/network/gossip-support/src/tests.rs index dbe44ea835d0..831f0aa94342 100644 --- a/node/network/gossip-support/src/tests.rs +++ b/node/network/gossip-support/src/tests.rs @@ -255,7 +255,7 @@ async fn test_neighbors(overseer: &mut VirtualOverseer, expected_session: Sessio assert_matches!( overseer_recv(overseer).await, - AllMessages::NetworkBridge(NetworkBridgeMessage::NewGossipTopology { + AllMessages::NetworkBridgeRx(NetworkBridgeRxMessage::NewGossipTopology { session: got_session, our_neighbors_x, our_neighbors_y, @@ -313,7 +313,7 @@ fn issues_a_connection_request_on_new_session() { assert_matches!( overseer_recv(overseer).await, - AllMessages::NetworkBridge(NetworkBridgeMessage::ConnectToResolvedValidators { + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::ConnectToResolvedValidators { validator_addrs, peer_set, }) => { @@ -392,7 +392,7 @@ fn issues_a_connection_request_on_new_session() { assert_matches!( overseer_recv(overseer).await, - AllMessages::NetworkBridge(NetworkBridgeMessage::ConnectToResolvedValidators { + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::ConnectToResolvedValidators { validator_addrs, peer_set, }) => { @@ -451,7 +451,7 @@ fn issues_connection_request_to_past_present_future() { assert_matches!( overseer_recv(overseer).await, - AllMessages::NetworkBridge(NetworkBridgeMessage::ConnectToResolvedValidators { + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::ConnectToResolvedValidators { validator_addrs, peer_set, }) => { @@ -553,7 +553,7 @@ fn issues_a_connection_request_when_last_request_was_mostly_unresolved() { assert_matches!( overseer_recv(overseer).await, - AllMessages::NetworkBridge(NetworkBridgeMessage::ConnectToResolvedValidators { + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::ConnectToResolvedValidators { validator_addrs, peer_set, }) => { @@ -618,7 +618,7 @@ fn issues_a_connection_request_when_last_request_was_mostly_unresolved() { assert_matches!( overseer_recv(overseer).await, - AllMessages::NetworkBridge(NetworkBridgeMessage::ConnectToResolvedValidators { + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::ConnectToResolvedValidators { validator_addrs, peer_set, }) => { diff --git a/node/network/protocol/src/request_response/outgoing.rs b/node/network/protocol/src/request_response/outgoing.rs index a9353965a48f..b93c4e93cd31 100644 --- a/node/network/protocol/src/request_response/outgoing.rs +++ b/node/network/protocol/src/request_response/outgoing.rs @@ -25,7 +25,7 @@ use polkadot_primitives::v2::AuthorityDiscoveryId; use super::{v1, IsRequest, Protocol}; -/// All requests that can be sent to the network bridge via `NetworkBridgeMessage::SendRequest`. +/// All requests that can be sent to the network bridge via `NetworkBridgeTxMessage::SendRequest`. #[derive(Debug)] pub enum Requests { /// Request an availability chunk from a node. diff --git a/node/network/statement-distribution/src/lib.rs b/node/network/statement-distribution/src/lib.rs index 2abb765f392b..38d4022c633b 100644 --- a/node/network/statement-distribution/src/lib.rs +++ b/node/network/statement-distribution/src/lib.rs @@ -39,7 +39,7 @@ use polkadot_node_subsystem_util::{self as util, rand, MIN_GOSSIP_PEERS}; use polkadot_node_subsystem::{ jaeger, messages::{ - CandidateBackingMessage, NetworkBridgeEvent, NetworkBridgeMessage, + CandidateBackingMessage, NetworkBridgeEvent, NetworkBridgeTxMessage, StatementDistributionMessage, }, overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, PerLeafSpan, SpawnedSubsystem, @@ -1083,7 +1083,7 @@ async fn circulate_statement<'a, Context>( statement = ?stored.statement, "Sending statement", ); - ctx.send_message(NetworkBridgeMessage::SendValidationMessage( + ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage( peers_to_send.iter().map(|(p, _)| p.clone()).collect(), payload, )) @@ -1123,8 +1123,11 @@ async fn send_statements_about( statement = ?statement.statement, "Sending statement", ); - ctx.send_message(NetworkBridgeMessage::SendValidationMessage(vec![peer.clone()], payload)) - .await; + ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage( + vec![peer.clone()], + payload, + )) + .await; metrics.on_statement_distributed(); } @@ -1155,8 +1158,11 @@ async fn send_statements( statement = ?statement.statement, "Sending statement" ); - ctx.send_message(NetworkBridgeMessage::SendValidationMessage(vec![peer.clone()], payload)) - .await; + ctx.send_message(NetworkBridgeTxMessage::SendValidationMessage( + vec![peer.clone()], + payload, + )) + .await; metrics.on_statement_distributed(); } @@ -1167,7 +1173,7 @@ async fn report_peer( peer: PeerId, rep: Rep, ) { - sender.send_message(NetworkBridgeMessage::ReportPeer(peer, rep)).await + sender.send_message(NetworkBridgeTxMessage::ReportPeer(peer, rep)).await } /// If message contains a statement, then retrieve it, otherwise fork task to fetch it. @@ -1926,7 +1932,7 @@ impl StatementDistributionSubsystem { } }, RequesterMessage::SendRequest(req) => { - ctx.send_message(NetworkBridgeMessage::SendRequests( + ctx.send_message(NetworkBridgeTxMessage::SendRequests( vec![req], IfDisconnected::ImmediateError, )) diff --git a/node/network/statement-distribution/src/tests.rs b/node/network/statement-distribution/src/tests.rs index 9f5b4f6de326..49a6e211bbd6 100644 --- a/node/network/statement-distribution/src/tests.rs +++ b/node/network/statement-distribution/src/tests.rs @@ -33,7 +33,7 @@ use polkadot_node_subsystem::{ ActivatedLeaf, LeafStatus, }; use polkadot_node_subsystem_test_helpers::mock::make_ferdie_keystore; -use polkadot_primitives::v2::{Hash, SessionInfo, ValidationCode}; +use polkadot_primitives::v2::{Hash, Id as ParaId, SessionInfo, ValidationCode}; use polkadot_primitives_test_helpers::{ dummy_committed_candidate_receipt, dummy_hash, AlwaysZeroRng, }; @@ -383,7 +383,7 @@ fn peer_view_update_sends_messages() { let candidate = { let mut c = dummy_committed_candidate_receipt(dummy_hash()); c.descriptor.relay_parent = hash_c; - c.descriptor.para_id = 1.into(); + c.descriptor.para_id = ParaId::from(1_u32); c }; let candidate_hash = candidate.hash(); @@ -549,7 +549,7 @@ fn peer_view_update_sends_messages() { assert_matches!( message, - AllMessages::NetworkBridge(NetworkBridgeMessage::SendValidationMessage( + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::SendValidationMessage( to, payload, )) => { @@ -570,7 +570,7 @@ fn circulated_statement_goes_to_all_peers_with_view() { let candidate = { let mut c = dummy_committed_candidate_receipt(dummy_hash()); c.descriptor.relay_parent = hash_b; - c.descriptor.para_id = 1.into(); + c.descriptor.para_id = ParaId::from(1_u32); c }; @@ -680,7 +680,7 @@ fn circulated_statement_goes_to_all_peers_with_view() { let message = handle.recv().await; assert_matches!( message, - AllMessages::NetworkBridge(NetworkBridgeMessage::SendValidationMessage( + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::SendValidationMessage( to, payload, )) => { @@ -847,8 +847,8 @@ fn receiving_from_one_sends_to_another_and_to_candidate_backing() { assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(p, r) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(p, r) ) if p == peer_a && r == BENEFIT_VALID_STATEMENT_FIRST => {} ); @@ -861,8 +861,8 @@ fn receiving_from_one_sends_to_another_and_to_candidate_backing() { assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendValidationMessage( + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendValidationMessage( recipients, Versioned::V1(protocol_v1::ValidationProtocol::StatementDistribution( protocol_v1::StatementDistributionMessage::Statement(r, s) @@ -1090,8 +1090,8 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendRequests( + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendRequests( mut reqs, IfDisconnected::ImmediateError ) ) => { @@ -1143,8 +1143,8 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( // Let c fail once too: assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendRequests( + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendRequests( mut reqs, IfDisconnected::ImmediateError ) ) => { @@ -1163,8 +1163,8 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( // a fails again: assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendRequests( + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendRequests( mut reqs, IfDisconnected::ImmediateError ) ) => { @@ -1184,8 +1184,8 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( // Send invalid response (all other peers have been tried now): assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendRequests( + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendRequests( mut reqs, IfDisconnected::ImmediateError ) ) => { @@ -1211,16 +1211,16 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( // Should get punished and never tried again: assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(p, r) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(p, r) ) if p == peer_bad && r == COST_WRONG_HASH => {} ); // a is tried again (retried in reverse order): assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendRequests( + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendRequests( mut reqs, IfDisconnected::ImmediateError ) ) => { @@ -1240,8 +1240,8 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( // c succeeds now: assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendRequests( + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendRequests( mut reqs, IfDisconnected::ImmediateError ) ) => { @@ -1262,22 +1262,22 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(p, r) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(p, r) ) if p == peer_a && r == COST_FETCH_FAIL => {} ); assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(p, r) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(p, r) ) if p == peer_c && r == BENEFIT_VALID_RESPONSE => {} ); assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(p, r) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(p, r) ) if p == peer_a && r == BENEFIT_VALID_STATEMENT_FIRST => {} ); @@ -1291,8 +1291,8 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing( // Now messages should go out: assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendValidationMessage( + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendValidationMessage( mut recipients, Versioned::V1(protocol_v1::ValidationProtocol::StatementDistribution( protocol_v1::StatementDistributionMessage::LargeStatement(meta) @@ -1638,8 +1638,8 @@ fn share_prioritizes_backing_group() { // Messages should go out: assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendValidationMessage( + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendValidationMessage( mut recipients, Versioned::V1(protocol_v1::ValidationProtocol::StatementDistribution( protocol_v1::StatementDistributionMessage::LargeStatement(meta) @@ -1843,7 +1843,7 @@ fn peer_cant_flood_with_large_statements() { let mut punished = false; for _ in 0..2 { match handle.recv().await { - AllMessages::NetworkBridge(NetworkBridgeMessage::SendRequests( + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::SendRequests( mut reqs, IfDisconnected::ImmediateError, )) => { @@ -1860,7 +1860,7 @@ fn peer_cant_flood_with_large_statements() { requested = true; }, - AllMessages::NetworkBridge(NetworkBridgeMessage::ReportPeer(p, r)) + AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::ReportPeer(p, r)) if p == peer_a && r == COST_APPARENT_FLOOD => { punished = true; @@ -2088,8 +2088,8 @@ fn handle_multiple_seconded_statements() { assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(p, r) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(p, r) ) => { assert_eq!(p, peer_a); assert_eq!(r, BENEFIT_VALID_STATEMENT_FIRST); @@ -2109,8 +2109,8 @@ fn handle_multiple_seconded_statements() { assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendValidationMessage( + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendValidationMessage( recipients, Versioned::V1(protocol_v1::ValidationProtocol::StatementDistribution( protocol_v1::StatementDistributionMessage::Statement(r, s) @@ -2140,8 +2140,8 @@ fn handle_multiple_seconded_statements() { assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(p, r) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(p, r) ) => { assert_eq!(p, peer_b); assert_eq!(r, BENEFIT_VALID_STATEMENT); @@ -2191,8 +2191,8 @@ fn handle_multiple_seconded_statements() { assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(p, r) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(p, r) ) => { assert_eq!(p, peer_a); assert_eq!(r, BENEFIT_VALID_STATEMENT_FIRST); @@ -2211,8 +2211,8 @@ fn handle_multiple_seconded_statements() { assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::SendValidationMessage( + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::SendValidationMessage( recipients, Versioned::V1(protocol_v1::ValidationProtocol::StatementDistribution( protocol_v1::StatementDistributionMessage::Statement(r, s) @@ -2244,8 +2244,8 @@ fn handle_multiple_seconded_statements() { // the first when sending `Seconded` assert_matches!( handle.recv().await, - AllMessages::NetworkBridge( - NetworkBridgeMessage::ReportPeer(p, r) + AllMessages::NetworkBridgeTx( + NetworkBridgeTxMessage::ReportPeer(p, r) ) => { assert_eq!(p, peer_b); assert_eq!(r, BENEFIT_VALID_STATEMENT); diff --git a/node/overseer/src/dummy.rs b/node/overseer/src/dummy.rs index 0b34339dfe7d..84ecdd1e8a89 100644 --- a/node/overseer/src/dummy.rs +++ b/node/overseer/src/dummy.rs @@ -85,6 +85,7 @@ pub fn dummy_overseer_builder<'a, Spawner, SupportsParachains>( DummySubsystem, DummySubsystem, DummySubsystem, + DummySubsystem, >, SubsystemError, > @@ -126,6 +127,7 @@ pub fn one_for_all_overseer_builder<'a, Spawner, SupportsParachains, Sub>( Sub, Sub, Sub, + Sub, >, SubsystemError, > @@ -143,7 +145,8 @@ where + Subsystem, SubsystemError> + Subsystem, SubsystemError> + Subsystem, SubsystemError> - + Subsystem, SubsystemError> + + Subsystem, SubsystemError> + + Subsystem, SubsystemError> + Subsystem, SubsystemError> + Subsystem, SubsystemError> + Subsystem, SubsystemError> @@ -169,7 +172,8 @@ where .chain_api(subsystem.clone()) .collation_generation(subsystem.clone()) .collator_protocol(subsystem.clone()) - .network_bridge(subsystem.clone()) + .network_bridge_tx(subsystem.clone()) + .network_bridge_rx(subsystem.clone()) .provisioner(subsystem.clone()) .runtime_api(subsystem.clone()) .statement_distribution(subsystem.clone()) diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index 8c38f8a8299f..fefcc4dba0ce 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -83,8 +83,8 @@ use polkadot_node_subsystem_types::messages::{ BitfieldSigningMessage, CandidateBackingMessage, CandidateValidationMessage, ChainApiMessage, ChainSelectionMessage, CollationGenerationMessage, CollatorProtocolMessage, DisputeCoordinatorMessage, DisputeDistributionMessage, GossipSupportMessage, - NetworkBridgeMessage, ProvisionerMessage, PvfCheckerMessage, RuntimeApiMessage, - StatementDistributionMessage, + NetworkBridgeRxMessage, NetworkBridgeTxMessage, ProvisionerMessage, PvfCheckerMessage, + RuntimeApiMessage, StatementDistributionMessage, }; pub use polkadot_node_subsystem_types::{ errors::{SubsystemError, SubsystemResult}, @@ -108,9 +108,9 @@ use parity_util_mem::MemoryAllocationTracker; pub use orchestra as gen; pub use orchestra::{ contextbounds, orchestra, subsystem, FromOrchestra, MapSubsystem, MessagePacket, - SignalsReceived, Spawner, Subsystem, SubsystemContext, SubsystemIncomingMessages, - SubsystemInstance, SubsystemMeterReadouts, SubsystemMeters, SubsystemSender, TimeoutExt, - ToOrchestra, + OrchestraError as OverseerError, SignalsReceived, Spawner, Subsystem, SubsystemContext, + SubsystemIncomingMessages, SubsystemInstance, SubsystemMeterReadouts, SubsystemMeters, + SubsystemSender, TimeoutExt, ToOrchestra, }; /// Store 2 days worth of blocks, not accounting for forks, @@ -389,7 +389,7 @@ pub async fn forward_events>(client: Arc

, mut hand /// # }; /// # use polkadot_node_subsystem_types::messages::{ /// # CandidateValidationMessage, CandidateBackingMessage, -/// # NetworkBridgeMessage, +/// # NetworkBridgeTxMessage, /// # }; /// /// struct ValidationSubsystem; @@ -477,7 +477,7 @@ pub struct Overseer { candidate_backing: CandidateBacking, #[subsystem(StatementDistributionMessage, sends: [ - NetworkBridgeMessage, + NetworkBridgeTxMessage, CandidateBackingMessage, RuntimeApiMessage, ])] @@ -488,12 +488,12 @@ pub struct Overseer { AvailabilityRecoveryMessage, ChainApiMessage, RuntimeApiMessage, - NetworkBridgeMessage, + NetworkBridgeTxMessage, ])] availability_distribution: AvailabilityDistribution, #[subsystem(AvailabilityRecoveryMessage, sends: [ - NetworkBridgeMessage, + NetworkBridgeTxMessage, RuntimeApiMessage, AvailabilityStoreMessage, ])] @@ -508,7 +508,7 @@ pub struct Overseer { #[subsystem(BitfieldDistributionMessage, sends: [ RuntimeApiMessage, - NetworkBridgeMessage, + NetworkBridgeTxMessage, ProvisionerMessage, ])] bitfield_distribution: BitfieldDistribution, @@ -530,7 +530,7 @@ pub struct Overseer { ])] availability_store: AvailabilityStore, - #[subsystem(NetworkBridgeMessage, sends: [ + #[subsystem(NetworkBridgeRxMessage, sends: [ BitfieldDistributionMessage, StatementDistributionMessage, ApprovalDistributionMessage, @@ -539,7 +539,10 @@ pub struct Overseer { CollationGenerationMessage, CollatorProtocolMessage, ])] - network_bridge: NetworkBridge, + network_bridge_rx: NetworkBridgeRx, + + #[subsystem(NetworkBridgeTxMessage, sends: [])] + network_bridge_tx: NetworkBridgeTx, #[subsystem(blocking, ChainApiMessage, sends: [])] chain_api: ChainApi, @@ -551,14 +554,14 @@ pub struct Overseer { collation_generation: CollationGeneration, #[subsystem(CollatorProtocolMessage, sends: [ - NetworkBridgeMessage, + NetworkBridgeTxMessage, RuntimeApiMessage, CandidateBackingMessage, ])] collator_protocol: CollatorProtocol, #[subsystem(ApprovalDistributionMessage, sends: [ - NetworkBridgeMessage, + NetworkBridgeTxMessage, ApprovalVotingMessage, ])] approval_distribution: ApprovalDistribution, @@ -575,7 +578,8 @@ pub struct Overseer { approval_voting: ApprovalVoting, #[subsystem(GossipSupportMessage, sends: [ - NetworkBridgeMessage, + NetworkBridgeTxMessage, + NetworkBridgeRxMessage, // TODO RuntimeApiMessage, ChainSelectionMessage, ])] @@ -594,7 +598,7 @@ pub struct Overseer { #[subsystem(DisputeDistributionMessage, sends: [ RuntimeApiMessage, DisputeCoordinatorMessage, - NetworkBridgeMessage, + NetworkBridgeTxMessage, ])] dispute_distribution: DisputeDistribution, diff --git a/node/overseer/src/tests.rs b/node/overseer/src/tests.rs index a3f304466626..25a6d07e3934 100644 --- a/node/overseer/src/tests.rs +++ b/node/overseer/src/tests.rs @@ -29,7 +29,7 @@ use polkadot_node_subsystem_types::{ ActivatedLeaf, LeafStatus, }; use polkadot_primitives::v2::{ - CandidateHash, CandidateReceipt, CollatorPair, InvalidDisputeStatementKind, + CandidateHash, CandidateReceipt, CollatorPair, InvalidDisputeStatementKind, SessionIndex, ValidDisputeStatementKind, ValidatorIndex, }; @@ -864,8 +864,16 @@ fn test_availability_store_msg() -> AvailabilityStoreMessage { AvailabilityStoreMessage::QueryAvailableData(CandidateHash(Default::default()), sender) } -fn test_network_bridge_msg() -> NetworkBridgeMessage { - NetworkBridgeMessage::ReportPeer(PeerId::random(), UnifiedReputationChange::BenefitMinor("")) +fn test_network_bridge_tx_msg() -> NetworkBridgeTxMessage { + NetworkBridgeTxMessage::ReportPeer(PeerId::random(), UnifiedReputationChange::BenefitMinor("")) +} + +fn test_network_bridge_rx_msg() -> NetworkBridgeRxMessage { + NetworkBridgeRxMessage::NewGossipTopology { + session: SessionIndex::from(0_u32), + our_neighbors_x: HashMap::new(), + our_neighbors_y: HashMap::new(), + } } fn test_approval_distribution_msg() -> ApprovalDistributionMessage { @@ -913,7 +921,7 @@ fn test_chain_selection_msg() -> ChainSelectionMessage { // Checks that `stop`, `broadcast_signal` and `broadcast_message` are implemented correctly. #[test] fn overseer_all_subsystems_receive_signals_and_messages() { - const NUM_SUBSYSTEMS: usize = 21; + const NUM_SUBSYSTEMS: usize = 22; // -4 for BitfieldSigning, GossipSupport, AvailabilityDistribution and PvfCheckerSubsystem. const NUM_SUBSYSTEMS_MESSAGED: usize = NUM_SUBSYSTEMS - 4; @@ -980,7 +988,10 @@ fn overseer_all_subsystems_receive_signals_and_messages() { .send_msg_anon(AllMessages::AvailabilityStore(test_availability_store_msg())) .await; handle - .send_msg_anon(AllMessages::NetworkBridge(test_network_bridge_msg())) + .send_msg_anon(AllMessages::NetworkBridgeTx(test_network_bridge_tx_msg())) + .await; + handle + .send_msg_anon(AllMessages::NetworkBridgeRx(test_network_bridge_rx_msg())) .await; handle.send_msg_anon(AllMessages::ChainApi(test_chain_api_msg())).await; handle @@ -1042,7 +1053,8 @@ fn context_holds_onto_message_until_enough_signals_received() { let (provisioner_bounded_tx, _) = metered::channel(CHANNEL_CAPACITY); let (runtime_api_bounded_tx, _) = metered::channel(CHANNEL_CAPACITY); let (availability_store_bounded_tx, _) = metered::channel(CHANNEL_CAPACITY); - let (network_bridge_bounded_tx, _) = metered::channel(CHANNEL_CAPACITY); + let (network_bridge_rx_bounded_tx, _) = metered::channel(CHANNEL_CAPACITY); + let (network_bridge_tx_bounded_tx, _) = metered::channel(CHANNEL_CAPACITY); let (chain_api_bounded_tx, _) = metered::channel(CHANNEL_CAPACITY); let (collator_protocol_bounded_tx, _) = metered::channel(CHANNEL_CAPACITY); let (collation_generation_bounded_tx, _) = metered::channel(CHANNEL_CAPACITY); @@ -1064,7 +1076,8 @@ fn context_holds_onto_message_until_enough_signals_received() { let (provisioner_unbounded_tx, _) = metered::unbounded(); let (runtime_api_unbounded_tx, _) = metered::unbounded(); let (availability_store_unbounded_tx, _) = metered::unbounded(); - let (network_bridge_unbounded_tx, _) = metered::unbounded(); + let (network_bridge_tx_unbounded_tx, _) = metered::unbounded(); + let (network_bridge_rx_unbounded_tx, _) = metered::unbounded(); let (chain_api_unbounded_tx, _) = metered::unbounded(); let (collator_protocol_unbounded_tx, _) = metered::unbounded(); let (collation_generation_unbounded_tx, _) = metered::unbounded(); @@ -1087,7 +1100,8 @@ fn context_holds_onto_message_until_enough_signals_received() { provisioner: provisioner_bounded_tx.clone(), runtime_api: runtime_api_bounded_tx.clone(), availability_store: availability_store_bounded_tx.clone(), - network_bridge: network_bridge_bounded_tx.clone(), + network_bridge_tx: network_bridge_tx_bounded_tx.clone(), + network_bridge_rx: network_bridge_rx_bounded_tx.clone(), chain_api: chain_api_bounded_tx.clone(), collator_protocol: collator_protocol_bounded_tx.clone(), collation_generation: collation_generation_bounded_tx.clone(), @@ -1109,7 +1123,8 @@ fn context_holds_onto_message_until_enough_signals_received() { provisioner_unbounded: provisioner_unbounded_tx.clone(), runtime_api_unbounded: runtime_api_unbounded_tx.clone(), availability_store_unbounded: availability_store_unbounded_tx.clone(), - network_bridge_unbounded: network_bridge_unbounded_tx.clone(), + network_bridge_tx_unbounded: network_bridge_tx_unbounded_tx.clone(), + network_bridge_rx_unbounded: network_bridge_rx_unbounded_tx.clone(), chain_api_unbounded: chain_api_unbounded_tx.clone(), collator_protocol_unbounded: collator_protocol_unbounded_tx.clone(), collation_generation_unbounded: collation_generation_unbounded_tx.clone(), diff --git a/node/service/src/overseer.rs b/node/service/src/overseer.rs index c1f2352dd622..efc36de15423 100644 --- a/node/service/src/overseer.rs +++ b/node/service/src/overseer.rs @@ -51,7 +51,10 @@ pub use polkadot_availability_recovery::AvailabilityRecoverySubsystem; pub use polkadot_collator_protocol::{CollatorProtocolSubsystem, ProtocolSide}; pub use polkadot_dispute_distribution::DisputeDistributionSubsystem; pub use polkadot_gossip_support::GossipSupport as GossipSupportSubsystem; -pub use polkadot_network_bridge::NetworkBridge as NetworkBridgeSubsystem; +pub use polkadot_network_bridge::{ + Metrics as NetworkBridgeMetrics, NetworkBridgeRx as NetworkBridgeRxSubsystem, + NetworkBridgeTx as NetworkBridgeTxSubsystem, +}; pub use polkadot_node_collation_generation::CollationGenerationSubsystem; pub use polkadot_node_core_approval_voting::ApprovalVotingSubsystem; pub use polkadot_node_core_av_store::AvailabilityStoreSubsystem; @@ -158,7 +161,11 @@ pub fn prepared_overseer_builder<'a, Spawner, RuntimeClient>( ProvisionerSubsystem, RuntimeApiSubsystem, AvailabilityStoreSubsystem, - NetworkBridgeSubsystem< + NetworkBridgeRxSubsystem< + Arc>, + AuthorityDiscoveryService, + >, + NetworkBridgeTxSubsystem< Arc>, AuthorityDiscoveryService, >, @@ -185,7 +192,19 @@ where let spawner = SpawnGlue(spawner); + let network_bridge_metrics: NetworkBridgeMetrics = Metrics::register(registry)?; let builder = Overseer::builder() + .network_bridge_tx(NetworkBridgeTxSubsystem::new( + network_service.clone(), + authority_discovery_service.clone(), + network_bridge_metrics.clone(), + )) + .network_bridge_rx(NetworkBridgeRxSubsystem::new( + network_service.clone(), + authority_discovery_service.clone(), + Box::new(network_service.clone()), + network_bridge_metrics, + )) .availability_distribution(AvailabilityDistributionSubsystem::new( keystore.clone(), IncomingRequestReceivers { pov_req_receiver, chunk_req_receiver }, @@ -237,12 +256,6 @@ where }; CollatorProtocolSubsystem::new(side) }) - .network_bridge(NetworkBridgeSubsystem::new( - network_service.clone(), - authority_discovery_service.clone(), - Box::new(network_service.clone()), - Metrics::register(registry)?, - )) .provisioner(ProvisionerSubsystem::new(Metrics::register(registry)?)) .runtime_api(RuntimeApiSubsystem::new( runtime_client.clone(), diff --git a/node/subsystem-test-helpers/src/lib.rs b/node/subsystem-test-helpers/src/lib.rs index 6ea0caabaddc..cc263266366e 100644 --- a/node/subsystem-test-helpers/src/lib.rs +++ b/node/subsystem-test-helpers/src/lib.rs @@ -245,20 +245,37 @@ pub struct TestSubsystemContextHandle { } impl TestSubsystemContextHandle { + /// Fallback timeout value used to never block test execution + /// indefinitely. + pub const TIMEOUT: Duration = Duration::from_secs(120); + /// Send a message or signal to the subsystem. This resolves at the point in time when the /// subsystem has _read_ the message. pub async fn send(&mut self, from_overseer: FromOrchestra) { - self.tx.send(from_overseer).await.expect("Test subsystem no longer live"); + self.tx + .send(from_overseer) + .timeout(Self::TIMEOUT) + .await + .expect("`fn send` does not timeout") + .expect("Test subsystem no longer live"); } /// Receive the next message from the subsystem. pub async fn recv(&mut self) -> AllMessages { - self.try_recv().await.expect("Test subsystem no longer live") + self.try_recv() + .timeout(Self::TIMEOUT) + .await + .expect("`fn recv` does not timeout") + .expect("Test subsystem no longer live") } /// Receive the next message from the subsystem, or `None` if the channel has been closed. pub async fn try_recv(&mut self) -> Option { - self.rx.next().await + self.rx + .next() + .timeout(Self::TIMEOUT) + .await + .expect("`try_recv` does not timeout") } } diff --git a/node/subsystem-types/src/messages.rs b/node/subsystem-types/src/messages.rs index db74ab11cd4d..b79785ce406f 100644 --- a/node/subsystem-types/src/messages.rs +++ b/node/subsystem-types/src/messages.rs @@ -318,9 +318,36 @@ pub enum DisputeDistributionMessage { SendDispute(DisputeMessage), } -/// Messages received by the network bridge subsystem. +/// Messages received from other subsystems. #[derive(Debug)] -pub enum NetworkBridgeMessage { +pub enum NetworkBridgeRxMessage { + /// Inform the distribution subsystems about the new + /// gossip network topology formed. + /// + /// The only reason to have this here, is the availability of the + /// authority discovery service, otherwise, the `GossipSupport` + /// subsystem would make more sense. + NewGossipTopology { + /// The session info this gossip topology is concerned with. + session: SessionIndex, + /// Ids of our neighbors in the X dimensions of the new gossip topology, + /// along with their validator indices within the session. + /// + /// We're not necessarily connected to all of them, but we should + /// try to be. + our_neighbors_x: HashMap, + /// Ids of our neighbors in the X dimensions of the new gossip topology, + /// along with their validator indices within the session. + /// + /// We're not necessarily connected to all of them, but we should + /// try to be. + our_neighbors_y: HashMap, + }, +} + +/// Messages received from other subsystems by the network bridge subsystem. +#[derive(Debug)] +pub enum NetworkBridgeTxMessage { /// Report a peer for their actions. ReportPeer(PeerId, UnifiedReputationChange), @@ -375,27 +402,9 @@ pub enum NetworkBridgeMessage { /// The peer set we want the connection on. peer_set: PeerSet, }, - /// Inform the distribution subsystems about the new - /// gossip network topology formed. - NewGossipTopology { - /// The session info this gossip topology is concerned with. - session: SessionIndex, - /// Ids of our neighbors in the X dimensions of the new gossip topology, - /// along with their validator indices within the session. - /// - /// We're not necessarily connected to all of them, but we should - /// try to be. - our_neighbors_x: HashMap, - /// Ids of our neighbors in the X dimensions of the new gossip topology, - /// along with their validator indices within the session. - /// - /// We're not necessarily connected to all of them, but we should - /// try to be. - our_neighbors_y: HashMap, - }, } -impl NetworkBridgeMessage { +impl NetworkBridgeTxMessage { /// If the current variant contains the relay parent hash, return it. pub fn relay_parent(&self) -> Option { match self { @@ -408,7 +417,6 @@ impl NetworkBridgeMessage { Self::ConnectToValidators { .. } => None, Self::ConnectToResolvedValidators { .. } => None, Self::SendRequests { .. } => None, - Self::NewGossipTopology { .. } => None, } } } diff --git a/node/subsystem-util/src/rolling_session_window.rs b/node/subsystem-util/src/rolling_session_window.rs index ba8a62d08118..dd9282b50fe5 100644 --- a/node/subsystem-util/src/rolling_session_window.rs +++ b/node/subsystem-util/src/rolling_session_window.rs @@ -28,16 +28,18 @@ use polkadot_node_subsystem::{ messages::{RuntimeApiMessage, RuntimeApiRequest}, overseer, }; -use thiserror::Error; /// Sessions unavailable in state to cache. -#[derive(Debug, Clone)] +#[derive(Debug, Clone, thiserror::Error)] pub enum SessionsUnavailableReason { /// Runtime API subsystem was unavailable. - RuntimeApiUnavailable(oneshot::Canceled), + #[error(transparent)] + RuntimeApiUnavailable(#[from] oneshot::Canceled), /// The runtime API itself returned an error. - RuntimeApi(RuntimeApiError), + #[error(transparent)] + RuntimeApi(#[from] RuntimeApiError), /// Missing session info from runtime API for given `SessionIndex`. + #[error("Missing session index {0:?}")] Missing(SessionIndex), } @@ -53,20 +55,16 @@ pub struct SessionsUnavailableInfo { } /// Sessions were unavailable to fetch from the state for some reason. -#[derive(Debug, Error, Clone)] +#[derive(Debug, thiserror::Error, Clone)] +#[error("Sessions unavailable: {kind:?}, info: {info:?}")] pub struct SessionsUnavailable { /// The error kind. + #[source] kind: SessionsUnavailableReason, /// The info about the session window, if any. info: Option, } -impl core::fmt::Display for SessionsUnavailable { - fn fmt(&self, f: &mut core::fmt::Formatter) -> Result<(), core::fmt::Error> { - write!(f, "Sessions unavailable: {:?}, info: {:?}", self.kind, self.info) - } -} - /// An indicated update of the rolling session window. #[derive(Debug, PartialEq, Clone)] pub enum SessionWindowUpdate { From 81cd489111830b8a60aa991113f41187c5e94fdf Mon Sep 17 00:00:00 2001 From: ferrell-code Date: Tue, 12 Jul 2022 17:43:13 -0400 Subject: [PATCH 03/15] fix disable-runtime-api feature flag (#5773) --- runtime/kusama/src/lib.rs | 2 +- runtime/polkadot/src/lib.rs | 2 +- runtime/westend/src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 56444a7a58bb..28bfe304165a 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -121,7 +121,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, #[cfg(feature = "disable-runtime-api")] - apis: version::create_apis_vec![[]], + apis: sp_version::create_apis_vec![[]], transaction_version: 12, state_version: 0, }; diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index ac3d19fbce4b..6464d945c595 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -117,7 +117,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, #[cfg(feature = "disable-runtime-api")] - apis: version::create_apis_vec![[]], + apis: sp_version::create_apis_vec![[]], transaction_version: 13, state_version: 0, }; diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 5ac7942138fd..25697c65a916 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -110,7 +110,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, #[cfg(feature = "disable-runtime-api")] - apis: version::create_apis_vec![[]], + apis: sp_version::create_apis_vec![[]], transaction_version: 11, state_version: 0, }; From 2ec6214dc8897033d0411bfff5f7c071a293be26 Mon Sep 17 00:00:00 2001 From: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Date: Wed, 13 Jul 2022 16:34:24 +0100 Subject: [PATCH 04/15] companion for new pools reward scheme (#5757) * companion for new pools reward scheme * fix build * fix * Fux * update lockfile for {"substrate"} * fmt Co-authored-by: parity-processbot <> --- Cargo.lock | 727 ++++++++++++++++--------------------- runtime/kusama/Cargo.toml | 1 + runtime/kusama/src/lib.rs | 10 +- runtime/westend/Cargo.toml | 1 + runtime/westend/src/lib.rs | 10 +- 5 files changed, 320 insertions(+), 429 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 38b6cc561915..26cecc02e7a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -424,7 +424,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "beefy-primitives", "fnv", @@ -458,7 +458,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -478,7 +478,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "beefy-primitives", "sp-api", @@ -487,7 +487,7 @@ dependencies = [ [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "parity-scale-codec", "scale-info", @@ -1953,7 +1953,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "parity-scale-codec", ] @@ -1971,7 +1971,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-support", "frame-system", @@ -1993,7 +1993,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "Inflector", "chrono", @@ -2044,7 +2044,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2055,7 +2055,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2071,7 +2071,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-support", "frame-system", @@ -2099,7 +2099,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "bitflags", "frame-metadata", @@ -2129,7 +2129,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2141,7 +2141,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2153,7 +2153,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "proc-macro2", "quote", @@ -2163,7 +2163,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2186,7 +2186,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-support", "frame-system", @@ -2197,7 +2197,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-support", "log", @@ -2214,7 +2214,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -2229,7 +2229,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "parity-scale-codec", "sp-api", @@ -2238,7 +2238,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-support", "sp-api", @@ -2420,7 +2420,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "chrono", "frame-election-provider-support", @@ -3033,7 +3033,7 @@ dependencies = [ "http", "jsonrpsee-core", "jsonrpsee-types", - "pin-project 1.0.10", + "pin-project", "rustls-native-certs", "soketto", "thiserror", @@ -3386,9 +3386,9 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] name = "libp2p" -version = "0.45.1" +version = "0.46.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41726ee8f662563fafba2d2d484b14037cc8ecb8c953fbfc8439d4ce3a0a9029" +checksum = "81327106887e42d004fbdab1fef93675be2e2e07c1b95fce45e2cc813485611d" dependencies = [ "bytes", "futures", @@ -3397,7 +3397,7 @@ dependencies = [ "instant", "lazy_static", "libp2p-autonat", - "libp2p-core 0.33.0", + "libp2p-core", "libp2p-deflate", "libp2p-dns", "libp2p-floodsub", @@ -3423,69 +3423,35 @@ dependencies = [ "libp2p-yamux", "multiaddr", "parking_lot 0.12.0", - "pin-project 1.0.10", + "pin-project", "rand 0.7.3", "smallvec", ] [[package]] name = "libp2p-autonat" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50de7c1d5c3f040fccb469e8a2d189e068b7627d760dd74ef914071c16bbe905" +checksum = "4decc51f3573653a9f4ecacb31b1b922dd20c25a6322bb15318ec04287ec46f9" dependencies = [ "async-trait", "futures", "futures-timer", "instant", - "libp2p-core 0.33.0", + "libp2p-core", "libp2p-request-response", "libp2p-swarm", "log", - "prost 0.10.3", - "prost-build 0.10.4", + "prost", + "prost-build", "rand 0.8.5", ] [[package]] name = "libp2p-core" -version = "0.32.1" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db5b02602099fb75cb2d16f9ea860a320d6eb82ce41e95ab680912c454805cd5" -dependencies = [ - "asn1_der", - "bs58", - "ed25519-dalek", - "either", - "fnv", - "futures", - "futures-timer", - "instant", - "lazy_static", - "log", - "multiaddr", - "multihash", - "multistream-select", - "parking_lot 0.12.0", - "pin-project 1.0.10", - "prost 0.9.0", - "prost-build 0.9.0", - "rand 0.8.5", - "ring", - "rw-stream-sink 0.2.1", - "sha2 0.10.2", - "smallvec", - "thiserror", - "unsigned-varint", - "void", - "zeroize", -] - -[[package]] -name = "libp2p-core" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d46fca305dee6757022e2f5a4f6c023315084d0ed7441c3ab244e76666d979" +checksum = "fbf9b94cefab7599b2d3dff2f93bee218c6621d68590b23ede4485813cbcece6" dependencies = [ "asn1_der", "bs58", @@ -3502,12 +3468,12 @@ dependencies = [ "multihash", "multistream-select", "parking_lot 0.12.0", - "pin-project 1.0.10", - "prost 0.10.3", - "prost-build 0.10.4", + "pin-project", + "prost", + "prost-build", "rand 0.8.5", "ring", - "rw-stream-sink 0.3.0", + "rw-stream-sink", "sha2 0.10.2", "smallvec", "thiserror", @@ -3518,24 +3484,24 @@ dependencies = [ [[package]] name = "libp2p-deflate" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86adefc55ea4ed8201149f052fb441210727481dff1fb0b8318460206a79f5fb" +checksum = "d0183dc2a3da1fbbf85e5b6cf51217f55b14f5daea0c455a9536eef646bfec71" dependencies = [ "flate2", "futures", - "libp2p-core 0.33.0", + "libp2p-core", ] [[package]] name = "libp2p-dns" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb462ec3a51fab457b4b44ac295e8b0a4b04dc175127e615cf996b1f0f1a268" +checksum = "6cbf54723250fa5d521383be789bf60efdabe6bacfb443f87da261019a49b4b5" dependencies = [ "async-std-resolver", "futures", - "libp2p-core 0.33.0", + "libp2p-core", "log", "parking_lot 0.12.0", "smallvec", @@ -3544,27 +3510,27 @@ dependencies = [ [[package]] name = "libp2p-floodsub" -version = "0.36.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a505d0c6f851cbf2919535150198e530825def8bd3757477f13dc3a57f46cbcc" +checksum = "98a4b6ffd53e355775d24b76f583fdda54b3284806f678499b57913adb94f231" dependencies = [ "cuckoofilter", "fnv", "futures", - "libp2p-core 0.33.0", + "libp2p-core", "libp2p-swarm", "log", - "prost 0.10.3", - "prost-build 0.10.4", + "prost", + "prost-build", "rand 0.7.3", "smallvec", ] [[package]] name = "libp2p-gossipsub" -version = "0.38.1" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43e064ba4d7832e01c738626c6b274ae100baba05f5ffcc7b265c2a3ed398108" +checksum = "74b4b888cfbeb1f5551acd3aa1366e01bf88ede26cc3c4645d0d2d004d5ca7b0" dependencies = [ "asynchronous-codec", "base64", @@ -3574,12 +3540,12 @@ dependencies = [ "futures", "hex_fmt", "instant", - "libp2p-core 0.33.0", + "libp2p-core", "libp2p-swarm", "log", "prometheus-client", - "prost 0.10.3", - "prost-build 0.10.4", + "prost", + "prost-build", "rand 0.7.3", "regex", "sha2 0.10.2", @@ -3590,19 +3556,19 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.36.1" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84b53490442d086db1fa5375670c9666e79143dccadef3f7c74a4346899a984" +checksum = "c50b585518f8efd06f93ac2f976bd672e17cdac794644b3117edd078e96bda06" dependencies = [ "asynchronous-codec", "futures", "futures-timer", - "libp2p-core 0.33.0", + "libp2p-core", "libp2p-swarm", "log", "lru 0.7.7", - "prost 0.10.3", - "prost-build 0.10.4", + "prost", + "prost-build", "prost-codec", "smallvec", "thiserror", @@ -3611,9 +3577,9 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.37.1" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6b5d4de90fcd35feb65ea6223fd78f3b747a64ca4b65e0813fbe66a27d56aa" +checksum = "740862893bb5f06ac24acc9d49bdeadc3a5e52e51818a30a25c1f3519da2c851" dependencies = [ "arrayvec 0.7.2", "asynchronous-codec", @@ -3623,11 +3589,11 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core 0.33.0", + "libp2p-core", "libp2p-swarm", "log", - "prost 0.10.3", - "prost-build 0.10.4", + "prost", + "prost-build", "rand 0.7.3", "sha2 0.10.2", "smallvec", @@ -3639,9 +3605,9 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4783f8cf00c7b6c1ff0f1870b4fcf50b042b45533d2e13b6fb464caf447a6951" +checksum = "66e5e5919509603281033fd16306c61df7a4428ce274b67af5e14b07de5cdcb2" dependencies = [ "async-io", "data-encoding", @@ -3649,7 +3615,7 @@ dependencies = [ "futures", "if-watch", "lazy_static", - "libp2p-core 0.33.0", + "libp2p-core", "libp2p-swarm", "log", "rand 0.8.5", @@ -3660,11 +3626,11 @@ dependencies = [ [[package]] name = "libp2p-metrics" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4357140141ba9739eee71b20aa735351c0fc642635b2bffc7f57a6b5c1090" +checksum = "ef8aff4a1abef42328fbb30b17c853fff9be986dc39af17ee39f9c5f755c5e0c" dependencies = [ - "libp2p-core 0.33.0", + "libp2p-core", "libp2p-gossipsub", "libp2p-identify", "libp2p-kad", @@ -3676,14 +3642,14 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ff9c893f2367631a711301d703c47432af898c9bb8253bea0e2c051a13f7640" +checksum = "61fd1b20638ec209c5075dfb2e8ce6a7ea4ec3cd3ad7b77f7a477c06d53322e2" dependencies = [ "asynchronous-codec", "bytes", "futures", - "libp2p-core 0.33.0", + "libp2p-core", "log", "nohash-hasher", "parking_lot 0.12.0", @@ -3694,18 +3660,18 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.36.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2cee1dad1c83325bbd182a8e94555778699cec8a9da00086efb7522c4c15ad" +checksum = "762408cb5d84b49a600422d7f9a42c18012d8da6ebcd570f9a4a4290ba41fb6f" dependencies = [ "bytes", "curve25519-dalek 3.2.0", "futures", "lazy_static", - "libp2p-core 0.33.0", + "libp2p-core", "log", - "prost 0.10.3", - "prost-build 0.10.4", + "prost", + "prost-build", "rand 0.8.5", "sha2 0.10.2", "snow", @@ -3716,14 +3682,14 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.36.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41516c82fe8dd148ec925eead0c5ec08a0628f7913597e93e126e4dfb4e0787" +checksum = "100a6934ae1dbf8a693a4e7dd1d730fd60b774dafc45688ed63b554497c6c925" dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core 0.33.0", + "libp2p-core", "libp2p-swarm", "log", "rand 0.7.3", @@ -3732,17 +3698,17 @@ dependencies = [ [[package]] name = "libp2p-plaintext" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db007e737adc5d28b2e03223b0210164928ad742591127130796a72aa8eaf54f" +checksum = "be27bf0820a6238a4e06365b096d428271cce85a129cf16f2fe9eb1610c4df86" dependencies = [ "asynchronous-codec", "bytes", "futures", - "libp2p-core 0.33.0", + "libp2p-core", "log", - "prost 0.10.3", - "prost-build 0.10.4", + "prost", + "prost-build", "unsigned-varint", "void", ] @@ -3755,7 +3721,7 @@ checksum = "0f1a458bbda880107b5b36fcb9b5a1ef0c329685da0e203ed692a8ebe64cc92c" dependencies = [ "futures", "log", - "pin-project 1.0.10", + "pin-project", "rand 0.7.3", "salsa20", "sha3 0.9.1", @@ -3763,9 +3729,9 @@ dependencies = [ [[package]] name = "libp2p-relay" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624ead3406f64437a0d4567c31bd128a9a0b8226d5f16c074038f5d0fc32f650" +checksum = "4931547ee0cce03971ccc1733ff05bb0c4349fd89120a39e9861e2bbe18843c3" dependencies = [ "asynchronous-codec", "bytes", @@ -3773,12 +3739,12 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core 0.33.0", + "libp2p-core", "libp2p-swarm", "log", - "pin-project 1.0.10", - "prost 0.10.3", - "prost-build 0.10.4", + "pin-project", + "prost", + "prost-build", "prost-codec", "rand 0.8.5", "smallvec", @@ -3789,20 +3755,20 @@ dependencies = [ [[package]] name = "libp2p-rendezvous" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59967ea2db2c7560f641aa58ac05982d42131863fcd3dd6dcf0dd1daf81c60c" +checksum = "9511c9672ba33284838e349623319c8cad2d18cfad243ae46c6b7e8a2982ea4e" dependencies = [ "asynchronous-codec", "bimap", "futures", "futures-timer", "instant", - "libp2p-core 0.33.0", + "libp2p-core", "libp2p-swarm", "log", - "prost 0.10.3", - "prost-build 0.10.4", + "prost", + "prost-build", "rand 0.8.5", "sha2 0.10.2", "thiserror", @@ -3812,15 +3778,15 @@ dependencies = [ [[package]] name = "libp2p-request-response" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b02e0acb725e5a757d77c96b95298fd73a7394fe82ba7b8bbeea510719cbe441" +checksum = "508a189e2795d892c8f5c1fa1e9e0b1845d32d7b0b249dbf7b05b18811361843" dependencies = [ "async-trait", "bytes", "futures", "instant", - "libp2p-core 0.33.0", + "libp2p-core", "libp2p-swarm", "log", "rand 0.7.3", @@ -3830,18 +3796,18 @@ dependencies = [ [[package]] name = "libp2p-swarm" -version = "0.36.1" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4bb21c5abadbf00360c734f16bf87f1712ed4f23cd46148f625d2ddb867346" +checksum = "95ac5be6c2de2d1ff3f7693fda6faf8a827b1f3e808202277783fea9f527d114" dependencies = [ "either", "fnv", "futures", "futures-timer", "instant", - "libp2p-core 0.33.0", + "libp2p-core", "log", - "pin-project 1.0.10", + "pin-project", "rand 0.7.3", "smallvec", "thiserror", @@ -3850,9 +3816,9 @@ dependencies = [ [[package]] name = "libp2p-swarm-derive" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf2fe8c80b43561355f4d51875273b5b6dfbac37952e8f64b1270769305c9d7" +checksum = "9f54a64b6957249e0ce782f8abf41d97f69330d02bf229f0672d864f0650cc76" dependencies = [ "quote", "syn", @@ -3860,9 +3826,9 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4933e38ef21b50698aefc87799c24f2a365c9d3f6cf50471f3f6a0bc410892" +checksum = "8a6771dc19aa3c65d6af9a8c65222bfc8fcd446630ddca487acd161fa6096f3b" dependencies = [ "async-io", "futures", @@ -3870,32 +3836,32 @@ dependencies = [ "if-watch", "ipnet", "libc", - "libp2p-core 0.33.0", + "libp2p-core", "log", "socket2", ] [[package]] name = "libp2p-uds" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24bdab114f7f2701757d6541266e1131b429bbae382008f207f2114ee4222dcb" +checksum = "d125e3e5f0d58f3c6ac21815b20cf4b6a88b8db9dc26368ea821838f4161fd4d" dependencies = [ "async-std", "futures", - "libp2p-core 0.32.1", + "libp2p-core", "log", ] [[package]] name = "libp2p-wasm-ext" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f066f2b8b1a1d64793f05da2256e6842ecd0293d6735ca2e9bda89831a1bdc06" +checksum = "ec894790eec3c1608f8d1a8a0bdf0dbeb79ed4de2dce964222011c2896dfa05a" dependencies = [ "futures", "js-sys", - "libp2p-core 0.33.0", + "libp2p-core", "parity-send-wrapper", "wasm-bindgen", "wasm-bindgen-futures", @@ -3903,18 +3869,18 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39d398fbb29f432c4128fabdaac2ed155c3bcaf1b9bd40eeeb10a471eefacbf5" +checksum = "9808e57e81be76ff841c106b4c5974fb4d41a233a7bdd2afbf1687ac6def3818" dependencies = [ "either", "futures", "futures-rustls", - "libp2p-core 0.33.0", + "libp2p-core", "log", "parking_lot 0.12.0", "quicksink", - "rw-stream-sink 0.3.0", + "rw-stream-sink", "soketto", "url", "webpki-roots", @@ -3922,12 +3888,12 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.37.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fe653639ad74877c759720febb0cbcbf4caa221adde4eed2d3126ce5c6f381f" +checksum = "c6dea686217a06072033dc025631932810e2f6ad784e4fafa42e27d311c7a81c" dependencies = [ "futures", - "libp2p-core 0.33.0", + "libp2p-core", "parking_lot 0.12.0", "thiserror", "yamux", @@ -4393,7 +4359,7 @@ dependencies = [ "bytes", "futures", "log", - "pin-project 1.0.10", + "pin-project", "smallvec", "unsigned-varint", ] @@ -4759,7 +4725,7 @@ dependencies = [ "futures", "futures-timer", "orchestra-proc-macro", - "pin-project 1.0.10", + "pin-project", "prioritized-metered-channel", "rustversion", "thiserror", @@ -4826,7 +4792,7 @@ checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -4840,7 +4806,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-support", "frame-system", @@ -4856,7 +4822,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-support", "frame-system", @@ -4871,7 +4837,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -4895,7 +4861,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4915,7 +4881,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-election-provider-support", "frame-support", @@ -4934,7 +4900,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -4949,7 +4915,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "beefy-primitives", "frame-support", @@ -4965,7 +4931,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -4988,7 +4954,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5006,7 +4972,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5025,7 +4991,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5042,7 +5008,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5058,7 +5024,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5081,7 +5047,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5094,7 +5060,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5112,7 +5078,7 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5127,7 +5093,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5150,7 +5116,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5166,7 +5132,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5186,7 +5152,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5203,7 +5169,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5220,7 +5186,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5238,7 +5204,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -5253,7 +5219,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5268,7 +5234,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-support", "frame-system", @@ -5285,7 +5251,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5304,7 +5270,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-support", "frame-system", @@ -5321,7 +5287,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5344,7 +5310,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5360,7 +5326,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5375,7 +5341,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5390,7 +5356,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5406,7 +5372,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-support", "frame-system", @@ -5427,7 +5393,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5443,7 +5409,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-support", "frame-system", @@ -5457,7 +5423,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5480,7 +5446,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5491,7 +5457,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "log", "sp-arithmetic", @@ -5500,7 +5466,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-support", "frame-system", @@ -5514,7 +5480,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5532,7 +5498,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5551,7 +5517,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-support", "frame-system", @@ -5567,7 +5533,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5582,7 +5548,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5593,7 +5559,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5610,7 +5576,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5626,7 +5592,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-benchmarking", "frame-support", @@ -5923,33 +5889,13 @@ dependencies = [ "indexmap", ] -[[package]] -name = "pin-project" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9615c18d31137579e9ff063499264ddc1278e7b1982757ebc111028c4d1dc909" -dependencies = [ - "pin-project-internal 0.4.29", -] - [[package]] name = "pin-project" version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" dependencies = [ - "pin-project-internal 1.0.10", -] - -[[package]] -name = "pin-project-internal" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "044964427019eed9d49d9d5bbce6047ef18f37100ea400912a9fa4a3523ab12a" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "pin-project-internal", ] [[package]] @@ -6583,7 +6529,7 @@ dependencies = [ "futures-timer", "hex-literal", "parity-scale-codec", - "pin-project 1.0.10", + "pin-project", "polkadot-core-primitives", "polkadot-node-subsystem-util", "polkadot-parachain", @@ -6802,7 +6748,7 @@ dependencies = [ "parity-scale-codec", "parity-util-mem", "parking_lot 0.11.2", - "pin-project 1.0.10", + "pin-project", "polkadot-node-jaeger", "polkadot-node-metrics", "polkadot-node-network-protocol", @@ -7720,16 +7666,6 @@ dependencies = [ "regex", ] -[[package]] -name = "prost" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001" -dependencies = [ - "bytes", - "prost-derive 0.9.0", -] - [[package]] name = "prost" version = "0.10.3" @@ -7737,27 +7673,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc03e116981ff7d8da8e5c220e374587b98d294af7ba7dd7fda761158f00086f" dependencies = [ "bytes", - "prost-derive 0.10.1", -] - -[[package]] -name = "prost-build" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5" -dependencies = [ - "bytes", - "heck 0.3.3", - "itertools", - "lazy_static", - "log", - "multimap", - "petgraph", - "prost 0.9.0", - "prost-types 0.9.0", - "regex", - "tempfile", - "which", + "prost-derive", ] [[package]] @@ -7775,8 +7691,8 @@ dependencies = [ "log", "multimap", "petgraph", - "prost 0.10.3", - "prost-types 0.10.1", + "prost", + "prost-types", "regex", "tempfile", "which", @@ -7790,24 +7706,11 @@ checksum = "00af1e92c33b4813cc79fda3f2dbf56af5169709be0202df730e9ebc3e4cd007" dependencies = [ "asynchronous-codec", "bytes", - "prost 0.10.3", + "prost", "thiserror", "unsigned-varint", ] -[[package]] -name = "prost-derive" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "prost-derive" version = "0.10.1" @@ -7821,16 +7724,6 @@ dependencies = [ "syn", ] -[[package]] -name = "prost-types" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a" -dependencies = [ - "bytes", - "prost 0.9.0", -] - [[package]] name = "prost-types" version = "0.10.1" @@ -7838,7 +7731,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" dependencies = [ "bytes", - "prost 0.10.3", + "prost", ] [[package]] @@ -8156,7 +8049,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "env_logger 0.9.0", "jsonrpsee", @@ -8466,17 +8359,6 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" -[[package]] -name = "rw-stream-sink" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" -dependencies = [ - "futures", - "pin-project 0.4.29", - "static_assertions", -] - [[package]] name = "rw-stream-sink" version = "0.3.0" @@ -8484,7 +8366,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" dependencies = [ "futures", - "pin-project 1.0.10", + "pin-project", "static_assertions", ] @@ -8515,7 +8397,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "log", "sp-core", @@ -8526,7 +8408,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "async-trait", "futures", @@ -8535,8 +8417,8 @@ dependencies = [ "libp2p", "log", "parity-scale-codec", - "prost 0.10.3", - "prost-build 0.10.4", + "prost", + "prost-build", "rand 0.7.3", "sc-client-api", "sc-network", @@ -8553,7 +8435,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "futures", "futures-timer", @@ -8576,7 +8458,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8592,7 +8474,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.0", @@ -8609,7 +8491,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8620,7 +8502,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "chrono", "clap", @@ -8659,7 +8541,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "fnv", "futures", @@ -8687,7 +8569,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "hash-db", "kvdb", @@ -8712,7 +8594,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "async-trait", "futures", @@ -8736,7 +8618,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "async-trait", "fork-tree", @@ -8779,7 +8661,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "futures", "jsonrpsee", @@ -8801,7 +8683,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8814,7 +8696,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "async-trait", "futures", @@ -8839,7 +8721,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "sc-client-api", "sp-authorship", @@ -8850,7 +8732,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "lazy_static", "lru 0.7.7", @@ -8877,7 +8759,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "environmental", "parity-scale-codec", @@ -8894,7 +8776,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "log", "parity-scale-codec", @@ -8909,7 +8791,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "cfg-if 1.0.0", "libc", @@ -8929,7 +8811,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "ahash", "async-trait", @@ -8949,6 +8831,7 @@ dependencies = [ "sc-consensus", "sc-keystore", "sc-network", + "sc-network-common", "sc-network-gossip", "sc-telemetry", "sc-utils", @@ -8969,7 +8852,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "finality-grandpa", "futures", @@ -8990,7 +8873,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "ansi_term", "futures", @@ -9007,7 +8890,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "async-trait", "hex", @@ -9022,7 +8905,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "async-trait", "asynchronous-codec", @@ -9043,16 +8926,14 @@ dependencies = [ "lru 0.7.7", "parity-scale-codec", "parking_lot 0.12.0", - "pin-project 1.0.10", - "prost 0.10.3", - "prost-build 0.10.4", + "pin-project", + "prost", + "prost-build", "rand 0.7.3", "sc-block-builder", "sc-client-api", "sc-consensus", "sc-network-common", - "sc-network-light", - "sc-network-sync", "sc-peerset", "sc-utils", "serde", @@ -9062,7 +8943,6 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", - "sp-finality-grandpa", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", @@ -9074,20 +8954,25 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ + "bitflags", "futures", "libp2p", "parity-scale-codec", - "prost-build 0.10.4", + "prost-build", + "sc-consensus", "sc-peerset", "smallvec", + "sp-consensus", + "sp-finality-grandpa", + "sp-runtime", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "ahash", "futures", @@ -9104,14 +8989,14 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "futures", "libp2p", "log", "parity-scale-codec", - "prost 0.10.3", - "prost-build 0.10.4", + "prost", + "prost-build", "sc-client-api", "sc-network-common", "sc-peerset", @@ -9124,18 +9009,16 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ - "bitflags", - "either", "fork-tree", "futures", "libp2p", "log", "lru 0.7.7", "parity-scale-codec", - "prost 0.10.3", - "prost-build 0.10.4", + "prost", + "prost-build", "sc-client-api", "sc-consensus", "sc-network-common", @@ -9153,7 +9036,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "bytes", "fnv", @@ -9181,7 +9064,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "futures", "libp2p", @@ -9194,7 +9077,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9203,7 +9086,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "futures", "hash-db", @@ -9233,7 +9116,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "futures", "jsonrpsee", @@ -9256,7 +9139,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "futures", "jsonrpsee", @@ -9269,7 +9152,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "async-trait", "directories", @@ -9282,7 +9165,7 @@ dependencies = [ "parity-scale-codec", "parity-util-mem", "parking_lot 0.12.0", - "pin-project 1.0.10", + "pin-project", "rand 0.7.3", "sc-block-builder", "sc-chain-spec", @@ -9294,6 +9177,8 @@ dependencies = [ "sc-keystore", "sc-network", "sc-network-common", + "sc-network-light", + "sc-network-sync", "sc-offchain", "sc-rpc", "sc-rpc-server", @@ -9334,7 +9219,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "log", "parity-scale-codec", @@ -9348,7 +9233,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9367,7 +9252,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "futures", "libc", @@ -9386,14 +9271,14 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "chrono", "futures", "libp2p", "log", "parking_lot 0.12.0", - "pin-project 1.0.10", + "pin-project", "rand 0.7.3", "serde", "serde_json", @@ -9404,7 +9289,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "ansi_term", "atty", @@ -9435,7 +9320,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9446,7 +9331,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "futures", "futures-timer", @@ -9473,7 +9358,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "futures", "log", @@ -9486,7 +9371,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "futures", "futures-timer", @@ -9959,7 +9844,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "hash-db", "log", @@ -9976,7 +9861,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "blake2", "proc-macro-crate", @@ -9988,7 +9873,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "parity-scale-codec", "scale-info", @@ -10001,7 +9886,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "integer-sqrt", "num-traits", @@ -10016,7 +9901,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "parity-scale-codec", "scale-info", @@ -10029,7 +9914,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "async-trait", "parity-scale-codec", @@ -10041,7 +9926,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "parity-scale-codec", "sp-api", @@ -10053,7 +9938,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "futures", "log", @@ -10071,7 +9956,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "async-trait", "futures", @@ -10090,7 +9975,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "async-trait", "merlin", @@ -10113,7 +9998,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "parity-scale-codec", "scale-info", @@ -10127,7 +10012,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "parity-scale-codec", "scale-info", @@ -10140,7 +10025,7 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "base58", "bitflags", @@ -10186,7 +10071,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "blake2", "byteorder", @@ -10200,7 +10085,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "proc-macro2", "quote", @@ -10211,7 +10096,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "kvdb", "parking_lot 0.12.0", @@ -10220,7 +10105,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "proc-macro2", "quote", @@ -10230,7 +10115,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "environmental", "parity-scale-codec", @@ -10241,7 +10126,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "finality-grandpa", "log", @@ -10259,7 +10144,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10273,7 +10158,7 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "futures", "hash-db", @@ -10298,7 +10183,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "lazy_static", "sp-core", @@ -10309,7 +10194,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "async-trait", "futures", @@ -10326,7 +10211,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "thiserror", "zstd", @@ -10335,7 +10220,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "log", "parity-scale-codec", @@ -10350,7 +10235,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "parity-scale-codec", "scale-info", @@ -10364,7 +10249,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "sp-api", "sp-core", @@ -10374,7 +10259,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "backtrace", "lazy_static", @@ -10384,7 +10269,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "rustc-hash", "serde", @@ -10394,7 +10279,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "either", "hash256-std-hasher", @@ -10416,7 +10301,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10433,7 +10318,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "Inflector", "proc-macro-crate", @@ -10445,7 +10330,7 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "log", "parity-scale-codec", @@ -10459,7 +10344,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "serde", "serde_json", @@ -10468,7 +10353,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "parity-scale-codec", "scale-info", @@ -10482,7 +10367,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "parity-scale-codec", "scale-info", @@ -10493,7 +10378,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "hash-db", "log", @@ -10515,12 +10400,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10533,7 +10418,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "log", "sp-core", @@ -10546,7 +10431,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "async-trait", "futures-timer", @@ -10562,7 +10447,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "parity-scale-codec", "sp-std", @@ -10574,7 +10459,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "sp-api", "sp-runtime", @@ -10583,7 +10468,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "async-trait", "log", @@ -10599,7 +10484,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "hash-db", "memory-db", @@ -10615,7 +10500,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10632,7 +10517,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10643,7 +10528,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "impl-trait-for-tuples", "log", @@ -10835,7 +10720,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "platforms", ] @@ -10843,7 +10728,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -10864,7 +10749,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "futures-util", "hyper", @@ -10877,7 +10762,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "jsonrpsee", "log", @@ -10898,7 +10783,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "async-trait", "futures", @@ -10924,7 +10809,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "futures", "substrate-test-utils-derive", @@ -10934,7 +10819,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10945,7 +10830,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "ansi_term", "build-helper", @@ -11497,7 +11382,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" dependencies = [ - "pin-project 1.0.10", + "pin-project", "tracing", ] @@ -11661,7 +11546,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ee3eb8f2448cc1bb978c5d1564febd351c128bb0" +source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" dependencies = [ "clap", "jsonrpsee", @@ -11730,9 +11615,9 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "digest 0.10.3", - "rand 0.7.3", + "rand 0.8.5", "static_assertions", ] diff --git a/runtime/kusama/Cargo.toml b/runtime/kusama/Cargo.toml index 7ff0058d51dc..8f417a9a4f96 100644 --- a/runtime/kusama/Cargo.toml +++ b/runtime/kusama/Cargo.toml @@ -253,6 +253,7 @@ try-runtime = [ "pallet-indices/try-runtime", "pallet-membership/try-runtime", "pallet-multisig/try-runtime", + "pallet-nomination-pools/try-runtime", "pallet-offences/try-runtime", "pallet-preimage/try-runtime", "pallet-proxy/try-runtime", diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 28bfe304165a..6a8623d87a3d 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -72,7 +72,7 @@ use sp_runtime::{ OpaqueKeys, SaturatedConversion, Verify, }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, KeyTypeId, Perbill, Percent, Permill, + ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill, }; use sp_staking::SessionIndex; #[cfg(any(feature = "std", test))] @@ -1439,13 +1439,15 @@ impl sp_runtime::traits::Convert for U256ToBalance { parameter_types! { pub const PoolsPalletId: PalletId = PalletId(*b"py/nopls"); - pub const MinPointsToBalance: u32 = 10; + pub const MaxPointsToBalance: u8 = 10; } impl pallet_nomination_pools::Config for Runtime { type Event = Event; type WeightInfo = weights::pallet_nomination_pools::WeightInfo; type Currency = Balances; + type CurrencyBalance = Balance; + type RewardCounter = FixedU128; type BalanceToU256 = BalanceToU256; type U256ToBalance = U256ToBalance; type StakingInterface = Staking; @@ -1454,7 +1456,7 @@ impl pallet_nomination_pools::Config for Runtime { // we use the same number of allowed unlocking chunks as with staking. type MaxUnbonding = ::MaxUnlockingChunks; type PalletId = PoolsPalletId; - type MinPointsToBalance = MinPointsToBalance; + type MaxPointsToBalance = MaxPointsToBalance; } construct_runtime! { @@ -1600,7 +1602,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - (), + pallet_nomination_pools::migration::v2::MigrateToV2, >; /// The payload being signed in the transactions. pub type SignedPayload = generic::SignedPayload; diff --git a/runtime/westend/Cargo.toml b/runtime/westend/Cargo.toml index ae573d975d16..bf1e97636124 100644 --- a/runtime/westend/Cargo.toml +++ b/runtime/westend/Cargo.toml @@ -237,6 +237,7 @@ try-runtime = [ "pallet-indices/try-runtime", "pallet-membership/try-runtime", "pallet-multisig/try-runtime", + "pallet-nomination-pools/try-runtime", "pallet-offences/try-runtime", "pallet-preimage/try-runtime", "pallet-proxy/try-runtime", diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 25697c65a916..642c4e75353c 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -67,7 +67,7 @@ use sp_runtime::{ OpaqueKeys, SaturatedConversion, Verify, }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, KeyTypeId, Perbill, + ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, }; use sp_staking::SessionIndex; use sp_std::{collections::btree_map::BTreeMap, prelude::*}; @@ -1030,13 +1030,15 @@ impl sp_runtime::traits::Convert for U256ToBalance { parameter_types! { pub const PoolsPalletId: PalletId = PalletId(*b"py/nopls"); - pub const MinPointsToBalance: u32 = 10; + pub const MaxPointsToBalance: u8 = 10; } impl pallet_nomination_pools::Config for Runtime { type Event = Event; type WeightInfo = weights::pallet_nomination_pools::WeightInfo; type Currency = Balances; + type CurrencyBalance = Balance; + type RewardCounter = FixedU128; type BalanceToU256 = BalanceToU256; type U256ToBalance = U256ToBalance; type StakingInterface = Staking; @@ -1045,7 +1047,7 @@ impl pallet_nomination_pools::Config for Runtime { // we use the same number of allowed unlocking chunks as with staking. type MaxUnbonding = ::MaxUnlockingChunks; type PalletId = PoolsPalletId; - type MinPointsToBalance = MinPointsToBalance; + type MaxPointsToBalance = MaxPointsToBalance; } construct_runtime! { @@ -1171,7 +1173,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - (), + pallet_nomination_pools::migration::v2::MigrateToV2, >; /// The payload being signed in transactions. pub type SignedPayload = generic::SignedPayload; From e76cd144f9dad8c1304fd1476f92495bbb9ad22e Mon Sep 17 00:00:00 2001 From: Chevdor Date: Thu, 14 Jul 2022 16:16:07 +0200 Subject: [PATCH 05/15] Fix Core Version display in the release notes (#5781) --- scripts/ci/changelog/templates/runtime.md.tera | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/changelog/templates/runtime.md.tera b/scripts/ci/changelog/templates/runtime.md.tera index 1610e6e3e3f6..cd7edf28f7a3 100644 --- a/scripts/ci/changelog/templates/runtime.md.tera +++ b/scripts/ci/changelog/templates/runtime.md.tera @@ -17,7 +17,7 @@ ``` 🏋️ Runtime Size: {{ runtime.data.runtimes.compressed.subwasm.size | filesizeformat }} ({{ runtime.data.runtimes.compressed.subwasm.size }} bytes) -🔥 Core Version: {{ runtime.data.runtimes.compressed.subwasm.core_version }} +🔥 Core Version: {{ runtime.data.runtimes.compressed.subwasm.core_version.specName }}-{{ runtime.data.runtimes.compressed.subwasm.core_version.specVersion }} ({{ runtime.data.runtimes.compressed.subwasm.core_version.implName }}-{{ runtime.data.runtimes.compressed.subwasm.core_version.implVersion }}.tx{{ runtime.data.runtimes.compressed.subwasm.core_version.transactionVersion }}.au{{ runtime.data.runtimes.compressed.subwasm.core_version.authoringVersion }}) 🗜 Compressed: {{ compressed }}: {{ comp_ratio | round(method="ceil", precision=2) }}% 🎁 Metadata version: V{{ runtime.data.runtimes.compressed.subwasm.metadata_version }} 🗳️ system.setCode hash: {{ runtime.data.runtimes.compressed.subwasm.proposal_hash }} From bf54653f93025c61680b28dac41e251b50c6fded Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Mon, 18 Jul 2022 03:22:43 +0800 Subject: [PATCH 06/15] Fix Typo (#5766) --- runtime/common/src/auctions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/common/src/auctions.rs b/runtime/common/src/auctions.rs index 0eaabe2e6d6b..71f9c2182d92 100644 --- a/runtime/common/src/auctions.rs +++ b/runtime/common/src/auctions.rs @@ -209,7 +209,7 @@ pub mod pallet { } #[pallet::constant_name(LeasePeriodsPerSlot)] - fn pease_periods_per_slot() -> u32 { + fn lease_periods_per_slot() -> u32 { SlotRange::LEASE_PERIODS_PER_SLOT as u32 } } From eed45cfe22d5d1d66d0d149f4a0656f90976ad8b Mon Sep 17 00:00:00 2001 From: Andrei Sandu <54316454+sandreim@users.noreply.github.com> Date: Mon, 18 Jul 2022 13:55:38 +0300 Subject: [PATCH 07/15] Zombienet: paritydb test (#5310) * Add test Signed-off-by: Andrei Sandu * gitlab integration Signed-off-by: Andrei Sandu * tune test Signed-off-by: Andrei Sandu * Try waiting for nodes to be up before checks Signed-off-by: Andrei Sandu * Use js check for paritydb folder Signed-off-by: Andrei Sandu * artifacts true Signed-off-by: Andrei Sandu * change error message Signed-off-by: Andrei Sandu * debug Signed-off-by: Andrei Sandu * try again Signed-off-by: Andrei Sandu * use log line contains for test * bump zombienet verision for test * Is approval checking lag 0 on rocksdb ? Signed-off-by: Andrei Sandu * Is approval checking lag 1 with paritydb ? Signed-off-by: Andrei Sandu * update zombienet test for parityDb * Update zombienet_tests/misc/0001-check_paritydb.sh Co-authored-by: Chevdor Co-authored-by: Javier Viola Co-authored-by: Chevdor --- .gitlab-ci.yml | 28 +++++++ zombienet_tests/misc/0001-check_paritydb.sh | 1 + zombienet_tests/misc/0001-paritydb.feature | 91 +++++++++++++++++++++ zombienet_tests/misc/0001-paritydb.toml | 40 +++++++++ 4 files changed, 160 insertions(+) create mode 100644 zombienet_tests/misc/0001-check_paritydb.sh create mode 100644 zombienet_tests/misc/0001-paritydb.feature create mode 100644 zombienet_tests/misc/0001-paritydb.toml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5bbba30f4ec6..a46f3b5915e8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -755,6 +755,34 @@ zombienet-test-parachains-upgrade-smoke-test: tags: - zombienet-polkadot-integration-test +zombienet-tests-misc-paritydb: + stage: stage3 + <<: *kubernetes-env + <<: *zombienet-refs + image: "docker.io/paritytech/zombienet:v1.2.49" + needs: + - job: publish-polkadot-debug-image + - job: publish-test-collators-image + artifacts: true + variables: + GH_DIR: "https://github.com/paritytech/polkadot/tree/${CI_COMMIT_SHORT_SHA}/zombienet_tests/misc" + before_script: + - echo "Zombie-net Tests Config" + - echo "${ZOMBIENET_IMAGE_NAME}" + - echo "${PARACHAINS_IMAGE_NAME} ${PARACHAINS_IMAGE_TAG}" + - echo "${GH_DIR}" + - export DEBUG=zombie,zombie::network-node + - export ZOMBIENET_INTEGRATION_TEST_IMAGE=${PARACHAINS_IMAGE_NAME}:${PARACHAINS_IMAGE_TAG} + - export COL_IMAGE=${COLLATOR_IMAGE_NAME}:${COLLATOR_IMAGE_TAG} + script: + - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh + --github-remote-dir="${GH_DIR}" + --test="0001-paritydb.feature" + allow_failure: false + retry: 2 + tags: + - zombienet-polkadot-integration-test + zombienet-tests-malus-dispute-valid: stage: stage3 image: "${ZOMBIENET_IMAGE}" diff --git a/zombienet_tests/misc/0001-check_paritydb.sh b/zombienet_tests/misc/0001-check_paritydb.sh new file mode 100644 index 000000000000..127efe592dbd --- /dev/null +++ b/zombienet_tests/misc/0001-check_paritydb.sh @@ -0,0 +1 @@ +ls /data/chains/rococo_local_testnet/paritydb/full 2>/dev/null diff --git a/zombienet_tests/misc/0001-paritydb.feature b/zombienet_tests/misc/0001-paritydb.feature new file mode 100644 index 000000000000..2ed448321f78 --- /dev/null +++ b/zombienet_tests/misc/0001-paritydb.feature @@ -0,0 +1,91 @@ +Description: Check that paritydb works without affecting finality lag and block production. +Network: ./0001-paritydb.toml +Creds: config + +validator-0: is up +validator-1: is up +validator-2: is up +validator-3: is up +validator-4: is up +validator-5: is up +validator-6: is up +validator-7: is up +validator-8: is up +validator-9: is up + +# Check if we are using ParityDB. +validator: log line contains "Database: ParityDb" +validator: run ./0001-check_paritydb.sh within 60 seconds + +# Check authority status and peers. +validator-0: reports node_roles is 4 +validator-1: reports node_roles is 4 +validator-2: reports node_roles is 4 +validator-3: reports node_roles is 4 +validator-4: reports node_roles is 4 +validator-5: reports node_roles is 4 +validator-6: reports node_roles is 4 +validator-7: reports node_roles is 4 +validator-8: reports node_roles is 4 +validator-9: reports node_roles is 4 + +# Ensure parachains are registered. +validator-0: parachain 2000 is registered +validator-0: parachain 2001 is registered +validator-0: parachain 2002 is registered +validator-0: parachain 2003 is registered +validator-0: parachain 2004 is registered +validator-0: parachain 2005 is registered +validator-0: parachain 2006 is registered +validator-0: parachain 2007 is registered +validator-0: parachain 2008 is registered +validator-0: parachain 2009 is registered + +# Check if network is fully connected. +validator-0: reports peers count is at least 19 within 20 seconds +validator-1: reports peers count is at least 19 within 20 seconds +validator-2: reports peers count is at least 19 within 20 seconds +validator-3: reports peers count is at least 19 within 20 seconds +validator-4: reports peers count is at least 19 within 20 seconds +validator-5: reports peers count is at least 19 within 20 seconds +validator-6: reports peers count is at least 19 within 20 seconds +validator-7: reports peers count is at least 19 within 20 seconds +validator-8: reports peers count is at least 19 within 20 seconds +validator-9: reports peers count is at least 19 within 20 seconds + +# Ensure parachains made some progress. +validator-0: parachain 2000 block height is at least 3 within 30 seconds +validator-0: parachain 2001 block height is at least 3 within 30 seconds +validator-0: parachain 2002 block height is at least 3 within 30 seconds +validator-0: parachain 2003 block height is at least 3 within 30 seconds +validator-0: parachain 2004 block height is at least 3 within 30 seconds +validator-0: parachain 2005 block height is at least 3 within 30 seconds +validator-0: parachain 2006 block height is at least 3 within 30 seconds +validator-0: parachain 2007 block height is at least 3 within 30 seconds +validator-0: parachain 2008 block height is at least 3 within 30 seconds +validator-0: parachain 2009 block height is at least 3 within 30 seconds + +# Check lag - approval +validator-0: reports polkadot_parachain_approval_checking_finality_lag is 0 +validator-1: reports polkadot_parachain_approval_checking_finality_lag is 0 +validator-2: reports polkadot_parachain_approval_checking_finality_lag is 0 +validator-3: reports polkadot_parachain_approval_checking_finality_lag is 0 +validator-4: reports polkadot_parachain_approval_checking_finality_lag is 0 +validator-5: reports polkadot_parachain_approval_checking_finality_lag is 0 +validator-6: reports polkadot_parachain_approval_checking_finality_lag is 0 +validator-7: reports polkadot_parachain_approval_checking_finality_lag is 0 +validator-8: reports polkadot_parachain_approval_checking_finality_lag is 0 +validator-9: reports polkadot_parachain_approval_checking_finality_lag is 0 + +# Check lag - dispute conclusion +validator-0: reports parachain_candidate_disputes_total is 0 +validator-1: reports parachain_candidate_disputes_total is 0 +validator-2: reports parachain_candidate_disputes_total is 0 +validator-3: reports parachain_candidate_disputes_total is 0 +validator-4: reports parachain_candidate_disputes_total is 0 +validator-5: reports parachain_candidate_disputes_total is 0 +validator-6: reports parachain_candidate_disputes_total is 0 +validator-7: reports parachain_candidate_disputes_total is 0 +validator-8: reports parachain_candidate_disputes_total is 0 +validator-9: reports parachain_candidate_disputes_total is 0 + diff --git a/zombienet_tests/misc/0001-paritydb.toml b/zombienet_tests/misc/0001-paritydb.toml new file mode 100644 index 000000000000..c40e0969d084 --- /dev/null +++ b/zombienet_tests/misc/0001-paritydb.toml @@ -0,0 +1,40 @@ +[settings] +timeout = 1000 +bootnode = true + +[relaychain.genesis.runtime.runtime_genesis_config.configuration.config] + max_validators_per_core = 1 + needed_approvals = 3 + +[relaychain] +default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}" +chain = "rococo-local" +chain_spec_command = "polkadot build-spec --chain rococo-local" +default_command = "polkadot" + +[relaychain.default_resources] +limits = { memory = "4G", cpu = "2" } +requests = { memory = "2G", cpu = "1" } + + [[relaychain.node_groups]] + name = "validator" + count = 10 + args = ["-lparachain=debug", "--db=paritydb"] + +{% for id in range(2000,2010) %} +[[parachains]] +id = {{id}} +addToGenesis = true +genesis_state_generator = "undying-collator export-genesis-state --pov-size={{10000*(id-1999)}} --pvf-complexity={{id - 1999}}" + [parachains.collator] + name = "collator" + image = "{{COL_IMAGE}}" + command = "undying-collator" + args = ["-lparachain=debug", "--pov-size={{10000*(id-1999)}}", "--parachain-id={{id}}", "--pvf-complexity={{id - 1999}}"] + +{% endfor %} + +[types.Header] +number = "u64" +parent_hash = "Hash" +post_state = "Hash" From f75ed5ee52ad19dc3150cd3ed84c424d857c5578 Mon Sep 17 00:00:00 2001 From: Chevdor Date: Tue, 19 Jul 2022 09:32:56 +0200 Subject: [PATCH 08/15] `staking-miner`: Add handling of `SIGTERM`, `SIGKILL`, `SIGQUIT` and `SIGINT` (#5780) * Add handling of SIGTERM, SIGINT and SIGQUIT Fix #5649 * Fix signals and log levels * Add missing imports * Add sig count to the logs --- Cargo.lock | 35 +++++++++++++++++----- utils/staking-miner/Cargo.toml | 8 ++++-- utils/staking-miner/src/main.rs | 51 +++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 26cecc02e7a1..25475aec90a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -278,9 +278,9 @@ dependencies = [ [[package]] name = "async-std" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52580991739c5cdb36cde8b2a516371c0a3b70dda36d916cc08b82372916808c" +checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ "async-attributes", "async-channel", @@ -297,7 +297,6 @@ dependencies = [ "kv-log-macro", "log", "memchr", - "num_cpus", "once_cell", "pin-project-lite 0.2.7", "pin-utils", @@ -1155,9 +1154,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.1" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +checksum = "4c02a4d71819009c192cf4872265391563fd6a84c81ff2c0f2a7026ca4c1d85c" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -1732,6 +1731,12 @@ dependencies = [ "futures", ] +[[package]] +name = "exitcode" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de853764b47027c2e862a995c34978ffa63c1501f2e15f987ba11bd4f9bba193" + [[package]] name = "expander" version = "0.0.4" @@ -9715,9 +9720,9 @@ checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" [[package]] name = "signal-hook" -version = "0.3.10" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c98891d737e271a2954825ef19e46bd16bdb98e2746f2eec4f7a4ef7946efd1" +checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" dependencies = [ "libc", "signal-hook-registry", @@ -9732,6 +9737,18 @@ dependencies = [ "libc", ] +[[package]] +name = "signal-hook-tokio" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213241f76fb1e37e27de3b6aa1b068a2c333233b59cca6634f634b80a27ecf1e" +dependencies = [ + "futures-core", + "libc", + "signal-hook", + "tokio", +] + [[package]] name = "signature" version = "1.4.0" @@ -10571,9 +10588,11 @@ version = "0.9.26" dependencies = [ "assert_cmd", "clap", + "exitcode", "frame-election-provider-support", "frame-support", "frame-system", + "futures-util", "jsonrpsee", "kusama-runtime", "log", @@ -10590,6 +10609,8 @@ dependencies = [ "sc-transaction-pool-api", "serde", "serde_json", + "signal-hook", + "signal-hook-tokio", "sp-core", "sp-io", "sp-npos-elections", diff --git a/utils/staking-miner/Cargo.toml b/utils/staking-miner/Cargo.toml index 424a0c9c38d1..5b6cb42495fc 100644 --- a/utils/staking-miner/Cargo.toml +++ b/utils/staking-miner/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0" } clap = { version = "3.1", features = ["derive", "env"] } -tracing-subscriber = { version = "0.3.11", features = ["env-filter"] } +tracing-subscriber = { version = "0.3.11", features = ["env-filter"] } jsonrpsee = { version = "0.14.0", features = ["ws-client", "macros"] } log = "0.4.17" paste = "1.0.7" @@ -15,9 +15,8 @@ serde = "1.0.137" serde_json = "1.0" thiserror = "1.0.31" tokio = { version = "1.18.2", features = ["macros", "rt-multi-thread", "sync"] } - remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master" } - +signal-hook-tokio = { version = "0.3", features = ["futures-v0_3"] } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-version = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -39,8 +38,11 @@ runtime-common = { package = "polkadot-runtime-common", path = "../../runtime/co polkadot-runtime = { path = "../../runtime/polkadot" } kusama-runtime = { path = "../../runtime/kusama" } westend-runtime = { path = "../../runtime/westend" } +exitcode = "1.1" sub-tokens = { git = "https://github.com/paritytech/substrate-debug-kit", branch = "master" } +signal-hook = "0.3" +futures-util = "0.3" [dev-dependencies] assert_cmd = "2.0.4" diff --git a/utils/staking-miner/src/main.rs b/utils/staking-miner/src/main.rs index fc7c018ba72d..971e771e0073 100644 --- a/utils/staking-miner/src/main.rs +++ b/utils/staking-miner/src/main.rs @@ -48,14 +48,18 @@ use crate::opts::*; use clap::Parser; use frame_election_provider_support::NposSolver; use frame_support::traits::Get; +use futures_util::StreamExt; use jsonrpsee::ws_client::{WsClient, WsClientBuilder}; use remote_externalities::{Builder, Mode, OnlineConfig}; use rpc::{RpcApiClient, SharedRpcClient}; use runtime_versions::RuntimeVersions; +use signal_hook::consts::signal::*; +use signal_hook_tokio::Signals; use sp_npos_elections::BalancingConfig; use sp_runtime::{traits::Block as BlockT, DeserializeOwned}; use std::{ops::Deref, sync::Arc}; use tracing_subscriber::{fmt, EnvFilter}; + pub(crate) enum AnyRuntime { Polkadot, Kusama, @@ -437,6 +441,46 @@ pub(crate) async fn check_versions( } } +/// Control how we exit the application +fn controlled_exit(code: i32) { + log::info!(target: LOG_TARGET, "Exiting application"); + std::process::exit(code); +} + +/// Handles the various signal and exit the application +/// when appropriate. +async fn handle_signals(mut signals: Signals) { + let mut keyboard_sig_count: u8 = 0; + while let Some(signal) = signals.next().await { + match signal { + // Interrupts come from the keyboard + SIGQUIT | SIGINT => { + if keyboard_sig_count >= 1 { + log::info!( + target: LOG_TARGET, + "Received keyboard termination signal #{}/{}, quitting...", + keyboard_sig_count + 1, + 2 + ); + controlled_exit(exitcode::OK); + } + keyboard_sig_count += 1; + log::warn!( + target: LOG_TARGET, + "Received keyboard termination signal #{}, if you keep doing that I will really quit", + keyboard_sig_count + ); + }, + + SIGKILL | SIGTERM => { + log::info!(target: LOG_TARGET, "Received SIGKILL | SIGTERM, quitting..."); + controlled_exit(exitcode::OK); + }, + _ => unreachable!(), + } + } +} + #[tokio::main] async fn main() { fmt().with_env_filter(EnvFilter::from_default_env()).init(); @@ -444,6 +488,10 @@ async fn main() { let Opt { uri, command } = Opt::parse(); log::debug!(target: LOG_TARGET, "attempting to connect to {:?}", uri); + let signals = Signals::new(&[SIGTERM, SIGINT, SIGQUIT]).expect("Failed initializing Signals"); + let handle = signals.handle(); + let signals_task = tokio::spawn(handle_signals(signals)); + let rpc = loop { match SharedRpcClient::new(&uri).await { Ok(client) => break client, @@ -555,6 +603,9 @@ async fn main() { } }; log::info!(target: LOG_TARGET, "round of execution finished. outcome = {:?}", outcome); + + handle.close(); + let _ = signals_task.await; } #[cfg(test)] From 9c64ccdf88921926a07225c50697179a99d7903d Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Tue, 19 Jul 2022 14:11:38 +0200 Subject: [PATCH 09/15] Co #11456: Expose `benchmark extrinsic` command (#5620) * Expose 'benchmark extrinsic' command Signed-off-by: Oliver Tale-Yazdi * Add test Signed-off-by: Oliver Tale-Yazdi * Fix tests Signed-off-by: Oliver Tale-Yazdi * Fix tests Signed-off-by: Oliver Tale-Yazdi * Split benchmarking into own mod Signed-off-by: Oliver Tale-Yazdi * Simplify code Signed-off-by: Oliver Tale-Yazdi * Fixup Signed-off-by: Oliver Tale-Yazdi * Cleanup Signed-off-by: Oliver Tale-Yazdi * Spell Signed-off-by: Oliver Tale-Yazdi * Revert Cargo.lock updates Signed-off-by: Oliver Tale-Yazdi * update lockfile for {"substrate"} * Fix brittle test Signed-off-by: Oliver Tale-Yazdi * Bump spec version to 9270 Signed-off-by: Oliver Tale-Yazdi * Sleep in test to make it work in CI... Signed-off-by: Oliver Tale-Yazdi * Disable failing test Signed-off-by: Oliver Tale-Yazdi * Revert "Bump spec version to 9270" This reverts commit c1c385d7a4dc849e7f4d4723740aec66c2b7be09. * Delete brittle test, see #5788 Signed-off-by: Oliver Tale-Yazdi * Disable failing test Signed-off-by: Oliver Tale-Yazdi * Delete more failing tests... Signed-off-by: Oliver Tale-Yazdi Co-authored-by: parity-processbot <> --- Cargo.lock | 351 +++++++++++++-------------- cli/Cargo.toml | 1 + cli/src/command.rs | 46 +++- node/client/src/benchmarking.rs | 391 ++++++++++++++++++++++++++++++ node/client/src/lib.rs | 303 +---------------------- runtime/rococo/src/lib.rs | 1 + runtime/westend/src/lib.rs | 1 + tests/benchmark_block_works.rs | 95 -------- tests/benchmark_overhead_works.rs | 67 ----- 9 files changed, 616 insertions(+), 640 deletions(-) create mode 100644 node/client/src/benchmarking.rs delete mode 100644 tests/benchmark_block_works.rs delete mode 100644 tests/benchmark_overhead_works.rs diff --git a/Cargo.lock b/Cargo.lock index 25475aec90a6..50e765016390 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -423,7 +423,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "beefy-primitives", "fnv", @@ -457,7 +457,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -477,7 +477,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "beefy-primitives", "sp-api", @@ -486,7 +486,7 @@ dependencies = [ [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "parity-scale-codec", "scale-info", @@ -1958,7 +1958,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "parity-scale-codec", ] @@ -1976,7 +1976,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-support", "frame-system", @@ -1998,7 +1998,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "Inflector", "chrono", @@ -2049,7 +2049,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2060,7 +2060,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2076,7 +2076,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-support", "frame-system", @@ -2104,7 +2104,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "bitflags", "frame-metadata", @@ -2134,7 +2134,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2146,7 +2146,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2158,7 +2158,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "proc-macro2", "quote", @@ -2168,7 +2168,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2191,7 +2191,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-support", "frame-system", @@ -2202,7 +2202,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-support", "log", @@ -2219,7 +2219,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -2234,7 +2234,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "parity-scale-codec", "sp-api", @@ -2243,7 +2243,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-support", "sp-api", @@ -2425,7 +2425,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "chrono", "frame-election-provider-support", @@ -4797,7 +4797,7 @@ checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -4811,7 +4811,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-support", "frame-system", @@ -4827,7 +4827,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-support", "frame-system", @@ -4842,7 +4842,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -4866,7 +4866,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4886,7 +4886,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-election-provider-support", "frame-support", @@ -4905,7 +4905,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -4920,7 +4920,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "beefy-primitives", "frame-support", @@ -4936,7 +4936,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -4959,7 +4959,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -4977,7 +4977,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -4996,7 +4996,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5013,7 +5013,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5029,7 +5029,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5052,7 +5052,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5065,7 +5065,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5083,7 +5083,7 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5098,7 +5098,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5121,7 +5121,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5137,7 +5137,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5157,7 +5157,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5174,7 +5174,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5191,7 +5191,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5209,7 +5209,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -5224,7 +5224,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5239,7 +5239,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-support", "frame-system", @@ -5256,7 +5256,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5275,7 +5275,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-support", "frame-system", @@ -5292,7 +5292,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5315,7 +5315,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5331,7 +5331,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5346,7 +5346,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5361,7 +5361,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5377,7 +5377,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-support", "frame-system", @@ -5398,7 +5398,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5414,7 +5414,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-support", "frame-system", @@ -5428,7 +5428,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5451,7 +5451,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5462,7 +5462,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "log", "sp-arithmetic", @@ -5471,7 +5471,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-support", "frame-system", @@ -5485,7 +5485,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5503,7 +5503,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5522,7 +5522,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-support", "frame-system", @@ -5538,7 +5538,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5553,7 +5553,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5564,7 +5564,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5581,7 +5581,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -5597,7 +5597,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -6083,6 +6083,7 @@ dependencies = [ "sc-sysinfo", "sc-tracing", "sp-core", + "sp-keyring", "sp-trie", "substrate-build-script-utils", "thiserror", @@ -8054,7 +8055,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "env_logger 0.9.0", "jsonrpsee", @@ -8402,7 +8403,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "log", "sp-core", @@ -8413,7 +8414,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "async-trait", "futures", @@ -8440,7 +8441,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "futures", "futures-timer", @@ -8463,7 +8464,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8479,7 +8480,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.0", @@ -8496,7 +8497,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8507,7 +8508,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "chrono", "clap", @@ -8546,7 +8547,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "fnv", "futures", @@ -8574,7 +8575,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "hash-db", "kvdb", @@ -8599,7 +8600,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "async-trait", "futures", @@ -8623,7 +8624,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "async-trait", "fork-tree", @@ -8666,7 +8667,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "futures", "jsonrpsee", @@ -8688,7 +8689,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8701,7 +8702,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "async-trait", "futures", @@ -8726,7 +8727,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "sc-client-api", "sp-authorship", @@ -8737,7 +8738,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "lazy_static", "lru 0.7.7", @@ -8764,7 +8765,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "environmental", "parity-scale-codec", @@ -8781,7 +8782,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "log", "parity-scale-codec", @@ -8796,7 +8797,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "cfg-if 1.0.0", "libc", @@ -8816,7 +8817,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "ahash", "async-trait", @@ -8857,7 +8858,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "finality-grandpa", "futures", @@ -8878,7 +8879,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "ansi_term", "futures", @@ -8895,7 +8896,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "async-trait", "hex", @@ -8910,7 +8911,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "async-trait", "asynchronous-codec", @@ -8959,7 +8960,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "bitflags", "futures", @@ -8977,7 +8978,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "ahash", "futures", @@ -8994,7 +8995,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "futures", "libp2p", @@ -9014,7 +9015,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "fork-tree", "futures", @@ -9041,7 +9042,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "bytes", "fnv", @@ -9069,7 +9070,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "futures", "libp2p", @@ -9082,7 +9083,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9091,7 +9092,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "futures", "hash-db", @@ -9121,7 +9122,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "futures", "jsonrpsee", @@ -9144,7 +9145,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "futures", "jsonrpsee", @@ -9157,7 +9158,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "async-trait", "directories", @@ -9224,7 +9225,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "log", "parity-scale-codec", @@ -9238,7 +9239,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9257,7 +9258,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "futures", "libc", @@ -9276,7 +9277,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "chrono", "futures", @@ -9294,7 +9295,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "ansi_term", "atty", @@ -9325,7 +9326,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9336,7 +9337,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "futures", "futures-timer", @@ -9363,7 +9364,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "futures", "log", @@ -9376,7 +9377,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "futures", "futures-timer", @@ -9861,7 +9862,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "hash-db", "log", @@ -9878,7 +9879,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "blake2", "proc-macro-crate", @@ -9890,7 +9891,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "parity-scale-codec", "scale-info", @@ -9903,7 +9904,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "integer-sqrt", "num-traits", @@ -9918,7 +9919,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "parity-scale-codec", "scale-info", @@ -9931,7 +9932,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "async-trait", "parity-scale-codec", @@ -9943,7 +9944,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "parity-scale-codec", "sp-api", @@ -9955,7 +9956,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "futures", "log", @@ -9973,7 +9974,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "async-trait", "futures", @@ -9992,7 +9993,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "async-trait", "merlin", @@ -10015,7 +10016,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "parity-scale-codec", "scale-info", @@ -10029,7 +10030,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "parity-scale-codec", "scale-info", @@ -10042,7 +10043,7 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "base58", "bitflags", @@ -10088,7 +10089,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "blake2", "byteorder", @@ -10102,7 +10103,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "proc-macro2", "quote", @@ -10113,7 +10114,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "kvdb", "parking_lot 0.12.0", @@ -10122,7 +10123,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "proc-macro2", "quote", @@ -10132,7 +10133,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "environmental", "parity-scale-codec", @@ -10143,7 +10144,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "finality-grandpa", "log", @@ -10161,7 +10162,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10175,7 +10176,7 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "futures", "hash-db", @@ -10200,7 +10201,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "lazy_static", "sp-core", @@ -10211,7 +10212,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "async-trait", "futures", @@ -10228,7 +10229,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "thiserror", "zstd", @@ -10237,7 +10238,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "log", "parity-scale-codec", @@ -10252,7 +10253,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "parity-scale-codec", "scale-info", @@ -10266,7 +10267,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "sp-api", "sp-core", @@ -10276,7 +10277,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "backtrace", "lazy_static", @@ -10286,7 +10287,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "rustc-hash", "serde", @@ -10296,7 +10297,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "either", "hash256-std-hasher", @@ -10318,7 +10319,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10335,7 +10336,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "Inflector", "proc-macro-crate", @@ -10347,7 +10348,7 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "log", "parity-scale-codec", @@ -10361,7 +10362,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "serde", "serde_json", @@ -10370,7 +10371,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "parity-scale-codec", "scale-info", @@ -10384,7 +10385,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "parity-scale-codec", "scale-info", @@ -10395,7 +10396,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "hash-db", "log", @@ -10417,12 +10418,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10435,7 +10436,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "log", "sp-core", @@ -10448,7 +10449,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "async-trait", "futures-timer", @@ -10464,7 +10465,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "parity-scale-codec", "sp-std", @@ -10476,7 +10477,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "sp-api", "sp-runtime", @@ -10485,7 +10486,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "async-trait", "log", @@ -10501,7 +10502,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "hash-db", "memory-db", @@ -10517,7 +10518,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10534,7 +10535,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10545,7 +10546,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "impl-trait-for-tuples", "log", @@ -10741,7 +10742,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "platforms", ] @@ -10749,7 +10750,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -10770,7 +10771,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "futures-util", "hyper", @@ -10783,7 +10784,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "jsonrpsee", "log", @@ -10804,7 +10805,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "async-trait", "futures", @@ -10830,7 +10831,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "futures", "substrate-test-utils-derive", @@ -10840,7 +10841,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10851,7 +10852,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "ansi_term", "build-helper", @@ -11389,11 +11390,11 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.26" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" +checksum = "7b7358be39f2f274f322d2aaed611acc57f382e8eb1e5b48cb9ae30933495ce7" dependencies = [ - "lazy_static", + "once_cell", "valuable", ] @@ -11435,10 +11436,8 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" dependencies = [ - "ahash", "lazy_static", "log", - "lru 0.7.7", "tracing-core", ] @@ -11567,7 +11566,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#367dab0d4bd7fd7b6c222dd15c753169c057dd42" +source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" dependencies = [ "clap", "jsonrpsee", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 24df95126f23..68c297f7eeda 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -26,6 +26,7 @@ polkadot-node-core-pvf = { path = "../node/core/pvf", optional = true } polkadot-performance-test = { path = "../node/test/performance-test", optional = true } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } diff --git a/cli/src/command.rs b/cli/src/command.rs index 19c046e7c2e2..dfa4c05c2147 100644 --- a/cli/src/command.rs +++ b/cli/src/command.rs @@ -15,12 +15,16 @@ // along with Polkadot. If not, see . use crate::cli::{Cli, Subcommand}; -use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; +use frame_benchmarking_cli::{BenchmarkCmd, ExtrinsicFactory, SUBSTRATE_REFERENCE_HARDWARE}; use futures::future::TryFutureExt; use log::info; +use polkadot_client::benchmarking::{ + benchmark_inherent_data, ExistentialDepositProvider, RemarkBuilder, TransferKeepAliveBuilder, +}; use sc_cli::{Role, RuntimeVersion, SubstrateCli}; use service::{self, HeaderBackend, IdentifyVariant}; use sp_core::crypto::Ss58AddressFormatRegistry; +use sp_keyring::Sr25519Keyring; use std::net::ToSocketAddrs; pub use crate::{error::Error, service::BlockId}; @@ -508,22 +512,42 @@ pub fn run() -> Result<()> { unwrap_client!(client, cmd.run(client.clone()).map_err(Error::SubstrateCli)) }), - BenchmarkCmd::Overhead(cmd) => { + // These commands are very similar and can be handled in nearly the same way. + BenchmarkCmd::Extrinsic(_) | BenchmarkCmd::Overhead(_) => { ensure_dev(chain_spec).map_err(Error::Other)?; runner.sync_run(|mut config| { - use polkadot_client::benchmark_inherent_data; let (client, _, _, _) = service::new_chain_ops(&mut config, None)?; - let wrapped = client.clone(); - let header = client.header(BlockId::Number(0_u32.into())).unwrap().unwrap(); let inherent_data = benchmark_inherent_data(header) .map_err(|e| format!("generating inherent data: {:?}", e))?; - - unwrap_client!( - client, - cmd.run(config, client.clone(), inherent_data, wrapped) - .map_err(Error::SubstrateCli) - ) + let remark_builder = RemarkBuilder::new(client.clone()); + + match cmd { + BenchmarkCmd::Extrinsic(cmd) => { + let tka_builder = TransferKeepAliveBuilder::new( + client.clone(), + Sr25519Keyring::Alice.to_account_id(), + client.existential_deposit(), + ); + + let ext_factory = ExtrinsicFactory(vec![ + Box::new(remark_builder), + Box::new(tka_builder), + ]); + + unwrap_client!( + client, + cmd.run(client.clone(), inherent_data, &ext_factory) + .map_err(Error::SubstrateCli) + ) + }, + BenchmarkCmd::Overhead(cmd) => unwrap_client!( + client, + cmd.run(config, client.clone(), inherent_data, &remark_builder) + .map_err(Error::SubstrateCli) + ), + _ => unreachable!("Ensured by the outside match; qed"), + } }) }, BenchmarkCmd::Pallet(cmd) => { diff --git a/node/client/src/benchmarking.rs b/node/client/src/benchmarking.rs new file mode 100644 index 000000000000..02c0d316c0ad --- /dev/null +++ b/node/client/src/benchmarking.rs @@ -0,0 +1,391 @@ +// 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 . + +//! Code related to benchmarking a [`crate::Client`]. + +use polkadot_primitives::v2::{AccountId, Balance}; +use sp_core::{Pair, H256}; +use sp_keyring::Sr25519Keyring; +use sp_runtime::OpaqueExtrinsic; + +use crate::*; + +/// Generates `System::Remark` extrinsics for the benchmarks. +/// +/// Note: Should only be used for benchmarking. +pub struct RemarkBuilder { + client: Arc, +} + +impl RemarkBuilder { + /// Creates a new [`Self`] from the given client. + pub fn new(client: Arc) -> Self { + Self { client } + } +} + +impl frame_benchmarking_cli::ExtrinsicBuilder for RemarkBuilder { + fn pallet(&self) -> &str { + "system" + } + + fn extrinsic(&self) -> &str { + "remark" + } + + fn build(&self, nonce: u32) -> std::result::Result { + with_client! { + self.client.as_ref(), client, { + use runtime::{Call, SystemCall}; + + let call = Call::System(SystemCall::remark { remark: vec![] }); + let signer = Sr25519Keyring::Bob.pair(); + + let period = polkadot_runtime_common::BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64; + let genesis = client.usage_info().chain.best_hash; + + Ok(client.sign_call(call, nonce, 0, period, genesis, signer)) + } + } + } +} + +/// Generates `Balances::TransferKeepAlive` extrinsics for the benchmarks. +/// +/// Note: Should only be used for benchmarking. +pub struct TransferKeepAliveBuilder { + client: Arc, + dest: AccountId, + value: Balance, +} + +impl TransferKeepAliveBuilder { + /// Creates a new [`Self`] from the given client and the arguments for the extrinsics. + + pub fn new(client: Arc, dest: AccountId, value: Balance) -> Self { + Self { client, dest, value } + } +} + +impl frame_benchmarking_cli::ExtrinsicBuilder for TransferKeepAliveBuilder { + fn pallet(&self) -> &str { + "balances" + } + + fn extrinsic(&self) -> &str { + "transfer_keep_alive" + } + + fn build(&self, nonce: u32) -> std::result::Result { + with_client! { + self.client.as_ref(), client, { + use runtime::{Call, BalancesCall}; + + let call = Call::Balances(BalancesCall::transfer_keep_alive { + dest: self.dest.clone().into(), + value: self.value.into(), + }); + let signer = Sr25519Keyring::Bob.pair(); + + let period = polkadot_runtime_common::BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64; + let genesis = client.usage_info().chain.best_hash; + + Ok(client.sign_call(call, nonce, 0, period, genesis, signer)) + } + } + } +} + +/// Helper trait to implement [`frame_benchmarking_cli::ExtrinsicBuilder`]. +/// +/// Should only be used for benchmarking since it makes strong assumptions +/// about the chain state that these calls will be valid for. +trait BenchmarkCallSigner { + /// Signs a call together with the signed extensions of the specific runtime. + /// + /// Only works if the current block is the genesis block since the + /// `CheckMortality` check is mocked by using the genesis block. + fn sign_call( + &self, + call: Call, + nonce: u32, + current_block: u64, + period: u64, + genesis: H256, + acc: Signer, + ) -> OpaqueExtrinsic; +} + +#[cfg(feature = "polkadot")] +impl BenchmarkCallSigner + for FullClient +{ + fn sign_call( + &self, + call: polkadot_runtime::Call, + nonce: u32, + current_block: u64, + period: u64, + genesis: H256, + acc: sp_core::sr25519::Pair, + ) -> OpaqueExtrinsic { + use polkadot_runtime as runtime; + + let extra: runtime::SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckMortality::::from( + sp_runtime::generic::Era::mortal(period, current_block), + ), + frame_system::CheckNonce::::from(nonce), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + polkadot_runtime_common::claims::PrevalidateAttests::::new(), + ); + + let payload = runtime::SignedPayload::from_raw( + call.clone(), + extra.clone(), + ( + (), + runtime::VERSION.spec_version, + runtime::VERSION.transaction_version, + genesis.clone(), + genesis, + (), + (), + (), + (), + ), + ); + + let signature = payload.using_encoded(|p| acc.sign(p)); + runtime::UncheckedExtrinsic::new_signed( + call, + sp_runtime::AccountId32::from(acc.public()).into(), + polkadot_core_primitives::Signature::Sr25519(signature.clone()), + extra, + ) + .into() + } +} + +#[cfg(feature = "westend")] +impl BenchmarkCallSigner + for FullClient +{ + fn sign_call( + &self, + call: westend_runtime::Call, + nonce: u32, + current_block: u64, + period: u64, + genesis: H256, + acc: sp_core::sr25519::Pair, + ) -> OpaqueExtrinsic { + use westend_runtime as runtime; + + let extra: runtime::SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckMortality::::from( + sp_runtime::generic::Era::mortal(period, current_block), + ), + frame_system::CheckNonce::::from(nonce), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + ); + + let payload = runtime::SignedPayload::from_raw( + call.clone(), + extra.clone(), + ( + (), + runtime::VERSION.spec_version, + runtime::VERSION.transaction_version, + genesis.clone(), + genesis, + (), + (), + (), + ), + ); + + let signature = payload.using_encoded(|p| acc.sign(p)); + runtime::UncheckedExtrinsic::new_signed( + call, + sp_runtime::AccountId32::from(acc.public()).into(), + polkadot_core_primitives::Signature::Sr25519(signature.clone()), + extra, + ) + .into() + } +} + +#[cfg(feature = "kusama")] +impl BenchmarkCallSigner + for FullClient +{ + fn sign_call( + &self, + call: kusama_runtime::Call, + nonce: u32, + current_block: u64, + period: u64, + genesis: H256, + acc: sp_core::sr25519::Pair, + ) -> OpaqueExtrinsic { + use kusama_runtime as runtime; + + let extra: runtime::SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckMortality::::from( + sp_runtime::generic::Era::mortal(period, current_block), + ), + frame_system::CheckNonce::::from(nonce), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + ); + + let payload = runtime::SignedPayload::from_raw( + call.clone(), + extra.clone(), + ( + (), + runtime::VERSION.spec_version, + runtime::VERSION.transaction_version, + genesis.clone(), + genesis, + (), + (), + (), + ), + ); + + let signature = payload.using_encoded(|p| acc.sign(p)); + runtime::UncheckedExtrinsic::new_signed( + call, + sp_runtime::AccountId32::from(acc.public()).into(), + polkadot_core_primitives::Signature::Sr25519(signature.clone()), + extra, + ) + .into() + } +} + +#[cfg(feature = "rococo")] +impl BenchmarkCallSigner + for FullClient +{ + fn sign_call( + &self, + call: rococo_runtime::Call, + nonce: u32, + current_block: u64, + period: u64, + genesis: H256, + acc: sp_core::sr25519::Pair, + ) -> OpaqueExtrinsic { + use rococo_runtime as runtime; + + let extra: runtime::SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckMortality::::from( + sp_runtime::generic::Era::mortal(period, current_block), + ), + frame_system::CheckNonce::::from(nonce), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + ); + + let payload = runtime::SignedPayload::from_raw( + call.clone(), + extra.clone(), + ( + (), + runtime::VERSION.spec_version, + runtime::VERSION.transaction_version, + genesis.clone(), + genesis, + (), + (), + (), + ), + ); + + let signature = payload.using_encoded(|p| acc.sign(p)); + runtime::UncheckedExtrinsic::new_signed( + call, + sp_runtime::AccountId32::from(acc.public()).into(), + polkadot_core_primitives::Signature::Sr25519(signature.clone()), + extra, + ) + .into() + } +} + +/// Generates inherent data for benchmarking Polkadot, Kusama, Westend and Rococo. +/// +/// Not to be used outside of benchmarking since it returns mocked values. +pub fn benchmark_inherent_data( + header: polkadot_core_primitives::Header, +) -> std::result::Result { + use sp_inherents::InherentDataProvider; + let mut inherent_data = sp_inherents::InherentData::new(); + + // Assume that all runtimes have the `timestamp` pallet. + let d = std::time::Duration::from_millis(0); + let timestamp = sp_timestamp::InherentDataProvider::new(d.into()); + timestamp.provide_inherent_data(&mut inherent_data)?; + + let para_data = polkadot_primitives::v2::InherentData { + bitfields: Vec::new(), + backed_candidates: Vec::new(), + disputes: Vec::new(), + parent_header: header, + }; + + polkadot_node_core_parachains_inherent::ParachainsInherentDataProvider::from_data(para_data) + .provide_inherent_data(&mut inherent_data)?; + + Ok(inherent_data) +} + +/// Provides the existential deposit that is only needed for benchmarking. +pub trait ExistentialDepositProvider { + /// Returns the existential deposit. + fn existential_deposit(&self) -> Balance; +} + +impl ExistentialDepositProvider for Client { + fn existential_deposit(&self) -> Balance { + with_client! { + self, + _client, + runtime::ExistentialDeposit::get() + } + } +} diff --git a/node/client/src/lib.rs b/node/client/src/lib.rs index 537eefb622d6..41b0048f0e46 100644 --- a/node/client/src/lib.rs +++ b/node/client/src/lib.rs @@ -28,16 +28,16 @@ use sc_executor::NativeElseWasmExecutor; use sp_api::{CallApiAt, Encode, NumberFor, ProvideRuntimeApi}; use sp_blockchain::{HeaderBackend, HeaderMetadata}; use sp_consensus::BlockStatus; -use sp_core::{Pair, H256}; -use sp_keyring::Sr25519Keyring; use sp_runtime::{ generic::{BlockId, SignedBlock}, traits::{BlakeTwo256, Block as BlockT}, - Justifications, OpaqueExtrinsic, + Justifications, }; use sp_storage::{ChildInfo, StorageData, StorageKey}; use std::sync::Arc; +pub mod benchmarking; + pub type FullBackend = sc_service::TFullBackend; pub type FullClient = @@ -243,35 +243,37 @@ pub trait ClientHandle { /// provides the concrete runtime as `runtime`. macro_rules! with_client { { - $self:ident, + // The client instance that should be unwrapped. + $self:expr, + // The name that the unwrapped client will have. $client:ident, // NOTE: Using an expression here is fine since blocks are also expressions. $code:expr } => { match $self { #[cfg(feature = "polkadot")] - Self::Polkadot($client) => { + Client::Polkadot($client) => { #[allow(unused_imports)] use polkadot_runtime as runtime; $code }, #[cfg(feature = "westend")] - Self::Westend($client) => { + Client::Westend($client) => { #[allow(unused_imports)] use westend_runtime as runtime; $code }, #[cfg(feature = "kusama")] - Self::Kusama($client) => { + Client::Kusama($client) => { #[allow(unused_imports)] use kusama_runtime as runtime; $code }, #[cfg(feature = "rococo")] - Self::Rococo($client) => { + Client::Rococo($client) => { #[allow(unused_imports)] use rococo_runtime as runtime; @@ -280,6 +282,8 @@ macro_rules! with_client { } } } +// Make the macro available only within this crate. +pub(crate) use with_client; /// A client instance of Polkadot. /// @@ -603,286 +607,3 @@ impl sp_blockchain::HeaderBackend for Client { } } } - -impl frame_benchmarking_cli::ExtrinsicBuilder for Client { - fn remark(&self, nonce: u32) -> std::result::Result { - with_client! { - self, client, { - use runtime::{Call, SystemCall}; - - let call = Call::System(SystemCall::remark { remark: vec![] }); - let signer = Sr25519Keyring::Bob.pair(); - - let period = polkadot_runtime_common::BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64; - let genesis = self.usage_info().chain.best_hash; - - Ok(client.sign_call(call, nonce, 0, period, genesis, signer)) - } - } - } -} - -/// Helper trait to implement [`frame_benchmarking_cli::ExtrinsicBuilder`]. -/// -/// Should only be used for benchmarking since it makes strong assumptions -/// about the chain state that these calls will be valid for. -trait BenchmarkCallSigner { - /// Signs a call together with the signed extensions of the specific runtime. - /// - /// Only works if the current block is the genesis block since the - /// `CheckMortality` check is mocked by using the genesis block. - fn sign_call( - &self, - call: Call, - nonce: u32, - current_block: u64, - period: u64, - genesis: H256, - acc: Signer, - ) -> OpaqueExtrinsic; -} - -#[cfg(feature = "polkadot")] -impl BenchmarkCallSigner - for FullClient -{ - fn sign_call( - &self, - call: polkadot_runtime::Call, - nonce: u32, - current_block: u64, - period: u64, - genesis: H256, - acc: sp_core::sr25519::Pair, - ) -> OpaqueExtrinsic { - use polkadot_runtime as runtime; - - let extra: runtime::SignedExtra = ( - frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckMortality::::from( - sp_runtime::generic::Era::mortal(period, current_block), - ), - frame_system::CheckNonce::::from(nonce), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(0), - polkadot_runtime_common::claims::PrevalidateAttests::::new(), - ); - - let payload = runtime::SignedPayload::from_raw( - call.clone(), - extra.clone(), - ( - (), - runtime::VERSION.spec_version, - runtime::VERSION.transaction_version, - genesis.clone(), - genesis, - (), - (), - (), - (), - ), - ); - - let signature = payload.using_encoded(|p| acc.sign(p)); - runtime::UncheckedExtrinsic::new_signed( - call, - sp_runtime::AccountId32::from(acc.public()).into(), - polkadot_core_primitives::Signature::Sr25519(signature.clone()), - extra, - ) - .into() - } -} - -#[cfg(feature = "westend")] -impl BenchmarkCallSigner - for FullClient -{ - fn sign_call( - &self, - call: westend_runtime::Call, - nonce: u32, - current_block: u64, - period: u64, - genesis: H256, - acc: sp_core::sr25519::Pair, - ) -> OpaqueExtrinsic { - use westend_runtime as runtime; - - let extra: runtime::SignedExtra = ( - frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckMortality::::from( - sp_runtime::generic::Era::mortal(period, current_block), - ), - frame_system::CheckNonce::::from(nonce), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(0), - ); - - let payload = runtime::SignedPayload::from_raw( - call.clone(), - extra.clone(), - ( - (), - runtime::VERSION.spec_version, - runtime::VERSION.transaction_version, - genesis.clone(), - genesis, - (), - (), - (), - ), - ); - - let signature = payload.using_encoded(|p| acc.sign(p)); - runtime::UncheckedExtrinsic::new_signed( - call, - sp_runtime::AccountId32::from(acc.public()).into(), - polkadot_core_primitives::Signature::Sr25519(signature.clone()), - extra, - ) - .into() - } -} - -#[cfg(feature = "kusama")] -impl BenchmarkCallSigner - for FullClient -{ - fn sign_call( - &self, - call: kusama_runtime::Call, - nonce: u32, - current_block: u64, - period: u64, - genesis: H256, - acc: sp_core::sr25519::Pair, - ) -> OpaqueExtrinsic { - use kusama_runtime as runtime; - - let extra: runtime::SignedExtra = ( - frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckMortality::::from( - sp_runtime::generic::Era::mortal(period, current_block), - ), - frame_system::CheckNonce::::from(nonce), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(0), - ); - - let payload = runtime::SignedPayload::from_raw( - call.clone(), - extra.clone(), - ( - (), - runtime::VERSION.spec_version, - runtime::VERSION.transaction_version, - genesis.clone(), - genesis, - (), - (), - (), - ), - ); - - let signature = payload.using_encoded(|p| acc.sign(p)); - runtime::UncheckedExtrinsic::new_signed( - call, - sp_runtime::AccountId32::from(acc.public()).into(), - polkadot_core_primitives::Signature::Sr25519(signature.clone()), - extra, - ) - .into() - } -} - -#[cfg(feature = "rococo")] -impl BenchmarkCallSigner - for FullClient -{ - fn sign_call( - &self, - call: rococo_runtime::Call, - nonce: u32, - current_block: u64, - period: u64, - genesis: H256, - acc: sp_core::sr25519::Pair, - ) -> OpaqueExtrinsic { - use rococo_runtime as runtime; - - let extra: runtime::SignedExtra = ( - frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckMortality::::from( - sp_runtime::generic::Era::mortal(period, current_block), - ), - frame_system::CheckNonce::::from(nonce), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(0), - ); - - let payload = runtime::SignedPayload::from_raw( - call.clone(), - extra.clone(), - ( - (), - runtime::VERSION.spec_version, - runtime::VERSION.transaction_version, - genesis.clone(), - genesis, - (), - (), - (), - ), - ); - - let signature = payload.using_encoded(|p| acc.sign(p)); - runtime::UncheckedExtrinsic::new_signed( - call, - sp_runtime::AccountId32::from(acc.public()).into(), - polkadot_core_primitives::Signature::Sr25519(signature.clone()), - extra, - ) - .into() - } -} - -/// Generates inherent data for benchmarking Polkadot, Kusama, Westend and Rococo. -/// -/// Not to be used outside of benchmarking since it returns mocked values. -pub fn benchmark_inherent_data( - header: polkadot_core_primitives::Header, -) -> std::result::Result { - use sp_inherents::InherentDataProvider; - let mut inherent_data = sp_inherents::InherentData::new(); - - // Assume that all runtimes have the `timestamp` pallet. - let d = std::time::Duration::from_millis(0); - let timestamp = sp_timestamp::InherentDataProvider::new(d.into()); - timestamp.provide_inherent_data(&mut inherent_data)?; - - let para_data = polkadot_primitives::v2::InherentData { - bitfields: Vec::new(), - backed_candidates: Vec::new(), - disputes: Vec::new(), - parent_header: header, - }; - - polkadot_node_core_parachains_inherent::ParachainsInherentDataProvider::from_data(para_data) - .provide_inherent_data(&mut inherent_data)?; - - Ok(inherent_data) -} diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index a8405691f8aa..936d34325e30 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -75,6 +75,7 @@ use runtime_parachains::{ }; pub use frame_system::Call as SystemCall; +pub use pallet_balances::Call as BalancesCall; /// Constant values used within the runtime. use rococo_runtime_constants::{currency::*, fee::*, time::*}; diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 642c4e75353c..b1c7efae61cf 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -76,6 +76,7 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; pub use frame_system::Call as SystemCall; +pub use pallet_balances::Call as BalancesCall; pub use pallet_election_provider_multi_phase::Call as EPMCall; #[cfg(feature = "std")] pub use pallet_staking::StakerStatus; diff --git a/tests/benchmark_block_works.rs b/tests/benchmark_block_works.rs deleted file mode 100644 index 0994fae675a4..000000000000 --- a/tests/benchmark_block_works.rs +++ /dev/null @@ -1,95 +0,0 @@ -// 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 . - -// Unix only since it uses signals. -#![cfg(unix)] - -use assert_cmd::cargo::cargo_bin; -use nix::{ - sys::signal::{kill, Signal::SIGINT}, - unistd::Pid, -}; -use std::{ - path::Path, - process::{self, Command}, - result::Result, - time::Duration, -}; -use tempfile::tempdir; - -pub mod common; - -static RUNTIMES: [&'static str; 3] = ["polkadot", "kusama", "westend"]; - -/// `benchmark block` works for all dev runtimes using the wasm executor. -#[tokio::test] -async fn benchmark_block_works() { - for runtime in RUNTIMES { - let tmp_dir = tempdir().expect("could not create a temp dir"); - let base_path = tmp_dir.path(); - let runtime = format!("{}-dev", runtime); - - // Build a chain with a single block. - build_chain(&runtime, base_path).await.unwrap(); - // Benchmark the that one. - benchmark_block(&runtime, base_path, 1).unwrap(); - } -} - -/// Builds a chain with one block for the given runtime and base path. -async fn build_chain(runtime: &str, base_path: &Path) -> Result<(), String> { - let mut cmd = Command::new(cargo_bin("polkadot")) - .stdout(process::Stdio::piped()) - .stderr(process::Stdio::piped()) - .args(["--chain", &runtime, "--force-authoring", "--alice"]) - .arg("-d") - .arg(base_path) - .arg("--port") - .arg("33034") - .spawn() - .unwrap(); - - let (ws_url, _) = common::find_ws_url_from_output(cmd.stderr.take().unwrap()); - - // Wait for the chain to produce one block. - let ok = common::wait_n_finalized_blocks(1, Duration::from_secs(60), &ws_url).await; - // Send SIGINT to node. - kill(Pid::from_raw(cmd.id().try_into().unwrap()), SIGINT).unwrap(); - // Wait for the node to handle it and exit. - assert!(common::wait_for(&mut cmd, 30).map(|x| x.success()).unwrap_or_default()); - - ok.map_err(|e| format!("Node did not build the chain: {:?}", e)) -} - -/// Benchmarks the given block with the wasm executor. -fn benchmark_block(runtime: &str, base_path: &Path, block: u32) -> Result<(), String> { - // Invoke `benchmark block` with all options to make sure that they are valid. - let status = Command::new(cargo_bin("polkadot")) - .args(["benchmark", "block", "--chain", &runtime]) - .arg("-d") - .arg(base_path) - .args(["--from", &block.to_string(), "--to", &block.to_string()]) - .args(["--repeat", "1"]) - .args(["--execution", "wasm", "--wasm-execution", "compiled"]) - .status() - .map_err(|e| format!("command failed: {:?}", e))?; - - if !status.success() { - return Err("Command failed".into()) - } - - Ok(()) -} diff --git a/tests/benchmark_overhead_works.rs b/tests/benchmark_overhead_works.rs deleted file mode 100644 index 29a1de67e2c1..000000000000 --- a/tests/benchmark_overhead_works.rs +++ /dev/null @@ -1,67 +0,0 @@ -// 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 assert_cmd::cargo::cargo_bin; -use std::{process::Command, result::Result}; -use tempfile::tempdir; - -static RUNTIMES: [&'static str; 3] = ["polkadot", "kusama", "westend"]; - -/// `benchmark overhead` works for all dev runtimes. -#[test] -fn benchmark_overhead_works() { - for runtime in RUNTIMES { - let runtime = format!("{}-dev", runtime); - assert!(benchmark_overhead(runtime).is_ok()); - } -} - -/// `benchmark overhead` rejects all non-dev runtimes. -#[test] -fn benchmark_overhead_rejects_non_dev_runtimes() { - for runtime in RUNTIMES { - assert!(benchmark_overhead(runtime.into()).is_err()); - } -} - -fn benchmark_overhead(runtime: String) -> Result<(), String> { - let tmp_dir = tempdir().expect("could not create a temp dir"); - let base_path = tmp_dir.path(); - - // Invoke `benchmark overhead` with all options to make sure that they are valid. - let status = Command::new(cargo_bin("polkadot")) - .args(["benchmark", "overhead", "--chain", &runtime]) - .arg("-d") - .arg(base_path) - .arg("--weight-path") - .arg(base_path) - .args(["--warmup", "5", "--repeat", "5"]) - .args(["--add", "100", "--mul", "1.2", "--metric", "p75"]) - // Only put 5 extrinsics into the block otherwise it takes forever to build it - // especially for a non-release builds. - .args(["--max-ext-per-block", "5"]) - .status() - .map_err(|e| format!("command failed: {:?}", e))?; - - if !status.success() { - return Err("Command failed".into()) - } - - // Weight files have been created. - assert!(base_path.join("block_weights.rs").exists()); - assert!(base_path.join("extrinsic_weights.rs").exists()); - Ok(()) -} From f6831e91ab574d9e33bf75e9368e8f86a08b8dcb Mon Sep 17 00:00:00 2001 From: Mara Robin B Date: Tue, 19 Jul 2022 17:12:55 +0200 Subject: [PATCH 10/15] add `Extrinsic Ordering` check that runs against a local reference node (#5790) * add `Extrinsic Ordering` check that runs against a local reference node * cleanup * use different polkadot base path * check all chains & other review nits * fixup * review nits * do not fail-fast --- ...e-21_extrinsic-ordering-check-from-two.yml | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 .github/workflows/release-21_extrinsic-ordering-check-from-two.yml diff --git a/.github/workflows/release-21_extrinsic-ordering-check-from-two.yml b/.github/workflows/release-21_extrinsic-ordering-check-from-two.yml new file mode 100644 index 000000000000..5d8bfddcfeb2 --- /dev/null +++ b/.github/workflows/release-21_extrinsic-ordering-check-from-two.yml @@ -0,0 +1,98 @@ +# This workflow performs the Extrinsic Ordering Check on demand using two reference binaries + +name: Release - Extrinsic API Check with reference bins +on: + workflow_dispatch: + inputs: + reference_binary_url: + description: A url to a Linux binary for the node containing the reference runtime to test against + default: https://releases.parity.io/polkadot/x86_64-debian:stretch/v0.9.26/polkadot + required: true + binary_url: + description: A url to a Linux binary for the node containing the runtime to test + default: https://releases.parity.io/polkadot/x86_64-debian:stretch/v0.9.27-rc1/polkadot + required: true + +jobs: + check: + name: Run check + runs-on: ubuntu-latest + env: + BIN_URL: ${{github.event.inputs.binary_url}} + REF_URL: ${{github.event.inputs.reference_binary_url}} + strategy: + matrix: + fail-fast: false + chain: [polkadot, kusama, westend, rococo] + + steps: + - name: Checkout sources + uses: actions/checkout@v3 + + - name: Fetch reference binary + run: | + echo Fetching $REF_URL + curl $REF_URL -o polkadot-ref + chmod a+x polkadot-ref + ./polkadot-ref --version + + - name: Fetch test binary + run: | + echo Fetching $BIN_URL + curl $BIN_URL -o polkadot + chmod a+x polkadot + ./polkadot --version + + - name: Start local reference node + run: | + echo Running reference on ${{ matrix.chain }}-local + ./polkadot-ref --chain=${{ matrix.chain }}-local --rpc-port=9934 --ws-port=9945 --base-path=polkadot-ref-base/ & + + - name: Start local test node + run: | + echo Running test on ${{ matrix.chain }}-local + ./polkadot --chain=${{ matrix.chain }}-local & + + - name: Prepare output + run: | + REF_VERSION=$(./polkadot-ref --version) + BIN_VERSION=$(./polkadot --version) + echo "Metadata comparison:" >> output.txt + echo "Date: $(date)" >> output.txt + echo "Ref. binary: $REF_URL" >> output.txt + echo "Test binary: $BIN_URL" >> output.txt + echo "Ref. version: $REF_VERSION" >> output.txt + echo "Test version: $BIN_VERSION" >> output.txt + echo "Chain: ${{ matrix.chain }}-local" >> output.txt + echo "----------------------------------------------------------------------" >> output.txt + + - name: Pull polkadot-js-tools image + run: docker pull jacogr/polkadot-js-tools + + - name: Compare the metadata + run: | + CMD="docker run --pull always --network host jacogr/polkadot-js-tools metadata ws://localhost:9945 ws://localhost:9944" + echo -e "Running:\n$CMD" + $CMD >> output.txt + sed -z -i 's/\n\n/\n/g' output.txt + cat output.txt | egrep -n -i '' + SUMMARY=$(./scripts/ci/github/extrinsic-ordering-filter.sh output.txt) + echo -e $SUMMARY + echo -e $SUMMARY >> output.txt + + - name: Show result + run: | + cat output.txt + + - name: Save output as artifact + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.chain }} + path: | + output.txt + + - name: Stop our local nodes + run: | + pkill polkadot-ref + pkill polkadot + From bb1bf69dfc538abd40c8d614e8bbf46580d7005a Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Wed, 20 Jul 2022 12:23:25 +0200 Subject: [PATCH 11/15] Introduce async runtime calling trait for runtime-api subsystem (#5782) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Implement OverseerRuntimeClient * blockchainevents * Update patches * Finish merging rntime-api subsystem * First version that is able to produce blocks * Make OverseerRuntimeClient async * Move overseer notification stream forwarding to cumulus * Remove unused imports * Add more logging to collator-protocol * Lockfile * Use hashes in OverseerRuntimeClient * Move OverseerRuntimeClient into extra module * Fix old session info call and make HeadSupportsParachain async * Improve naming of trait * Cleanup * Remove unused From trait implementation * Remove unwanted debug print * Move trait to polkadot-node-subsystem-types * Add sections to runtime client Co-authored-by: Davide Galassi * Reorder methods * Fix spelling * Fix spacing in Cargo.toml Co-authored-by: Bastian Köcher * Remove unused babe methods Co-authored-by: Davide Galassi Co-authored-by: Bastian Köcher --- Cargo.lock | 11 +- node/core/approval-voting/Cargo.toml | 1 + node/core/approval-voting/src/tests.rs | 4 +- node/core/runtime-api/Cargo.toml | 7 +- node/core/runtime-api/src/lib.rs | 57 +-- node/core/runtime-api/src/tests.rs | 18 +- node/overseer/Cargo.toml | 1 + node/overseer/examples/minimal-example.rs | 5 +- node/overseer/src/lib.rs | 37 +- node/overseer/src/tests.rs | 4 +- node/subsystem-test-helpers/src/lib.rs | 4 +- node/subsystem-types/Cargo.toml | 4 + node/subsystem-types/src/lib.rs | 3 + node/subsystem-types/src/runtime_client.rs | 384 +++++++++++++++++++++ rustfmt.toml | 1 + 15 files changed, 467 insertions(+), 74 deletions(-) create mode 100644 node/subsystem-types/src/runtime_client.rs diff --git a/Cargo.lock b/Cargo.lock index 50e765016390..4a2da99419d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -327,9 +327,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", @@ -6295,6 +6295,7 @@ name = "polkadot-node-core-approval-voting" version = "0.9.26" dependencies = [ "assert_matches", + "async-trait", "bitvec", "derive_more", "futures", @@ -6590,6 +6591,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", + "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-primitives", "polkadot-primitives-test-helpers", @@ -6720,6 +6722,7 @@ dependencies = [ name = "polkadot-node-subsystem-types" version = "0.9.26" dependencies = [ + "async-trait", "derive_more", "futures", "orchestra", @@ -6730,6 +6733,9 @@ dependencies = [ "polkadot-statement-table", "sc-network", "smallvec", + "sp-api", + "sp-authority-discovery", + "sp-consensus-babe", "substrate-prometheus-endpoint", "thiserror", ] @@ -6779,6 +6785,7 @@ name = "polkadot-overseer" version = "0.9.26" dependencies = [ "assert_matches", + "async-trait", "femme", "futures", "futures-timer", diff --git a/node/core/approval-voting/Cargo.toml b/node/core/approval-voting/Cargo.toml index 646817a5aa4e..79f78bba7f61 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..641e6cb3a4f9 100644 --- a/node/core/approval-voting/src/tests.rs +++ b/node/core/approval-voting/src/tests.rs @@ -38,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; @@ -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 3af58ab5d2a0..bf14836b9b1b 100644 --- a/node/core/runtime-api/Cargo.toml +++ b/node/core/runtime-api/Cargo.toml @@ -10,15 +10,16 @@ gum = { package = "tracing-gum", path = "../../gum" } 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-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } polkadot-primitives = { path = "../../../primitives" } -polkadot-node-subsystem = {path = "../../subsystem" } +polkadot-node-subsystem = { path = "../../subsystem" } +polkadot-node-subsystem-types = { path = "../../subsystem-types" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } [dev-dependencies] +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"] } diff --git a/node/core/runtime-api/src/lib.rs b/node/core/runtime-api/src/lib.rs index 691ca9e655d9..a815b76a8d7c 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_primitives::{ - runtime_api::ParachainHost, - v2::{Block, BlockId, Hash}, -}; - -use sp_api::ProvideRuntimeApi; -use sp_authority_discovery::AuthorityDiscoveryApi; -use sp_consensus_babe::BabeApi; +use polkadot_node_subsystem_types::RuntimeApiSubsystemClient; +use polkadot_primitives::v2::Hash; use cache::{RequestResult, RequestResultCache}; use futures::{channel::oneshot, prelude::*, select, stream::FuturesUnordered}; @@ -88,8 +82,7 @@ impl RuntimeApiSubsystem { #[overseer::subsystem(RuntimeApi, error = SubsystemError, prefix = self::overseer)] impl RuntimeApiSubsystem where - Client: ProvideRuntimeApi + Send + 'static + Sync, - Client::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, + Client: RuntimeApiSubsystemClient + Send + Sync + 'static, { fn start(self, ctx: Context) -> SpawnedSubsystem { SpawnedSubsystem { future: run(ctx, self).boxed(), name: "runtime-api-subsystem" } @@ -98,8 +91,7 @@ where impl RuntimeApiSubsystem where - Client: ProvideRuntimeApi + Send + 'static + Sync, - Client::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, + Client: RuntimeApiSubsystemClient + Send + 'static + Sync, { fn store_cache(&mut self, result: RequestResult) { use RequestResult::*; @@ -282,7 +274,7 @@ where }; 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(); @@ -317,8 +309,7 @@ async fn run( mut subsystem: RuntimeApiSubsystem, ) -> SubsystemResult<()> where - Client: ProvideRuntimeApi + Send + Sync + 'static, - Client::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, + Client: RuntimeApiSubsystemClient + Send + Sync + 'static, { loop { // Let's add some back pressure when the subsystem is running at `MAX_PARALLEL_REQUESTS`. @@ -348,26 +339,21 @@ where } } -fn make_runtime_api_request( +async fn make_runtime_api_request( client: Arc, metrics: Metrics, relay_parent: Hash, request: Request, ) -> Option where - Client: ProvideRuntimeApi, - Client::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, + Client: RuntimeApiSubsystemClient + 'static, { - use sp_api::ApiExt; - 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 runtime_version = api.api_version::>(&BlockId::Hash(relay_parent)) + let runtime_version = client.api_version_parachain_host(relay_parent).await .unwrap_or_else(|e| { gum::warn!( target: LOG_TARGET, @@ -385,7 +371,7 @@ where }); let res = if runtime_version >= $version { - api.$api_name(&BlockId::Hash(relay_parent) $(, $param.clone() )*) + 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), @@ -404,11 +390,7 @@ where match request { Request::Version(sender) => { - let api = client.runtime_api(); - - let runtime_version = match api - .api_version::>(&BlockId::Hash(relay_parent)) - { + 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 { @@ -465,25 +447,24 @@ where Request::CandidateEvents(sender) => query!(CandidateEvents, candidate_events(), ver = 1, sender), Request::SessionInfo(index, sender) => { - let api = client.runtime_api(); - let block_id = BlockId::Hash(relay_parent); - - let api_version = api - .api_version::>(&BlockId::Hash(relay_parent)) + 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(&block_id, 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), - }); + } + }); 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 = 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), 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/Cargo.toml b/node/overseer/Cargo.toml index 8341d14f9251..c586f748f95a 100644 --- a/node/overseer/Cargo.toml +++ b/node/overseer/Cargo.toml @@ -20,6 +20,7 @@ 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" } +async-trait = "0.1.56" [dev-dependencies] metered = { package = "prioritized-metered-channel", path = "../metered-channel" } 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 fefcc4dba0ce..43386352b77a 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -71,11 +71,7 @@ use futures::{channel::oneshot, future::BoxFuture, select, Future, FutureExt, St use lru::LruCache; use client::{BlockImportNotification, BlockchainEvents, FinalityNotification}; -use polkadot_primitives::{ - runtime_api::ParachainHost, - v2::{Block, BlockId, BlockNumber, Hash}, -}; -use sp_api::{ApiExt, ProvideRuntimeApi}; +use polkadot_primitives::v2::{Block, BlockNumber, Hash}; use polkadot_node_subsystem_types::messages::{ ApprovalDistributionMessage, ApprovalVotingMessage, AvailabilityDistributionMessage, @@ -89,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; @@ -157,25 +154,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: ProvideRuntimeApi, - Client::Api: ParachainHost, + Client: RuntimeApiSubsystemClient + Sync + Send, { - fn head_supports_parachains(&self, head: &Hash) -> bool { - let id = BlockId::Hash(*head); + async fn head_supports_parachains(&self, head: &Hash) -> bool { // 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(*head).await.ok().flatten().unwrap_or(0) >= 1 } } @@ -421,9 +413,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() @@ -718,7 +713,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?; @@ -780,7 +775,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, @@ -837,12 +832,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/tests.rs b/node/overseer/src/tests.rs index 25a6d07e3934..121c707c2541 100644 --- a/node/overseer/src/tests.rs +++ b/node/overseer/src/tests.rs @@ -14,6 +14,7 @@ // 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 std::{collections::HashMap, sync::atomic, task::Poll}; @@ -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 cc263266366e..e2e61c2006d8 100644 --- a/node/subsystem-test-helpers/src/lib.rs +++ b/node/subsystem-test-helpers/src/lib.rs @@ -401,8 +401,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 } } 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/subsystem-types/src/runtime_client.rs b/node/subsystem-types/src/runtime_client.rs new file mode 100644 index 000000000000..2aa9e2bffb82 --- /dev/null +++ b/node/subsystem-types/src/runtime_client.rs @@ -0,0 +1,384 @@ +// 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, Id, + InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, + PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, + ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, + }, +}; +use sp_api::{ApiError, ApiExt, ProvideRuntimeApi}; +use sp_authority_discovery::AuthorityDiscoveryApi; +use sp_consensus_babe::{BabeApi, Epoch}; +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. + 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>; + + /// 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 === + + /// Returns information regarding the current epoch. + async fn current_epoch(&self, at: Hash) -> Result; + + // === AuthorityDiscovery API === + + /// Retrieve authority identifiers of the current and next authority set. + async fn authorities( + &self, + at: Hash, + ) -> std::result::Result, ApiError>; +} + +#[async_trait] +impl RuntimeApiSubsystemClient 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 current_epoch(&self, at: Hash) -> Result { + self.runtime_api().current_epoch(&BlockId::Hash(at)) + } + + 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)) + } + + #[warn(deprecated)] + async fn session_info_before_version_2( + &self, + at: Hash, + index: SessionIndex, + ) -> Result, ApiError> { + #[allow(deprecated)] + self.runtime_api().session_info_before_version_2(&BlockId::Hash(at), index) + } + + async fn staging_get_disputes( + &self, + at: Hash, + ) -> Result)>, ApiError> { + self.runtime_api().staging_get_disputes(&BlockId::Hash(at)) + } +} 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 264b81abe854646b4f98f34b711deb0cf96f1ea3 Mon Sep 17 00:00:00 2001 From: Bernhard Schuster Date: Wed, 20 Jul 2022 13:53:11 +0200 Subject: [PATCH 12/15] allow re-use and avoid compiling kusama parachain code (#5792) * allow re-use and avoid compiling kusama parachain code * fixup removed trailing ; * make it compat with rustfmt +nightly --- cli/Cargo.toml | 4 ++-- cli/src/command.rs | 13 ++++++++++--- cli/src/lib.rs | 2 +- node/test/performance-test/src/lib.rs | 3 +++ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 68c297f7eeda..b1066167e4fb 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -43,7 +43,7 @@ sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master", substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } [features] -default = ["wasmtime", "db", "cli", "full-node", "trie-memory-tracker", "polkadot-native"] +default = ["wasmtime", "db", "cli", "hostperfcheck", "full-node", "trie-memory-tracker", "polkadot-native"] wasmtime = ["sc-cli/wasmtime"] db = ["service/db"] cli = [ @@ -55,7 +55,6 @@ cli = [ "try-runtime-cli", "polkadot-client", "polkadot-node-core-pvf", - "polkadot-performance-test", ] runtime-benchmarks = ["service/runtime-benchmarks", "polkadot-node-metrics/runtime-benchmarks"] trie-memory-tracker = ["sp-trie/memory-tracker"] @@ -63,6 +62,7 @@ full-node = ["service/full-node"] try-runtime = ["service/try-runtime"] fast-runtime = ["service/fast-runtime"] pyroscope = ["pyro"] +hostperfcheck = ["polkadot-performance-test"] # Configure the native runtimes to use. Polkadot is enabled by default. # diff --git a/cli/src/command.rs b/cli/src/command.rs index dfa4c05c2147..de9cdbf2b8cd 100644 --- a/cli/src/command.rs +++ b/cli/src/command.rs @@ -248,12 +248,19 @@ macro_rules! unwrap_client { fn host_perf_check() -> Result<()> { #[cfg(not(build_type = "release"))] { - Err(PerfCheckError::WrongBuildType.into()) + return Err(PerfCheckError::WrongBuildType.into()) } #[cfg(build_type = "release")] { - crate::host_perf_check::host_perf_check()?; - Ok(()) + #[cfg(not(feature = "hostperfcheck"))] + { + return Err(PerfCheckError::FeatureNotEnabled { feature: "hostperfcheck" }.into()) + } + #[cfg(feature = "hostperfcheck")] + { + crate::host_perf_check::host_perf_check()?; + return Ok(()) + } } } diff --git a/cli/src/lib.rs b/cli/src/lib.rs index b4ee9f868b2e..b31cf5dca8dc 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -24,7 +24,7 @@ mod cli; mod command; #[cfg(feature = "cli")] mod error; -#[cfg(all(feature = "cli", build_type = "release"))] +#[cfg(all(feature = "hostperfcheck", build_type = "release"))] mod host_perf_check; #[cfg(feature = "full-node")] diff --git a/node/test/performance-test/src/lib.rs b/node/test/performance-test/src/lib.rs index e80b5e7589f2..762c530e5d20 100644 --- a/node/test/performance-test/src/lib.rs +++ b/node/test/performance-test/src/lib.rs @@ -36,6 +36,9 @@ pub enum PerfCheckError { #[error("This subcommand is only available in release mode")] WrongBuildType, + #[error("This subcommand is only available when compiled with `{feature}`")] + FeatureNotEnabled { feature: &'static str }, + #[error("No wasm code found for running the performance test")] WasmBinaryMissing, From 0ac32c2f1429b47f55d5c7ad33e136caef24eb4e Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Wed, 20 Jul 2022 18:32:02 +0200 Subject: [PATCH 13/15] Fix benchmarking tests (#5791) * Re-add tests Signed-off-by: Oliver Tale-Yazdi * Test with release profile Signed-off-by: Oliver Tale-Yazdi * Re-add tests Signed-off-by: Oliver Tale-Yazdi * Test with diener Signed-off-by: Oliver Tale-Yazdi * Revert "Test with release profile" This reverts commit d5384c5b603e1f8b7d14871ee57d2661e61bdb75. * Revert "Test with diener" This reverts commit 9e035759c780c2dfaf431456c8d0ff1a78e68d64. * cargo update -p sp-io Signed-off-by: Oliver Tale-Yazdi * Update tests/benchmark_block.rs Co-authored-by: Chevdor Co-authored-by: Chevdor --- Cargo.lock | 342 +++++++++++++++++------------------ tests/benchmark_block.rs | 94 ++++++++++ tests/benchmark_extrinsic.rs | 58 ++++++ tests/benchmark_overhead.rs | 67 +++++++ tests/common.rs | 2 +- 5 files changed, 391 insertions(+), 172 deletions(-) create mode 100644 tests/benchmark_block.rs create mode 100644 tests/benchmark_extrinsic.rs create mode 100644 tests/benchmark_overhead.rs diff --git a/Cargo.lock b/Cargo.lock index 4a2da99419d3..4f898af81ddb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -423,7 +423,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "beefy-primitives", "fnv", @@ -457,7 +457,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -477,7 +477,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "beefy-primitives", "sp-api", @@ -486,7 +486,7 @@ dependencies = [ [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "parity-scale-codec", "scale-info", @@ -1958,7 +1958,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "parity-scale-codec", ] @@ -1976,7 +1976,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-support", "frame-system", @@ -1998,7 +1998,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "Inflector", "chrono", @@ -2049,7 +2049,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2060,7 +2060,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2076,7 +2076,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-support", "frame-system", @@ -2104,7 +2104,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "bitflags", "frame-metadata", @@ -2134,7 +2134,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2146,7 +2146,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2158,7 +2158,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "proc-macro2", "quote", @@ -2168,7 +2168,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2191,7 +2191,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-support", "frame-system", @@ -2202,7 +2202,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-support", "log", @@ -2219,7 +2219,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -2234,7 +2234,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "parity-scale-codec", "sp-api", @@ -2243,7 +2243,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-support", "sp-api", @@ -2425,7 +2425,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "chrono", "frame-election-provider-support", @@ -4797,7 +4797,7 @@ checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4811,7 +4811,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-support", "frame-system", @@ -4827,7 +4827,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-support", "frame-system", @@ -4842,7 +4842,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4866,7 +4866,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4886,7 +4886,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-election-provider-support", "frame-support", @@ -4905,7 +4905,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4920,7 +4920,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "beefy-primitives", "frame-support", @@ -4936,7 +4936,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -4959,7 +4959,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4977,7 +4977,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4996,7 +4996,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5013,7 +5013,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5029,7 +5029,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5052,7 +5052,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5065,7 +5065,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5083,7 +5083,7 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5098,7 +5098,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5121,7 +5121,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5137,7 +5137,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5157,7 +5157,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5174,7 +5174,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5191,7 +5191,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5209,7 +5209,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -5224,7 +5224,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5239,7 +5239,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-support", "frame-system", @@ -5256,7 +5256,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5275,7 +5275,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-support", "frame-system", @@ -5292,7 +5292,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5315,7 +5315,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5331,7 +5331,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5346,7 +5346,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5361,7 +5361,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5377,7 +5377,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-support", "frame-system", @@ -5398,7 +5398,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5414,7 +5414,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-support", "frame-system", @@ -5428,7 +5428,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5451,7 +5451,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5462,7 +5462,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "log", "sp-arithmetic", @@ -5471,7 +5471,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-support", "frame-system", @@ -5485,7 +5485,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5503,7 +5503,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5522,7 +5522,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-support", "frame-system", @@ -5538,7 +5538,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5553,7 +5553,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5564,7 +5564,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5581,7 +5581,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5597,7 +5597,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-benchmarking", "frame-support", @@ -8062,7 +8062,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "env_logger 0.9.0", "jsonrpsee", @@ -8410,7 +8410,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "log", "sp-core", @@ -8421,7 +8421,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "async-trait", "futures", @@ -8448,7 +8448,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "futures", "futures-timer", @@ -8471,7 +8471,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8487,7 +8487,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.0", @@ -8504,7 +8504,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8515,7 +8515,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "chrono", "clap", @@ -8554,7 +8554,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "fnv", "futures", @@ -8582,7 +8582,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "hash-db", "kvdb", @@ -8607,7 +8607,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "async-trait", "futures", @@ -8631,7 +8631,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "async-trait", "fork-tree", @@ -8674,7 +8674,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "futures", "jsonrpsee", @@ -8696,7 +8696,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8709,7 +8709,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "async-trait", "futures", @@ -8734,7 +8734,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "sc-client-api", "sp-authorship", @@ -8745,7 +8745,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "lazy_static", "lru 0.7.7", @@ -8772,7 +8772,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "environmental", "parity-scale-codec", @@ -8789,7 +8789,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "log", "parity-scale-codec", @@ -8804,7 +8804,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "cfg-if 1.0.0", "libc", @@ -8824,7 +8824,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "ahash", "async-trait", @@ -8865,7 +8865,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "finality-grandpa", "futures", @@ -8886,7 +8886,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "ansi_term", "futures", @@ -8903,7 +8903,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "async-trait", "hex", @@ -8918,7 +8918,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "async-trait", "asynchronous-codec", @@ -8967,7 +8967,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "bitflags", "futures", @@ -8985,7 +8985,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "ahash", "futures", @@ -9002,7 +9002,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "futures", "libp2p", @@ -9022,7 +9022,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "fork-tree", "futures", @@ -9049,7 +9049,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "bytes", "fnv", @@ -9077,7 +9077,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "futures", "libp2p", @@ -9090,7 +9090,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9099,7 +9099,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "futures", "hash-db", @@ -9129,7 +9129,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "futures", "jsonrpsee", @@ -9152,7 +9152,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "futures", "jsonrpsee", @@ -9165,7 +9165,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "async-trait", "directories", @@ -9232,7 +9232,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "log", "parity-scale-codec", @@ -9246,7 +9246,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9265,7 +9265,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "futures", "libc", @@ -9284,7 +9284,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "chrono", "futures", @@ -9302,7 +9302,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "ansi_term", "atty", @@ -9333,7 +9333,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9344,7 +9344,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "futures", "futures-timer", @@ -9371,7 +9371,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "futures", "log", @@ -9384,7 +9384,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "futures", "futures-timer", @@ -9869,7 +9869,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "hash-db", "log", @@ -9886,7 +9886,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "blake2", "proc-macro-crate", @@ -9898,7 +9898,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "parity-scale-codec", "scale-info", @@ -9911,7 +9911,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "integer-sqrt", "num-traits", @@ -9926,7 +9926,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "parity-scale-codec", "scale-info", @@ -9939,7 +9939,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "async-trait", "parity-scale-codec", @@ -9951,7 +9951,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "parity-scale-codec", "sp-api", @@ -9963,7 +9963,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "futures", "log", @@ -9981,7 +9981,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "async-trait", "futures", @@ -10000,7 +10000,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "async-trait", "merlin", @@ -10023,7 +10023,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "parity-scale-codec", "scale-info", @@ -10037,7 +10037,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "parity-scale-codec", "scale-info", @@ -10050,7 +10050,7 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "base58", "bitflags", @@ -10096,7 +10096,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "blake2", "byteorder", @@ -10110,7 +10110,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "proc-macro2", "quote", @@ -10121,7 +10121,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "kvdb", "parking_lot 0.12.0", @@ -10130,7 +10130,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "proc-macro2", "quote", @@ -10140,7 +10140,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "environmental", "parity-scale-codec", @@ -10151,7 +10151,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "finality-grandpa", "log", @@ -10169,7 +10169,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10183,7 +10183,7 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "futures", "hash-db", @@ -10208,7 +10208,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "lazy_static", "sp-core", @@ -10219,7 +10219,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "async-trait", "futures", @@ -10236,7 +10236,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "thiserror", "zstd", @@ -10245,7 +10245,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "log", "parity-scale-codec", @@ -10260,7 +10260,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "parity-scale-codec", "scale-info", @@ -10274,7 +10274,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "sp-api", "sp-core", @@ -10284,7 +10284,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "backtrace", "lazy_static", @@ -10294,7 +10294,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "rustc-hash", "serde", @@ -10304,7 +10304,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "either", "hash256-std-hasher", @@ -10326,7 +10326,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10343,7 +10343,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "Inflector", "proc-macro-crate", @@ -10355,7 +10355,7 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "log", "parity-scale-codec", @@ -10369,7 +10369,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "serde", "serde_json", @@ -10378,7 +10378,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "parity-scale-codec", "scale-info", @@ -10392,7 +10392,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "parity-scale-codec", "scale-info", @@ -10403,7 +10403,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "hash-db", "log", @@ -10425,12 +10425,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10443,7 +10443,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "log", "sp-core", @@ -10456,7 +10456,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "async-trait", "futures-timer", @@ -10472,7 +10472,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "parity-scale-codec", "sp-std", @@ -10484,7 +10484,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "sp-api", "sp-runtime", @@ -10493,7 +10493,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "async-trait", "log", @@ -10509,7 +10509,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "hash-db", "memory-db", @@ -10525,7 +10525,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10542,7 +10542,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10553,7 +10553,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "impl-trait-for-tuples", "log", @@ -10749,7 +10749,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "platforms", ] @@ -10757,7 +10757,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -10778,7 +10778,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "futures-util", "hyper", @@ -10791,7 +10791,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "jsonrpsee", "log", @@ -10812,7 +10812,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "async-trait", "futures", @@ -10838,7 +10838,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "futures", "substrate-test-utils-derive", @@ -10848,7 +10848,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10859,7 +10859,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "ansi_term", "build-helper", @@ -11573,7 +11573,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#ced41695aafa648ebdb01305e563fa7ca89756bc" +source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" dependencies = [ "clap", "jsonrpsee", diff --git a/tests/benchmark_block.rs b/tests/benchmark_block.rs new file mode 100644 index 000000000000..ee68d43b2aa5 --- /dev/null +++ b/tests/benchmark_block.rs @@ -0,0 +1,94 @@ +// 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 . + +// Unix only since it uses signals. +#![cfg(unix)] + +use assert_cmd::cargo::cargo_bin; +use nix::{ + sys::signal::{kill, Signal::SIGINT}, + unistd::Pid, +}; +use std::{ + path::Path, + process::{self, Command}, + result::Result, + time::Duration, +}; +use tempfile::tempdir; + +pub mod common; + +static RUNTIMES: [&'static str; 4] = ["polkadot", "kusama", "westend", "rococo"]; + +/// `benchmark block` works for all dev runtimes using the wasm executor. +#[tokio::test] +async fn benchmark_block_works() { + for runtime in RUNTIMES { + let tmp_dir = tempdir().expect("could not create a temp dir"); + let base_path = tmp_dir.path(); + let runtime = format!("{}-dev", runtime); + + // Build a chain with a single block. + build_chain(&runtime, base_path).await.unwrap(); + // Benchmark the one block. + benchmark_block(&runtime, base_path, 1).unwrap(); + } +} + +/// Builds a chain with one block for the given runtime and base path. +async fn build_chain(runtime: &str, base_path: &Path) -> Result<(), String> { + let mut cmd = Command::new(cargo_bin("polkadot")) + .stdout(process::Stdio::piped()) + .stderr(process::Stdio::piped()) + .args(["--chain", &runtime, "--force-authoring", "--alice"]) + .arg("-d") + .arg(base_path) + .arg("--no-hardware-benchmarks") + .spawn() + .unwrap(); + + let (ws_url, _) = common::find_ws_url_from_output(cmd.stderr.take().unwrap()); + + // Wait for the chain to produce one block. + let ok = common::wait_n_finalized_blocks(1, Duration::from_secs(60), &ws_url).await; + // Send SIGINT to node. + kill(Pid::from_raw(cmd.id().try_into().unwrap()), SIGINT).unwrap(); + // Wait for the node to handle it and exit. + assert!(common::wait_for(&mut cmd, 30).map(|x| x.success()).unwrap_or_default()); + + ok.map_err(|e| format!("Node did not build the chain: {:?}", e)) +} + +/// Benchmarks the given block with the wasm executor. +fn benchmark_block(runtime: &str, base_path: &Path, block: u32) -> Result<(), String> { + // Invoke `benchmark block` with all options to make sure that they are valid. + let status = Command::new(cargo_bin("polkadot")) + .args(["benchmark", "block", "--chain", &runtime]) + .arg("-d") + .arg(base_path) + .args(["--from", &block.to_string(), "--to", &block.to_string()]) + .args(["--repeat", "1"]) + .args(["--execution", "wasm", "--wasm-execution", "compiled"]) + .status() + .map_err(|e| format!("command failed: {:?}", e))?; + + if !status.success() { + return Err("Command failed".into()) + } + + Ok(()) +} diff --git a/tests/benchmark_extrinsic.rs b/tests/benchmark_extrinsic.rs new file mode 100644 index 000000000000..c112a8c023f8 --- /dev/null +++ b/tests/benchmark_extrinsic.rs @@ -0,0 +1,58 @@ +// 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 assert_cmd::cargo::cargo_bin; +use std::{process::Command, result::Result}; + +static RUNTIMES: [&'static str; 4] = ["polkadot", "kusama", "westend", "rococo"]; + +static EXTRINSICS: [(&'static str, &'static str); 2] = + [("system", "remark"), ("balances", "transfer_keep_alive")]; + +/// `benchmark extrinsic` works for all dev runtimes and some extrinsics. +#[test] +fn benchmark_extrinsic_works() { + for runtime in RUNTIMES { + for (pallet, extrinsic) in EXTRINSICS { + let runtime = format!("{}-dev", runtime); + assert!(benchmark_extrinsic(&runtime, pallet, extrinsic).is_ok()); + } + } +} + +/// `benchmark extrinsic` rejects all non-dev runtimes. +#[test] +fn benchmark_extrinsic_rejects_non_dev_runtimes() { + for runtime in RUNTIMES { + assert!(benchmark_extrinsic(runtime, "system", "remark").is_err()); + } +} + +fn benchmark_extrinsic(runtime: &str, pallet: &str, extrinsic: &str) -> Result<(), String> { + let status = Command::new(cargo_bin("polkadot")) + .args(["benchmark", "extrinsic", "--chain", &runtime]) + .args(&["--pallet", pallet, "--extrinsic", extrinsic]) + // Run with low repeats for faster execution. + .args(["--repeat=1", "--warmup=1", "--max-ext-per-block=1"]) + .status() + .map_err(|e| format!("command failed: {:?}", e))?; + + if !status.success() { + return Err("Command failed".into()) + } + + Ok(()) +} diff --git a/tests/benchmark_overhead.rs b/tests/benchmark_overhead.rs new file mode 100644 index 000000000000..a3b4ed1160ea --- /dev/null +++ b/tests/benchmark_overhead.rs @@ -0,0 +1,67 @@ +// 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 assert_cmd::cargo::cargo_bin; +use std::{process::Command, result::Result}; +use tempfile::tempdir; + +static RUNTIMES: [&'static str; 4] = ["polkadot", "kusama", "westend", "rococo"]; + +/// `benchmark overhead` works for all dev runtimes. +#[test] +fn benchmark_overhead_works() { + for runtime in RUNTIMES { + let runtime = format!("{}-dev", runtime); + assert!(benchmark_overhead(runtime).is_ok()); + } +} + +/// `benchmark overhead` rejects all non-dev runtimes. +#[test] +fn benchmark_overhead_rejects_non_dev_runtimes() { + for runtime in RUNTIMES { + assert!(benchmark_overhead(runtime.into()).is_err()); + } +} + +fn benchmark_overhead(runtime: String) -> Result<(), String> { + let tmp_dir = tempdir().expect("could not create a temp dir"); + let base_path = tmp_dir.path(); + + // Invoke `benchmark overhead` with all options to make sure that they are valid. + let status = Command::new(cargo_bin("polkadot")) + .args(["benchmark", "overhead", "--chain", &runtime]) + .arg("-d") + .arg(base_path) + .arg("--weight-path") + .arg(base_path) + .args(["--warmup", "5", "--repeat", "5"]) + .args(["--add", "100", "--mul", "1.2", "--metric", "p75"]) + // Only put 5 extrinsics into the block otherwise it takes forever to build it + // especially for a non-release builds. + .args(["--max-ext-per-block", "5"]) + .status() + .map_err(|e| format!("command failed: {:?}", e))?; + + if !status.success() { + return Err("Command failed".into()) + } + + // Weight files have been created. + assert!(base_path.join("block_weights.rs").exists()); + assert!(base_path.join("extrinsic_weights.rs").exists()); + Ok(()) +} diff --git a/tests/common.rs b/tests/common.rs index 6c6450f6db68..0a25b0334848 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -91,6 +91,6 @@ pub fn find_ws_url_from_output(read: impl Read + Send) -> (String, String) { Some(format!("ws://{}", sock_addr)) }) - .expect("We should get a WebSocket address"); + .expect(&format!("Could not find WebSocket address in process output:\n{}", &data)); (ws_url, data) } From 7f3e99d8fc84e55654172efe8423edfb9cb17744 Mon Sep 17 00:00:00 2001 From: Dmitry Markin Date: Thu, 21 Jul 2022 12:31:12 +0300 Subject: [PATCH 14/15] Cleanup light client leftovers (#5794) * Cleanup light client leftovers * Remove light clent leftovers in test-parachains * update lockfile for {"substrate"} Co-authored-by: parity-processbot <> --- Cargo.lock | 342 +++++++++--------- cli/src/command.rs | 35 +- .../adder/collator/src/main.rs | 100 +++-- .../undying/collator/src/main.rs | 99 +++-- 4 files changed, 278 insertions(+), 298 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4f898af81ddb..3ef488c630e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -423,7 +423,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "beefy-primitives", "fnv", @@ -457,7 +457,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -477,7 +477,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "beefy-primitives", "sp-api", @@ -486,7 +486,7 @@ dependencies = [ [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "parity-scale-codec", "scale-info", @@ -1958,7 +1958,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "parity-scale-codec", ] @@ -1976,7 +1976,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-support", "frame-system", @@ -1998,7 +1998,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "Inflector", "chrono", @@ -2049,7 +2049,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2060,7 +2060,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2076,7 +2076,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-support", "frame-system", @@ -2104,7 +2104,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "bitflags", "frame-metadata", @@ -2134,7 +2134,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2146,7 +2146,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2158,7 +2158,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "proc-macro2", "quote", @@ -2168,7 +2168,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2191,7 +2191,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-support", "frame-system", @@ -2202,7 +2202,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-support", "log", @@ -2219,7 +2219,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -2234,7 +2234,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "parity-scale-codec", "sp-api", @@ -2243,7 +2243,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-support", "sp-api", @@ -2425,7 +2425,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "chrono", "frame-election-provider-support", @@ -4797,7 +4797,7 @@ checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -4811,7 +4811,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-support", "frame-system", @@ -4827,7 +4827,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-support", "frame-system", @@ -4842,7 +4842,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -4866,7 +4866,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4886,7 +4886,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-election-provider-support", "frame-support", @@ -4905,7 +4905,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -4920,7 +4920,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "beefy-primitives", "frame-support", @@ -4936,7 +4936,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -4959,7 +4959,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -4977,7 +4977,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -4996,7 +4996,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5013,7 +5013,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5029,7 +5029,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5052,7 +5052,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5065,7 +5065,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5083,7 +5083,7 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5098,7 +5098,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5121,7 +5121,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5137,7 +5137,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5157,7 +5157,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5174,7 +5174,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5191,7 +5191,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5209,7 +5209,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -5224,7 +5224,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5239,7 +5239,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-support", "frame-system", @@ -5256,7 +5256,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5275,7 +5275,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-support", "frame-system", @@ -5292,7 +5292,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5315,7 +5315,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5331,7 +5331,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5346,7 +5346,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5361,7 +5361,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5377,7 +5377,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-support", "frame-system", @@ -5398,7 +5398,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5414,7 +5414,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-support", "frame-system", @@ -5428,7 +5428,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5451,7 +5451,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5462,7 +5462,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "log", "sp-arithmetic", @@ -5471,7 +5471,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-support", "frame-system", @@ -5485,7 +5485,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5503,7 +5503,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5522,7 +5522,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-support", "frame-system", @@ -5538,7 +5538,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5553,7 +5553,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5564,7 +5564,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5581,7 +5581,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -5597,7 +5597,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-benchmarking", "frame-support", @@ -8062,7 +8062,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "env_logger 0.9.0", "jsonrpsee", @@ -8410,7 +8410,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "log", "sp-core", @@ -8421,7 +8421,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "async-trait", "futures", @@ -8448,7 +8448,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "futures", "futures-timer", @@ -8471,7 +8471,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8487,7 +8487,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.0", @@ -8504,7 +8504,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8515,7 +8515,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "chrono", "clap", @@ -8554,7 +8554,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "fnv", "futures", @@ -8582,7 +8582,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "hash-db", "kvdb", @@ -8607,7 +8607,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "async-trait", "futures", @@ -8631,7 +8631,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "async-trait", "fork-tree", @@ -8674,7 +8674,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "futures", "jsonrpsee", @@ -8696,7 +8696,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8709,7 +8709,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "async-trait", "futures", @@ -8734,7 +8734,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "sc-client-api", "sp-authorship", @@ -8745,7 +8745,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "lazy_static", "lru 0.7.7", @@ -8772,7 +8772,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "environmental", "parity-scale-codec", @@ -8789,7 +8789,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "log", "parity-scale-codec", @@ -8804,7 +8804,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "cfg-if 1.0.0", "libc", @@ -8824,7 +8824,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "ahash", "async-trait", @@ -8865,7 +8865,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "finality-grandpa", "futures", @@ -8886,7 +8886,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "ansi_term", "futures", @@ -8903,7 +8903,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "async-trait", "hex", @@ -8918,7 +8918,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "async-trait", "asynchronous-codec", @@ -8967,7 +8967,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "bitflags", "futures", @@ -8985,7 +8985,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "ahash", "futures", @@ -9002,7 +9002,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "futures", "libp2p", @@ -9022,7 +9022,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "fork-tree", "futures", @@ -9049,7 +9049,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "bytes", "fnv", @@ -9077,7 +9077,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "futures", "libp2p", @@ -9090,7 +9090,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9099,7 +9099,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "futures", "hash-db", @@ -9129,7 +9129,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "futures", "jsonrpsee", @@ -9152,7 +9152,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "futures", "jsonrpsee", @@ -9165,7 +9165,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "async-trait", "directories", @@ -9232,7 +9232,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "log", "parity-scale-codec", @@ -9246,7 +9246,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9265,7 +9265,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "futures", "libc", @@ -9284,7 +9284,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "chrono", "futures", @@ -9302,7 +9302,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "ansi_term", "atty", @@ -9333,7 +9333,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9344,7 +9344,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "futures", "futures-timer", @@ -9371,7 +9371,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "futures", "log", @@ -9384,7 +9384,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "futures", "futures-timer", @@ -9869,7 +9869,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "hash-db", "log", @@ -9886,7 +9886,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "blake2", "proc-macro-crate", @@ -9898,7 +9898,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "parity-scale-codec", "scale-info", @@ -9911,7 +9911,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "integer-sqrt", "num-traits", @@ -9926,7 +9926,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "parity-scale-codec", "scale-info", @@ -9939,7 +9939,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "async-trait", "parity-scale-codec", @@ -9951,7 +9951,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "parity-scale-codec", "sp-api", @@ -9963,7 +9963,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "futures", "log", @@ -9981,7 +9981,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "async-trait", "futures", @@ -10000,7 +10000,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "async-trait", "merlin", @@ -10023,7 +10023,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "parity-scale-codec", "scale-info", @@ -10037,7 +10037,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "parity-scale-codec", "scale-info", @@ -10050,7 +10050,7 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "base58", "bitflags", @@ -10096,7 +10096,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "blake2", "byteorder", @@ -10110,7 +10110,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "proc-macro2", "quote", @@ -10121,7 +10121,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "kvdb", "parking_lot 0.12.0", @@ -10130,7 +10130,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "proc-macro2", "quote", @@ -10140,7 +10140,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "environmental", "parity-scale-codec", @@ -10151,7 +10151,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "finality-grandpa", "log", @@ -10169,7 +10169,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10183,7 +10183,7 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "futures", "hash-db", @@ -10208,7 +10208,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "lazy_static", "sp-core", @@ -10219,7 +10219,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "async-trait", "futures", @@ -10236,7 +10236,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "thiserror", "zstd", @@ -10245,7 +10245,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "log", "parity-scale-codec", @@ -10260,7 +10260,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "parity-scale-codec", "scale-info", @@ -10274,7 +10274,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "sp-api", "sp-core", @@ -10284,7 +10284,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "backtrace", "lazy_static", @@ -10294,7 +10294,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "rustc-hash", "serde", @@ -10304,7 +10304,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "either", "hash256-std-hasher", @@ -10326,7 +10326,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10343,7 +10343,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "Inflector", "proc-macro-crate", @@ -10355,7 +10355,7 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "log", "parity-scale-codec", @@ -10369,7 +10369,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "serde", "serde_json", @@ -10378,7 +10378,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "parity-scale-codec", "scale-info", @@ -10392,7 +10392,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "parity-scale-codec", "scale-info", @@ -10403,7 +10403,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "hash-db", "log", @@ -10425,12 +10425,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10443,7 +10443,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "log", "sp-core", @@ -10456,7 +10456,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "async-trait", "futures-timer", @@ -10472,7 +10472,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "parity-scale-codec", "sp-std", @@ -10484,7 +10484,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "sp-api", "sp-runtime", @@ -10493,7 +10493,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "async-trait", "log", @@ -10509,7 +10509,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "hash-db", "memory-db", @@ -10525,7 +10525,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10542,7 +10542,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10553,7 +10553,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "impl-trait-for-tuples", "log", @@ -10749,7 +10749,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "platforms", ] @@ -10757,7 +10757,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -10778,7 +10778,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "futures-util", "hyper", @@ -10791,7 +10791,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "jsonrpsee", "log", @@ -10812,7 +10812,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "async-trait", "futures", @@ -10838,7 +10838,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "futures", "substrate-test-utils-derive", @@ -10848,7 +10848,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10859,7 +10859,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "ansi_term", "build-helper", @@ -11573,7 +11573,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#7b81072843e584ef2bee449081aed5c963021ee9" +source = "git+https://github.com/paritytech/substrate?branch=master#58a80806f01bab8bcf9da9be8afdfd70ad50e7fe" dependencies = [ "clap", "jsonrpsee", diff --git a/cli/src/command.rs b/cli/src/command.rs index de9cdbf2b8cd..babfa1c3ce5e 100644 --- a/cli/src/command.rs +++ b/cli/src/command.rs @@ -21,7 +21,7 @@ use log::info; use polkadot_client::benchmarking::{ benchmark_inherent_data, ExistentialDepositProvider, RemarkBuilder, TransferKeepAliveBuilder, }; -use sc_cli::{Role, RuntimeVersion, SubstrateCli}; +use sc_cli::{RuntimeVersion, SubstrateCli}; use service::{self, HeaderBackend, IdentifyVariant}; use sp_core::crypto::Ss58AddressFormatRegistry; use sp_keyring::Sr25519Keyring; @@ -330,25 +330,20 @@ where None }; - let role = config.role.clone(); - - match role { - Role::Light => Err(Error::Other("Light client not enabled".into())), - _ => service::build_full( - config, - service::IsCollator::No, - grandpa_pause, - cli.run.beefy, - jaeger_agent, - None, - false, - overseer_gen, - cli.run.overseer_channel_capacity_override, - hwbench, - ) - .map(|full| full.task_manager) - .map_err(Into::into), - } + service::build_full( + config, + service::IsCollator::No, + grandpa_pause, + cli.run.beefy, + jaeger_agent, + None, + false, + overseer_gen, + cli.run.overseer_channel_capacity_override, + hwbench, + ) + .map(|full| full.task_manager) + .map_err(Into::into) }) } diff --git a/parachain/test-parachains/adder/collator/src/main.rs b/parachain/test-parachains/adder/collator/src/main.rs index 00e1532fcf68..3a0b7805c643 100644 --- a/parachain/test-parachains/adder/collator/src/main.rs +++ b/parachain/test-parachains/adder/collator/src/main.rs @@ -20,7 +20,7 @@ use polkadot_cli::{Error, Result}; use polkadot_node_primitives::CollationGenerationConfig; use polkadot_node_subsystem::messages::{CollationGenerationMessage, CollatorProtocolMessage}; use polkadot_primitives::v2::Id as ParaId; -use sc_cli::{Error as SubstrateCliError, Role, SubstrateCli}; +use sc_cli::{Error as SubstrateCliError, SubstrateCli}; use sp_core::hexdisplay::HexDisplay; use test_parachain_adder_collator::Collator; @@ -54,59 +54,51 @@ fn main() -> Result<()> { })?; runner.run_node_until_exit(|config| async move { - let role = config.role.clone(); - - match role { - Role::Light => Err("Light client not supported".into()), - _ => { - let collator = Collator::new(); - - let full_node = polkadot_service::build_full( - config, - polkadot_service::IsCollator::Yes(collator.collator_key()), - None, - false, - None, - None, - false, - polkadot_service::RealOverseerGen, - None, - None, - ) - .map_err(|e| e.to_string())?; - let mut overseer_handle = full_node - .overseer_handle - .expect("Overseer handle should be initialized for collators"); - - let genesis_head_hex = - format!("0x{:?}", HexDisplay::from(&collator.genesis_head())); - let validation_code_hex = - format!("0x{:?}", HexDisplay::from(&collator.validation_code())); - - let para_id = - cli.run.parachain_id.map(ParaId::from).unwrap_or(DEFAULT_PARA_ID); - - log::info!("Running adder collator for parachain id: {}", para_id); - log::info!("Genesis state: {}", genesis_head_hex); - log::info!("Validation code: {}", validation_code_hex); - - let config = CollationGenerationConfig { - key: collator.collator_key(), - collator: collator - .create_collation_function(full_node.task_manager.spawn_handle()), - para_id, - }; - overseer_handle - .send_msg(CollationGenerationMessage::Initialize(config), "Collator") - .await; - - overseer_handle - .send_msg(CollatorProtocolMessage::CollateOn(para_id), "Collator") - .await; - - Ok(full_node.task_manager) - }, - } + let collator = Collator::new(); + + let full_node = polkadot_service::build_full( + config, + polkadot_service::IsCollator::Yes(collator.collator_key()), + None, + false, + None, + None, + false, + polkadot_service::RealOverseerGen, + None, + None, + ) + .map_err(|e| e.to_string())?; + let mut overseer_handle = full_node + .overseer_handle + .expect("Overseer handle should be initialized for collators"); + + let genesis_head_hex = + format!("0x{:?}", HexDisplay::from(&collator.genesis_head())); + let validation_code_hex = + format!("0x{:?}", HexDisplay::from(&collator.validation_code())); + + let para_id = cli.run.parachain_id.map(ParaId::from).unwrap_or(DEFAULT_PARA_ID); + + log::info!("Running adder collator for parachain id: {}", para_id); + log::info!("Genesis state: {}", genesis_head_hex); + log::info!("Validation code: {}", validation_code_hex); + + let config = CollationGenerationConfig { + key: collator.collator_key(), + collator: collator + .create_collation_function(full_node.task_manager.spawn_handle()), + para_id, + }; + overseer_handle + .send_msg(CollationGenerationMessage::Initialize(config), "Collator") + .await; + + overseer_handle + .send_msg(CollatorProtocolMessage::CollateOn(para_id), "Collator") + .await; + + Ok(full_node.task_manager) }) }, }?; diff --git a/parachain/test-parachains/undying/collator/src/main.rs b/parachain/test-parachains/undying/collator/src/main.rs index 65e97f34f695..2f7d683400ad 100644 --- a/parachain/test-parachains/undying/collator/src/main.rs +++ b/parachain/test-parachains/undying/collator/src/main.rs @@ -20,7 +20,7 @@ use polkadot_cli::{Error, Result}; use polkadot_node_primitives::CollationGenerationConfig; use polkadot_node_subsystem::messages::{CollationGenerationMessage, CollatorProtocolMessage}; use polkadot_primitives::v2::Id as ParaId; -use sc_cli::{Error as SubstrateCliError, Role, SubstrateCli}; +use sc_cli::{Error as SubstrateCliError, SubstrateCli}; use sp_core::hexdisplay::HexDisplay; use test_parachain_undying_collator::Collator; @@ -54,58 +54,51 @@ fn main() -> Result<()> { })?; runner.run_node_until_exit(|config| async move { - let role = config.role.clone(); - - match role { - Role::Light => Err("Light client not supported".into()), - _ => { - let collator = Collator::new(cli.run.pov_size, cli.run.pvf_complexity); - - let full_node = polkadot_service::build_full( - config, - polkadot_service::IsCollator::Yes(collator.collator_key()), - None, - false, - None, - None, - false, - polkadot_service::RealOverseerGen, - None, - None, - ) - .map_err(|e| e.to_string())?; - let mut overseer_handle = full_node - .overseer_handle - .expect("Overseer handle should be initialized for collators"); - - let genesis_head_hex = - format!("0x{:?}", HexDisplay::from(&collator.genesis_head())); - let validation_code_hex = - format!("0x{:?}", HexDisplay::from(&collator.validation_code())); - - let para_id = ParaId::from(cli.run.parachain_id); - - log::info!("Running `Undying` collator for parachain id: {}", para_id); - log::info!("Genesis state: {}", genesis_head_hex); - log::info!("Validation code: {}", validation_code_hex); - - let config = CollationGenerationConfig { - key: collator.collator_key(), - collator: collator - .create_collation_function(full_node.task_manager.spawn_handle()), - para_id, - }; - overseer_handle - .send_msg(CollationGenerationMessage::Initialize(config), "Collator") - .await; - - overseer_handle - .send_msg(CollatorProtocolMessage::CollateOn(para_id), "Collator") - .await; - - Ok(full_node.task_manager) - }, - } + let collator = Collator::new(cli.run.pov_size, cli.run.pvf_complexity); + + let full_node = polkadot_service::build_full( + config, + polkadot_service::IsCollator::Yes(collator.collator_key()), + None, + false, + None, + None, + false, + polkadot_service::RealOverseerGen, + None, + None, + ) + .map_err(|e| e.to_string())?; + let mut overseer_handle = full_node + .overseer_handle + .expect("Overseer handle should be initialized for collators"); + + let genesis_head_hex = + format!("0x{:?}", HexDisplay::from(&collator.genesis_head())); + let validation_code_hex = + format!("0x{:?}", HexDisplay::from(&collator.validation_code())); + + let para_id = ParaId::from(cli.run.parachain_id); + + log::info!("Running `Undying` collator for parachain id: {}", para_id); + log::info!("Genesis state: {}", genesis_head_hex); + log::info!("Validation code: {}", validation_code_hex); + + let config = CollationGenerationConfig { + key: collator.collator_key(), + collator: collator + .create_collation_function(full_node.task_manager.spawn_handle()), + para_id, + }; + overseer_handle + .send_msg(CollationGenerationMessage::Initialize(config), "Collator") + .await; + + overseer_handle + .send_msg(CollatorProtocolMessage::CollateOn(para_id), "Collator") + .await; + + Ok(full_node.task_manager) }) }, }?; From 9804117d3e676aace31ed39569a4e6aec75956de Mon Sep 17 00:00:00 2001 From: Muharem Ismailov Date: Thu, 21 Jul 2022 13:50:00 +0200 Subject: [PATCH 15/15] westend xcm: collectives parachain is trusted teleporter (#5798) --- runtime/westend/src/xcm_config.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/runtime/westend/src/xcm_config.rs b/runtime/westend/src/xcm_config.rs index cb1d382980b4..867bdb2cacf3 100644 --- a/runtime/westend/src/xcm_config.rs +++ b/runtime/westend/src/xcm_config.rs @@ -76,14 +76,20 @@ pub type XcmRouter = ( parameter_types! { pub const Westmint: MultiLocation = Parachain(1000).into(); pub const Encointer: MultiLocation = Parachain(1001).into(); + pub const Collectives: MultiLocation = Parachain(1002).into(); pub const WestendForWestmint: (MultiAssetFilter, MultiLocation) = (Wild(AllOf { fun: WildFungible, id: Concrete(WndLocation::get()) }), Westmint::get()); pub const WestendForEncointer: (MultiAssetFilter, MultiLocation) = (Wild(AllOf { fun: WildFungible, id: Concrete(WndLocation::get()) }), Encointer::get()); + pub const WestendForCollectives: (MultiAssetFilter, MultiLocation) = + (Wild(AllOf { fun: WildFungible, id: Concrete(WndLocation::get()) }), Collectives::get()); pub const MaxInstructions: u32 = 100; } -pub type TrustedTeleporters = - (xcm_builder::Case, xcm_builder::Case); +pub type TrustedTeleporters = ( + xcm_builder::Case, + xcm_builder::Case, + xcm_builder::Case, +); /// The barriers one of which must be passed for an XCM message to be executed. pub type Barrier = (