Skip to content

Commit

Permalink
Fix Validator For Spadina (prysmaticlabs#7314)
Browse files Browse the repository at this point in the history
* fix commands
* Merge refs/heads/master into fixSpadina
  • Loading branch information
nisdas authored Sep 23, 2020
1 parent 1ce7cd5 commit 49ae42c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
4 changes: 2 additions & 2 deletions shared/featureconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func ConfigureBeaconChain(ctx *cli.Context) {
params.UseOnyxNetworkConfig()
cfg.OnyxTestnet = true
}
if ctx.Bool(spadinaTestnet.Name) {
if ctx.Bool(SpadinaTestnet.Name) {
log.Warn("Running Node on Spadina Testnet")
params.UseSpadinaConfig()
params.UseSpadinaNetworkConfig()
Expand Down Expand Up @@ -309,7 +309,7 @@ func ConfigureValidator(ctx *cli.Context) {
params.UseOnyxNetworkConfig()
cfg.OnyxTestnet = true
}
if ctx.Bool(spadinaTestnet.Name) {
if ctx.Bool(SpadinaTestnet.Name) {
log.Warn("Running Node on Spadina Testnet")
params.UseSpadinaConfig()
params.UseSpadinaNetworkConfig()
Expand Down
7 changes: 4 additions & 3 deletions shared/featureconfig/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ var (
Name: "onyx",
Usage: "This defines the flag through which we can run on the Onyx Prysm Testnet",
}
spadinaTestnet = &cli.BoolFlag{
// SpadinaTestnet flag for the multiclient eth2 devnet.
SpadinaTestnet = &cli.BoolFlag{
Name: "spadina",
Usage: "This defines the flag through which we can run on the Spadina Multiclient Testnet",
}
Expand Down Expand Up @@ -656,7 +657,7 @@ var ValidatorFlags = append(deprecatedFlags, []cli.Flag{
waitForSyncedFlag,
AltonaTestnet,
OnyxTestnet,
spadinaTestnet,
SpadinaTestnet,
disableAccountsV2,
enableBlst,
}...)
Expand Down Expand Up @@ -697,7 +698,7 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
disableNewBeaconStateLocks,
AltonaTestnet,
OnyxTestnet,
spadinaTestnet,
SpadinaTestnet,
disableBatchBlockVerify,
initSyncVerbose,
disableFinalizedDepositsCache,
Expand Down
11 changes: 10 additions & 1 deletion validator/accounts/v2/cmd_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ this command outputs a deposit data string which is required to become a validat
flags.WalletPasswordFileFlag,
flags.AccountPasswordFileFlag,
flags.NumAccountsFlag,
flags.DeprecatedPasswordsDirFlag,
featureconfig.AltonaTestnet,
featureconfig.OnyxTestnet,
flags.DeprecatedPasswordsDirFlag,
featureconfig.SpadinaTestnet,
},
Action: func(cliCtx *cli.Context) error {
featureconfig.ConfigureValidator(cliCtx)
Expand All @@ -48,6 +49,7 @@ this command outputs a deposit data string which is required to become a validat
flags.DeletePublicKeysFlag,
featureconfig.AltonaTestnet,
featureconfig.OnyxTestnet,
featureconfig.SpadinaTestnet,
},
Action: func(cliCtx *cli.Context) error {
featureconfig.ConfigureValidator(cliCtx)
Expand All @@ -66,6 +68,7 @@ this command outputs a deposit data string which is required to become a validat
flags.ShowDepositDataFlag,
featureconfig.AltonaTestnet,
featureconfig.OnyxTestnet,
featureconfig.SpadinaTestnet,
flags.DeprecatedPasswordsDirFlag,
},
Action: func(cliCtx *cli.Context) error {
Expand All @@ -90,6 +93,7 @@ this command outputs a deposit data string which is required to become a validat
flags.BackupPasswordFile,
featureconfig.AltonaTestnet,
featureconfig.OnyxTestnet,
featureconfig.SpadinaTestnet,
},
Action: func(cliCtx *cli.Context) error {
featureconfig.ConfigureValidator(cliCtx)
Expand All @@ -110,6 +114,7 @@ this command outputs a deposit data string which is required to become a validat
flags.ImportPrivateKeyFileFlag,
featureconfig.AltonaTestnet,
featureconfig.OnyxTestnet,
featureconfig.SpadinaTestnet,
flags.DeprecatedPasswordsDirFlag,
},
Action: func(cliCtx *cli.Context) error {
Expand All @@ -136,6 +141,7 @@ this command outputs a deposit data string which is required to become a validat
flags.GrpcRetryDelayFlag,
featureconfig.AltonaTestnet,
featureconfig.OnyxTestnet,
featureconfig.SpadinaTestnet,
},
Action: func(cliCtx *cli.Context) error {
featureconfig.ConfigureValidator(cliCtx)
Expand All @@ -161,6 +167,9 @@ this command outputs a deposit data string which is required to become a validat
flags.DepositPublicKeysFlag,
flags.SkipDepositConfirmationFlag,
flags.DepositAllAccountsFlag,
featureconfig.AltonaTestnet,
featureconfig.OnyxTestnet,
featureconfig.SpadinaTestnet,
},
Action: func(cliCtx *cli.Context) error {
featureconfig.ConfigureValidator(cliCtx)
Expand Down
6 changes: 6 additions & 0 deletions validator/accounts/v2/cmd_wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ var WalletCommands = &cli.Command{
flags.WalletPasswordFileFlag,
featureconfig.AltonaTestnet,
featureconfig.OnyxTestnet,
featureconfig.SpadinaTestnet,
flags.DeprecatedPasswordsDirFlag,
},
Action: func(cliCtx *cli.Context) error {
featureconfig.ConfigureValidator(cliCtx)
if _, err := CreateAndSaveWalletCli(cliCtx); err != nil {
log.Fatalf("Could not create a wallet: %v", err)
}
Expand All @@ -46,9 +48,11 @@ var WalletCommands = &cli.Command{
flags.RemoteSignerCACertPathFlag,
featureconfig.AltonaTestnet,
featureconfig.OnyxTestnet,
featureconfig.SpadinaTestnet,
flags.DeprecatedPasswordsDirFlag,
},
Action: func(cliCtx *cli.Context) error {
featureconfig.ConfigureValidator(cliCtx)
if err := EditWalletConfigurationCli(cliCtx); err != nil {
log.Fatalf("Could not edit wallet configuration: %v", err)
}
Expand All @@ -65,9 +69,11 @@ var WalletCommands = &cli.Command{
flags.NumAccountsFlag,
featureconfig.AltonaTestnet,
featureconfig.OnyxTestnet,
featureconfig.SpadinaTestnet,
flags.DeprecatedPasswordsDirFlag,
},
Action: func(cliCtx *cli.Context) error {
featureconfig.ConfigureValidator(cliCtx)
if err := RecoverWalletCli(cliCtx); err != nil {
log.Fatalf("Could not recover wallet: %v", err)
}
Expand Down

0 comments on commit 49ae42c

Please sign in to comment.