Change validation & collation protocol names to include genesis hash & fork id (#5876)

This commit is contained in:
Dmitry Markin
2022-08-30 19:50:22 +03:00
committed by GitHub
parent 6e04112b93
commit 13ea167bd7
19 changed files with 739 additions and 177 deletions
+11 -2
View File
@@ -46,7 +46,9 @@ use {
self as chain_selection_subsystem, Config as ChainSelectionConfig,
},
polkadot_node_core_dispute_coordinator::Config as DisputeCoordinatorConfig,
polkadot_node_network_protocol::request_response::ReqProtocolNames,
polkadot_node_network_protocol::{
peer_set::PeerSetProtocolNames, request_response::ReqProtocolNames,
},
polkadot_overseer::BlockInfo,
sc_client_api::{BlockBackend, ExecutorProvider},
sp_core::traits::SpawnNamed,
@@ -852,10 +854,16 @@ where
.push(beefy_gadget::beefy_peers_set_config(beefy_protocol_name.clone()));
}
let peerset_protocol_names =
PeerSetProtocolNames::new(genesis_hash, config.chain_spec.fork_id());
{
use polkadot_network_bridge::{peer_sets_info, IsAuthority};
let is_authority = if role.is_authority() { IsAuthority::Yes } else { IsAuthority::No };
config.network.extra_sets.extend(peer_sets_info(is_authority));
config
.network
.extra_sets
.extend(peer_sets_info(is_authority, &peerset_protocol_names));
}
let req_protocol_names = ReqProtocolNames::new(&genesis_hash, config.chain_spec.fork_id());
@@ -1063,6 +1071,7 @@ where
pvf_checker_enabled,
overseer_message_channel_capacity_override,
req_protocol_names,
peerset_protocol_names,
},
)
.map_err(|e| {