Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve validator UX #4558

Merged
merged 1 commit into from
Sep 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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