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

[Bug] wallet recover / rebuild should not write keys to disk until all keys have been recovered. #407

Open
jshufro opened this issue Nov 20, 2023 · 0 comments

Comments

@jshufro
Copy link
Contributor

jshufro commented Nov 20, 2023

Assume I have 9 minipools, 5 leb8s and then 1 leb8 which was a 0x00 solo validator i converted followed by 3 leb 8s from credit.

If I run rocketpool wallet recover or rocketpool wallet rebuild now, I believe the behavior will recover the first 5 keys, and then fail unless I've already imported my solo key.

Unfortunately, I'll have 5 out of 8 of the keys that I can recover in my wallet, which is a bit of a POLA violation.

Instead, smartnode should fail fully- if all keys can't be recovered, none are.

Additionally, it should have a new flag --allow-partial-recover or something that overrides this behavior, and recovers as many keys as it can (critically, after the failure, it should keep trying to recover subsequent keys).

Edit:

The response must inform the user which pubkeys were successfully recovered, and which were not, in the case of --allow-partial-recover.

If --allow-partial-recover is not passed, and recovery fails on iterating to the limit, we should ask the user if they did a solo migration and remind them that they must deal with the solo validator's keys manually, and keep them securely backed up, as they will not be recoverable by the node wallet's mnemonic.

Additionally, we should update rocketpool wallet test-recovery to be very verbose when recovery fails- which validators keys were successfully recovered, which failed to be recovered, which (if any) were imported from custom_keys. test-recovery should also take the opportunity, should it find any custom_keys, to provide a similar admonition about backing up the imported key.

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

1 participant