From 043086081fefad756700edfa9c68b917eadd6151 Mon Sep 17 00:00:00 2001 From: behzad nouri Date: Fri, 11 Mar 2022 14:15:05 +0000 Subject: [PATCH] checks if --entrypoint is consistent with --allow-private-addr (#23559) If entrypoints are excluded by SocketAddrSpace, the node cannot start. Private --entrypoint addresses require --allow-private-addr. --- validator/src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/validator/src/main.rs b/validator/src/main.rs index 4996358024..c83c907124 100644 --- a/validator/src/main.rs +++ b/validator/src/main.rs @@ -2114,6 +2114,12 @@ pub fn main() { .collect::>() .into_iter() .collect::>(); + for addr in &entrypoint_addrs { + if !socket_addr_space.check(addr) { + eprintln!("invalid entrypoint address: {}", addr); + exit(1); + } + } // TODO: Once entrypoints are updated to return shred-version, this should // abort if it fails to obtain a shred-version, so that nodes always join // gossip with a valid shred-version. The code to adopt entrypoint shred