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

removing show deposit data flag #13618

Merged
merged 6 commits into from
Feb 15, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/validator/accounts/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ var Commands = &cli.Command{
Flags: cmd.WrapFlags([]cli.Flag{
flags.WalletDirFlag,
flags.WalletPasswordFileFlag,
flags.ShowDepositDataFlag,
flags.ShowPrivateKeysFlag,
flags.ListValidatorIndices,
flags.BeaconRPCProviderFlag,
Expand Down
3 changes: 0 additions & 3 deletions cmd/validator/accounts/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ func accountsList(c *cli.Context) error {
accounts.WithBeaconRESTApiProvider(c.String(flags.BeaconRESTApiProviderFlag.Name)),
accounts.WithGRPCHeaders(grpcHeaders),
}
if c.IsSet(flags.ShowDepositDataFlag.Name) {
opts = append(opts, accounts.WithShowDepositData())
}
if c.IsSet(flags.ShowPrivateKeysFlag.Name) {
opts = append(opts, accounts.WithShowPrivateKeys())
}
Expand Down
7 changes: 1 addition & 6 deletions cmd/validator/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,7 @@ var (
Name: "mnemonic-language",
Usage: "Allows specifying mnemonic language. Supported languages are: english|chinese_traditional|chinese_simplified|czech|french|japanese|korean|italian|spanish.",
}
// ShowDepositDataFlag for accounts.
ShowDepositDataFlag = &cli.BoolFlag{
Name: "show-deposit-data",
Usage: "Displays raw eth1 tx deposit data for validator accounts.",
Value: false,
}

// ShowPrivateKeysFlag for accounts.
ShowPrivateKeysFlag = &cli.BoolFlag{
Name: "show-private-keys",
Expand Down
1 change: 0 additions & 1 deletion validator/accounts/accounts_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ func (acm *CLIManager) List(ctx context.Context) error {
}
return acm.keymanager.ListKeymanagerAccounts(ctx,
keymanager.ListKeymanagerAccountConfig{
ShowDepositData: acm.showDepositData,
ShowPrivateKeys: acm.showPrivateKeys,
WalletAccountsDir: acm.wallet.AccountsDir(),
KeymanagerConfigFileName: wallet.KeymanagerConfigFileName,
Expand Down
9 changes: 1 addition & 8 deletions validator/accounts/accounts_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ func TestListAccounts_LocalKeymanager(t *testing.T) {
t,
km.ListKeymanagerAccounts(cliCtx.Context,
keymanager.ListKeymanagerAccountConfig{
ShowDepositData: true,
ShowPrivateKeys: true,
}),
)
Expand All @@ -190,44 +189,38 @@ func TestListAccounts_LocalKeymanager(t *testing.T) {
(keymanager kind) local wallet

Showing 5 validator accounts
View the eth1 deposit transaction data for your accounts by running `validator accounts list --show-deposit-data

Account 0 | fully-evolving-fawn
[validating public key] 0xa6669aa0381c06470b9a6faf8abf4194ad5148a62e461cbef5a6bc4d292026f58b992c4cf40e50552d301cef19da75b9
[validating private key] 0x50cabc13435fcbde9d240fe720aff84f8557a6c1c445211b904f1a9620668241
If you imported your account coming from the Ethereum launchpad, you will find your deposit_data.json in the eth2.0-deposit-cli's validator_keys folder


Account 1 | preferably-mighty-heron
[validating public key] 0xa7ea37fa2e2272762ffed8486f09b13cd56d76cf03a2a3e75bc36bd1719add84c20597671750be5bc1ccd3dadfebc30f
[validating private key] 0x44563da0d11bc6a7219d18217cce8cdd064de3ebee5cdcf8d901c2fae7545116
If you imported your account coming from the Ethereum eth2 launchpad, you will find your deposit_data.json in the eth2.0-deposit-cli's validator_keys folder


Account 2 | conversely-good-monitor
[validating public key] 0xa4c63619fb8cb87f6dd1686c9255f99c68066797bf284488ecbab64b1926d33eefdf96d1ee89ae4a89e84e7fb019d5e5
[validating private key] 0x4448d0ab17ecd73bbb636ddbfc89b181731f6cd88c33f2cecc0d04cba1a18447
If you imported your account coming from the Ethereum eth2 launchpad, you will find your deposit_data.json in the eth2.0-deposit-cli's validator_keys folder


Account 3 | rarely-joint-mako
[validating public key] 0x91dd8d5bfc22aea398740ebcea66ced159df8d3f1a066d7aba9f0bef4ed6d9687fc1fd1c87bd2b6d12b0788dfb6a7d20
[validating private key] 0x4d1944bd7375185f70b3e70c68d9e6307f2009de3a4cf47ca5217443ddf81fc9
If you imported your account coming from the Ethereum eth2 launchpad, you will find your deposit_data.json in the eth2.0-deposit-cli's validator_keys folder


Account 4 | mainly-useful-catfish
[validating public key] 0x83c4d722a98b599e2666bbe35146ff44800256190bc662f2dd5efbc0c4c0d57e5d297487a4f9c21a932d3b1b40e8379f
[validating private key] 0x284cd65030496bf82ee2d52963cd540a1abb2cc738b8164901bbe7e2df4d57bd
If you imported your account coming from the Ethereum eth2 launchpad, you will find your deposit_data.json in the eth2.0-deposit-cli's validator_keys folder



*/

// Expected output format definition
const prologLength = 4
const accountLength = 6
const accountLength = 4
const epilogLength = 2
const nameOffset = 1
const keyOffset = 2
Expand Down
1 change: 0 additions & 1 deletion validator/accounts/cli_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ type CLIManager struct {
wallet *wallet.Wallet
keymanager keymanager.IKeymanager
keymanagerKind keymanager.Kind
showDepositData bool
showPrivateKeys bool
listValidatorIndices bool
deletePublicKeys bool
Expand Down
8 changes: 0 additions & 8 deletions validator/accounts/cli_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ func WithKeymanagerType(k keymanager.Kind) Option {
}
}

// WithShowDepositData enables displaying deposit data in the accounts cli manager.
func WithShowDepositData() Option {
return func(acc *CLIManager) error {
acc.showDepositData = true
return nil
}
}

// WithShowPrivateKeys enables displaying private keys in the accounts cli manager.
func WithShowPrivateKeys() Option {
return func(acc *CLIManager) error {
Expand Down
9 changes: 0 additions & 9 deletions validator/keymanager/local/keymanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,15 +427,6 @@ func (km *Keymanager) ListKeymanagerAccounts(ctx context.Context, cfg keymanager
fmt.Printf("%s %#x\n", au.BrightRed("[validating private key]").Bold(), privateKeys[i])
}
}
if !cfg.ShowDepositData {
continue
}
fmt.Printf(
"%s\n",
au.BrightRed("If you imported your account coming from the eth2 launchpad, you will find your "+
"deposit_data.json in the eth2.0-deposit-cli's validator_keys folder"),
)
fmt.Println("")
}
fmt.Println("")
return nil
Expand Down
1 change: 0 additions & 1 deletion validator/keymanager/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ type PublicKeyDeleter interface {
}

type ListKeymanagerAccountConfig struct {
ShowDepositData bool
ShowPrivateKeys bool
WalletAccountsDir string
KeymanagerConfigFileName string
Expand Down
Loading