namada
namada copied to clipboard
Do not overwrite genesis validator keys is they alreay exist
Currently running init-genesis-validator
of namada client cli overwrites existing keys with newly generated ones without any prompts.
It would be great to add some kind of prompt if validator-wallet.toml
already exist.
Better, as this will save my time
From my understanding, if validator-wallet.toml
exists, a prompt should be made to tell the end user that that file would be overwritten. After scanning through the repository, I think the issue is from the function gen_and_store
https://github.com/anoma/namada/blob/d649d0484f5d8ae003a00e530e1ed2ca17978f9c/apps/src/lib/wallet/pre_genesis.rs#L27-L46 Specifically this line: https://github.com/anoma/namada/blob/d649d0484f5d8ae003a00e530e1ed2ca17978f9c/apps/src/lib/wallet/pre_genesis.rs#L41
Solution would could be to issue a prompt using a log
library or simply println
.
The time frame for implementing this solution is less that a minute. Most of the time taken was to find the offending method.
I'll go ahead now and write the fix