Problem
The --ip flag help for ping is misleading:
Operator endpoint(s) to ping (https://host:port). If empty, pings all
operators from operatorsInfo
This implies --ip is primary and --operatorsInfo is a fallback. In
reality, --operatorsInfo (or --operatorsInfoPath) is required for
identity verification; --ip is an optional filter to target a subset of
operators.
Users running ssv-dkg ping --ip https://host:3030 without operatorsInfo
get a runtime error ("operators info should be provided..."). Functional but
confusing — help text doesn't reflect the new requirement introduced in
v3.1.0.
Proposed fixes
1. Update --ip description (cli/flags/healthcheck.go:8)
"Optional filter: specific operator endpoints (https://host:port) to ping. "
"Requires --operatorsInfo or --operatorsInfoPath. "
"If omitted, pings all operators from operatorsInfo."
2. Use cobra's MarkFlagsOneRequired
Move the runtime check to parse-time via cobra:
cmd.MarkFlagsOneRequired("operatorsInfo", "operatorsInfoPath")
cmd.MarkFlagsMutuallyExclusive("operatorsInfo", "operatorsInfoPath")
This replaces the manual check in cli/initiator/initiator_health_check.go
and surfaces the error before the binary does any setup — better UX.
Problem
The
--ipflag help forpingis misleading:This implies
--ipis primary and--operatorsInfois a fallback. Inreality,
--operatorsInfo(or--operatorsInfoPath) is required foridentity verification;
--ipis an optional filter to target a subset ofoperators.
Users running
ssv-dkg ping --ip https://host:3030without operatorsInfoget a runtime error ("operators info should be provided..."). Functional but
confusing — help text doesn't reflect the new requirement introduced in
v3.1.0.
Proposed fixes
1. Update
--ipdescription (cli/flags/healthcheck.go:8)2. Use cobra's
MarkFlagsOneRequiredMove the runtime check to parse-time via cobra:
This replaces the manual check in
cli/initiator/initiator_health_check.goand surfaces the error before the binary does any setup — better UX.