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

--reuse-password fails to check if the reused password is correct #4364

Closed
remyroy opened this issue Jun 1, 2023 · 2 comments
Closed

--reuse-password fails to check if the reused password is correct #4364

remyroy opened this issue Jun 1, 2023 · 2 comments

Comments

@remyroy
Copy link
Contributor

remyroy commented Jun 1, 2023

Description

When using the account validator import command with --reuse-password flag, the password will be reused and the keystores will be imported even if the password is wrong after the first successful keystore import.

Version

Lighthouse v4.2.0-c547a11 (from v4.2.0 stable release on Ubuntu 22.04)

Present Behaviour

If you create multiple keystores with different passwords and import them all with a command like:

sudo ./lighthouse account validator import --reuse-password \
    --directory /home/remyroy/staking_deposit-cli-d7b5304-linux-amd64/validator_keys \
    --datadir /var/lib/lighthouse \
    --network mainnet

it will prompt for the first keystore password and if that password is correct, the import command will import all the keystores with the same password not matter if the password is correct or not.

Expected Behaviour

The import command should check each keystore to make sure the imported password is correct. If one password check fails, it should prompt for a new password (ideal for most use cases) or stop with an error message.

Steps to resolve

Modify the behavior of the account validator import command with --reuse-password flag to check for each keystore to make sure the password is working and prompt for a new password if not.

@remyroy
Copy link
Contributor Author

remyroy commented Jun 6, 2023

As a comparison, Nimbus will keep reusing the last entered password as long as it's the correct password when importing keystores. If it fails to decrypt the keystore, it will prompt for a new password and it will keep reusing it as long as it is the correct password. That behavior seems the be a good and efficient way to import a random list of keystores in an interactive way.

@chong-he
Copy link
Member

Closed by #4380

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants