Skip to content
Snippets Groups Projects
Commit 2194b957 authored by Aaro Altonen's avatar Aaro Altonen Committed by GitHub
Browse files

Disable validation/collation protocols for normal full nodes (#7601)

If authority discovery is not enabled, `Overseer` is not enabled,
meaning `NetworkBridge` is not started. Validation/collation protocols
are, however, enabled even if the `NetworkBridge` is not started.

Currently this results in normal Polkadot full nodes advertising these
protocols, accepting inbound substreams and even establishing outbound
substreams for the validation protocol. Since the `NetworkBridge` is
not started and no protocol in Substrate is interested in these
protocol events, the events are relayed to all protocol handlers but
are getting discarded because no installed protocol is interested in them.

Co-authored-by: parity-processbot <>
parent 342d7205
Branches
No related merge requests found
......@@ -828,10 +828,11 @@ pub fn new_full<OverseerGenerator: OverseerGen>(
net_config.add_request_response_protocol(beefy_req_resp_cfg);
}
// validation/collation protocols are enabled only if `Overseer` is enabled
let peerset_protocol_names =
PeerSetProtocolNames::new(genesis_hash, config.chain_spec.fork_id());
{
if auth_or_collator || overseer_enable_anyways {
use polkadot_network_bridge::{peer_sets_info, IsAuthority};
let is_authority = if role.is_authority() { IsAuthority::Yes } else { IsAuthority::No };
for config in peer_sets_info(is_authority, &peerset_protocol_names) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment