Migrate polkadot-primitives to v6 (#1543)

- Async-backing related primitives are stable `primitives::v6`
- Async-backing API is now part of `api_version(7)`
- It's enabled on Rococo and Westend runtimes

---------

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com>
This commit is contained in:
Chris Sosnin
2023-09-27 13:32:02 +03:00
committed by GitHub
parent 5a2833cceb
commit 7cbe0c76ef
107 changed files with 2410 additions and 2792 deletions
+4 -4
View File
@@ -854,7 +854,7 @@ pub fn new_full<OverseerGenerator: OverseerGen>(
let (collation_req_v1_receiver, cfg) =
IncomingRequest::get_config_receiver(&req_protocol_names);
net_config.add_request_response_protocol(cfg);
let (collation_req_vstaging_receiver, cfg) =
let (collation_req_v2_receiver, cfg) =
IncomingRequest::get_config_receiver(&req_protocol_names);
net_config.add_request_response_protocol(cfg);
let (available_data_req_receiver, cfg) =
@@ -862,7 +862,7 @@ pub fn new_full<OverseerGenerator: OverseerGen>(
net_config.add_request_response_protocol(cfg);
let (statement_req_receiver, cfg) = IncomingRequest::get_config_receiver(&req_protocol_names);
net_config.add_request_response_protocol(cfg);
let (candidate_req_vstaging_receiver, cfg) =
let (candidate_req_v2_receiver, cfg) =
IncomingRequest::get_config_receiver(&req_protocol_names);
net_config.add_request_response_protocol(cfg);
let (dispute_req_receiver, cfg) = IncomingRequest::get_config_receiver(&req_protocol_names);
@@ -1051,10 +1051,10 @@ pub fn new_full<OverseerGenerator: OverseerGen>(
pov_req_receiver,
chunk_req_receiver,
collation_req_v1_receiver,
collation_req_vstaging_receiver,
collation_req_v2_receiver,
available_data_req_receiver,
statement_req_receiver,
candidate_req_vstaging_receiver,
candidate_req_v2_receiver,
dispute_req_receiver,
registry: prometheus_registry.as_ref(),
spawner,
+8 -10
View File
@@ -28,7 +28,7 @@ use polkadot_node_core_dispute_coordinator::Config as DisputeCoordinatorConfig;
use polkadot_node_network_protocol::{
peer_set::PeerSetProtocolNames,
request_response::{
v1 as request_v1, vstaging as request_vstaging, IncomingRequestReceiver, ReqProtocolNames,
v1 as request_v1, v2 as request_v2, IncomingRequestReceiver, ReqProtocolNames,
},
};
#[cfg(any(feature = "malus", test))]
@@ -104,17 +104,15 @@ where
pub chunk_req_receiver: IncomingRequestReceiver<request_v1::ChunkFetchingRequest>,
/// Collations request receiver for network protocol v1.
pub collation_req_v1_receiver: IncomingRequestReceiver<request_v1::CollationFetchingRequest>,
/// Collations request receiver for network protocol vstaging.
pub collation_req_vstaging_receiver:
IncomingRequestReceiver<request_vstaging::CollationFetchingRequest>,
/// Collations request receiver for network protocol v2.
pub collation_req_v2_receiver: IncomingRequestReceiver<request_v2::CollationFetchingRequest>,
/// Receiver for available data requests.
pub available_data_req_receiver:
IncomingRequestReceiver<request_v1::AvailableDataFetchingRequest>,
/// Receiver for incoming large statement requests.
pub statement_req_receiver: IncomingRequestReceiver<request_v1::StatementFetchingRequest>,
/// Receiver for incoming candidate requests.
pub candidate_req_vstaging_receiver:
IncomingRequestReceiver<request_vstaging::AttestedCandidateRequest>,
pub candidate_req_v2_receiver: IncomingRequestReceiver<request_v2::AttestedCandidateRequest>,
/// Receiver for incoming disputes.
pub dispute_req_receiver: IncomingRequestReceiver<request_v1::DisputeRequest>,
/// Prometheus registry, commonly used for production systems, less so for test.
@@ -158,10 +156,10 @@ pub fn prepared_overseer_builder<Spawner, RuntimeClient>(
pov_req_receiver,
chunk_req_receiver,
collation_req_v1_receiver,
collation_req_vstaging_receiver,
collation_req_v2_receiver,
available_data_req_receiver,
statement_req_receiver,
candidate_req_vstaging_receiver,
candidate_req_v2_receiver,
dispute_req_receiver,
registry,
spawner,
@@ -288,7 +286,7 @@ where
peer_id: network_service.local_peer_id(),
collator_pair,
request_receiver_v1: collation_req_v1_receiver,
request_receiver_vstaging: collation_req_vstaging_receiver,
request_receiver_v2: collation_req_v2_receiver,
metrics: Metrics::register(registry)?,
},
IsParachainNode::FullNode => ProtocolSide::None,
@@ -309,7 +307,7 @@ where
.statement_distribution(StatementDistributionSubsystem::new(
keystore.clone(),
statement_req_receiver,
candidate_req_vstaging_receiver,
candidate_req_v2_receiver,
Metrics::register(registry)?,
rand::rngs::StdRng::from_entropy(),
))