Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Disable validation/collation protocols for normal full nodes (#7601)
Browse files Browse the repository at this point in the history
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 <>
  • Loading branch information
altonen authored Aug 14, 2023
1 parent 247e4a7 commit 1a50cb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1a50cb1

Please sign in to comment.