Skip to content

Commit f6d66db

Browse files
tomakamxinden
andauthored
Add a warning if users pass --sentry or --sentry-nodes (paritytech#6779)
* Add a warning if users pass --sentry or --sentry-nodes * Apply suggestions from code review Co-authored-by: Max Inden <[email protected]> * Fix text Co-authored-by: parity-processbot <> Co-authored-by: Max Inden <[email protected]>
1 parent d7979d0 commit f6d66db

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

client/network/src/service.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,21 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkWorker<B, H> {
180180
known_addresses.push((reserved.peer_id.clone(), reserved.multiaddr.clone()));
181181
}
182182

183+
let print_deprecated_message = match &params.role {
184+
Role::Sentry { .. } => true,
185+
Role::Authority { sentry_nodes } if !sentry_nodes.is_empty() => true,
186+
_ => false,
187+
};
188+
if print_deprecated_message {
189+
log::warn!(
190+
"🙇 Sentry nodes are deprecated, and the `--sentry` and `--sentry-nodes` \
191+
CLI options will eventually be removed in a future version. The Substrate \
192+
and Polkadot networking protocol require validators to be \
193+
publicly-accessible. Please do not block access to your validator nodes. \
194+
For details, see https://github.com/paritytech/substrate/issues/6845."
195+
);
196+
}
197+
183198
let mut sentries_and_validators = HashSet::new();
184199
match &params.role {
185200
Role::Sentry { validators } => {

0 commit comments

Comments
 (0)