From 648ab9f2c249f1d06d0aad4328e8df429ceaf66c Mon Sep 17 00:00:00 2001 From: james-prysm <90280386+james-prysm@users.noreply.github.com> Date: Mon, 24 Oct 2022 22:52:30 -0500 Subject: [PATCH] revert moving validator-exit command (#11575) --- cmd/validator/accounts/accounts.go | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/cmd/validator/accounts/accounts.go b/cmd/validator/accounts/accounts.go index d6add8f797a7..7f9ee3aa2888 100644 --- a/cmd/validator/accounts/accounts.go +++ b/cmd/validator/accounts/accounts.go @@ -1,6 +1,8 @@ package accounts import ( + "os" + "github.com/prysmaticlabs/prysm/v3/cmd" "github.com/prysmaticlabs/prysm/v3/cmd/validator/flags" "github.com/prysmaticlabs/prysm/v3/config/features" @@ -148,5 +150,47 @@ var Commands = &cli.Command{ return nil }, }, + { + Name: "voluntary-exit", + Description: "Performs a voluntary exit on selected accounts", + Flags: cmd.WrapFlags([]cli.Flag{ + flags.WalletDirFlag, + flags.WalletPasswordFileFlag, + flags.AccountPasswordFileFlag, + flags.VoluntaryExitPublicKeysFlag, + flags.BeaconRPCProviderFlag, + flags.Web3SignerURLFlag, + flags.Web3SignerPublicValidatorKeysFlag, + flags.InteropNumValidators, + flags.InteropStartIndex, + cmd.GrpcMaxCallRecvMsgSizeFlag, + flags.CertFlag, + flags.GrpcHeadersFlag, + flags.GrpcRetriesFlag, + flags.GrpcRetryDelayFlag, + flags.ExitAllFlag, + features.Mainnet, + features.PraterTestnet, + features.RopstenTestnet, + features.SepoliaTestnet, + cmd.AcceptTosFlag, + }), + Before: func(cliCtx *cli.Context) error { + if err := cmd.LoadFlagsFromConfig(cliCtx, cliCtx.Command.Flags); err != nil { + return err + } + if err := tos.VerifyTosAcceptedOrPrompt(cliCtx); err != nil { + return err + } + return features.ConfigureValidator(cliCtx) + }, + Action: func(cliCtx *cli.Context) error { + log.Info("This command will be deprecated in the future in favor of `prysmctl sign validator-exit`") + if err := AccountsExit(cliCtx, os.Stdin); err != nil { + log.WithError(err).Fatal("Could not perform voluntary exit") + } + return nil + }, + }, }, }