Skip to content

Commit

Permalink
Improve validator UX (#4558)
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Sep 17, 2022
1 parent 342e231 commit aa1af04
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions packages/cli/src/cmds/validator/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ export async function validatorHandler(args: IValidatorCliArgs & IGlobalArgs): P
// Ensure the validator has at least one key
if (signers.length === 0) {
if (args["keymanager"]) {
logger.warn("No signers found with current args, expecting to be added via keymanager");
logger.warn("No local keystores or remote signers found with current args, expecting to be added via keymanager");
} else {
throw new YargsError("No signers found with current args");
throw new YargsError(
"No local keystores and remote signers found with current args, start with --keymanager if intending to add them later (via keymanager)"
);
}
}

Expand Down
6 changes: 3 additions & 3 deletions packages/validator/src/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ export class Validator {
: opts.api;

const genesis = await waitForGenesis(api, opts.logger, opts.abortController.signal);
logger.info("Genesis available");
logger.info("Genesis fetched from the beacon node");

const {data: externalSpecJson} = await api.config.getSpec();
assertEqualParams(config, externalSpecJson);
logger.info("Verified node and validator have same config");
logger.info("Verified connected beacon node and validator have same the config");

await assertEqualGenesis(opts, genesis);
logger.info("Verified node and validator have same genesisValidatorRoot");
logger.info("Verified connected beacon node and validator have the same genesisValidatorRoot");

return new Validator(opts, genesis, metrics);
}
Expand Down

0 comments on commit aa1af04

Please sign in to comment.